Adding a Brightness Value

13 views (last 30 days)
Alexiss Rivas
Alexiss Rivas on 11 Jun 2017
Answered: KSSV on 12 Jun 2017
Can someone help me in writing a code that brightens the top left corner of an image by y, where y is an integer variable representing the amount by which to increase brightness. I'm still in the basics, so I need to use for loops or vectorization, no brightness function. Just writing out an actual code that can manipulate the sizes and layers.
I know that I will be using something along the lines of i= 1:row/2: end and j= 1: col/2: end... or at least I think so?
Thanks!

Answers (1)

KSSV
KSSV on 12 Jun 2017
I = imread('your image') ;
y = 100 ; % add pixel value
I(1,1,:) = I(1,1,:)+y; % top left corner is given by (1,1)

Categories

Find more on Image Processing Toolbox in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!