Adjust Brightness of Image part

2 visualizzazioni (ultimi 30 giorni)
Muhammad Muaz
Muhammad Muaz il 20 Gen 2013
I am new to Matlab and to Image Processing as well, I know we can change image brightness by following formula if my image is `I`
newImg=imadjust(I, [low_in high_in], [low_out,high_out]);
it adjust all pixel's value of image but how can I do it on some part of image, like I detected face in the image now I want change its brightness how can I do it using `imadjust`.
I have detected area in a binary mask.

Risposta accettata

Image Analyst
Image Analyst il 20 Gen 2013
Just do it on the whole image. Then use your binary mask to assign only those pixels in your new image that are in the mask, to your original image in the same pixel locations:
% Replace original pixels with adjusted pixels, but only under the mask.
I(binaryMask) = newImg(binaryMask);

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by