资源说明:毕业设计和课程设计全套资料,主程序代码
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);
本源码包内暂不包含可直接显示的源代码文件,请下载源码包。