Putri Ranati
Putri Ranati

Reputation: 47

How to set same luminance for several images?

I have a lot of images with different luminance value. And i want to set luminance of image to standard value that is 0,196 or 49,98.

And what i want is:

Standar imageOver-exposure under-exposure

Image 1 - standard image, Image 2 - Over-exposure, Image 3 - Under-exposure

The question is "how to set all of images has a exposure/luminance same like a standard image?"

Upvotes: 0

Views: 241

Answers (1)

Duck Dodgers
Duck Dodgers

Reputation: 3461

So, I think there are two questions, you are asking.

Q1:

And what i want is:

  • image that has overexposure the luminance should be decrease, and
  • image that has under-exposure, the luminance should be increase.

I believe what you are looking for is some sort of histogram equalization.

If you plot the histograms of those three images, they would look something like this:

histograms

As you can see,

  • the distribution of the underexposed histogram is more concentrated in the lower bins, roughly [0 ~ 55].

  • the distribution of the overexposed histogram is more concentrated in the higher bins, roughly [55 ~ 225].

  • the distribution of your 'standard' histogram is more concentrated in the in-between bins, roughly [15 ~ 145].

What you want to do is distribute the histograms more equally among all bins. You could try to come up with a little algorithm of your own or you could use the built-in MATLAB function adapthisteq() as explained here, on how to use. Playing with the different parameters, you could end up with a histogram distribution that produces the best image output for you. By default, the function adapthisteq would try to distribute the histogram over all 256 bins.

Q2:

The question is "how to set all of images has a exposure/luminance same like a standard image?"

If you just want the histograms of the other two images to look like your 'standard' image, for that you could use the imhistmatchn function as explained here. to be honest, I have little experience with this function myself, but you could try it out.

Upvotes: 1

Related Questions