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];
Linem4_3 = [Line1(1, 1) ym4_3; Line1(2, 1) ym4_3];
Linem5_3 = [Line1(1, 1) ym5_3; Line1(2, 1) ym5_3];
xm1_1 = round(Line3(1, 1) + 0.07*(Linen1_2(1, 1)-Line3(1, 1)));
xm1_2 = round(Line3(1, 1) + 0.25*(Linen1_2(1, 1)-Line3(1, 1)));
xm1_3 = round(Line3(1, 1) + 0.43*(Linen1_2(1, 1)-Line3(1, 1)));
xm1_4 = round(Line3(1, 1) + 0.63*(Linen1_2(1, 1)-Line3(1, 1)));
xm1_5 = round(Line3(1, 1) + 0.83*(Linen1_2(1, 1)-Line3(1, 1)));
xm1_6 = round(Line3(1, 1) + 1.02*(Linen1_2(1, 1)-Line3(1, 1)));
Linem1_1_2 = [xm1_1 Line3(1, 2); xm1_1 Line3(2, 2)];
Linem1_2_2 = [xm1_2 Line3(1, 2); xm1_2 Line3(2, 2)];
Linem1_3_2 = [xm1_3 Line3(1, 2); xm1_3 Line3(2, 2)];
Linem1_4_2 = [xm1_4 Line3(1, 2); xm1_4 Line3(2, 2)];
Linem1_5_2 = [xm1_5 Line3(1, 2); xm1_5 Line3(2, 2)];
Linem1_6_2 = [xm1_6 Line3(1, 2); xm1_6 Line3(2, 2)];
xm2_1 = round(Linen2_2(1, 1) + 0.05*(Linen3_2(1, 1)-Linen2_2(1, 1)));
xm2_2 = round(Linen2_2(1, 1) + 0.22*(Linen3_2(1, 1)-Linen2_2(1, 1)));
xm2_3 = round(Linen2_2(1, 1) + 0.41*(Linen3_2(1, 1)-Linen2_2(1, 1)));
xm2_4 = round(Linen2_2(1, 1) + 0.58*(Linen3_2(1, 1)-Linen2_2(1, 1)));
xm2_5 = round(Linen2_2(1, 1) + 0.78*(Linen3_2(1, 1)-Linen2_2(1, 1)));
xm2_6 = round(Linen2_2(1, 1) + 0.98*(Linen3_2(1, 1)-Linen2_2(1, 1)));
Linem2_1_2 = [xm2_1 Line3(1, 2); xm2_1 Line3(2, 2)];
Linem2_2_2 = [xm2_2 Line3(1, 2); xm2_2 Line3(2, 2)];
Linem2_3_2 = [xm2_3 Line3(1, 2); xm2_3 Line3(2, 2)];
Linem2_4_2 = [xm2_4 Line3(1, 2); xm2_4 Line3(2, 2)];
Linem2_5_2 = [xm2_5 Line3(1, 2); xm2_5 Line3(2, 2)];
Linem2_6_2 = [xm2_6 Line3(1, 2); xm2_6 Line3(2, 2)];
xm3_1 = round(Linen4_2(1, 1) + 0.03*(Linen5_2(1, 1)-Linen4_2(1, 1)));
xm3_2 = round(Linen4_2(1, 1) + 0.22*(Linen5_2(1, 1)-Linen4_2(1, 1)));
xm3_3 = round(Linen4_2(1, 1) + 0.41*(Linen5_2(1, 1)-Linen4_2(1, 1)));
xm3_4 = round(Linen4_2(1, 1) + 0.58*(Linen5_2(1, 1)-Linen4_2(1, 1)));
xm3_5 = round(Linen4_2(1, 1) + 0.78*(Linen5_2(1, 1)-Linen4_2(1, 1)));
xm3_6 = round(Linen4_2(1, 1) + 0.98*(Linen5_2(1, 1)-Linen4_2(1, 1)));
Linem3_1_2 = [xm3_1 Line3(1, 2); xm3_1 Line3(2, 2)];
Linem3_2_2 = [xm3_2 Line3(1, 2); xm3_2 Line3(2, 2)];
Linem3_3_2 = [xm3_3 Line3(1, 2); xm3_3 Line3(2, 2)];
Linem3_4_2 = [xm3_4 Line3(1, 2); xm3_4 Line3(2, 2)];
Linem3_5_2 = [xm3_5 Line3(1, 2); xm3_5 Line3(2, 2)];
Linem3_6_2 = [xm3_6 Line3(1, 2); xm3_6 Line3(2, 2)];
xm4_1 = round(Linen6_2(1, 1) + 0.03*(Linen7_2(1, 1)-Linen6_2(1, 1)));
xm4_2 = round(Linen6_2(1, 1) + 0.22*(Linen7_2(1, 1)-Linen6_2(1, 1)));
xm4_3 = round(Linen6_2(1, 1) + 0.41*(Linen7_2(1, 1)-Linen6_2(1, 1)));
xm4_4 = round(Linen6_2(1, 1) + 0.58*(Linen7_2(1, 1)-Linen6_2(1, 1)));
xm4_5 = round(Linen6_2(1, 1) + 0.78*(Linen7_2(1, 1)-Linen6_2(1, 1)));
xm4_6 = round(Linen6_2(1, 1) + 0.98*(Linen7_2(1, 1)-Linen6_2(1, 1)));
Linem4_1_2 = [xm4_1 Line3(1, 2); xm4_1 Line3(2, 2)];
Linem4_2_2 = [xm4_2 Line3(1, 2); xm4_2 Line3(2, 2)];
Linem4_3_2 = [xm4_3 Line3(1, 2); xm4_3 Line3(2, 2)];
Linem4_4_2 = [xm4_4 Line3(1, 2); xm4_4 Line3(2, 2)];
Linem4_5_2 = [xm4_5 Line3(1, 2); xm4_5 Line3(2, 2)];
Linem4_6_2 = [xm4_6 Line3(1, 2); xm4_6 Line3(2, 2)];
ym1_4 = round(Line1(1, 2) - 0.18*(Linen1_1(1, 2)-Line1(1, 2)));
ym2_4 = round(Line1(1, 2) - 0.35*(Linen1_1(1, 2)-Line1(1, 2)));
ym3_4 = round(Line1(1, 2) - 0.50*(Linen1_1(1, 2)-Line1(1, 2)));
ym4_4 = round(Line1(1, 2) - 0.65*(Linen1_1(1, 2)-Line1(1, 2)));
ym5_4 = round(Line1(1, 2) - 0.80*(Linen1_1(1, 2)-Line1(1, 2)));
ym6_4 = round(Line1(1, 2) - 0.95*(Linen1_1(1, 2)-Line1(1, 2)));
ym7_4 = round(Line1(1, 2) - 1.10*(Linen1_1(1, 2)-Line1(1, 2)));
ym8_4 = round(Line1(1, 2) - 1.22*(Linen1_1(1, 2)-Line1(1, 2)));
ym9_4 = round(Line1(1, 2) - 1.35*(Linen1_1(1, 2)-Line1(1, 2)));
ym10_4 = round(Line1(1, 2) - 1.50*(Linen1_1(1, 2)-Line1(1, 2)));
ym11_4 = round(Line1(1, 2) - 1.65*(Linen1_1(1, 2)-Line1(1, 2)));
Linem1_4 = [Line1(1, 1) ym1_4; Line1(2, 1) ym1_4];
Linem2_4 = [Line1(1, 1) ym2_4; Line1(2, 1) ym2_4];
Linem3_4 = [Line1(1, 1) ym3_4; Line1(2, 1) ym3_4];
Linem4_4 = [Line1(1, 1) ym4_4; Line1(2, 1) ym4_4];
Linem5_4 = [Line1(1, 1) ym5_4; Line1(2, 1) ym5_4];
Linem6_4 = [Line1(1, 1) ym6_4; Line1(2, 1) ym6_4];
Linem7_4 = [Line1(1, 1) ym7_4; Line1(2, 1) ym7_4];
Linem8_4 = [Line1(1, 1) ym8_4; Line1(2, 1) ym8_4];
Linem9_4 = [Line1(1, 1) ym9_4; Line1(2, 1) ym9_4];
Linem10_4 = [Line1(1, 1) ym10_4; Line1(2, 1) ym10_4];
Linem11_4 = [Line1(1, 1) ym11_4; Line1(2, 1) ym11_4];
Dom(1).Loc = [Line1(1, 2) Linen1_1(1, 2)];
Dom(1).y = [ym1_1 ym2_1 ym3_1 ym4_1 ym5_1];
xt{1} = [xm1_1 xm1_2 xm1_3 xm1_4 xm1_5 xm1_6];
xt{2} = [xm2_1 xm2_2 xm2_3 xm2_4 xm2_5 xm2_6];
xt{3} = [xm3_1 xm3_2 xm3_3 xm3_4 xm3_5 xm3_6];
xt{4} = [xm4_1 xm4_2 xm4_3 xm4_4 xm4_5 xm4_6];
Dom(1).x = xt;
Dom(2).Loc = [Linen1_1(1, 2) Linen2_1(1, 2)];
Dom(2).y = [ym1_2 ym2_2 ym3_2 ym4_2 ym5_2];
xt{1} = [xm1_1 xm1_2 xm1_3 xm1_4 xm1_5 xm1_6];
xt{2} = [xm2_1 xm2_2 xm2_3 xm2_4 xm2_5 xm2_6];
xt{3} = [xm3_1 xm3_2 xm3_3 xm3_4 xm3_5 xm3_6];
xt{4} = [xm4_1 xm4_2 xm4_3 xm4_4 xm4_5 xm4_6];
Dom(2).x = xt;
Dom(3).Loc
没有合适的资源?快使用搜索试试~ 我知道了~
【答题卡识别】基于matlab Hough变换答题卡识别【含Matlab源码 250期】.zip
共17个文件
m:13个
jpg:4个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
5星 · 超过95%的资源 4 下载量 10 浏览量
2021-11-06
09:43:00
上传
评论 5
收藏 13.46MB ZIP 举报
温馨提示
CSDN海神之光上传的代码均可运行,亲测可用,直接替换数据即可,适合小白; 1、代码压缩包内容 主函数:main.m; 调用函数:其他m文件;无需运行 运行结果效果图; 2、代码运行版本 Matlab 2019b;若运行有误,根据提示修改;若不会,私信博主; 3、运行操作步骤 步骤一:将所有文件放到Matlab的当前文件夹中; 步骤二:双击打开main.m文件; 步骤三:点击运行,等程序运行完得到结果; 4、仿真咨询 如需其他服务,可私信博主或扫描博客文章底部QQ名片; 4.1 博客或资源的完整代码提供 4.2 期刊或参考文献复现 4.3 Matlab程序定制 4.4 科研合作 图像识别:表盘识别、车道线识别、车牌识别、答题卡识别、电器识别、跌倒检测、动物识别、发票识别、服装识别、汉字识别、红绿灯识别、火灾检测、疾病分类、交通标志牌识别、口罩识别、裂缝识别、目标跟踪、疲劳检测、身份证识别、人民币识别、数字字母识别、手势识别、树叶识别、水果分级、条形码识别、瑕疵检测、芯片识别、指纹识别
资源推荐
资源详情
资源评论
收起资源包目录
【答题卡识别】基于matlab Hough变换答题卡识别【含Matlab源码 250期】.zip (17个子文件)
【答题卡识别】基于matlab Hough变换答题卡识别【含Matlab源码 250期】
Morph_Process.m 527B
Location_Label.m 995B
Analysis.m 16KB
Image_Rotate.m 573B
results
Image_Smooth.m 461B
Write_Results.m 161B
Region_Segmation.m 927B
images
2.jpg 3.06MB
3.JPG 5.19MB
1.JPG 5.19MB
runme.m 627B
Hough_Process.m 1KB
Image_Binary.m 442B
Compute_Angle.m 145B
Image_Normalize.m 412B
Gray_Convert.m 368B
运行结果.jpg 56KB
共 17 条
- 1
资源评论
- wybmvcl12022-05-08用户下载后在一定时间内未进行评价,系统默认好评。
- hazy5272023-12-10资源内容详实,描述详尽,解决了我的问题,受益匪浅,学到了。
- 2301_768852242023-04-23内容与描述一致,超赞的资源,值得借鉴的内容很多,支持!
海神之光
- 粉丝: 5w+
- 资源: 6110
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功