| In this paper,the characteristics analysis,detection algorithm design,result analysis and corresponding algorithm improvement are carried out for the hole,yellow stain and black stain of plaster.In the detection of hole,the single use of threshold segmentation method has limitations,such as global threshold segmentation method and local threshold segmentation method.This paper presents a detection algorithm based on local gray extremum in directional gray space.The algorithm combines two parts of region of interest extraction and threshold segmentation.Firstly,the region of interest is extracted by extremum and amplitude of gray distribution curve,and then the region of interest is processed by threshold segmentation to achieve the purpose of hole detection.Region of interest(ROI)extraction is realized by combining extreme value and amplitude.Threshold segmentation consists of two parts: the first part uses absolute amplitude as the characteristic quantity to generate amplitude histogram and calculates automatic threshold value through amplitude histogram to carry out segmentation;the second part uses the minimum gray value of the region as the characteristic quantity to carry out high-low threshold segmentation on the segmentation result of the first part.In the detection of yellow stain,this paper carries out appropriate white balance processing on the required image through the gray world algorithm,then decompose the image in HSV(Hue,Saturation,Value)space,and finally carries on the analysis and processing to the H(Hue)channel image.The processing process is to first carry out mean filtering on H channel image,and then select the point with gray value satisfying the hue range according to the direction for region segmentation,and finally generate the segmented image.In the detection of black stain,Gauss filter is firstly used to preprocess the image,and then the minimum value of each concave line segment on the gray distribution curve is extracted from the preprocessed image according to the direction,and arranged according to the coordinate order to generate a new gray distribution curve.The amplitude and extremum information are extracted from this new gray distribution curve,the image is segmented by amplitude histogram.In order to reduce false detection,gray value is introduced as the characteristic quantity,and the second segmentation can reduce false detection through gray value neighborhood comparison of the points segmented from the amplitude histogram.The research of this subject is based on the image processing of machine vision,after the test of image library,this research is proved to have certain practical value. |