为什么车牌识别不正确呢?
原图:
read_image (Image1, 'C:/Users/29185/Desktop/图片1.png')
get_image_size (Image1, Width, Height)
dev_close_window ()
dev_open_window (0, 0, Width, Height, 'black', WindowHandle)
rgb1_to_gray (Image1, GrayImage)
dev_display (GrayImage)
gen_rectangle1 (Rectangle, 59, 49, 89, 159)
reduce_domain (GrayImage, Rectangle, ImageReduced)
threshold (ImageReduced, Regions, 98, 194)
shape_trans (Regions, RegionTrans1, 'rectangle1')
reduce_domain (GrayImage, RegionTrans1, ImageReduced1)
orientation_region (RegionTrans1, Phi) //区域方向计算,得到弧度Phi
area_center (RegionTrans1, Area, Row, Column)//获得区域坐标,面积
vector_angle_to_rigid (Row, Column, rad(180)-Phi, Row, Column,0 , HomMat2D)//生成旋转矩形,Phi>0 , [rad(180)-Phi]防止旋转后图像反转
affine_trans_image (Image1, ImageAffineTrans, HomMat2D, 'constant', 'false')//旋转操作
reduce_domain (ImageAffineTrans, RegionTrans1, ImageReduced)//截取车牌区域操作
threshold (ImageReduced, Regions1, 100, 215)
connection (Regions1, ConnectedRegions)
select_shape (ConnectedRegions, SelectedRegions1, 'area', 'and', 89.39, 169.58)
read_ocr_class_mlp ('Industrial_0-9A-Z_NoRej.omc', OCRHandle4)
do_ocr_multi_class_mlp (SelectedRegions1, ImageReduced, OCRHandle4, Class, Confidence)
disp_message (WindowHandle, Class, 'window', 0, 0, 'black', 'true')
我希望输出AT0H69