histogram equalization based on a pixel region
7 views (last 30 days)
Show older comments
I have a sequence of grayscale images that were taken in different sunlight conditions. In the sequence, there are no moving objects in the upper left corner, so I would like to set the histogram of each image such that the upper left corner is constant brightness.
For two whole images I am able to get the histogram of image B to match the histogram of image A by
hgram = imhist(A);
B_adj = histeq(B,hgram);
Or I could make the entire B_adj match the histogram of the upper left corner of A by
hgram = imhist(A(1:100,1:100));
B_adj = histeq(B,hgram);
But I don't want the histogram of the entire image B_adj to match the histogram of the upper left corner of A. I know imhist offers an optional grayscale transformation array T, but I don't know how to use it. Any hints would be much appreciated.
Answers (0)
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!