Adding a Brightness Value

13 次查看(过去 30 天)
Alexiss Rivas
Alexiss Rivas 2017-6-11
回答: KSSV 2017-6-12
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!

回答(1 个)

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

类别

Help CenterFile Exchange 中查找有关 Image Processing Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by