how can i show two images with different range with imagesc

5 次查看(过去 30 天)
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 个评论
Adam
Adam 2016-11-8
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
LauraLee Austin 2016-11-8
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.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Modify Image Colors 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by