read_image (Audi2, 'audi2')
fill_interlace (Audi2, ImageFilled, 'odd')
dev_set_color('green')
threshold (ImageFilled, Region, , )
connection (Region, ConnectedRegions)
select_shape (ConnectedRegions, SelectedRegions, 'width', 'and', , )
select_shape (SelectedRegions, Letters, 'height', 'and', , )
*dev_clear_window ()
*dev_set_colored ()
*dev_display (ImageFilled)
*dev_display (Letters) read_ocr_class_mlp('Industrial_0-9A-Z.omc',OCRHandle)
do_ocr_multi_class_mlp(Letters,Audi2,OCRHandle, Class, Confidence) *显示识别的结果
area_center(Letters, Area, Row, Column)
for Index := to by
disp_message(, Class[Index], 'window', Row[Index], Column[Index], 'black', 'true')
endfor
初始图片:
处理后的图片,将车牌所在的区域识别出来:
显示输出结果:
*Class[0]--class[6]分别为GAPV329
area_center(Letters, Area, Row, Column) for Index := 0 to 6 by 1
disp_message(3600, Class[Index], 'window' , Row[Index], Column[Index], 'black' , 'true' )
endfor
|