How can i observe a 3 dimensional matrix(hdr) using pcolor command?

I have with me,
file={'img1.jpg','img2.jpg','img3.jpg','img4.jpg','img5.jpg'};
hdr = makehdr(file);
hdr is 1728x2592x3 single matrix
I want to display this image file in pseudocolor.
my aim is to get the light intensity values. What shall i do?
Thank you

 Accepted Answer

image(rgb2gray(hdr));
colormap(gray(256))

5 Comments

sir, i tried with this, but i could see only a black screen on the figure window. Another thing is that i am want the actual luminance values from the hdr image. The values that we get from extracting the r, g and b components are the real RGB values..so then how can we use them to find the actual luminance values. Thankyou
It is possible that all of the values are small and so black might be appropriate. You can experiment with
imagesc(rgb2gray(hdr));
colormap(gray(256))
You cannot get "actual" luminance values from RGB values without photometric calibration. rgb2gray() will give you relative luminance, subject to a number of assumptions (assumptions about linearity of the detector, assumptions about relative intensity of spectral bands, assumptions about the lens being linear out to the edge... The assumption of linearity of the detector is especially problematic at low light levels.)
Okay, i can find a calibration factor for the software luminance calculated.And i hope this calibration factor will compensate for all those assumptions and errors. Am i right.
I have another doubt, whether the R G and B pixel values of the hdr=makehdr(file) are linearly proportional to the radiance or light falling on the scene.
It would be more like a calibration curve, not a single factor.
Whether the values are linearly proportional to the radiance or the light falling on the scene is going to depend on what kind of detector you are using. It is not uncommon for detectors to go non-linear at the extreme ends, usually with increased sensitivity in low low light and decreased sensitivity in bright light.
Camera response curve will also work in this regard right. Thankyou for your help

Sign in to comment.

More Answers (0)

Asked:

on 8 Nov 2013

Edited:

on 19 Nov 2013

Community Treasure Hunt

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

Start Hunting!