Adjust Brightness of Image part

2 ビュー (過去 30 日間)
Muhammad Muaz
Muhammad Muaz 2013 年 1 月 20 日
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.

採用された回答

Image Analyst
Image Analyst 2013 年 1 月 20 日
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);

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by