Adding a Brightness Value
조회 수: 14 (최근 30일)
이전 댓글 표시
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!
댓글 수: 0
답변 (1개)
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)
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!