| Computer vision has an irreplaceable role in research,defense and industry,and has made great progress in many fields.In industrial production,target detection and measurement technology is a very important task,often used in the quality inspection stage of products.Most of the current inspection methods rely on manual contact measurement,which is inefficient and not accurate enough.Currently,vision-based non-contact measurement techniques have gradually replaced manual measurement,which significantly increases safety and improves efficiency compared to manual contact measurement.A fundamental task in vision measurement technology is edge detection,and the accuracy of the detection affects the final measurement results.In order to measure the size of the plate more accurately,this paper studies the sub-pixel edge detection algorithm and size measurement method in detail,and uses the synthetic image and PVC plate image as the experimental object,and finally realizes the edge detection of the object and the dimension measurement of the plate.The main research contents of the paper are as follows.(1)This paper improves the subpixel edge detection algorithm based on the partial area effect(PAE).The algorithm establishes a model in the neighborhood of the edge pixel and obtains high-precision edges by calculation.When calculating the subpixel position,the original method takes the intersection of the curve and the y-axis as the edge point,which will lose some information of the curve and is not accurate enough.In order to improve the accuracy of plate detection,this paper proposes a more accurate method for calculating subpixel position based on this method,which determines the position of edge points in the direction of edge normals.This method improves the acquisition of subpixel edge points in the linear and curved models and optimizes the calculation of parameters within the edge pixels.After obtaining the sub-pixel positions of the edges,the camera is calibrated by the Zhang Zhengyou calibration method,and the image coordinate system is linked to the world coordinate system to calculate the diameter of the circular PVC sheet.The experimental results show that in terms of synthetic circle position detection,the mean square error of the radius is 0.0341,which is smaller than the other two algorithms.In terms of actual image measurement,the mean square error of circular sheet diameter is 0.0186,so the method has high stability and accuracy.(2)This paper improves the subpixel edge detection algorithm based on Zernike moments.Unlike the Zernike moments method based on the step function model,the method uses the linear ramp model as the edge intensity function and combines the idea of the bilinear interpolation method to optimize the selection of parameters in the edge model.Through the validation of various examples,it is found that the improved algorithm outperforms the compared methods for edge localization of noise-containing images.After edge detection,this paper proposes a method that traverses image pixels and preserves edge pixels,relates the preserved edge points to the world coordinate system,and then fits the actual edge coordinate points to parallel lines,thus avoiding the interference of extraneous noise points and finally achieving accurate measurement of sheet dimensions.The method is computationally efficient and non-iterative,and the experiments have verified the feasibility of the method with high noise immunity and accuracy by making several measurements of the length of the plates.After edge detection,this paper proposes a method that traverses image pixels and preserves edge pixels,associates the preserved edge points with the world coordinate system,and then fits the actual edge coordinates with a parallel line fitting method,thus avoiding the interference of extraneous noise points and finally achieving accurate measurement of sheet dimensions.The method is efficient and non-iterative in calculation.The length of the PVC plate is measured many times in the experiment,which verifies that the method has high anti-noise performance and accuracy. |