how can i show two images with different range with imagesc
1 view (last 30 days)
Show older comments
I have two uint16 images with different range, let's say the one has a range from 0 to 1800 and the other from 0 to 2500. In order to see them I use imagesc but this will make the range between 0 to 65535 to both the images.Because I want to see the difference between them I use
caxis=[0,2500]
to both the images. But when I put a legend in the image the legend in the first image is from 0 to 1800, which means that the range of the shown image has the brighter parts at 1800. What am I doing wrong?
2 Comments
Adam
on 8 Nov 2016
imagesc should automatically scale your plot to the min-max range of the data, bit the data type. So a 0 to 1800 plot should show a colorbar and caxis range that is already 0 to 1800 unless you have a rogue 65535 value in there somewhere as well.
I'm not sure what you mean about the legend. Legends have nothing to do with the color range. Do you mean a colourbar?
LauraLee Austin
on 8 Nov 2016
If you wish to see the differences between the images, why not just subtract one image from the other and display the new image using imagesc.
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!