Extracting Z values from a colormap given a specified X,Y coordinate range
4 ビュー (過去 30 日間)
古いコメントを表示
For the attached image (concentration.jpg), how would I extract the Z values (concentration values in this case) from the colormap along the line that I have drawn, which has coordinates of (60μm, 120μm) as the starting point and (60μm, -430μm) as the ending point? I have tried using CData to obtain the x,y,z values, but I a bit stuck on how to get the Z values on the line I just defined. The line is in turqouise. Thanks.
0 件のコメント
回答 (1 件)
Walter Roberson
2020 年 9 月 23 日
It looks to me as if that is colormap jet.
ind = rgb2ind(YourRGBImage, jet(256));
relative_intensity = im2double(ind);
concentration = minimum_concentration + relative_intensity * (maximum_concentration - minium_concentration);
concentration will be a 2D map of estimated concentration, same size as the original image. If you want to take a line across it, you can do that with indexing (for vertical or horizontal lines), or with improfile()
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!