Halcon deep OCR

【开篇】先开个篇,后期逐步更新...

Halcon22.05版本的deep ocr功能很好用,就是速度慢了些,识别准确率几乎无敌。

查看默认识别的字符

get_deep_ocr_param (DeepOcrHandle, 'recognition_alphabet', GenParamValue)
get_deep_ocr_param (DeepOcrHandle, 'recognition_alphabet_internal', GenParamValue1)
get_deep_ocr_param (DeepOcrHandle, 'recognition_alphabet_mapping', GenParamValue2)

 只识别数字,可以设置如下:

OnlyNumber:=['0','1','2','3','4','5','6','7','8','9']
OnlyLowerCaseLetter:=['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']
OnlyUpperCaseLetter:=['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']
NumberAndLetter:=[OnlyNumber,OnlyLowerCaseLetter,OnlyUpperCaseLetter]

create_deep_ocr ('mode', 'recognition', DeepOcrHandle)
set_deep_ocr_param (DeepOcrHandle, 'recognition_alphabet',OnlyNumber)

数字、小写字母、大写字母都写出来了,方便直接用。特殊字符,根据具体情况。

【MVTec Deep Learning Tool 框取样本训练】

使用带方向的矩形框框选目标字符,训练

 

 案例参考 dl_detection_with_orientation_workflow.hdev

 样本与halcon代码:

链接:https://pan.baidu.com/s/1KKoAHKLb6Tux9Lgfb-P1lQ?pwd=gq7h
提取码:gq7h

【参考博客】

Deep_OCR_workflow - Edmund2053 - 博客园 (cnblogs.com)

posted @ 2022-10-08 11:17  夕西行  阅读(2869)  评论(3编辑  收藏  举报