文件名称:答题卡识别
文件大小:5.19MB
文件格式:RAR
更新时间:2021-05-31 12:03:56
MATLAB 霍夫变换 答题卡识别
毕业设计和课程设计全套资料,主程序代码 clc; clear all; close all; warning off all; I = imread('images\\1.jpg'); I1 = Image_Normalize(I, 0);%图像归一化 hsize = [3 3]; sigma = 0.5; I2 = Image_Smooth(I1, hsize, sigma, 0); I3 = Gray_Convert(I2, 0); bw2 = Image_Binary(I3, 0);%二值化处理 [~, ~, xy_long] = Hough_Process(bw2, I1, 0);%霍夫变换 angle = Compute_Angle(xy_long);%计算角度 [I4, bw3] = Image_Rotate(I1, bw2, angle*1.8, 0);%图像旋转 [bw4, Loc1] = Morph_Process(bw3, 0);%形态处理 [Len, XYn, xy_long] = Hough_Process(bw4, I4, 0); [bw5, bw6] = Region_Segmation(XYn, bw4, I4, 0); [stats1, stats2, Line] = Location_Label(bw5, bw6, I4, XYn, Loc1, 1); [Dom, Aom, Answer, Bn] = Analysis(stats1, stats2, Line, I4);
【文件预览】:
main.m
Hough_Process.m
Location_Label.m
images
----1.JPG(5.19MB)
Gray_Convert.m
Morph_Process.m
Image_Normalize.m
Analysis.m
Image_Smooth.m
results
Image_Binary.m
Write_Results.m
Region_Segmation.m
Image_Rotate.m
Compute_Angle.m