Digital Image Processing restoration technique on grayscale image
Show older comments
i want to remove the white mask which is presented on the image.
Please help me out used orderstatic filters but unable to get satisfactory result.

Answers (1)
Image Analyst
on 15 Dec 2018
How did the image get corrupted in this way? Was a constant added to the region (to make it brighter), or was the range also compressed (to reduce contrast)? Will the rectangle always be in the same location?
I guess what I'd do is to determine the min and max of the original, unaltered region, and make the altered region have the same as the min and max of the rest of the image.
minOriginal = min(grayImage(maskOriginal));
maxOriginal = max(grayImage(maskOriginal));
% Then I'd set the altered region to what they might have been had they not been altered
grayImage(maskAltered) = uint8(minOriginal + maxOriginal * mat2gray(grayImage(maskAltered))); % Or uint16
Presumably you can find the masked region yourself. It's certainly trivial if it doesn't move around.
Categories
Find more on Video Formats and Interfaces in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!