A method for identifying leather surface defects

Through adaptive obtaining leather texture coverage coefficients and correction scale parameters in leather surface image processing, combined with adaptive Retinex single -scale enhancement and neural network recognition, solving the problem of decline in image quality caused by irregular leather surface, which improves the recognition of scar defects. Accuracy.

CN118799323BActive Publication Date: 2025-01-24NANTONG HAOKE NEW MATERIAL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411287819.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-14
Publication Date
2025-01-24
Estimated Expiration
2044-09-14

AI Technical Summary

Technical Problem

The prior art causes the image quality to decline due to environmental reasons during the leather surface image acquisition process, which affects defect recognition, especially due to uneven leather surface, the single-scale enhancement effect is poor.

Method used

By obtaining the leather texture coverage coefficient of each pixel in the leather surface image, the corrected scale parameter of each pixel is adaptively obtained, the adaptive Retinex single-scale enhancement algorithm is used to process the image, and the enhanced image is input into the neural network for scar analysis Defect identification.

Benefits of technology

Improve the clarity and information reliability of the leather surface image, enhance the accuracy of scar defects, and solve the problem of influencing the surface of the leather surface influence.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118799323B_ABST
    Figure CN118799323B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of image processing, and in particular to a method for identifying leather surface defects, which includes collecting leather surface images, obtaining each direction line in each pixel point neighborhood window, and calculating the minimum gradient variance; dividing each pixel point neighborhood window into two regions according to the direction line where the minimum gradient variance is located; constructing the scar defect significance of each pixel point neighborhood window according to the grayscale change between the connected domains of the two regions and the difference in the characteristic vectors of the edge contours of each connected domain, adaptively obtaining the corrected scale parameter of each pixel point, performing single-scale enhancement of each pixel point according to the corrected scale parameter of each pixel point, obtaining an adaptive enhanced image according to the pixel value after the enhancement of each pixel point, and identifying the scar defect region through a neural network according to the enhanced image. Thus, leather surface defect recognition is realized with high recognition accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing, and in particular to a method for identifying leather surface defects. Background Art

[0002] With the rapid development of the economy, people's demand for material quality is constantly increasing, and people are gradually beginning to pursue material quality for backpacks needed for daily travel. Among them, leather bags are particularly popular among the public. Leather is made of processed animal skin, which has good air permeability, flexibility and wear resistance. As a special fabric, it is widely used in various manufacturing industries such as leather bags, leather shoes, leather sofas, etc. Leather products have always been popular. Common leather materials include sheepskin, cowhide, crocodile skin, etc. This kind of animal skin will have various skin problems during the growth of the animal, resulting in defects such as scars and scratches, which will affect the appearance of the leather and reduce the quality of the leather. Leather surface defect recognition can be completed through defect recognition based on machine vision, but in the process of leather surface image acquisition, due to the shooting environment, the image will be overexposed, dark details will be lost, the contrast is insufficient, and the image will be fogged, which will reduce the image quality and affect defect recognition. The image can be enhanced by the Retinex algorithm to improve the image quality and facilitate defect recognition.

[0003] The traditional Retinex single-scale enhancement algorithm has a single scale. Since the leather surface is not completely flat, the brightness and darkness in the captured pictures are uneven, resulting in poor image enhancement effect at a single scale.

[0004] In summary, the present invention proposes a leather surface defect recognition method, which collects leather surface images, obtains the leather texture coverage coefficient of each pixel in the image according to the similar characteristics of the normal texture of the leather surface, thereby obtaining the adaptive scale parameter of each pixel, enhances the image according to the adaptive scale parameter of each pixel, inputs the enhanced image into a neural network, recognizes scar defects in the leather surface image, and realizes leather surface defect recognition. Summary of the invention

[0005] In order to solve the above technical problems, the present invention provides a leather surface defect recognition method to solve the existing problems.

[0006] A leather surface defect recognition method of the present invention adopts the following technical solution:

[0007] An embodiment of the present invention provides a method for identifying leather surface defects, the method comprising the following steps:

[0008] Collecting leather surface images;

[0009] Obtain the neighborhood window of each pixel point in the leather surface image; obtain each direction line in the neighborhood window of each pixel point; obtain the gradient variance of each direction line according to the gradient amplitude of each pixel point on each direction line; obtain the direction line where the minimum gradient variance is located, recorded as the minimum direction line; obtain the areas on both sides of the minimum direction line in the neighborhood window of each pixel point, recorded as the first area and the second area respectively;

[0010] Obtain each connected domain in the first area of ​​each pixel point neighborhood window; obtain the normal leather color membership of each connected domain in the first area of ​​each pixel point neighborhood window according to the grayscale change between the connected domains;

[0011] The edge contours of each connected domain in the first region of each pixel point neighborhood window are obtained by a region growing algorithm; the characteristic vectors of the edge contours of each connected domain are obtained by a Fourier descriptor; the numbers of each connected domain are obtained according to the positions of each connected domain; the edge contours of two connected domains with adjacent numbers are recorded as adjacent edge contours; the shape difference distance of each adjacent edge contour is obtained according to the characteristic vectors of each adjacent edge contour; the homogeneous connected domain compactness coefficient of the first region of each pixel point neighborhood window is obtained according to the shape difference distance of each adjacent edge contour and the size of each connected domain; the leather texture coverage coefficient of the first region of each pixel point neighborhood window is obtained according to the normal leather color membership of each connected domain in the first region of each pixel point neighborhood window and the homogeneous connected domain compactness coefficient; the leather texture coverage coefficient of the second region of each pixel point neighborhood window is obtained;

[0012] The scar defect significance of each pixel point neighborhood window is obtained according to the leather texture coverage coefficient of the first area and the second area of ​​each pixel point neighborhood window and the gradient variance of the direction line in each pixel point neighborhood window; the normal texture enhancement coefficient of each pixel point is obtained according to the scar defect significance of each pixel point neighborhood window; the correction scale parameter of each pixel point is obtained according to the normal texture enhancement coefficient of each pixel point;

[0013] An enhanced image of the leather surface image is obtained according to the corrected scale parameter of each pixel point; and the scar area on the leather surface in the enhanced image is obtained through a neural network.

[0014] Preferably, the normal leather color membership of each connected domain in the first area of ​​each pixel neighborhood window is obtained according to the grayscale change between the connected domains, and the expression is:

[0015]

[0016] In the formula, Pixel The normal leather color membership of the yth connected domain in the first area of ​​the neighborhood window, Pixel The mean gray value of the yth connected domain in the first area of ​​the neighborhood window; Pixel The minimum gray value in the first area of ​​the neighborhood window; Pixel The maximum grayscale value in the first area of ​​the neighborhood window.

[0017] Preferably, the numbering of each connected domain is obtained according to the position of each connected domain, specifically:

[0018] The pixel The connected domains in the first area of ​​the neighborhood window are arranged from left to right and from top to bottom, and the arrangement sequence numbers of the connected domains are used as the numbers of the connected domains.

[0019] Preferably, the shape difference distance of each adjacent edge contour is obtained according to the feature vector of each adjacent edge contour, and the expression is:

[0020]

[0021] In the formula, is the shape difference distance of the yth adjacent edge contour, To use the dynamic time warping algorithm for calculation, is the feature vector of the first edge contour in the yth adjacent edge contour, is the feature vector of the second edge contour in the y-th adjacent edge contour.

[0022] Preferably, the compactness coefficient of the homogeneous connected domain of the first area of ​​each pixel point neighborhood window is obtained according to the shape difference distance of each adjacent edge contour and the size of each connected domain, and the expression is:

[0023]

[0024] In the formula, Pixel The compactness coefficient of the homogeneous connected domain in the first area of ​​the neighborhood window, Pixel The number of connected domains in the first region of the neighborhood window, Pixel The first area in the neighborhood window The shape difference distance of adjacent edge contours, Pixel The first area in the neighborhood window connected domains, Pixel The first area in the neighborhood window A connected domain.

[0025] Preferably, the leather texture coverage coefficient of the first area of ​​each pixel point neighborhood window is obtained according to the normal leather color membership of each connected domain in the first area of ​​each pixel point neighborhood window and the compactness coefficient of the homogeneous connected domain, and the expression is:

[0026]

[0027] In the formula, Pixel The leather texture coverage factor of the first area of ​​the neighborhood window, Pixel The compactness coefficient of the homogeneous connected domain in the first area of ​​the neighborhood window, Pixel The number of connected domains in the first region of the neighborhood window, Pixel The first area in the neighborhood window The normal leather color membership of a connected domain, To correct A constant with a range of values.

[0028] Preferably, the scar defect significance of each pixel point neighborhood window is obtained according to the leather texture coverage coefficient of the first area and the second area of ​​each pixel point neighborhood window and the gradient variance of the direction line in each pixel point neighborhood window, and the expression is:

[0029]

[0030] In the formula, Pixel The scar defect significance of the neighborhood window, Pixel The minimum gradient variance of the direction line in the neighborhood window, Pixel The maximum gradient variance of the directional lines within the neighborhood window, Pixel The leather texture coverage factor of the first area of ​​the neighborhood window, Pixel Leather texture coverage factor for the second region of the neighborhood window.

[0031] Preferably, the normal texture enhancement coefficient of each pixel is obtained according to the scar defect significance of the neighborhood window of each pixel, and the expression is:

[0032]

[0033] In the formula, Pixel The normal texture enhancement coefficient, is an exponential function with base e, Pixel The scar defect significance of the neighborhood window, For control A constant with a range of values.

[0034] Preferably, the correction scale parameter of each pixel is obtained according to the normal texture enhancement coefficient of each pixel, and the expression is:

[0035]

[0036] In the formula, Pixel The modified scale parameter, Pixel The normal texture enhancement coefficient, is the original scale parameter.

[0037] The present invention has at least the following beneficial effects:

[0038] The present invention uses machine vision combined with leather surface texture features to perform adaptive single-scale enhancement on each pixel in the image, and performs defect recognition on the enhanced image to achieve leather surface defect recognition. By performing adaptive Retinex single-scale enhancement processing on the leather surface image, the problem of scar defect recognition affected by the uneven leather surface is solved, the problem of the inability to adaptively enhance the image at a single scale is avoided, the image clarity is improved, the reliability of the leather surface image information is increased, and the recognition accuracy of leather surface scar defects is improved;

[0039] The invention constructs a pixel leather texture coverage coefficient by analyzing the leather surface texture itself, obtains a normal texture enhancement coefficient of each pixel point in combination with the scar defect significance of the neighborhood window of each pixel point, and adaptively obtains a correction scale parameter of each pixel point according to the scar characteristics of each point in the image, thereby obtaining an enhanced leather surface image, performing scar defect recognition on the image, improving the clarity of scar defects, and having high scar defect recognition accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0041] Figure 1 A flowchart of a leather surface defect identification method provided by the present invention;

[0042] Figure 2 For leather surface images;

[0043] Figure 3 Schematic diagram of eight directional lines in the neighborhood window. DETAILED DESCRIPTION

[0044] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of a leather surface defect identification method proposed by the present invention, its specific implementation, structure, features and effects, in conjunction with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

[0045] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

[0046] The specific scheme of the leather surface defect identification method provided by the present invention is described in detail below with reference to the accompanying drawings.

[0047] An embodiment of the present invention provides a method for identifying leather surface defects.

[0048] Specifically, a leather surface defect identification method is provided as follows, please refer to Figure 1 , the method comprises the following steps:

[0049] Step S001, collecting leather surface images and performing preprocessing.

[0050] Although industrially produced leather has a certain degree of hardness, animal leather itself has a certain degree of softness, so in the process of identifying scar defects on the leather surface, some areas may be uneven. Therefore, during the shooting process, the leather should be laid flat on the identification table as much as possible to facilitate the identification of defects later, so as to minimize the impact of the unevenness of the leather surface on defect identification.

[0051] The leather surface image is collected using a CMOS camera. The collected image is an RGB image. The RGB image contains a lot of information, which affects the recognition speed. Therefore, the RGB image is converted into a grayscale image. The grayscale image is preprocessed and the histogram equalization algorithm is used to enhance the image to eliminate the color difference caused by uneven lighting and the influence of some noise.

[0052] Step S002: construct a normal texture enhancement coefficient for each pixel point, and adaptively obtain a correction scale parameter for each pixel point.

[0053] There are some scar defects on the leather surface. These defects are generally long and thin strips. However, unlike the long and thin characteristics of scratch defects, the scar area has a certain width. At the same time, there are a large number of fine textures on the leather surface, which will interfere with the identification of scar defect areas. In the leather surface image, the defect area is different, the defect edge and the leather's own texture distribution are different. The scar morphology information is constructed based on the defect area and the leather's own texture distribution in each channel image of the RGB image.

[0054] The leather surface may have scars, scratches, indentations and other defects. When taking pictures of the leather surface, the surface is not smooth because the material itself has a certain degree of softness and support. Figure 2 However, these raised and sunken areas are too large and are not the scar areas we want. The scar area is different from the concave and convex area, and its edge is more obvious.

[0055] In order to identify the scar edge, a 5x5 neighborhood window is constructed for each pixel in the image, and eight direction lines are determined through the central pixel, such as Figure 3 , calculate the gradient amplitude of each pixel in the leather surface image. It should be noted that the calculation method of the gradient amplitude is a well-known technology, and the specific calculation method can be selected by the implementer. In this embodiment, the Sobel operator is used to calculate the gradient amplitude of each pixel. In the neighborhood window of each pixel, the gradient variance of each direction line is obtained according to the gradient amplitude of each pixel on each direction line. The specific method is a well-known technology and will not be repeated here; the gradient variance of each direction line is compared to obtain the direction line with the minimum gradient variance, which is recorded as the minimum direction line; the neighborhood window of each pixel is divided into two areas with the minimum direction line as the dividing line, which are recorded as the first area and the second area respectively; the position of the minimum boundary line is the edge position of the scar and other slender defects in the neighborhood window of each pixel.

[0056] There are many textures on the leather surface, which are the characteristics of the leather itself. Scars and other defective areas will cover the texture of the leather itself. In order to determine whether each pixel is a defective area such as a scar, the texture of the leather surface is identified. On a normal leather surface, the texture is relatively rough and chaotic, but the size of each rough and chaotic texture is similar, that is, the texture on the leather surface is both chaotically distributed and basically consistent in size. This texture is a characteristic of the leather itself.

[0057] In order to identify this texture, a region growing algorithm is used in the neighborhood window of each pixel point to obtain each connected domain in the neighborhood window of each pixel point. The specific method is a well-known technology and will not be described in detail here.

[0058] In pixels Taking the neighborhood window as an example, the normal leather color membership of each connected domain in the first area of ​​the neighborhood window of each pixel point is obtained according to the grayscale change between the connected domains. The expression is:

[0059]

[0060] In the formula, Pixel The normal leather color membership of the yth connected domain in the first area of ​​the neighborhood window, Pixel The mean gray value of the yth connected domain in the first area of ​​the neighborhood window; Pixel The minimum gray value in the first area of ​​the neighborhood window; Pixel The maximum grayscale value in the first area of ​​the neighborhood window.

[0061] The value of is calculated for each connected domain in the same area of ​​the same neighborhood window. The time average is constant, which is used to measure the color difference of the overall color of each area in each neighborhood window. The larger the difference, the less likely the area is to belong to a normal leather surface. The value of represents the difference between the average gray value in the yth connected domain in the first region and the minimum gray value in the first region. The smaller it is, the darker the color of the y-th connected domain is. The smaller the value, the darker the color of the yth connected domain in the first region is relative to the overall color of the first region, and the more likely the yth connected domain is to have a scar region. Therefore, the smaller the numerator, the larger the denominator, that is, the greater the color difference in the first region, the greater the possibility that the yth connected domain has a scar, and the normal leather color membership The smaller it is, the less the yth connected domain belongs to the normal area of ​​the leather surface.

[0062] The above method is used to obtain the normal leather color membership of each connected domain in the first area and the second area of ​​each pixel point neighborhood window.

[0063] Pixel The edge contours of each connected domain in the first area of ​​the neighborhood window are calculated by using Fourier descriptors to calculate each set of feature vectors of the edge contours of each connected domain. The specific technology is well-known and will not be described in detail. In this embodiment, the first five Fourier descriptors are sufficient to describe the edge contours of each connected domain. Therefore, the first five feature vectors of the edge contours of each connected domain are taken as the feature vector set characterizing the edge contours of each connected domain. .

[0064] Pixel The positions of each connected domain in the first area of ​​the neighborhood window are obtained by numbering each connected domain. Specifically, the pixel point The connected domains in the first area of ​​the neighborhood window are arranged from left to right and from top to bottom, and the arrangement sequence of each connected domain is used as the number of each connected domain. The edge contours of two connected domains with adjacent numbers are recorded as adjacent edge contours. Taking the yth adjacent edge contour as an example, the shape difference distance of each adjacent edge contour is obtained according to the feature vector of each adjacent edge contour. The expression is:

[0065]

[0066] In the formula, is the shape difference distance of the yth adjacent edge contour, To use the dynamic time warping algorithm for calculation, is the feature vector of the first edge contour in the yth adjacent edge contour, is the feature vector of the second edge contour in the y-th adjacent edge contour. and The greater the difference, the lower the similarity between the two, the greater the shape difference distance of the yth adjacent edge contours, the more different the shapes of the two edge contours are, and the smaller the possibility of being on a normal leather surface. The shape difference distance of each adjacent edge contour in the first area of ​​the neighborhood window.

[0067] The pixel points are obtained according to the shape difference distance of each adjacent edge contour and the size of each connected domain. The compactness coefficient of the homogeneous connected domain in the first area of ​​the neighborhood window is expressed as:

[0068]

[0069] In the formula, Pixel The compactness coefficient of the homogeneous connected domain in the first area of ​​the neighborhood window, Pixel The number of connected domains in the first region of the neighborhood window, Pixel The first area in the neighborhood window The shape difference distance of adjacent edge contours, Pixel The first area in the neighborhood window connected domains, Pixel The first area in the neighborhood window A connected domain. The smaller, the The more similar the contours of adjacent edges are, the more likely the connected domain is a normal homogeneous texture area on the leather surface. The smaller the value of The more similar the sizes of adjacent connected domains are, the more likely they are normal texture areas on the leather surface with basically the same size. In summary, the more similar the edge contours of adjacent connected domains are, the more similar the sizes are, and the more likely the pixel points are. The greater the compactness coefficient of the homogeneous connected domain in the first area of ​​the neighborhood window, the greater the possibility that it is a normal leather texture area.

[0070] The compactness coefficient of the homogeneous connected domain represents whether there are similar areas around the pixel point, and cannot distinguish between scar areas and non-scar areas.

[0071] In order to distinguish the scar area from the non-scar area, according to the pixel The normal leather color membership of each connected domain in the first area of ​​the neighborhood window and the compactness coefficient of the homogeneous connected domain are used to obtain the leather texture coverage coefficient of the first area of ​​the neighborhood window of each pixel point. The expression is:

[0072]

[0073] In the formula, Pixel The leather texture coverage factor of the first area of ​​the neighborhood window, Pixel The compactness coefficient of the homogeneous connected domain in the first area of ​​the neighborhood window, Pixel The number of connected domains in the first region of the neighborhood window, Pixel The first area in the neighborhood window The normal leather color membership of a connected domain, To correct A constant with a range of values, The implementer can select the value of The value of is set to 0.5. To find pixels The normal leather color membership average of all connected domains in the first area of ​​the neighborhood window is in the range of 0-1. After that, the value range is between 0.5-1.5, so as to control The larger the value, the more likely it is the normal leather texture color. The greater the amplification effect; The larger the pixel The more similar the edge contours and sizes of adjacent connected domains in the first area of ​​the neighborhood window are, the more likely they are in the normal leather texture area. In summary, The bigger, The larger the pixel The first area of ​​the neighborhood window is more likely to be covered by leather texture, that is, the pixel The greater the possibility that the first area of ​​the neighborhood window is a non-scar area, The bigger.

[0074] When photographing the leather surface, the leather material itself has a certain degree of softness and support, so the surface is not flat. However, these raised and sunken areas are too large and are not the scar areas we want. The scar area is different from the concave and convex area, and its edge is more obvious.

[0075] According to the leather texture coverage coefficient of the first area and the second area of ​​each pixel point neighborhood window and the gradient variance of the direction line in each pixel point neighborhood window, the scar defect significance of each pixel point neighborhood window is obtained, and the expression is:

[0076]

[0077] In the formula, Pixel The scar defect significance of the neighborhood window, Pixel The minimum gradient variance of the direction line in the neighborhood window, Pixel The maximum gradient variance of the directional lines within the neighborhood window, Pixel The leather texture coverage factor of the first area of ​​the neighborhood window, Pixel The leather texture coverage coefficient of the second area of ​​the neighborhood window. The smaller the gradient variance of the direction line, the smaller the gradient change of each pixel point on the direction line, and the greater the possibility of being an edge line; the larger the gradient variance of the direction line, the greater the gradient change of each pixel point on the direction line. When it is perpendicular to the edge line, the gradient variance is the largest; when the pixel point Neighborhood window The larger it is, the greater the gradient change in the vertical edge line direction, and the more obvious the edge line is. The larger the pixel The greater the possibility that the edge line in the neighborhood window is the scar edge; The smaller it is, the more obvious the edge line is; The larger the value is, the greater the difference in texture features between the two sides of the minimum direction line is, and the greater the possibility that the minimum direction line is an edge line. In summary, The smaller, The bigger, The larger the pixel The scar edge feature of the neighborhood window is more obvious, and the pixel The greater the scar defect significance of the neighborhood window, The bigger.

[0078] The scar defect significance of each pixel neighborhood window is calculated in the above manner.

[0079] According to the scar defect significance of each pixel neighborhood window, the normal texture enhancement coefficient of each pixel is obtained, and the expression is:

[0080]

[0081] In the formula, Pixel The normal texture enhancement coefficient, is an exponential function with base e, Pixel The scar defect significance of the neighborhood window, For control A constant with a range of values, The implementer can select the value of is set to 1.11, thus The value range of becomes 0-1.11; pixel The smaller the normal leather area feature of the neighborhood window, the smaller the pixel The greater the scar defect significance of the neighborhood window, The smaller, The bigger.

[0082] Set a minimum normal texture enhancement coefficient threshold. It should be noted that the minimum normal texture enhancement coefficient threshold can be set by the implementer. In this embodiment, the minimum normal texture enhancement coefficient threshold is set to 0.89. If it is less than 0.89, it is calculated as 0.89, thus The value of is controlled in the range of 0.89 to 1.11.

[0083] According to the normal texture enhancement coefficient of each pixel, the correction scale parameter of each pixel is obtained, and the expression is:

[0084]

[0085] In the formula, Pixel The modified scale parameter, Pixel The normal texture enhancement coefficient, is the original scale parameter. The more obvious the scar defect is, the smaller the normal leather area features are. The smaller it is, the better the effect of preserving the details of the scar edge will be. On the contrary, if it is enlarged , thus making the colors of the low-illuminance areas in the enhanced image more vivid.

[0086] The corrected scale parameter of each pixel is calculated according to the above method.

[0087] Step S003, obtaining an enhanced image according to the corrected scale parameter of each pixel point, and performing scar defect recognition through a neural network.

[0088] The corrected scale parameter of each pixel is brought into the Gaussian surround function, and the Gaussian surround function is used to perform Retinex single-scale calculation on each pixel of the three channel images of R, G, and B on the leather surface to obtain the enhanced R, G, and B component grayscale values ​​of each pixel, thereby obtaining the enhanced RGB image of the leather surface.

[0089] The enhanced leather surface RGB image is sent as input to the autoencoder neural network to identify the scar defects in the image. The output is the scar area on the leather surface in the image, thus completing the leather surface defect recognition.

[0090] In summary, the embodiment of the present invention uses machine vision combined with leather surface texture features to perform adaptive single-scale enhancement on each pixel in the image, and performs defect recognition on the enhanced image to achieve leather surface defect recognition. By performing adaptive Retinex single-scale enhancement processing on the leather surface image, the problem of scar defect recognition affected by the uneven leather surface is solved, the problem of the inability to adaptively enhance the image at a single scale is avoided, the image clarity is improved, the reliability of the leather surface image information is increased, and the recognition accuracy of scar defects on the leather surface is improved;

[0091] This embodiment constructs the leather texture coverage coefficient of the pixel point through the analysis of the leather surface's own texture, and obtains the normal texture enhancement coefficient of each pixel point in combination with the scar defect significance of the neighborhood window of each pixel point. The corrected scale parameter of each pixel point is adaptively obtained according to the scar characteristics of each point in the image, thereby obtaining an enhanced leather surface image, performing scar defect recognition on the image, improving the clarity of scar defects, and having a high scar defect recognition accuracy.

[0092] It should be noted that the sequence of the above embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. The above is a description of a specific embodiment of this specification. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0093] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.

[0094] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Modifications to the technical solutions recorded in the aforementioned embodiments, or equivalent replacement of some of the technical features therein, do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A method for identifying leather surface defects, characterized in that: The method comprises the following steps: Collecting leather surface images; Obtain the neighborhood window of each pixel point in the leather surface image; obtain each direction line in the neighborhood window of each pixel point; obtain the gradient variance of each direction line according to the gradient amplitude of each pixel point on each direction line; obtain the direction line where the minimum gradient variance is located, recorded as the minimum direction line; obtain the areas on both sides of the minimum direction line in the neighborhood window of each pixel point, recorded as the first area and the second area respectively; Obtain each connected domain in the first area of ​​each pixel point neighborhood window; obtain the normal leather color membership of each connected domain in the first area of ​​each pixel point neighborhood window according to the grayscale change between the connected domains; The edge contours of each connected domain in the first region of each pixel point neighborhood window are obtained by a region growing algorithm; the characteristic vectors of the edge contours of each connected domain are obtained by a Fourier descriptor; the numbers of each connected domain are obtained according to the positions of each connected domain; the edge contours of two connected domains with adjacent numbers are recorded as adjacent edge contours; the shape difference distance of each adjacent edge contour is obtained according to the characteristic vectors of each adjacent edge contour; the homogeneous connected domain compactness coefficient of the first region of each pixel point neighborhood window is obtained according to the shape difference distance of each adjacent edge contour and the size of each connected domain; the leather texture coverage coefficient of the first region of each pixel point neighborhood window is obtained according to the normal leather color membership of each connected domain in the first region of each pixel point neighborhood window and the homogeneous connected domain compactness coefficient; the leather texture coverage coefficient of the second region of each pixel point neighborhood window is obtained; The scar defect significance of each pixel point neighborhood window is obtained according to the leather texture coverage coefficient of the first area and the second area of ​​each pixel point neighborhood window and the gradient variance of the direction line in each pixel point neighborhood window; the normal texture enhancement coefficient of each pixel point is obtained according to the scar defect significance of each pixel point neighborhood window; the correction scale parameter of each pixel point is obtained according to the normal texture enhancement coefficient of each pixel point; An enhanced image of the leather surface image is obtained according to the corrected scale parameters of each pixel point; the enhanced leather surface RGB image is used as the input of the autoencoder neural network, and the output is the scar area on the leather surface in the enhanced image.

2. A leather surface defect identification method as claimed in claim 1, characterized in that: The normal leather color membership of each connected domain in the first area of ​​each pixel point neighborhood window is obtained according to the grayscale change between the connected domains, and the expression is: In the formula, Pixel The normal leather color membership of the yth connected domain in the first area of ​​the neighborhood window, Pixel The mean gray value of the yth connected domain in the first area of ​​the neighborhood window; Pixel The minimum gray value in the first area of ​​the neighborhood window; Pixel The maximum grayscale value in the first area of ​​the neighborhood window.

3. A leather surface defect identification method as claimed in claim 1, characterized in that: The numbering of each connected domain is obtained according to the position of each connected domain, specifically: The pixel The connected domains in the first area of ​​the neighborhood window are arranged from left to right and from top to bottom, and the arrangement sequence numbers of the connected domains are used as the numbers of the connected domains.

4. A leather surface defect identification method as claimed in claim 1, characterized in that: The shape difference distance of each adjacent edge contour is obtained according to the feature vector of each adjacent edge contour, and the expression is: In the formula, is the shape difference distance of the yth adjacent edge contour, To use the dynamic time warping algorithm for calculation, is the feature vector of the first edge contour in the yth adjacent edge contour, is the feature vector of the second edge contour in the y-th adjacent edge contour.

5. The method for identifying leather surface defects according to claim 1, characterized in that: The homogeneous connected domain compactness coefficient of the first area of ​​each pixel point neighborhood window is obtained according to the shape difference distance of each adjacent edge contour and the size of each connected domain, and the expression is: In the formula, Pixel The compactness coefficient of the homogeneous connected domain in the first area of ​​the neighborhood window, Pixel The number of connected domains in the first region of the neighborhood window, Pixel The first area in the neighborhood window The shape difference distance of adjacent edge contours, Pixel The first area in the neighborhood window connected domains, Pixel The first area in the neighborhood window A connected domain.

6. A leather surface defect identification method as claimed in claim 1, characterized in that: The leather texture coverage coefficient of the first area of ​​each pixel point neighborhood window is obtained according to the normal leather color membership of each connected domain in the first area of ​​each pixel point neighborhood window and the compactness coefficient of the homogeneous connected domain, and the expression is: In the formula, Pixel The leather texture coverage factor of the first area of ​​the neighborhood window, Pixel The compactness coefficient of the homogeneous connected domain in the first area of ​​the neighborhood window, Pixel The number of connected domains in the first region of the neighborhood window, Pixel The first area in the neighborhood window The normal leather color membership of a connected domain, To correct A constant with a range of values.

7. A leather surface defect identification method as claimed in claim 1, characterized in that: The scar defect significance of each pixel point neighborhood window is obtained according to the leather texture coverage coefficient of the first area and the second area of ​​each pixel point neighborhood window and the gradient variance of the direction line in each pixel point neighborhood window, and the expression is: In the formula, Pixel The scar defect significance of the neighborhood window, Pixel The minimum gradient variance of the direction line in the neighborhood window, Pixel The maximum gradient variance of the directional lines within the neighborhood window, Pixel The leather texture coverage factor of the first area of ​​the neighborhood window, Pixel Leather texture coverage factor for the second region of the neighborhood window.

8. A leather surface defect identification method as claimed in claim 1, characterized in that: The normal texture enhancement coefficient of each pixel is obtained according to the scar defect significance of each pixel neighborhood window, and the expression is: In the formula, Pixel The normal texture enhancement coefficient, is an exponential function with base e, Pixel The scar defect significance of the neighborhood window, For control A constant with a range of values.

9. A leather surface defect identification method as claimed in claim 1, characterized in that: The correction scale parameter of each pixel is obtained according to the normal texture enhancement coefficient of each pixel, and the expression is: In the formula, Pixel The modified scale parameter, Pixel The normal texture enhancement coefficient, is the original scale parameter.

Citation Information

Patent Citations

  • Defect analysis and diagnosis system, method and device based on artificial intelligence

    CN112862770A

  • Metal structural member detection method based on feature matching

    CN116758067A