| Round tubular parts are widely used in military,aerospace and other fields,and the quality of such parts will directly affect the progress and development of this field.These parts are susceptible to bending and deformation due to factors such as the external environment during production and use,so quality inspection of them is crucial.Among them,the straightness of the inner hole axis of round tubular parts is one of the important indicators to judge the quality of parts.In this paper,the small bore pipe fittings with an inner hole diameter of 25~32mm and a length of 1500~2500mm are used as the detection object,and their inner diameter is small,and conventional detection methods such as large detection equipment placed inside cannot be used.This paper conducts in-depth research on this problem,proposes a detection method based on machine vision,and designs the corresponding detection device to be used with the straightening equipment to meet the needs of related industries.According to the detection scheme,the overall design of the experimental device was made,and the detection principle was explained in detail.At the same time,according to the particularity of the pipe fittings,the mechanical structure of the detection device is designed,mainly including the centering mechanism,clamping mechanism and driving mechanism.According to the detection accuracy requirements,the calculation and selection of the imaging system was completed.Then,the camera lens distortion is corrected by using the calibration assistant that comes with HALCON software,and the internal and external parameters of the camera are obtained,which provides a basis for subsequent coordinate conversion.Secondly,in order to obtain the center point coordinates of the spot image,the collected spot image is subjected to image preprocessing,threshold segmentation,Canny operator edge detection,and Hough transform standard circle center recognition.In addition,three commonly used straightness evaluation methods are analyzed,and the spatial straightness error evaluation is carried out by binary traversal method according to the actual situation,and the straightness error value of the pipe fittings is obtained.Finally,through HALCON software and C# language joint programming,the human-computer interaction interface for straightness detection was developed and designed on the Visual Studio 2021 software platform,and the main functional modules were introduced in detail to facilitate the operation and use of workers.According to the detection scheme,an experimental platform was built for experimental verification,and the experimental results showed that the repeatability of the detection system was high and the detection scheme was stable and feasible.In addition,compared with the traditional lever method test results,the detection results of this system are found to have good accuracy and high detection accuracy,which can be applied to actual testing.After the completion of the test,the occurrence of systematic error is analyzed according to the detection situation,and certain improvement measures are proposed. |