please i need a help.. how to remove the darkest handwritten text (black and red) from this image? just the text?
3 views (last 30 days)
Show older comments
Answers (2)
Walter Roberson
on 24 Oct 2016
somethreshold = 11; %found by examining the image RGB values
mask = YourImage(:,:,3) > somethreshold;
NewImage = YourImage .* cast(mask(:,:,[1 1 1]), class(YourImage));
%And to view it,
image(NewImage, 'AlphaData', double(mask))
Only the darkest text is removed.
4 Comments
Walter Roberson
on 25 Oct 2016
There is no white colored text.
Notice the "And to view it" portion. The image is being displayed with transparency for the pixels that are not selected. You are seeing the white of the background showing through. The image itself has been set to black at all other locations. The locations that are selected (the ROI, region of interest) are the ones where mask is true.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!