image convert question

조회 수: 1 (최근 30일)
LIU WEIHUA
LIU WEIHUA 2012년 2월 18일
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

채택된 답변

Image Analyst
Image Analyst 2012년 2월 18일
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()!

추가 답변 (0개)

태그

아직 태그를 입력하지 않았습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by