image convert question

2 visualizaciones (últimos 30 días)
LIU WEIHUA
LIU WEIHUA el 18 de Feb. de 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

Respuesta aceptada

Image Analyst
Image Analyst el 18 de Feb. de 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()!

Más respuestas (0)

Categorías

Más información sobre Convert Image Type en Help Center y File Exchange.

Etiquetas

Aún no se han introducido etiquetas.

Community Treasure Hunt

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

Start Hunting!

Translated by