1 Star 0 Fork 2

shatanzhihu/CodeRecognition

forked from xiaodelea/CodeRecognition 
Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
huahuaniu1109.hdev 3.54 KB
Copy Edit Raw Blame History
朱为 authored 2018-11-09 20:15 . add huahuaniu;affine trans images
<?xml version="1.0" encoding="UTF-8"?>
<hdevelop file_version="1.0" halcon_version="10.0" cs="393775701">
<procedure name="main">
<interface/>
<body>
<l>read_image (Image, 'D:/实习/图片/1109/0.bmp')</l>
<l>emphasize (Image, ImageEmphasize, 7, 7, 1)</l>
<l>threshold (ImageEmphasize, Region, 0, 20)</l>
<l>closing_circle (Region, RegionClosing, 7.5)</l>
<l>closing_rectangle1 (RegionClosing, RegionClosing1, 30, 20)</l>
<l>connection (RegionClosing1, ConnectedRegions)</l>
<l>select_shape (ConnectedRegions, SelectedRegions, 'area', 'and', 8000, 12500)</l>
<l>intersection (Region, SelectedRegions, RegionIntersection)</l>
<l>smallest_rectangle2 (RegionIntersection, Row1, Column1, Phi, Length1, Length2)</l>
<l>hom_mat2d_identity (HomMat2DIdentity)</l>
<l>hom_mat2d_rotate (HomMat2DIdentity, -Phi, 0, 0, HomMat2DRotate)</l>
<l>affine_trans_region (RegionIntersection, RegionAffineTrans, HomMat2DRotate, 'false')</l>
<l>affine_trans_image (Image, ImageAffinTrans, HomMat2DRotate, 'bilinear', 'false')</l>
<l>area_center (RegionAffineTrans, Area, Row, Column)</l>
<l>connection (RegionAffineTrans, ConnectedRegions1)</l>
<l>select_shape (ConnectedRegions1, SelectedRegions1, 'row', 'and', Row-30, Row)</l>
<l>union1 (SelectedRegions1, RegionUnion)</l>
<l>hom_mat2d_rotate (HomMat2DIdentity, -0.1, 0, 0, HomMat2DRotate1)</l>
<l>affine_trans_region (RegionUnion, RegionAffineTrans1, HomMat2DRotate1, 'false')</l>
<l>dilation_circle (RegionAffineTrans1, RegionDilation1, 1.5)</l>
<l>dilation_rectangle1 (RegionDilation1, RegionDilation, 3, 3)</l>
<l>connection (RegionDilation, ConnectedRegions2)</l>
<l>shape_trans (ConnectedRegions2, RegionTrans, 'convex')</l>
<l>partition_dynamic (RegionTrans, Partitioned, 30, 20)</l>
<l>select_shape (Partitioned, SelectedRegions2, 'height', 'and', 22, 32)</l>
<l>intersection (SelectedRegions2, RegionAffineTrans1, RegionIntersection1)</l>
<l>hom_mat2d_rotate (HomMat2DIdentity, 0.1, 0, 0, HomMat2DRotate2)</l>
<l>affine_trans_region (RegionIntersection1, RegionAffineTrans2, HomMat2DRotate2, 'false')</l>
<l>sort_region (RegionAffineTrans2, SortedRegions1, 'first_point', 'true', 'column')</l>
<l>count_obj (SortedRegions1, Number1)</l>
<c></c>
<l>select_shape (ConnectedRegions1, SelectedRegions2, 'row', 'and', Row, Row+30)</l>
<l>union1 (SelectedRegions2, RegionUnion2)</l>
<l>hom_mat2d_rotate (HomMat2DIdentity, -0.1, 0, 0, HomMat2DRotate3)</l>
<l>affine_trans_region (RegionUnion2, RegionAffineTrans3, HomMat2DRotate3, 'false')</l>
<l>dilation_circle (RegionAffineTrans3, RegionDilation3, 1.5)</l>
<l>dilation_rectangle1 (RegionDilation3, RegionDilation4, 3, 3)</l>
<l>connection (RegionDilation4, ConnectedRegions3)</l>
<l>shape_trans (ConnectedRegions3, RegionTrans2, 'convex')</l>
<l>partition_dynamic (RegionTrans2, Partitioned2, 30, 20)</l>
<l>select_shape (Partitioned2, SelectedRegions3, 'height', 'and', 22, 32)</l>
<l>intersection (SelectedRegions3, RegionAffineTrans3, RegionIntersection2)</l>
<l>hom_mat2d_rotate (HomMat2DIdentity, 0.1, 0, 0, HomMat2DRotate4)</l>
<l>affine_trans_region (RegionIntersection2, RegionAffineTrans4, HomMat2DRotate4, 'false')</l>
<l>sort_region (RegionAffineTrans4, SortedRegions2, 'first_point', 'true', 'column')</l>
<l>count_obj (SortedRegions2, Number2)</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 (SortedRegions1, ImageAffinTrans, OCRHandle, Class, Confidence)</l>
<l>do_ocr_multi_class_mlp (SortedRegions2, ImageAffinTrans, OCRHandle, Class1, Confidence1)</l>
<c></c>
</body>
<docu id="main">
<parameters/>
</docu>
</procedure>
</hdevelop>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/shatanzhihu/CodeRecognition.git
git@gitee.com:shatanzhihu/CodeRecognition.git
shatanzhihu
CodeRecognition
CodeRecognition
master

Search

D67c1975 1850385 1daf7b77 1850385