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).
답변 (1개)
Sean de Wolski
2012년 3월 13일
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!
카테고리
도움말 센터 및 File Exchange에서 Display Image에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!