MATLAB: How to remove the black regions in the holes of the letters

remove the black region

I have detected and cropped the license plate.But the image looks like this.I have to remove the black colur area in the holes in letter"B" and numbers "6" and"9".How can I do so?Anyone please help me.Screenshot (38).png

Best Answer

Looks like you need to improve your segmentation algorithm. Were the white spots ever there in a binary image earlier in the process? Then figure out which step got rid of them. Perhaps it was a bwareaopen() or bwareafilt().