Question about Imaging functions
Show older comments
Hi,
I have done some measurement of a light source that I like to display in MATLAB. I want to look at the intensities for each pixel. But I don't understand some of the imaging functions. For example, my image is a 12 bit image.
imshow(my_image) shows the image with no visible coordinate system. Its black and white (the image is in gray scale). It looks very rough. Pixel info shows the coordinate system and the intensity is a value like 3.0E+30 . The label from figure shows [X,Y]:[1200 59], Index 304; [R,G,B]:[1 1 1].
image(my_image) shows just a blue image (I don't see the object ???). Index here is 0,2 to 0,006 something of magnitude.
image(my_image/max(my_image(:))*100) shows a blue, yellow and red image. I see my object. The red and yellow is where I have my object with certain intensity. Max intensity is something like 90, this label shows Index 90.19. I think "my_image/max(my_image(:))*100" is some kind of normalization.
- The question is what is the differencte between these three options?
- Which one is more valid to use in image processing?
The pixel intensitis is calibrated with measured total energy.
For example, I want to display the object in coordinate system showing the size in mrad (the angle). I am using the function imref2d, but when I plot this with imshow all the sudden the index is about 1.7 as max. I am also not sure the angle size is correct, but lets assume it is. I don't understand the "new" pixel value. It wouldn't allow me to plot this with image function.
xWorldLimits = [0 size(bild,2)*alphaPixel];
yWorldLimits = [0 size(bild,1)*alphaPixel];
image_mrad = imref2d(size(my_image),xWorldLimits,yWorldLimits);
hIM5 = imshow(my_image,image_mrad);
What am I doing wrong?
Thankful for any insights!
7 Comments
Guillaume
on 25 May 2018
Before worrying about the display: What format is your image stored in, how is it imported into matlab and what class is your image once imported?
imshow (or imtool) are the proper way to look at images in matlab.
Stephen23
on 25 May 2018
@Susan Lindecrantz PhD: please upload a representative image by clicking the paperclip button.
Guillaume
on 25 May 2018
It looks very rough
I assume you are aware that computer displays are 8-bit (at most), so your image will have been discretised for display only.
Guillaume
on 25 May 2018
No issue with the loading of the image.
How are you imshow'ing the image? And which image are you actually displaying? cdata or uploaded_image?
If you were imshow'ing cdata as you've loaded it, the pixel info tool should be showing intensities in the range [0 1023].
Happy PhD
on 25 May 2018
Happy PhD
on 25 May 2018
Accepted Answer
More Answers (0)
Categories
Find more on Basic Display in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!