*3.1读入图像 dev_close_window() read_image(Image,'F:/学习资料/Halcon工程/ocr-read.bmp') read_image (Image, 'D:/halcon 10_study/识别字母/a2.png') get_image_size(Image, Width, Height) dev_open_window(0, 0, Width/1.3, Height/1.3, 'black', WindowHandle) dev_display(Image) *3.2对齐文字 text_line_orientation (Image, Image, 25, rad(-90), rad(90), OrientationAngle) rotate_image(Image, ImageRotate, -OrientationAngle/rad(180)*180, 'constant') *分割文字 threshold (ImageRotate, TestWordsRegion, 0, 100)
2021-11-22 10:31:25 34KB Halcon识字母
1