MATLAB Answers

Increase exposure of an image by a certain number of stops (EV)

7 views (last 30 days)
gbos
gbos on 9 Jan 2020
Answered: gbos on 15 Jan 2020
Hello,
I need to post-process some images with MatLab and I'd like to be able to increase the exposure of the image. I know I can just add some constant value to the matrix representing the image, but I need to know how many stops I'm increasing this brightness, like in Lightroom or Photoshop. Any help?

  0 Comments

Sign in to comment.

Accepted Answer

gbos
gbos on 15 Jan 2020
Well I solved the problem, the answer was pretty straightforward actually: obviosuly if you want to over expose by 1 stop (EV) the amount of light that will be recorded on a picture will be double. So to do this in MatLab you just have to double every pixel value. If the stops are 2, you have to quadruple the values, if it's just half a stop, then you have to multiply by 1.5 (50% more light in). Obviously pixels with a value will keep a value of and they'll be the clipped pixels.
This process doesn't take into account the camera response function but it's ok since the RAW file should have a linear response anyway.

  0 Comments

Sign in to comment.

More Answers (1)

KALYAN ACHARJYA
KALYAN ACHARJYA on 9 Jan 2020
Edited: KALYAN ACHARJYA on 9 Jan 2020
Still I feel the question is quite subjective, One way: the issue is how to get the contrast of an image? If done, you may look for imadjust function also with repeated iteration (loop).
Second way: As you mentioned about contrast enhancemnet, I suggest to go for repeated histogram equalization and see the dynamaic ranges. During the loop iterration, when you achieve disired dynamic range (contrast), you may consider a break statement.

  7 Comments

Show 4 older comments
gbos
gbos on 9 Jan 2020
Yep this is what I've been doing, but I need to do it properly and accurately. So let's say I want to increase the exposure of the image by 2 stops, what constant value should I add to the image?
KALYAN ACHARJYA
KALYAN ACHARJYA on 9 Jan 2020
Exposure of the image by 2 stops?
Is this in two iteration?
n=4 % Considering Gray Image, Color deals with individual color planes
for i=1:n
image_A=Image_A+randi(10);
imshow(image_A)
end

Sign in to comment.

Sign in to answer this question.


Translated by