Flood filling for number plate recognition

前端 未结 3 1893
北恋
北恋 2020-12-21 08:54

I have a number plate which is a binary image.

\"enter

I performed dilation to

3条回答
  •  不知归路
    2020-12-21 09:20

    You can do this with a few other clever calls to imfill. Here is a way, assuming your binary image is in the array BW:

    Tmp = imfill(BW, 'holes');
    Tmp2 = imfill(Tmp-BW, 'holes');
    Res = Tmp - imfill(BW & Tmp2, 'holes');
    

    and Res is a binary image that contains the desired output:

    enter image description here

提交回复
热议问题