Extracting Z values from a colormap given a specified X,Y coordinate range

5 visualizzazioni (ultimi 30 giorni)
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.

Risposte (1)

Walter Roberson
Walter Roberson il 23 Set 2020
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()

Categorie

Scopri di più su Colormaps in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by