Halcon转OpenCV实例--OCR字符识别(附源码)

导  读

    本文主要介绍Halcon转OpenCV实例--OCR字符识别(附源码)。

实例来源

    实例来源于51Halcon论坛的帖子,原贴地址:

    https://www.51halcon.com/forum.php?mod=viewthread&tid=889   

Halcon实现

    测试图:

    实现代码与效果:

read_image (Image, 'ET.png')decompose3 (Image, Image1, Image2, Image3)trans_from_rgb(Image1, Image2, Image3, ImageResult1, ImageResult2, ImageResult3, 'hsv')dev_get_window (WindowHandle)draw_rectangle1 (WindowHandle, Row1, Column1, Row2, Column2)gen_rectangle1 (Rectangle, Row1, Column1, Row2, Column2)reduce_domain (ImageResult3, Rectangle, ImageReduced)threshold(ImageReduced, Region, 180, 255)connec

猜你喜欢

转载自blog.csdn.net/stq054188/article/details/129010336