1 Star 1 Fork 2

wxzhouq/CodeRecognition

forked from xiaodelea/CodeRecognition 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
C1_0827.hdev 4.11 KB
一键复制 编辑 原始数据 按行查看 历史
朱为 提交于 2018-11-10 15:20 . 珠江啤酒采用轮廓长度判断缺陷
<?xml version="1.0" encoding="UTF-8"?>
<hdevelop file_version="1.0" halcon_version="10.0" cs="-513549700">
<procedure name="main">
<interface/>
<body>
<l>read_image (Image, 'C:/Users/Dell/Desktop/C1(1)/C1/C1_0.bmp')</l>
<l>emphasize (Image, ImageEmphasize, 7, 7, 3)</l>
<l>binomial_filter (ImageEmphasize, ImageBinomial0, 5, 5)</l>
<l>mean_image (ImageBinomial0, ImageMean1, 31, 31)</l>
<l>dyn_threshold (ImageBinomial0, ImageMean1, Regions, 15, 'dark')</l>
<c></c>
<l>connection (Regions, ConnectedRegions3)</l>
<l>select_shape (ConnectedRegions3, SelectedRegions8, ['width','height','area'], 'and', [3,20,50], [24,34,500])</l>
<c></c>
<l>union1 (SelectedRegions8, RegionUnion4)</l>
<l>closing_circle (RegionUnion4, RegionClosing5, 7.5)</l>
<l>closing_rectangle1 (RegionClosing5, RegionClosing6, 30, 20)</l>
<l>connection (RegionClosing6, ConnectedRegions6)</l>
<c></c>
<l>select_shape (ConnectedRegions6, SelectedRegions7, ['width','height'], 'and', [109.28,50.96], [242.23,113.25])</l>
<l>select_shape_std (SelectedRegions7, SelectedRegions5, 'max_area', 70)</l>
<c>***</c>
<l>smallest_rectangle2 (SelectedRegions5, Row, Column, Phi, Length1, Length2)</l>
<l>tuple_deg (Phi, Deg)</l>
<l>rotate_image (Image, rotateImage, -Deg, 'constant')</l>
<c></c>
<l>emphasize (rotateImage, ImageEmphasize1, 7, 7, 3)</l>
<l>binomial_filter (ImageEmphasize1, ImageBinomia1, 5, 5)</l>
<l>mean_image (ImageBinomia1, ImageMean, 31, 31)</l>
<c></c>
<l>dyn_threshold (ImageBinomia1, ImageMean, Region, 10, 'dark')</l>
<c></c>
<l>connection (Region, ConnectedRegions)</l>
<l>select_shape (ConnectedRegions, SelectedRegions, 'area', 'and', 50, 600)</l>
<l>union1 (SelectedRegions, RegionUnion)</l>
<l>closing_rectangle1 (RegionUnion, RegionClosing, 55, 3)</l>
<c>******************</c>
<l>closing_circle (RegionUnion, RegionClosing7, 33.5)</l>
<l>intersection (RegionClosing7, RegionClosing, RegionIntersection6)</l>
<c></c>
<l>connection (RegionIntersection6, ConnectedRegions1)</l>
<l>select_shape (ConnectedRegions1, SelectedRegions1, ['height','area'], 'and', [20,3000], [45,99999])</l>
<c></c>
<l>union1 (SelectedRegions1, RegionUnion1)</l>
<l>intersection (RegionUnion1, RegionUnion, RegionIntersection)</l>
<l>area_center (RegionIntersection, Area, Row1, Column1)</l>
<l>connection (RegionIntersection, ConnectedRegions5)</l>
<c>***第一行</c>
<l>select_shape (ConnectedRegions5, SelectedRegions2, 'row', 'and', Row1-25, Row1)</l>
<l>closing_rectangle1 (SelectedRegions2, RegionClosing3, 1, 12)</l>
<l>closing_circle (RegionClosing3, RegionClosing1, 1.5)</l>
<l>connection (RegionClosing1, ConnectedRegions4)</l>
<l>shape_trans (ConnectedRegions4, RegionTrans, 'rectangle1')</l>
<l>partition_rectangle (RegionTrans, Partitioned, 19, 29)</l>
<l>select_shape (Partitioned, SelectedRegions3, 'height', 'and', 19, 32)</l>
<l>intersection (SelectedRegions3, SelectedRegions2, RegionIntersection3)</l>
<l>sort_region (RegionIntersection3, SortedRegions, 'character', 'true', 'column')</l>
<c></c>
<l>select_shape (ConnectedRegions5, SelectedRegions6, 'row', 'and', Row1, Row1+25)</l>
<l>closing_rectangle1 (SelectedRegions6, RegionClosing4, 1, 12)</l>
<l>closing_circle (RegionClosing4, RegionClosing2, 1.5)</l>
<l>connection (RegionClosing2, ConnectedRegions2)</l>
<l>shape_trans (ConnectedRegions2, RegionTrans1, 'rectangle1')</l>
<l>partition_rectangle (RegionTrans1, Partitioned1,19, 29)</l>
<l>select_shape (Partitioned1, SelectedRegions4, 'height', 'and', 20, 34)</l>
<l>intersection (SelectedRegions4, SelectedRegions6, RegionIntersection2)</l>
<l>sort_region (RegionIntersection2, SortedRegions2, 'character', 'true', 'column')</l>
<c></c>
<l>read_ocr_class_mlp ('C:/Program Files/MVTec/HALCON-10.0/ocr/Industrial_0-9A-Z.omc', OCRHandle)</l>
<l>do_ocr_multi_class_mlp (SortedRegions, rotateImage, OCRHandle, Class, Confidence)</l>
<l>do_ocr_multi_class_mlp (SortedRegions2, rotateImage, OCRHandle, Class1, Confidence1)</l>
<l>T1:=''</l>
<l>T2:=''</l>
<l>for i := 0 to |Class| - 1 by 1</l>
<l> T1 := T1 + Class[i]</l>
<l>endfor</l>
<l>for i := 0 to |Class1| - 1 by 1</l>
<l> T2 := T2 + Class1[i]</l>
<l>endfor</l>
<c></c>
<c></c>
<c></c>
</body>
<docu id="main">
<parameters/>
</docu>
</procedure>
</hdevelop>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zxfsc/CodeRecognition.git
git@gitee.com:zxfsc/CodeRecognition.git
zxfsc
CodeRecognition
CodeRecognition
master

搜索帮助