I've carried out mean of each image and i've determined the highest
mean
from the images. See my code as stated below. However, i've a concern on
how
to determine which of the images gave the highest mean reported. Can anyone
advise me on how to do this. code's below
jpegFiles = dir('*.jpg'); % directory of pictures
for k = 1:length(jpegFiles) % loop to run large number of pictures
filename = jpegFiles(k).name;
data1 = imread(filename);
reddata = data1(:,:,1);
z(k+1) = mean(mean(reddata));
a = max(z) % reports the highest mean
end
look forward to your reply
On Thu, Aug 6, 2009 at 3:58 AM, yrodzii wrote:
> --- In m..., colenajayi@... wrote:
> >
> > I'm working with about 1000 images, which are read into matlab as
matrix.
> But due to variation in the intensity of light(weather condition, AC light)
> during the time the pictures are taken, there is a variation in the pixel
> value reported in the images. I want to make all pictures to have the same
> brightness. This means if I should index the image matrix at a point, all
> the images should have the same value. How can do it? I don't have
image
> processing toolbox, so i depend on writing the code directly into Matlab.
> >
> > look forward to your reply
> >
> One idea is to use the average of all pixels (i.e. mean(your_matrix,3),
> where your matrix is MxNx1000) if this is possible.
>
> On the other hand this fluctuation is normal and might be useful for your
> analysis later.. Just a though!
>
> Another idea is to select the value you want to use and set it for all
> matrices (your_matrix(m,n,:)=n0).
>
> Hope this works...