代码拉取完成,页面将自动刷新
同步操作将从 xiaodelea/CodeRecognition 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
<?xml version="1.0" encoding="UTF-8"?>
<hdevelop file_version="1.0" halcon_version="10.0" cs="-766247589">
<procedure name="main">
<interface/>
<body>
<l>read_image (Image, 'D:/实习/图片/1112/新建文件夹1/29.bmp')</l>
<l>dots_image (Image, DotImage, 5, 'dark', 2)</l>
<l>threshold (DotImage, Region, 110, 255)</l>
<l>dilation_circle (Region, RegionDilation, 2.5)</l>
<l>closing_rectangle1 (RegionDilation, RegionClosing, 3, 3)</l>
<l>connection (RegionClosing, ConnectedRegions)</l>
<l>select_shape (ConnectedRegions, SelectedRegions, ['width','height'], 'and', [15,15], [80,80])</l>
<l>union1 (SelectedRegions, RegionUnion)</l>
<l>closing_rectangle1 (RegionUnion, RegionClosing2, 30, 20)</l>
<l>connection (RegionClosing2, ConnectedRegions2)</l>
<l>select_shape (ConnectedRegions2, SelectedRegions5, 'area', 'and', 10000, 20000)</l>
<c></c>
<l>intersection (Region, SelectedRegions5, RegionIntersection)</l>
<l>smallest_rectangle2 (RegionIntersection, Row, Column, Phi, Length1, Length2)</l>
<l>hom_mat2d_identity (HomMat2DIdentity)</l>
<l>hom_mat2d_rotate (HomMat2DIdentity, -Phi, Column, Row, HomMat2DRotate)</l>
<l>affine_trans_region (RegionIntersection, RegionAffineTrans1, HomMat2DRotate, 'true')</l>
<l>affine_trans_image (Image, rotateImage, HomMat2DRotate, 'bilinear', 'false')</l>
<l>dilation_circle (RegionAffineTrans1, RegionDilation1, 2.5)</l>
<l>closing_rectangle1 (RegionDilation1, RegionClosing1, 3, 3)</l>
<l>opening_circle (RegionClosing1, RegionOpening, 2.5)</l>
<l>connection (RegionOpening, ConnectedRegions1)</l>
<l>area_center (RegionAffineTrans1, Area, Row1, Column1)</l>
<c></c>
<l>select_shape (ConnectedRegions1, SelectedRegions1, 'row', 'and', Row1-30, Row1)</l>
<l>shape_trans (SelectedRegions1, RegionTrans, 'rectangle1')</l>
<l>partition_dynamic (RegionTrans, Partitioned, 30, 20)</l>
<l>select_shape (Partitioned, SelectedRegions2, 'height', 'and', 25, 48)</l>
<l>intersection (SelectedRegions2, RegionAffineTrans1, RegionIntersection1)</l>
<l>sort_region (RegionIntersection1, SortedRegions1, 'first_point', 'true', 'column')</l>
<l>area_center (SortedRegions1, Area11, Row11, Column11)</l>
<l>count_obj (SortedRegions1, Number1)</l>
<l>*FontFile:='D:/github/CodeRecognition/tzb1112.omc'</l>
<l>read_ocr_class_mlp ('C:/Program Files/MVTec/HALCON-10.0/ocr/DotPrint_0-9A-Z.omc', OCRHandle)</l>
<l>do_ocr_multi_class_mlp (SortedRegions1, rotateImage, OCRHandle, Chars1, Confidence1)</l>
<c></c>
<l>select_shape (ConnectedRegions1, SelectedRegions3, 'row', 'and', Row1, Row1+40)</l>
<l>shape_trans (SelectedRegions3, RegionTrans1, 'rectangle1')</l>
<l>partition_dynamic (RegionTrans1, Partitioned1, 30, 1)</l>
<l>select_shape (Partitioned1, SelectedRegions4, 'height', 'and', 25, 48)</l>
<l>intersection (SelectedRegions4, RegionAffineTrans1, RegionIntersection2)</l>
<l>sort_region (RegionIntersection2, SortedRegions2, 'first_point', 'true', 'column')</l>
<l>area_center (SortedRegions2, Area12, Row12, Column12)</l>
<l>count_obj (SortedRegions2, Number2)</l>
<l>do_ocr_multi_class_mlp (SortedRegions2, rotateImage, OCRHandle, Chars2, Confidence2)</l>
<c></c>
<l>*word:=['d']</l>
<l>*TrainFile:='D:/github/CodeRecognition/tzb1112.trf'</l>
<l>*dev_set_check('~give_error') </l>
<l>*delete_file(TrainFile) </l>
<l>*dev_set_check('~give_error')</l>
<l>*for i:=7 to Number2 by 1 </l>
<l>* select_obj(SortedRegions2, SingleWord, i) </l>
<l>* append_ocr_trainf(SingleWord,rotateImage,word,TrainFile) </l>
<l>*endfor</l>
<l>*read_ocr_trainf_names(TrainFile, CharacterNames, CharacterCount)</l>
<l>*trainf_ocr_class_mlp (OCRHandle, TrainFile, 200, 1, 0.01, Error, ErrorLog)</l>
<l>*write_ocr_class_mlp (OCRHandle, FontFile)</l>
<c></c>
<c>*120, 68, 147, 183, 188, 0, 0, 107, 162, 197, 138, 0, 123</c>
<c>*120, 68, 147, 183, 146, 202, 0, 107, 162, 197, 138, 169, 123</c>
<l>dev_clear_window ()</l>
<l>dev_display (Image)</l>
<l>dev_set_color ('blue')</l>
<l>dev_display (SortedRegions1)</l>
<l>dev_display (SortedRegions2)</l>
<c></c>
</body>
<docu id="main">
<parameters/>
</docu>
</procedure>
</hdevelop>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。