Adjust Brightness of Image part

2 visualizaciones (últimos 30 días)
Muhammad Muaz
Muhammad Muaz el 20 de En. de 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.

Respuesta aceptada

Image Analyst
Image Analyst el 20 de En. de 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);

Más respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by