資源簡介
第 04 章 基于Hough變化的答題卡識別——相關代碼及源文件
\Analysis.m
\Compute_Angle.m
\Gray_Convert.m
\Hough_Process.m
\images
\......\1.JPG
\Image_Binary.m
\Image_Normalize.m
\Image_Rotate.m
\Image_Smooth.m
\Location_Label.m
\Morph_Process.m
\Region_Segmation.m
\results
\runme.m
\Write_Results.m

代碼片段和文件信息
function?[Dom?Aom?Answer?Bn]?=?Analysis(stats1?stats2?Line?Img?flag)
if?nargin?5
????flag?=?1;
end
Line1?=?Line{1};
Line2?=?Line{2};
Line3?=?Line{3};
Line4?=?Line{4};
yn1?=?round(Line1(1?2)?+?0.18*(Line2(1?2)-Line1(1?2)));
yn2?=?round(Line1(1?2)?+?0.34*(Line2(1?2)-Line1(1?2)));
yn3?=?round(Line1(1?2)?+?0.50*(Line2(1?2)-Line1(1?2)));
Linen1_1?=?[Line1(1?1)?yn1;?Line1(2?1)?yn1];
Linen2_1?=?[Line1(1?1)?yn2;?Line1(2?1)?yn2];
Linen3_1?=?[Line1(1?1)?yn3;?Line1(2?1)?yn3];
%?定位豎直網格分割線
xn1?=?round(Line3(1?1)?+?0.22*(Line4(1?1)-Line3(1?1)));
xn2?=?round(Line3(1?1)?+?0.26*(Line4(1?1)-Line3(1?1)));
xn3?=?round(Line3(1?1)?+?0.48*(Line4(1?1)-Line3(1?1)));
xn4?=?round(Line3(1?1)?+?0.52*(Line4(1?1)-Line3(1?1)));
xn5?=?round(Line3(1?1)?+?0.73*(Line4(1?1)-Line3(1?1)));
xn6?=?round(Line3(1?1)?+?0.77*(Line4(1?1)-Line3(1?1)));
xn7?=?round(Line3(1?1)?+?0.98*(Line4(1?1)-Line3(1?1)));
Linen1_2?=?[xn1?Line3(1?2);?xn1?Line3(2?2)];
Linen2_2?=?[xn2?Line3(1?2);?xn2?Line3(2?2)];
Linen3_2?=?[xn3?Line3(1?2);?xn3?Line3(2?2)];
Linen4_2?=?[xn4?Line3(1?2);?xn4?Line3(2?2)];
Linen5_2?=?[xn5?Line3(1?2);?xn5?Line3(2?2)];
Linen6_2?=?[xn6?Line3(1?2);?xn6?Line3(2?2)];
Linen7_2?=?[xn7?Line3(1?2);?xn7?Line3(2?2)];
ym1_1?=?round(Line1(1?2)?+?0.32*(Linen1_1(1?2)-Line1(1?2)));
ym2_1?=?round(Line1(1?2)?+?0.5*(Linen1_1(1?2)-Line1(1?2)));
ym3_1?=?round(Line1(1?2)?+?0.65*(Linen1_1(1?2)-Line1(1?2)));
ym4_1?=?round(Line1(1?2)?+?0.80*(Linen1_1(1?2)-Line1(1?2)));
ym5_1?=?round(Line1(1?2)?+?0.95*(Linen1_1(1?2)-Line1(1?2)));
Linem1_1?=?[Line1(1?1)?ym1_1;?Line1(2?1)?ym1_1];
Linem2_1?=?[Line1(1?1)?ym2_1;?Line1(2?1)?ym2_1];
Linem3_1?=?[Line1(1?1)?ym3_1;?Line1(2?1)?ym3_1];
Linem4_1?=?[Line1(1?1)?ym4_1;?Line1(2?1)?ym4_1];
Linem5_1?=?[Line1(1?1)?ym5_1;?Line1(2?1)?ym5_1];
ym1_2?=?round(Linen1_1(1?2)?+?0.25*(Linen2_1(1?2)-Linen1_1(1?2)));
ym2_2?=?round(Linen1_1(1?2)?+?0.40*(Linen2_1(1?2)-Linen1_1(1?2)));
ym3_2?=?round(Linen1_1(1?2)?+?0.60*(Linen2_1(1?2)-Linen1_1(1?2)));
ym4_2?=?round(Linen1_1(1?2)?+?0.75*(Linen2_1(1?2)-Linen1_1(1?2)));
ym5_2?=?round(Linen1_1(1?2)?+?0.90*(Linen2_1(1?2)-Linen1_1(1?2)));
Linem1_2?=?[Line1(1?1)?ym1_2;?Line1(2?1)?ym1_2];
Linem2_2?=?[Line1(1?1)?ym2_2;?Line1(2?1)?ym2_2];
Linem3_2?=?[Line1(1?1)?ym3_2;?Line1(2?1)?ym3_2];
Linem4_2?=?[Line1(1?1)?ym4_2;?Line1(2?1)?ym4_2];
Linem5_2?=?[Line1(1?1)?ym5_2;?Line1(2?1)?ym5_2];
ym1_3?=?round(Linen2_1(1?2)?+?0.25*(Linen3_1(1?2)-Linen2_1(1?2)));
ym2_3?=?round(Linen2_1(1?2)?+?0.40*(Linen3_1(1?2)-Linen2_1(1?2)));
ym3_3?=?round(Linen2_1(1?2)?+?0.60*(Linen3_1(1?2)-Linen2_1(1?2)));
ym4_3?=?round(Linen2_1(1?2)?+?0.75*(Linen3_1(1?2)-Linen2_1(1?2)));
ym5_3?=?round(Linen2_1(1?2)?+?0.90*(Linen3_1(1?2)-Linen2_1(1?2)));
Linem1_3?=?[Line1(1?1)?ym1_3;?Line1(2?1)?ym1_3];
Linem2_3?=?[Line1(1?1)?ym2_3;?Line1(2?1)?ym2_3];
Linem3_3?=?[Line1(1?1)?ym3_3;?Line1(2?1)?ym3_3];
Linem
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????16715??2014-12-30?19:47??第?04?章?基于Hough變化的答題卡識別\Analysis.m
?????文件????????145??2014-12-30?19:45??第?04?章?基于Hough變化的答題卡識別\Compute_Angle.m
?????文件????????368??2014-12-30?19:45??第?04?章?基于Hough變化的答題卡識別\Gray_Convert.m
?????文件???????1422??2014-12-30?19:45??第?04?章?基于Hough變化的答題卡識別\Hough_Process.m
?????文件????5441029??2011-05-09?13:55??第?04?章?基于Hough變化的答題卡識別\images\1.JPG
?????文件????????442??2014-12-30?19:45??第?04?章?基于Hough變化的答題卡識別\Image_Binary.m
?????文件????????412??2014-12-30?19:45??第?04?章?基于Hough變化的答題卡識別\Image_Normalize.m
?????文件????????573??2014-12-30?19:45??第?04?章?基于Hough變化的答題卡識別\Image_Rotate.m
?????文件????????461??2014-12-30?19:44??第?04?章?基于Hough變化的答題卡識別\Image_Smooth.m
?????文件????????995??2014-12-30?19:44??第?04?章?基于Hough變化的答題卡識別\Location_Label.m
?????文件????????527??2014-12-30?19:44??第?04?章?基于Hough變化的答題卡識別\Morph_Process.m
?????文件????????927??2014-12-30?19:44??第?04?章?基于Hough變化的答題卡識別\Region_Segmation.m
?????文件????????627??2014-12-30?19:43??第?04?章?基于Hough變化的答題卡識別\runme.m
?????文件????????161??2014-12-30?19:43??第?04?章?基于Hough變化的答題卡識別\Write_Results.m
?????目錄??????????0??2016-05-25?17:01??第?04?章?基于Hough變化的答題卡識別\images
????..AD...?????????0??2015-01-03?20:36??第?04?章?基于Hough變化的答題卡識別\results
?????目錄??????????0??2016-05-25?17:01??第?04?章?基于Hough變化的答題卡識別
-----------?---------??----------?-----??----
??????????????5464804????????????????????17
評論
共有 條評論