| In the field of oil extraction,the quality of oil casing directly affects the safety and success rate of drilling operations.Therefore,precise measurement of oil casing is necessary before it is put into production.However,the current engineering practice mostly relies on manual inspection methods for measuring casing thread parameters.This method places high demands on the technical expertise of the operators.The limited resolution and subjective variation in visual perception among individuals can lead to errors.To address the issues associated with manual inspection of casing thread parameters,reduce human errors and uncertainties,and comply with the API’s requirements for casing thread parameter detection,a vision-based casing thread parameter recognition system was designed.The main research included:(1)Designed the overall measurement scheme of the system,the operating philosophy of the system was studied,selected the hardware of the system.An optical imaging system consisting of an industrial camera,a telecentric lens and a telecentric light source can realize the high-quality acquisition of casing thread images,and a casing thread parameter recognition software based on the MFC framework was designed to realize the functions of image acquisition,pre-processing,feature extraction and result display;(2)Analytical experiments were conducted on algorithms such as preprocessing and feature extraction applied in casing thread image processing.In the preprocessing stage,the advantages and disadvantages of each image processing algorithm were compared and analyzed.In the feature extraction stage,the accuracy of contour fitting and template matching algorithms were compared and analyzed,and finally the optimized ZNCC template matching algorithm was used to extract the image features;(3)The camera and system were calibrated separately to obtain pixel equivalent values.The detection principles of casing thread pitch,tooth height,and taper were calibrated according to the casing thread size standards specified in GB/T 9253-2022 and the detection methods specified by the API.The calculation formulas for the three parameters were analyzed.Multiple experiments were conducted to compare and analyze the visual recognition results with the gage measurement results.Error analysis was then performed to derive the deviations and uncertainties in the system measurement,and parameter corrections were made accordingly. |