Extract numeric values ​​from a colormap

Hello everyone
I am trying to extract the numerical values ​​of a variable represented in the following colormap with its respective colorbar (which I also attach in PDF format):
It would be very desirable to be able to create a database based on the spatial deviation from the center of the hexagon along the directions defined by the a1 and a2 vectors as a fraction of a0, being a0 the modulus of the aforementioned vectos:
Any idea?

답변 (1개)

Image Analyst
Image Analyst 2024년 5월 19일
편집: Image Analyst 2024년 5월 19일

0 개 추천

You need to read that colorbar part of the image and then divide by 255.
colorsInBar = rgbImage(row1:row2, col1:col2, :);
[r, g, b] = imsplit(colorsInBar);
cMap = double([r(:), g(:), b(:)]) / 255;
You may be interested to see how I did it for thermal images:
To get the numbers you can use ocr in the Computer Vision Toolbox, but the numbers must be at least 20 pixels high.

카테고리

도움말 센터 및 File Exchange에서 Color and Styling에 대해 자세히 알아보기

질문:

2024년 5월 19일

편집:

2024년 5월 19일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by