| Machine vision based product surface quality inspection is an important technological frontier in the field of intelligent manufacturing,which is of great significance for guaranteeing product quality and optimizing machining processes.Surface defect detection performance relies on high-quality image data.However,in complex industrial inspection situations,there are many irresistible factors such as gesture of workpiece changes,focal point dynamic changes,and natural features of the surface,and the acquired low-quality images affect the visual perception capability of defect detection systems.Therefore,this thesis focus on the surface defect detection,mines deep into the physical prior knowledge related to the defect image characteristics,and develops image enhancement techniques for three common low quality factors including uneven illumination,defocus blur,and texture interference,to optimize the surface defect detection image quality to improve the subsequent vision detection algorithm accuracy.The main research contents are as follows:To solve the problems that the existing uneven illumination image enhancement model cannot accurately eliminate the illumination unevenness,and the enhancement process is easy to lose important defect information and the solution is time consuming,this thesis proposes a joint background prior and deep denoising prior uneven illumination image enhancement model.To accurately eliminate the uneven illumination in defective images and shorten the model time,a semi-coupled solver for uneven illumination image enhancement model is constructed.To achieve the retention of important defect information in the enhancement process,a background prior based on multi-scale spatial Gaussian difference is constructed in industrial defect images.To further reduce the model time,a deep denoising network is introduced as the prior knowledge embedded in the image enhancement optimization model,which shorten the number of iterative solutions by upgrading the smoothing constraints.Finally,quantitative and qualitative analysis in both public and private datasets verifies the effectiveness of the joint prior based enhancement model for uneven illumination image enhancement.To solve the problem of artificial artifact due to the defocus diffusion effect of the existing defocus image enhancement methods based on image fusion,an improved defocus image enhancement method based on depth prior is proposed in this thesis.Considering the correlation between the scene depth information and the degree of defocus blur,the depth prior is introduced into the multi-focus fusion network to accurately obtain the defocus image depth prior,the blur estimation network is trained using synthetic defocus image data,and the domain adaptation module is used to shorten the domain difference between the real image and the synthetic image.To eliminate the interference of defocus diffusion on image fusion,prior information is fused with deep features to build a fusion network based on spatial feature transformation for effective fusion of defocus images.Through quantitative and qualitative experimental analysis,the effectiveness of the depth prior guidance in enhancing the off-focus image enhancement is verified.To solve the impact of texture background interference on defect detection,this thesis proposes a texture image enhancement method based on multivariate Gaussian distribution prior.Accurate reconstruction of texture background is the key to eliminate texture background interference and improve the semantic characterization ability of defects,and the existing reconstruction methods cannot suppress defect information reconstruction while accurately reconstructing texture background.To solve this problem,the multivariate Gaussian distribution prior of texture dataset is fully utilized to transform the texture reconstruction problem into a blind image inpainting problem.Based on this idea,this thesis adopts an anomaly estimation method based on multi-scale feature fusion to estimate texture inconsistency regions using multivariate Gaussian distribution,and then suppress the reconstruction of defect information.To address the problem that the texture details cannot be accurately reconstructed,a inpainting network with contextual attention mechanism is constructed,and the multi-scale structural loss function is combined to achieve accurate reconstruction of texture images.The effectiveness of the blind inpainting based reconstruction method in texture background image enhancement is verified by quantitative and qualitative analysis on public and private datasets.Finally,to verify the effectiveness of the proposed series of enhancement methods,this thesis completes the experimental validation on the self-developed integrated production line for motor commutator processing and inspection and the jointly developed automatic optical inspection equipment for optical chips.On the commutator production line’s cylinder surface inspection platform and hole inspection platform,the defect segmentation accuracy was improved by 4.5% and 10.6%,respectively.On the optical chip quality inspection equipment,the defect segmentation accuracy is improved by 6.7% than before.Thus,the effectiveness of the proposed series of image enhancement methods in this thesis is verified for practical surface defect detection. |