image convert question

1 view (last 30 days)
LIU WEIHUA
LIU WEIHUA on 18 Feb 2012
There has an image with name of depthFrame, which can be show by using function imshow(depthFrame []); the value of depthFrame is double with the Min 0 Max 3975; Now I want to show this image on axes object of GUI, however,when I use function image(depthFrame ,'Parent',ax_handles2), it does not help to show on the axes. I think it must be something wrong with range of the value,but I do not know how to convert it. Please help! Thank you very much! PS: when I use data cursor to get the information of the pix, what I get as follow: X:157 Y:89 Index: 1221 RGB: 0.306 0.306 0.306

Accepted Answer

Image Analyst
Image Analyst on 18 Feb 2012
So don't use image(). Use imshow(depthFrame, []) instead. The issue is that if your image is double it's supposed to be in the range 0-1. You can get around that if you use the [] option in imshow. I see no reason to use image() or imagesc() at all, and don't get me started on pcolor()!

More Answers (0)

Tags

No tags entered yet.

Community Treasure Hunt

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

Start Hunting!