With the rapid development of China’s economy,people’s living standards have gradually risen in recent years,and many of them are now inseparable from the demand for automobiles for travel and transportation,and the consumer market for automobiles has thus become larger,and the number of automobiles manufactured in China has risen as more and more brands have become better and better.In the production of automobiles,large thick plate parts with assembly holes are widely used,such as longitudinal beams and U-beam plates as the load-bearing part of automobiles.Whether the size of the assembly holes meet the error requirements for the whole vehicle assembly is very important,for its measurement is directly related to the success of the assembly to ensure the stability of the vehicle after the overall assembly.At present,most of the assembly holes for such parts use machine vision technology for size detection,this paper for the large size of thick plate parts assembly hole diameter detection to study:First of all,the online inspection mechanism is designed with the automobile longitudinal beam plate as the research object,the hardware selection of the image acquisition system is made,and the inspection scheme is developed,and the workflow of the inspection mechanism is introduced.Then,after the calibration experiment of the camera,the images of the research object are acquired to obtain images that satisfy the stitching quality,and the image filtering and image enhancement pre-processing operations are performed to reduce the useless feature points by ROI region selection to make the SIFT algorithm operation speed increase and optimize the alignment process,and the grayscale values near the stitching are used for weighted fusion after the alignment is completed to obtain a complete image without stitching.Then,because the pseudo-edge of round holes in the image,and shadows have more similar features in the image,with reference to the current shadow removal algorithm,the pseudo-edge elimination experiment based on OTSU and U-S-Cycle-GAN network for pseudo-edge holes is proposed.The normal round hole image samples are processed using the OTSU algorithm,which is divided into two parts: background and foreground,and finally the number of samples is expanded by rotation and deflation transformations to build a dataset with pseudo-edge holes and normal round hole samples.To obtain finer edge feature information,the depth of the generator structure is increased with reference to the jump structure of U-Net network,the STN spatial attention mechanism is added to correct the generated round hole shape variations,the U-S-Cycle-GAN generator is constructed,the Markov discriminator structure is selected as the discriminator,the perceptual loss is added to the loss function,and the results generated after the training of this network are very effective for the pseudo-edge region removal is very effective.The canny operator is used to coarsely localize the pixel-level edges of the circular hole image,and on this basis,the Zernike moment subpixel edge extraction is selected to obtain the subpixel edge points,and the least squares method is used to fit them to obtain their aperture and feature circle.Finally,a simple experimental mechanism is built to verify the feasibility of this paper.First,the collected experimental plate images are stitched to obtain the complete graphics,all the holes on the plate are numbered,the pseudo-edge holes are extracted and input into the trained edge removal network to eliminate pseudo-edges,and the diameters of all the holes are obtained by sub-pixel edge extraction and least squares method,and the diameter dimensions obtained from the CMM are compared with the table data The measurement error of the eliminated pseudo-edge holes is ±0.3mm,and the measurement error of the normal holes is ±0.25 mm,both of which meet the requirement of ±0.5mm measurement accuracy. |