need help bringing images into matlab

I am trying to import gray scale x-rays into mat lab for object reconstruction. I would really like to import .jpg and have mat lab do the rgb2gray but that doesn't work right. I have open source source code (oscar02) that works with sample data. My x-ray data set generates all sorts of errors. I am somewhat of a beginner and need some help from someone familiar with image formats. I have tried gif, pgm, jpg, tif, 8-bit, 16-bit, 32 bit. My data appears to be identical to sample data set using imfinfo. gray scale images from Photoshop have some success but too labor intensive. After I get the x-rays loaded into the array the code takes the "log" of the image. An error is generated saying that the operation is not valid for uint8 and also for unit16. I tried converting the image to 32bit and I could no longer see anything - it all got washed out looking (white).

Respuestas (1)

Sean de Wolski
Sean de Wolski el 13 de Mzo. de 2012
imshow(your_white_image,[]); %show image over whole range
When you visualize single and double precision images the default viewing range is [0 1], i.e. anything less than 0 is black and anything greater than 1 is white. Hence you see all white since your image was originally uintX.
doc imshow
and
doc imtool
Personally, I use imtool way more often since it has the ability to adjust contrast, measure and other fun stuff. Welcome to MATLAB Answers!

Categorías

Más información sobre Display Image en Centro de ayuda y File Exchange.

Preguntada:

el 13 de Mzo. de 2012

Community Treasure Hunt

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

Start Hunting!

Translated by