Disclosure of Invention
(One) solving the technical problems
Aiming at the defects of the prior art, the invention provides a multi-mode fusion-based leather surface defect detection system, a group of leather surface images are acquired under different exposure time through an HDR optical imaging module and synthesized into high dynamic range images so as to more comprehensively capture fine features of the leather surface, a 3D point cloud reconstruction module converts the images into three-dimensional point cloud data, three-dimensional information of the leather surface is acquired through a laser scanning technology, a data fusion module effectively integrates the HDR image and the three-dimensional point cloud data by using an image registration technology to form a multi-mode data set, thus providing richer information for subsequent processing, a feature extraction module extracts various features related to leather surface defects from the multi-mode data set, the features are then input into a deep learning detection module, the deep learning model is used for carrying out efficient identification and classification on the leather defects, and a self-adaptive calibration module is used for adjusting parameters of the deep learning model in real time according to detection results so as to improve detection accuracy, and the problems of scratches and defect identification under micro-texture interference of leather can be effectively solved by a self-adaptive calibration algorithm driven by deep learning, and detection accuracy is up to 99.2%.
(II) technical scheme
In order to achieve the aim, the invention provides the technical scheme that the leather surface defect detection system based on multi-mode fusion comprises an HDR optical imaging module, a 3D point cloud reconstruction module, a data fusion module, a feature extraction module, a deep learning detection module and a self-adaptive calibration module;
the HDR optical imaging module is used for acquiring a group of leather surface images shot at different exposure time and then synthesizing the leather surface images into an HDR leather image, wherein one group is 20;
The 3D point cloud reconstruction module converts the leather surface image into three-dimensional point cloud data, and obtains the three-dimensional information of the leather surface image by utilizing a laser scanning technology;
The data fusion module fuses the three-dimensional point cloud data of the HDR leather image and the leather surface image by using image registration to form a multi-mode data set;
The feature extraction module extracts features related to the leather surface defects from the multi-mode dataset, wherein the features comprise texture features, geometric features, color features, depth features and edge features;
The deep learning detection module inputs the features extracted by the feature extraction module into a trained deep learning model and outputs a leather defect detection result;
The self-adaptive calibration module is used for adjusting parameters of the deep learning model in real time according to leather defect detection results.
Preferably, the formula for generating the HDR leather image is as follows:
In the formula, I HDR denotes a generated high dynamic range image, N denotes the total number of input images for generating an HDR image, w (I i) denotes a weight calculated for each input image I i, determined by luminance information of the image, and I i denotes an I-th input image.
Preferably, the three-dimensional point cloud data is generated by generating coordinates of the three-dimensional point cloud data in space from a depth image and a camera internal reference matrix according to a laser scanning technology, and the formula is as follows:
P(x,y,z)=Z(x,y)*K-1*D(x,y)
In the formula, P (x, y, Z) represents the three-dimensional coordinates of one point in the generated three-dimensional point cloud data, Z (x, y) represents the distance of each pixel point in the depth direction, K -1 represents the inverse of the camera internal reference matrix, and D (x, y) represents the pixel value at position (x, y) in the two-dimensional image.
Preferably, the formula of the image registration is as follows:
In the formula, T represents a transformation matrix for aligning an HDR image with point cloud data, M represents the total number of feature points to be registered, F j represents a j-th feature point in a set of feature points after registration, g (R (I HDR) represents a feature point extraction function for extracting feature points from given HDR image and point cloud data P j), R (I HDR) represents a result after feature extraction processing is performed on the HDR image, P j represents one point in a three-dimensional point cloud for registration, and j represents an index.
Preferably, the extraction formula of the texture features is as follows:
In the formula, contrast represents the Contrast characteristic of an image, K represents the total number of gray levels, and GLCM (i, j) represents the frequency of occurrence of a pair of pixels having gray levels i and j.
Preferably, the extraction formula of the geometric feature is as follows:
In the formula, area represents the Area of the detected defect region, p represents each pixel point in the image, and R represents the defect region, i.e., the set of pixel points satisfying the defect condition.
Preferably, the extraction formula of the color feature is as follows:
In the formula, H (c) represents the frequency of occurrence of the color c in the image I, I (x, y) represents the color value at the coordinates (x, y) in the image I, c represents the number of occurrences of the color in the image, and (x, y) ∈i represents each pixel coordinate in the image I, and the histogram is calculated by traversing each pixel value in the image.
Preferably, the extraction formula of the depth feature is as follows:
In the formula, Δz represents an average value of the change in the leather surface height, n represents the number of selected feature points, Z (x i,yi) represents a depth value at coordinates (x i,yi), and Z mean represents an average depth value of the feature points.
Preferably, the formula for extracting the edge features is as follows:
In the formula, E (x, y) represents the edge intensity at coordinates (x, y), Representing the gradient of the image I at a horizontal point,Representing the gradient of the image I at the vertical points.
Preferably, the formula for adjusting the parameters of the deep learning model is as follows:
In the formula, theta ′ represents updated model parameters, theta represents model parameters to be updated, eta represents model learning rate, Representing the gradient of the loss function L with respect to the model parameter theta,Representing the loss function, y representing the actual target output,Representing the predicted values given by the model.
Compared with the prior art, the invention provides a leather surface defect detection system based on multi-mode fusion, which has the following beneficial effects:
According to the invention, a group of leather surface images are acquired under different exposure time through the HDR optical imaging module and synthesized into high dynamic range images so as to more comprehensively capture fine features of the leather surface, the 3D point cloud reconstruction module converts the images into three-dimensional point cloud data, and three-dimensional information of the leather surface is acquired through a laser scanning technology, the data fusion module effectively integrates the HDR images and the three-dimensional point cloud data to form a multi-mode dataset by using an image registration technology, so that richer information is provided for subsequent processing, the feature extraction module extracts various features related to leather surface defects from the multi-mode dataset, the features are then input into the depth learning detection module, the trained depth learning model is used for carrying out high-efficiency identification and classification on the leather defects, the self-adaptive calibration module adjusts parameters of the depth learning model in real time according to detection results so as to improve detection accuracy, and the self-adaptive calibration algorithm driven by the depth learning can effectively solve the identification problem of micro scratches and wrinkles under leather texture interference, and detection accuracy is up to 99.2%.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Aiming at the situation that the traditional leather surface defect detection method relies on manual detection, the efficiency is low, and the detection omission and false detection are caused by the influence of human factors, a leather surface defect detection system based on multi-mode fusion is provided, and referring to fig. 1, the system comprises an HDR optical imaging module, a 3D point cloud reconstruction module, a data fusion module, a feature extraction module, a deep learning detection module and a self-adaptive calibration module;
The heart of this technical process consists in generating an HDR image using a combination of images, in particular, assuming we have a set of I 1、I2、I3、...、In (total 20) each acquired at different exposure settings, which are such that the image covers detailed information from dark to bright in the brightness range,
In this process, the formula for generating an HDR image by weighted combining of these images is as follows:
Wherein I HDR is the final HDR image, w (I i) is the weight calculated, and is usually optimized according to the brightness information of the image to reduce the overexposure and underexposure phenomena in the image, specifically, the calculation of the weight w (I i) can be based on the distribution characteristics of the brightness of the image, so as to ensure that the details of the area photographed with the best exposure are reserved as much as possible in the final HDR image, and the method of weighted combination enhances the dynamic range of the image while reducing noise, so that the image can still retain abundant detail information when displaying a scene with strong contrast between brightness and darkness;
The HDR optical imaging technology is mainly used for providing higher image quality and sense of reality, particularly when textures, colors and characteristics of the leather surface are carefully observed, the HDR image can reveal details which cannot be captured under single exposure, further, the generation process of the HDR image can effectively improve visual expressive force in subsequent analysis (such as a deep learning detection module) and improve the accuracy of leather surface defect detection, so that the HDR imaging technology based on different exposure combinations not only realizes clearer and richer image expression, but also lays a solid foundation for subsequent image processing and analysis;
the 3D point cloud reconstruction module can accurately capture and reconstruct the three-dimensional surface structure of leather by converting the leather surface image into three-dimensional point cloud data, the process is usually combined with a laser scanning technology to obtain more accurate and rich spatial information, specifically, the laser scanning device emits a laser beam, the distance is calculated by using the time difference between the emitted laser beam and the reflected light of the leather surface, and then the point cloud data is generated, and the process can be represented by the following formula:
P(x,y,z)=Z(x,y)*K-1*D(x,y)
Wherein P (x, y, Z) represents the three-dimensional coordinates of one point in the generated three-dimensional point cloud data, Z (x, y) represents the distance of each pixel point in the depth direction, K -1 represents the inverse matrix of the camera internal reference matrix, D (x, y) represents the pixel value at the position (x, y) in the two-dimensional image, and the rich point cloud covering the leather surface can be obtained by carrying out laser scanning on a plurality of angles and different positions;
The obtained point cloud data consists of a group of three-dimensional coordinate points (x, y, z), each point represents a specific position on the leather surface, the three-dimensional reconstruction can accurately reproduce the shape, texture and detail of the leather in space, more comprehensive information is provided than that of the traditional two-dimensional image, and the analysis of the point cloud data is beneficial to the subsequent fine surface feature extraction and defect detection;
The 3D point cloud can visually display geometric information of an object, the abundant depth information of the 3D point cloud can be used for a plurality of computer vision algorithms, such as volume measurement, shape analysis, three-dimensional reconstruction and the like, the quality and the accuracy of the point cloud can be further improved through supplementary algorithms, such as normal vector calculation and point cloud smoothing, in addition, the point cloud can be fused with data (such as HDR images) acquired by other sensors, the defects on the leather surface can be deeply detected and analyzed through a data fusion technology, and finally higher detection precision and efficiency are realized.
The data fusion module effectively fuses three-dimensional point cloud data of a High Dynamic Range (HDR) leather image and a leather surface image by using an image registration technology to form a multi-mode data set, wherein the image registration refers to the alignment of data from different sources under the same coordinate frame, so that the data can correspond to each other in space, and the geometric transformation and the feature matching of the image are generally involved;
In this process, a set of feature points or regions needs to be selected, which are identifiable in both the HDR image and the three-dimensional point cloud, and after setting these feature points, the following registration algorithm can be applied:
In the formula, T represents a transformation matrix for aligning an HDR image with point cloud data, M represents the total number of feature points for registration, F j represents the j-th feature point in a registered feature point set, g (R (I HDR) represents a feature point extraction function for extracting feature points from given HDR image and point cloud data P j), R (I HDR) represents a result of feature extraction processing on the HDR image, P j represents one point in a three-dimensional point cloud for registration, j represents an index, and the matching and optimization of the feature points can realize the accurate alignment of a data set, so that the rich illumination information of the HDR image and the space geometric information of the three-dimensional point cloud can be effectively fused, and a good data complementation effect can be achieved;
The multi-modal data set has the advantages that the multi-modal data set combines two different forms of information, the evaluation capability of leather surface characteristics is enhanced, the HDR image can provide accurate representation of illumination and surface details, the three-dimensional point cloud provides real space information about surface shape and depth, through the fusion, more comprehensive characteristic extraction can be realized, the performance of subsequent machine learning and deep learning algorithms can be improved, and the multi-modal data set has remarkable effects in the aspects of leather surface defect detection, quality evaluation and automatic detection;
The feature extraction module plays a vital role in the multi-mode data set, and various features related to the leather surface defects, including texture features, geometric features, color features, depth features and edge features, are extracted, so that abundant basic data are provided for subsequent defect detection and analysis, and the process adopts various advanced technical means to ensure comprehensive and accurate capture of the leather surface information;
First, in texture feature extraction, a gray level co-occurrence matrix (GLCM) is typically used to evaluate second order statistical features of textures, such as contrast, correlation, entropy, etc., and the contrast is calculated by the following formula:
Wherein GLCM (i, j) is symbiotic probability under different gray levels, and fine change and irregularity of the leather surface can be effectively identified by utilizing the texture characteristics, which is particularly important for detecting defects such as scratches, wrinkles and the like;
in geometric feature extraction, detection of an abnormal region is performed by the following formula:
Where Area represents the Area of the detected defect region, p represents each pixel point in the image, R represents the defect region, i.e. the set of pixel points satisfying the defect condition, and each pixel point p satisfying the condition is given a value of 1, which means that this pixel belongs to the defect region and statistically contributes a "unit Area". Regardless of how large or small the pixel is, it is considered as part of the whole area, and by summing all eligible pixels, in effect, calculating the total size of the area covered by the pixels, this simple counting effectively yields the total area of the defective area, while using more complex area calculation methods (e.g., shape analysis) may not be necessary here, since we only care if a defect is present and its area size;
In the process of extracting the color features, the color histogram of the HDR image is analyzed to extract the color difference and the speckles of leather, and the color histogram can be defined by the following formula:
The key point of the process is to identify color anomalies caused by uneven dyeing or material defects by comparing the color distribution of different texture areas, and the combination of the multidimensional features makes definition and understanding of surface defects clearer;
Furthermore, the extraction formula of the depth feature is as follows:
in the formula, deltaZ represents the average value of the height change of the leather surface, n represents the number of selected characteristic points, Z (x i,yi) represents the depth value at the coordinate (x i,yi), Z mean represents the average depth value of the characteristic points, and the depth characteristics can effectively distinguish the unevenness and the structural change of the leather surface, so that key information support is provided for identifying potential problems;
finally, edge feature extraction uses an edge detection algorithm, as follows:
Where E (x, y) represents the edge strength at coordinates (x, y), Representing the gradient of the image I at a horizontal point,The gradient of the image I in the vertical direction point is represented, and the edge characteristics can clearly identify the boundary of the leather surface defect, so that the defect is positioned more accurately;
By comprehensively extracting texture, geometry, color, depth and edge characteristics, the characteristic extraction module not only enhances the identification capability of leather surface defects, but also provides high-quality data support for subsequent machine learning and deep learning models, and the comprehensive characteristic analysis enables the system to detect and classify diversified surface defects in real time, promotes the intellectualization and automation of leather manufacturing, and improves the overall quality and market competitiveness of products;
The deep learning detection module is responsible for inputting the multidimensional features extracted by the feature extraction module into a trained deep learning model, and finally outputting an accurate leather defect detection result, the process relies on a deep learning architecture such as a Convolutional Neural Network (CNN) and the like, so that various defects such as scratches, uneven colors, structural deformation and the like on the leather surface can be effectively identified and classified, and the deep learning model is trained by a large amount of labeling data to continuously optimize the internal parameters of the deep learning model, so that efficient and accurate defect identification is realized;
In order to further improve the detection effect of the model, an adaptive calibration module needs to be introduced, and the main function of the module is to quickly adjust parameters of the deep learning model according to the obtained leather defect detection result on the basis of real-time detection, and the dynamic adjustment can not only optimize the input data characteristics which are continuously changed, but also improve the robustness and adaptability of the model in practical application, for example, the calibration module can adjust the model parameters by the following formula assuming that the model does not perform ideal on a certain batch of leather samples:
In the formula, theta ′ represents updated model parameters, theta represents model parameters to be updated, eta represents model learning rate, Representing the gradient of the loss function L with respect to the model parameter theta,Representing a loss function, the predicted output can be measuredThe gap from the real tag y, typically using mean square error or cross entropy etc. as loss metrics;
By dynamically adjusting parameters, the model can perform self-optimization on the basis of error feedback on the basis of new samples, which means that in actual operation, when the model faces new leather defects, the recognition capability can be quickly adapted and improved, the self-adaptive calibration not only improves the response speed of the deep learning model to real-time data flow, but also improves the reliability and accuracy of the whole detection system, so that the model is more suitable for fast change and high-requirement scenes in industrial production environments;
The combination of the deep learning detection module and the self-adaptive calibration module forms an intelligent and real-time defect detection system, and the system can not only improve the current detection capability, but also realize the rapid adaptation to future defect types which are not found in continuous learning and adjustment, so that the quality control in the leather production process becomes more efficient and flexible.
By the application of the system, the problem of identification of micro scratches and fold defects under the interference of leather textures can be solved by utilizing a self-adaptive calibration algorithm driven by deep learning, the detection precision reaches 99.2%, and the full-flow automatic quality control of leather manufacturing is supported.
Although embodiments of the present invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made therein without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.