毕业设计和课程设计全套资料,主程序代码clc;clearall;closeall;warningoffall;I=imread('images\\1.jpg');I1=Image_Normalize(I,0);%图像归一化hsize=[33];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);
1