Plotting of Graph using the Color Value
1 回表示 (過去 30 日間)
古いコメントを表示
From the MATLab, I'm able to obtained values based on the color field, e.g. red, yellow,green..etc
However, I need to convert the color code value to graph based on the image shown from A to B.
How do I plot the graph based on the color code (delta vs distance from A to B in pixel or mm)?
Thanks a lot!
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/154117/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/154118/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/154125/image.jpeg)
0 件のコメント
回答 (1 件)
Image Analyst
2013 年 12 月 26 日
It's best if you can just export your image not as a pseudocolor image but as the original grayscale image. That should be possible. If it's not, like you lifted this image off the web or somewhere, then you'll need to convert the colorbar into a colormap. You need to get the center column of the colorbar
theColorBar = rgbImage(100:300, 700, :); % Or whatever numbers locate the colorbar.
and for each color, interpolate its gray value, which will be between 0 and 0.4. Then call rgb2ind() to recover the missing grayscale information.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Colormaps についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!