二值图像中对象的总面积与整个面积的比是否小于0235
dimdilatedse如果小于则实现膨胀操作e
dimwritedexpa
sio
orcorrosio
thelice
ceplatejpgsubplot324imshowdtitleexpa
sio
orcorrosio
thelice
ceplate;运行结果如下所示:
13
f2字符分割在汽车牌照自动识别过程中,字符分割有承前启后的作用。它在前期牌照定位的基础
上进行字符的分割,然后再利用分割的结果进行字符识别。字符识别的算法很多,因为车牌字符间间隔较大,不会出现字符粘连情况,所以此处采用的方法为寻找连续有文字的块,若长度大于某阈值,则认为该块有两个字符组成,需要分割。一般分割出来的字符要进行进一步的处理,以满足下一步字符识别的需要。但是对于车牌的识别,并不需要太多的处理就已经可以达到正确识别的目的。在此只进行了归一化处理,然后进行后期处理。寻找连续有文字的块,若长度大于某阈值,则认为该块有两个字符组成,需要分割首先创建子函数qiege与getword,而后调用子程序,将车牌的字符分割开并且进行归一化处理dqiegedm
sizedsubplot325imshowdtitle
14
fk11k21ssumdj1whilej
whilesj0jj1
e
dk1jwhilesj0j
1
jj1e
dk2j1ifk2k1rou
d
65
val
ummi
sumdk15k25dk1
um50分割e
de
d再切割dqieged切割出7个字符y110y2025flag0word1whileflag0m
sizedleft1wide0whilesumdwide10widewide1e
difwidey1认为是左侧干扰d1wide0dqiegedelsetempqiegeimcropd11widem
15
fm
sizetempallsumsumtemptwo_thirdssumsumtemprou
dm32rou
dm3iftwo_thirdsally2
flag1word1tempWORD1e
dd1wide0dqiegede
de
d分割出第二个字符word2dgetwordd分割出第三个字符word3dgetwordd分割出第四个字符word4dgetwordd分割出第五个字符word5dgetwordd分割出第六个字符word6dgetwordd分割出第七个字符word7dgetworddfigure9subplot271imshowword1title1subplot272imshowword2title2subplot273imshowword3title3subplot274imshowword4title4subplot275imshowword5title5subplot276imshowword6title6subplot277imshowword7title7m
sizeword1
16
f商用系统程序中归一化大小为4020此处演示word1imresizeword14020word2imresizeword24020word3imresizeword34020word4imresizeword44020word5imresizeword54020word6imresizeword64020word7imresizeword74020
subplot278imshowword1title1subplot279imshowword2title2subplot2710imshowword3title3subplotr