MATLAB Answers

Increasing exposure of an image

6 views (last 30 days)
Michelle
Michelle on 15 Nov 2020
Answered: Subhadeep Koley on 15 Nov 2020
I have to increase the exposure of photo 2 so that it looks like it "whited out". How would I do this? The code I have below is on converting an image to grayscale.
The photos are also included in the zip file.
% Read the image 1
img1 = imread('photo1.jpg');
% Convert it to double
img1Double = im2double(img1);
% Convert from RGB to grayscale
img1Gray = rgb2gray(img1);
figure
imshowpair(img1, img1Gray, 'montage')
% Read the image 2
img2 = imread('photo2.jpg');
% Convert it to double
img2Double = im2double(img2);
% Convert from RGB to grayscale
img2Gray = rgb2gray(img2);
figure
imshowpair(img2, img2Gray, 'montage')

  0 Comments

Sign in to comment.

Answers (1)

Subhadeep Koley
Subhadeep Koley on 15 Nov 2020
A simple approach could be adding a constant value to the entire image. Like below,
% Load the image
img = imread('photo1.jpg');
% Add a constant value to the image
overExposedImg = imadd(img, 100);
% Visualize them
figure
imshowpair(img, overExposedImg, 'montage')

  0 Comments

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!