Leather texture quality detection method and system
Through edge detection and feature point detection algorithms, the key feature points of the strap leather texture are extracted and compared with standard textures, which solves the problem of low quality detection accuracy of the strap leather texture in the prior art, and achieves higher detection accuracy and speed.
Patent Information
- Application Number
- CN202411911162.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-03-14
AI Technical Summary
The prior art is difficult to accurately detect the texture quality of the strap leather, especially because the strap texture is diverse and small, resulting in low detection accuracy.
The edge detection algorithm is used to separate the fine texture edges, and the key feature points of the strap leather texture are extracted through the feature point detection algorithm, and the texture features to be detected are compared with the standard texture features, and the difference values are calculated to evaluate the texture quality.
Through detailed texture edge segmentation and feature point extraction, the accuracy of texture recognition is improved, the quality of the strap leather texture can be effectively detected, and the detection accuracy and speed can be improved.
Smart Images

Figure CN119624941A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to a leather texture quality detection method and system. Background Art
[0002] Leather texture refers to the various patterns and lines formed on the surface of leather. These textures are formed during the leather processing process and reflect the fiber organization and processing technology of the leather. Leather texture not only increases the aesthetics of leather, but also has an important impact on its physical properties and durability. Leather texture can be divided into the following categories according to different processing methods and processes: Plaid: The leather surface presents a diamond pattern, which is usually used for formal business shoes or handbags. Grain: The natural texture similar to tree bark is often used in leisure products such as outdoor shoes. Fine grain: Lines are printed on the surface, which is often used in high-end formal wear or professionally made leather products. Scale: It is made by processing or printing, and is often used in fashion shoes or handbags. Carved pattern: Various patterns are carved by artificial carving, which is often used in high-end handbags or gifts. Leather texture image detection refers to a series of scientific tests on leather and its products to ensure their quality and safety. This detection method mainly relies on image processing technology to distinguish between normal and defective leather by extracting texture features of the leather surface, such as entropy, energy, contrast, correlation, etc. Leather is widely used and can be used to make clothes, shoes, watch straps, etc.
[0003] Strap texture image detection refers to the process of extracting the texture feature parameters of the strap surface through certain image processing technology to obtain a quantitative or qualitative description of the texture. This detection method is mainly used to evaluate the texture, structure and appearance quality of the strap to ensure that the surface treatment of the strap meets the design requirements and usage standards. The general leather strap texture quality detection steps include: Image acquisition: Use a high-resolution camera to capture images of the strap surface. Preprocessing: Perform preprocessing such as denoising and enhancement on the acquired images to improve image quality. Feature extraction: Extract texture feature parameters such as texture direction and roughness through image processing technology. Quantitative or qualitative description: According to the extracted feature parameters, the texture of the strap is quantitatively or qualitatively described. Quality assessment: According to the texture analysis results, the surface quality and physical properties of the strap are evaluated. Due to the variety of strap textures and the relatively fine textures, it is difficult for the current algorithm to accurately detect the texture quality of the strap leather. Summary of the invention
[0004] The purpose of the present invention is to provide a leather texture quality detection method and system. The method performs detailed detection on the leather texture of a watch strap, uses an edge detection algorithm to divide the fine texture, and then extracts the key feature points of the leather texture of the watch strap through a feature point detection algorithm. The feature points of the leather texture of the watch strap to be detected are then compared with the standard leather texture features, thereby effectively detecting the quality of the leather texture of the watch strap. A leather texture quality detection method, comprising: Get leather image; identifying texture features of the leather image; Calculating the difference between the texture feature of the leather image and the standard texture; If the difference value is greater than a preset value, the leather texture quality test fails.
[0005] Preferably, after acquiring the leather image, the method further includes preprocessing the leather image, specifically: De-noising the leather image using a filtering algorithm; Perform grayscale processing on the denoised leather image; The leather image after grayscale processing is enhanced.
[0006] Preferably, the identifying the texture features of the leather image comprises: The edge detection algorithm is used to extract the edge information of leather texture; The key feature points of leather texture are extracted using feature point algorithm.
[0007] Preferably, the identifying and calculating the difference value between the texture feature of the leather image and the standard texture comprises: Match the extracted key feature points and edge information with the data in the leather texture information library; Select the most similar leather texture as the standard texture according to the matching results; Calculate the difference between the texture to be detected and the standard texture.
[0008] Preferably, the identifying and calculating the difference value between the texture to be detected and the standard texture comprises: Calculate the difference between the texture to be detected and the standard texture; Calculating a comprehensive difference degree according to the difference value between the texture to be detected and the standard texture; If any difference value or the comprehensive difference degree is greater than the corresponding preset threshold, the leather texture quality is unqualified.
[0009] Preferably, the step of extracting edge information of leather texture by using an edge detection algorithm comprises: The canny edge detection algorithm is used to calculate the edge points of leather texture on the gradient template; The non-maximum suppression method is used to compare the gradient amplitude of each pixel with its two adjacent points in the gradient direction to determine the potential edge points of the leather texture.
[0010] Preferably, the calculating the difference value between the texture to be detected and the standard texture comprises: Calculate the difference between the feature positions of the texture to be detected and the standard texture; Calculate the difference between the texture to be detected and the standard texture pattern; Calculate the difference between the texture to be tested and the standard texture size.
[0011] A leather texture quality detection system, comprising: Get leather image; identifying texture features of the leather image; Calculating the difference between the texture feature of the leather image and the standard texture; If the difference value is greater than a preset value, the leather texture quality test fails.
[0012] An electronic device comprises: a chip, a processor and a memory, wherein the memory is used to store computer program codes, the computer program codes comprise computer instructions, and when the chip executes the computer instructions, the electronic device executes a leather texture quality detection method.
[0013] A computer-readable storage medium stores a computer program, wherein the computer program includes program instructions. When the program instructions are executed by a processor of an electronic device, the processor is caused to execute a leather texture quality detection method.
[0014] The beneficial effects of the present invention are: 1. The present invention pre-processes the leather image, which can speed up the detection speed of the subsequent leather quality detection algorithm and improve the accuracy of the leather quality detection algorithm; 2. The present invention uses an edge detection algorithm to perform edge segmentation on the leather texture, and different types of textures in the same strap can be segmented and processed separately, thereby improving the accuracy of texture recognition; 3. The present invention uses a feature comparison method to verify the leather texture quality, and obtains the leather texture quality detection result by comparing the extracted texture features to be detected with the standard texture features. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention. In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor. Figure 1 A flow chart of a leather texture quality detection method of the present invention; Figure 2 This is a schematic diagram of the leather image preprocessing process of the present invention; Figure 3 It is a schematic diagram of the process of identifying the texture features of a leather image according to the present invention; Figure 4 The figure is a schematic diagram of the hardware structure of an electronic device of the present invention. DETAILED DESCRIPTION
[0016] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0017] It should be noted that all directional indications (such as up, down, left, right, front, back, etc.) in the embodiments of the present invention are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.
[0018] In addition, the descriptions of "first", "second", etc. in the present invention are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.
[0019] Strap texture image detection refers to the process of extracting the texture feature parameters of the strap surface through certain image processing technology to obtain a quantitative or qualitative description of the texture. This detection method is mainly used to evaluate the texture, structure and appearance quality of the strap to ensure that the surface treatment of the strap meets the design requirements and usage standards. The general leather strap texture quality detection steps include: Image acquisition: Use a high-resolution camera to capture images of the strap surface. Preprocessing: Perform preprocessing such as denoising and enhancement on the acquired images to improve image quality. Feature extraction: Extract texture feature parameters such as texture direction and roughness through image processing technology. Quantitative or qualitative description: According to the extracted feature parameters, the texture of the strap is quantitatively or qualitatively described. Quality assessment: According to the texture analysis results, the surface quality and physical properties of the strap are evaluated. Due to the variety of strap textures and the relatively fine textures, it is difficult for the current algorithm to accurately detect the texture quality of the strap leather.
[0020] The present invention performs preprocessing on leather images, which can speed up the detection speed of subsequent leather quality detection algorithms and improve the accuracy of leather quality detection algorithms; the present invention adopts an edge detection algorithm to perform edge segmentation on leather textures, which can segment different types of textures on the same strap and process them separately, thereby improving the accuracy of texture recognition; the present invention adopts a feature comparison method to verify the leather texture quality, and obtains the leather texture quality detection result by comparing the extracted texture features to be detected with the standard texture features.
[0021] Example 1 A leather texture quality detection method, reference Figure 1 ,include: S100, acquiring leather images; In the embodiment of the present invention, the leather image acquisition device can be adaptively adjusted according to the implementation funds. If the implementation funds are sufficient, a high-resolution camera, an infrared camera, or other equipment that can capture high-definition images can be selected to acquire the leather image. This can greatly improve the efficiency of the subsequent image processing process and the accuracy of leather recognition. If the implementation funds are limited, a simple shooting device can also be used, and the same texture quality recognition effect can be obtained by simply adjusting the subsequent image processing parameters.
[0022] S200, identifies texture features of leather images; The texture of leather can be divided into natural texture and artificial texture. Natural texture is the texture of the leather itself, such as cowhide, sheepskin, pigskin, etc., while artificial texture is the texture created by embossing, embossing and other processes. Texture shape: The texture shapes of different leathers are different. For example, the texture of cowhide is rough, the texture is tough, and the surface is wrinkled; the texture of sheepskin is delicate, soft and smooth; the texture of pigskin is rough and the surface is uneven; the texture of crocodile skin is regular and has a natural luster; the texture of snakeskin is unique and colorful. Different leather textures have different texture characteristics. The quality of the leather image can be verified based on the texture characteristics of the identified leather image. If the size, pattern, and position of the texture characteristics of the leather meet the standard characteristics, then the current leather meets the quality inspection standards.
[0023] S300, calculating the difference between the texture feature of the leather image and the standard texture; The difference between the texture features of the leather image and the standard texture reflects how big the texture difference is between the leather to be tested and the standard leather. The smaller the difference between the texture features of the leather image and the standard texture, the smaller the texture difference between the leather to be tested and the standard leather, which means that the leather to be tested is more consistent with the texture of the standard leather. If the texture difference between the leather to be tested and the standard leather is large, it means that the texture difference between the leather to be tested and the standard leather is large, which also means that the leather to be tested does not meet the texture of the standard leather.
[0024] S400, if the difference value is greater than a preset value, the leather texture quality test fails.
[0025] Since the machine has a fixed error, in an embodiment of the present invention, a small error is allowed between the leather to be tested and the standard leather. The present invention sets a difference value threshold according to actual conditions. If the difference between the texture features of the leather image and the standard texture is greater than the difference value threshold, the leather texture quality detection will fail. If the difference between the texture features of the leather image and the standard texture is within the difference value threshold, the current leather passes the texture quality detection.
[0026] Preferably, reference Figure 2 , S100, after obtaining the leather image, it also includes preprocessing the leather image, specifically: S110, uses filtering algorithm to denoise leather images; Image denoising refers to the process of restoring the original clear image from an image disturbed by noise. Noise appears in the image as data interference that cannot be explained or that the user does not care about. The purpose of denoising is to improve the image quality while retaining the important features of the original image as much as possible. In the embodiment of the present invention, the filtering algorithms that can be selected include: Gaussian filtering. Gaussian filtering can effectively remove random noise in the image and improve the quality of the image by smoothing the image. It is particularly suitable for removing Gaussian noise because Gaussian noise appears in the image as random fluctuations in pixel values, and Gaussian filtering can control the degree of smoothing by adjusting the parameters of the Gaussian function, thereby effectively reducing the influence of noise. The Gaussian filter can better maintain the edge information of the image while smoothing the image. This is because the Gaussian function has rotational symmetry and single-valued function characteristics, which makes the Gaussian filter not biased in any direction when smoothing the image, thereby reducing the loss of edge information. The Gaussian filter has a high computational efficiency because the two-dimensional Gaussian function is separable. This means that the calculation of the two-dimensional Gaussian filter can be achieved by first performing a one-dimensional Gaussian filter on the image and then performing another-dimensional filtering, thereby reducing the amount of calculation. In addition, the width of the Gaussian filter is determined by a parameter. By adjusting the value of the parameter, the smoothness of the image and the detail retention can be balanced; median filtering, median filtering is particularly suitable for removing salt and pepper noise (i.e., randomly appearing black and white pixels or signal mutations) in images or signals. By taking the median of the neighborhood pixels, these noise points can be effectively suppressed, making the image or signal clearer and smoother. Median filtering can better retain the edge information of the image or signal while removing noise. This is because median filtering is based on the principle of sorting statistics and is insensitive to changes in the grayscale value of edge pixels, thus avoiding the problem of edge blur. Median filtering is a nonlinear filtering method, which makes it more effective in processing certain nonlinear noise or signals. Compared with linear filters, nonlinear filters can provide more flexible and accurate filtering effects in some cases; bilateral filtering, the main benefit of bilateral filtering is that it can preserve edge information while smoothing and denoising. Compared with traditional filtering methods such as Gaussian filtering, bilateral filtering not only considers the spatial proximity between pixels, but also the similarity between pixel values, so as to protect edge information while smoothing the image. Bilateral filtering combines two functions: the spatial domain kernel and the range kernel. The spatial domain kernel is the template weight determined by the Euclidean distance of the pixel position, while the range kernel is the template weight determined by the difference of the pixel values. The combination of these two kernels enables bilateral filtering to adjust the weight according to the similarity of pixel values while smoothing the image, thereby maintaining a higher weight at the edge and avoiding edge blur.
[0027] S120, grayscale processing is performed on the denoised leather image; Grayscale processing can convert color images into grayscale images, thereby eliminating the influence of color on image processing. In many application scenarios, color is not important and may even interfere with image analysis and recognition. Through grayscale processing, the color information in the image can be converted into grayscale levels, making subsequent processing and analysis simpler and more accurate. In many image processing tasks, the texture and shape information of the image are of primary concern, and color information is not sensitive. Grayscale processing can remove color information, making the image processing process simpler, thereby improving processing efficiency. In many image analysis and recognition tasks, grayscale processing can eliminate color differences in the image, making the texture and shape information of the image more prominent. For example, in face recognition, grayscale processing can reduce color changes under different lighting conditions, thereby improving recognition accuracy. Grayscale processing can enhance the contrast of the image by adjusting the grayscale level distribution of the image. In some low-contrast images, the grayscale difference between the object and the background is small, making it difficult to distinguish the details of the image. Through grayscale processing, the grayscale level of the image can be adjusted to enhance the contrast between the object and the background, making the details of the image more clearly visible. Compared to color images, grayscale images take up less memory and run faster. In some cases, even after grayscale processing, when the image data volume is still large, it may be further binarized, that is, the pixel value in the image can only be 0 or 1, to further compress the data volume.
[0028] S130, performing enhancement processing on the leather image after grayscale processing.
[0029] Image enhancement can improve the visual effect of the image, enhance the image's clarity, contrast, brightness and other characteristics, and make the image more suitable for human observation or machine analysis and processing. Image enhancement can remove noise from the image, make the edges clearer, and highlight certain properties in the image, thereby improving the readability of the image. In computer vision systems, image enhancement can improve the performance and accuracy of the system. Enhancement can improve the accuracy of tasks such as feature extraction, classification, and detection, while reducing the amount of data that the system needs to process, reducing the complexity and cost of the system. Image enhancement can emphasize the overall or local characteristics of the image, make the originally unclear image clear or emphasize certain features of interest, expand the differences between the features of different objects in the image, and suppress features of no interest.
[0030] Preferably, reference Figure 3 , S200, identifies the texture features of leather images including: S210, extracting edge information of leather texture using edge detection algorithm; The edge information of the edge detection algorithm refers to the points in the image where the brightness or grayscale changes sharply, which usually correspond to the boundaries of the object. The basic principle of edge detection is to detect areas where the brightness or grayscale changes significantly by calculating the gradient or differential of the image. In a continuous function, the larger the derivative, the greater the rate of change, while in a discrete image, the rate of change is calculated by differential. Commonly used edge detection operators include the Sobel operator, Prewitt operator, and Canny operator. The Sobel operator uses two 3x3 convolution kernels to detect edges in the horizontal and vertical directions respectively. One kernel is used in the horizontal direction and the other kernel is used in the vertical direction. By convolving these two kernels with the image, the gradient of the image in the horizontal and vertical directions can be calculated to detect the edge information.
[0031] S220, using a feature point algorithm to extract key feature points of the leather texture.
[0032] In an embodiment of the present invention, the feature point algorithm optionally includes: SIFT, which has the characteristics of scale invariance, rotation invariance and resistance to noise, illumination, affine transformation, etc. The key points of SIFT are usually some prominent points, such as corner points, edge points, etc., which can remain stable under the conditions of illumination, scale changes and rotation. FAST, which finds corner points and edges by detecting the brightness changes of local pixels. The key points of FAST are those points with obvious brightness changes in a specific area.
[0033] Preferably, S300, identifying and calculating the difference between the texture feature of the leather image and the standard texture includes: S310, matching the extracted key feature points and edge information with data in a leather texture information library; Feature matching can help match the features in two images and find the correlation between them. Image registration is achieved by calculating the distance or similarity between two features and selecting a certain threshold for matching. The basic principle of feature matching is to extract features from an image and match them with features in another image. Optional methods include calculating the distance or similarity between two features and selecting a certain threshold for matching. Traditional feature matching algorithms mainly achieve feature matching based on key points, and match by finding special points in the image (such as points with large gradient changes or corner points).
[0034] S320, selecting the most similar leather texture as the standard texture according to the matching result; Because there may be many kinds of textures on the same leather, we cannot use only one leather texture as the standard for judging quality. Therefore, we need to find out which texture type the current detected texture belongs to, and then select the standard texture of this texture type as the comparison texture for quality assessment.
[0035] S330, calculating the difference between the texture to be detected and the standard texture.
[0036] The difference value of the feature can indicate the degree of difference between the two features. If the difference value between the two features is large, it means that there is a large difference between the two features, that is, the two features do not match, that is, the texture to be detected and the standard texture do not match and do not belong to the same texture.
[0037] Preferably, S330, identifying and calculating the difference between the texture to be detected and the standard texture includes: S331, calculating the difference value between the texture to be detected and the standard texture; In an embodiment of the present invention, the texture to be detected and the standard texture need to be compared in multiple aspects, such as size comparison, pattern comparison and position comparison. Each comparison will obtain a score, that is, the difference value between one of the texture to be detected and the standard texture. Through the above detection, the present invention can obtain multiple difference values between a texture to be detected and the standard texture.
[0038] S332, calculating a comprehensive difference degree according to the difference value between the texture to be detected and the standard texture; In the embodiment of the present invention, a plurality of difference values between a texture to be detected and a standard texture are comprehensively evaluated to obtain a comprehensive difference degree, and the comprehensive difference degree reflects the degree of matching between the texture to be detected and the standard texture.
[0039] S333: If any difference value or comprehensive difference degree is greater than the corresponding preset threshold, the leather texture quality is unqualified.
[0040] Any difference value greater than the corresponding preset threshold value indicates that there is an indicator of the texture to be detected that cannot match the standard texture. For example, if the pattern difference value between the texture to be detected and the standard texture is too large, it means that the pattern of the texture to be detected is not standard and cannot pass the quality inspection. If the size difference value between the texture to be detected and the standard texture is too large, it means that the texture to be detected is too large or too small and cannot pass the quality inspection. If the position difference value between the texture to be detected and the standard texture is too large, it means that there is an error in the printing position of the texture to be detected and cannot pass. The difference value of each small item can reflect which specific item of the texture to be detected is not qualified, so as to help the production line adjust which specific production process. The comprehensive difference reflects the overall difference between the texture to be detected and the standard texture. If each small item of the texture to be detected is within the preset threshold, but each small item has a certain deviation from the standard texture, then it will lead to a large comprehensive difference and cannot pass the inspection.
[0041] Preferably, S210, extracting edge information of leather texture using an edge detection algorithm includes: S211, using the canny edge detection algorithm to calculate the edge points of the leather texture on the gradient template; The partial derivative of the gradient function is solved to obtain the gradient size of the leather image in each direction, so as to judge the grayscale transformation in the leather image. For the image f(x,y), its gradient is expressed as: ; The Canny operator is used to calculate the gradient vector and image gradient amplitude in the x and y directions: ; in, and Represents the gradient magnitude components of the image in the x and y directions; At this time, the amplitude of the image gradient is expressed as: ; Among them, M(x, y) represents the image gradient amplitude, and θ(x, y) represents the gradient direction.
[0042] S212, using a non-maximum suppression method to compare the gradient amplitude of each pixel point with its two adjacent points in the gradient direction, to determine potential leather texture edge points.
[0043] Non-maximum suppression is used to determine potential edge points by comparing the gradient amplitude of each pixel with its two adjacent points in the gradient direction. If the gradient amplitude of a point is greater than the gradient amplitude of its two adjacent points, then the point may be an edge point, otherwise its grayscale value is set to 0; after traversing each element point of the image, an image is formed.
[0044] Preferably, calculating the difference value between the texture to be detected and the standard texture includes: Calculate the difference between the feature positions of the texture to be detected and the standard texture; ; in, Represents the texture to be detected, represents the standard texture feature position, Represents the distance between two features; Calculate the difference between the texture to be detected and the standard texture pattern; ; in, Represents a standard texture pattern.
[0045] Calculate the difference between the texture to be tested and the standard texture size.
[0046] ; in, Indicates the standard texture size.
[0047] Example 2 A leather texture quality detection system, comprising: Get leather image; Identify texture features of leather images; Calculate the difference between the texture features of the leather image and the standard texture; If the difference value is greater than the preset value, the leather texture quality test fails.
[0048] Example 3 An electronic device includes: a chip, a processor and a memory, the memory is used to store computer program codes, the computer program codes include computer instructions, and when the chip executes the computer instructions, the electronic device executes a leather texture quality detection method.
[0049] refer to Figure 4 , the electronic device 2 includes a processor 21, a memory 22, an input device 23, and an output device 24. The processor 21, the memory 22, the input device 23, and the output device 24 are coupled via a connector, and the connector includes various interfaces, transmission lines, or buses, etc., which are not limited in the embodiments of the present invention. It should be understood that in various embodiments of the present invention, coupling refers to mutual connection in a specific manner, including direct connection or indirect connection through other devices, for example, through various interfaces, transmission lines, buses, etc.
[0050] The processor 21 may be one or more graphics processing units (GPUs). When the processor 21 is a GPU, the GPU may be a single-core GPU or a multi-core GPU. Optionally, the processor 21 may be a processor group consisting of multiple GPUs, and the multiple processors are coupled to each other via one or more buses. Optionally, the processor may also be other types of processors, etc., which are not limited in the embodiments of the present invention.
[0051] The memory 22 can be used to store computer program instructions and various computer program codes including program codes for executing the scheme of the present invention. Optionally, the memory includes but is not limited to random access memory (RAM), read-only memory (ROM), erasable programmable read only memory (EPROM), or portable read only memory (CD-ROM), which is used for related instructions and data.
[0052] The input device 23 is used to input data and / or signals, and the output device 24 is used to output data and / or signals. The output device 24 and the input device 23 may be independent devices or an integrated device.
[0053] Example 4 A computer-readable storage medium stores a computer program, wherein the computer program includes program instructions. When the program instructions are executed by a processor of an electronic device, the processor executes a leather texture quality detection method.
[0054] The present invention performs preprocessing on leather images, which can speed up the detection speed of subsequent leather quality detection algorithms and improve the accuracy of leather quality detection algorithms; the present invention adopts an edge detection algorithm to perform edge segmentation on leather textures, which can segment different types of textures on the same strap and process them separately, thereby improving the accuracy of texture recognition; the present invention adopts a feature comparison method to verify the leather texture quality, and obtains the leather texture quality detection result by comparing the extracted texture features to be detected with the standard texture features.
[0055] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A leather texture quality detection method, characterized in that: include: Get leather image; identifying texture features of the leather image; Calculating the difference between the texture feature of the leather image and the standard texture; If the difference value is greater than a preset value, the leather texture quality test fails.
2. A leather texture quality detection method according to claim 1, characterized in that: After the leather image is obtained, the leather image is preprocessed, specifically: De-noising the leather image using a filtering algorithm; Perform grayscale processing on the denoised leather image; The leather image after grayscale processing is enhanced.
3. A leather texture quality detection method according to claim 1, characterized in that: The identifying of the texture features of the leather image comprises: The edge detection algorithm is used to extract the edge information of leather texture; The key feature points of leather texture are extracted using feature point algorithm.
4. A leather texture quality detection method according to claim 3, characterized in that: The identifying and calculating the difference between the texture feature of the leather image and the standard texture comprises: Match the extracted key feature points and edge information with the data in the leather texture information library; Select the most similar leather texture as the standard texture according to the matching results; Calculate the difference between the texture to be detected and the standard texture.
5. A leather texture quality detection method according to claim 4, characterized in that: The step of identifying and calculating the difference between the texture to be detected and the standard texture comprises: Calculate the difference between the texture to be detected and the standard texture; Calculating a comprehensive difference degree according to the difference value between the texture to be detected and the standard texture; If any difference value or the comprehensive difference degree is greater than the corresponding preset threshold, the leather texture quality is unqualified.
6. A leather texture quality detection method according to claim 3, characterized in that: The edge detection algorithm is used to extract edge information of leather texture, including: The canny edge detection algorithm is used to calculate the edge points of leather texture on the gradient template; The non-maximum suppression method is used to compare the gradient amplitude of each pixel with its two adjacent points in the gradient direction to determine the potential edge points of the leather texture.
7. A leather texture quality detection method according to claim 5, characterized in that: The calculating of the difference value between the texture to be detected and the standard texture comprises: Calculate the difference between the feature positions of the texture to be detected and the standard texture; Calculate the difference between the texture to be detected and the standard texture pattern; Calculate the difference between the texture to be tested and the standard texture size.
8. A leather texture quality detection system, characterized in that: include: Get leather image; identifying texture features of the leather image; Calculating the difference between the texture feature of the leather image and the standard texture; If the difference value is greater than a preset value, the leather texture quality test fails.
9. An electronic device, characterized in that: include: A chip, a processor and a memory, wherein the memory is used to store computer program codes, wherein the computer program codes include computer instructions, and when the chip executes the computer instructions, the electronic device executes a leather texture quality detection method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions. When the program instructions are executed by a processor of an electronic device, the processor executes a leather texture quality detection method according to any one of claims 1 to 7.