Dynamic Range of image

Hello guys,
I am really lost on this. Please could someone let me know how could I initiate the plotting of dynamic range of RGB image which will be something similar to this one: http://tinypic.com/view.php?pic=1zexhqs&s=8#.UxGskPldWT8
I really have no idea where to start and so a small push would be very much appreciated.

Answers (1)

Image Analyst
Image Analyst on 1 Mar 2014

0 votes

You have to image something of known percent reflectances, like the x-rite Color Checker chart or similar kinds of gray scale step wedges. Then measure the gray level of each step and plot it versus the "true" value.

7 Comments

I really thought about that and came up with a code which looks logically fine to me but there is something seriously wrong. What do you think could go wrong in here.
RGB2Y = [ 0.2552 1.0834 0];
% get the HDRI data, sensor sensitivity function and illumination information
ldr = double(imread(peppers.png));
% luminance value
lum = ldr(:,:,1)*RGB2Y(1) + ldr(:,:,2)*RGB2Y(2) + ldr(:,:,3)*RGB2Y(3);
% Image dynamic range
DR = max(lum(:))/min(lum(:));
% plotting the log luminance of image versus pixel values to obtan characteristic curve
logLum = log10(lum(:));
pvalue=impixel(logLum);
plot(logLum,pvalue);
xlabel('Log_{10} luminance')
ylabel('pixel value')
That doesn't look logically fine. It's just totally wrong. I do this stuff all the time. That is nothing like what I suggested to you.
mona
mona on 1 Mar 2014
Edited: mona on 1 Mar 2014
If that's the case, then before proceeding to make anymore attempt, I would like to know if there's a different approach to compute the characteristic curve for video which is combination of 40 rgb image frames? I am asking this because this is exactly what I have to do and so I thought I should compute the curve for each frame first and then find the average curve from the group. Do you think that's an appropriate step to begin with?
You can't compute the optoelectronic conversion function simply by reading in some image (like peppers) and applying weights to the different color channels and then taking the log of it. How is that going to tell you how the camera responds to different reflectances? It won't. You have to look at targets of a known reflectance, not some arbitrary image.
mona
mona on 5 Mar 2014
But I have a very basic question here, what do you mean by "true" value? What are these gray levels (0-255) getting plotted against when you're computing the RGB response curve? I have spent much time getting my base right and I would like to know your opinion too. I do understand the characteristic curve computed for different exposure setting which is the camera response curve but what does the meaning of RGB response curve hold in case of an image?
Chams
Chams on 31 Dec 2020
I have the same problem here
Image Analyst
Image Analyst on 31 Dec 2020
Edited: Image Analyst on 31 Dec 2020
Like I said in the original answer you have to use known, true, ground truth reflectance values. These values are supplied in the data sheet that comes with the Color Checker chart, or you can measure them yourself with a trusted instrument such as a calibrated spectrophotometer or colorimeter.
See attached tutorial.

Sign in to comment.

Asked:

on 1 Mar 2014

Edited:

on 31 Dec 2020

Community Treasure Hunt

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

Start Hunting!