CN116205911B - Machine vision-based method for detecting appearance defects of leather sports goods - Google Patents
Machine vision-based method for detecting appearance defects of leather sports goods Download PDFInfo
- Publication number
- CN116205911B CN116205911B CN202310466834.0A CN202310466834A CN116205911B CN 116205911 B CN116205911 B CN 116205911B CN 202310466834 A CN202310466834 A CN 202310466834A CN 116205911 B CN116205911 B CN 116205911B
- Authority
- CN
- China
- Prior art keywords
- sub
- merging
- block
- area
- blocks
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
- G06T7/0004—Industrial image inspection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/11—Region-based segmentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20021—Dividing image into blocks, subimages or windows
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/30—Computing systems specially adapted for manufacturing
Landscapes
- Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Quality & Reliability (AREA)
- Image Processing (AREA)
Abstract
The invention relates to the technical field of image processing, in particular to a machine vision-based method for detecting appearance defects of leather sports goods, which comprises the following steps: the method comprises the steps of collecting a natural leather image, partitioning the natural leather image, obtaining texture variability of each sub-block, screening initial sub-blocks, respectively carrying out sub-block merging operation on each initial sub-block, taking the initial sub-block as a reference sub-block, obtaining pre-merging sub-blocks according to sub-blocks in the neighborhood of the reference sub-block, merging all the pre-merging sub-blocks and merging areas into a new merging area, calculating the doubtful degree of the current merging area, further obtaining the doubtful increasing degree of the current merging area, obtaining a target area according to the doubtful degree of the current merging area and the doubtful increasing degree of the current merging, obtaining the defect rate of the target area, further obtaining a cavity defect area, and realizing the appearance defect detection of the sports goods. The invention eliminates the influence of illumination on the cavity defect detection, so that the detection result is more accurate.
Description
Technical Field
The invention relates to the technical field of image processing, in particular to a machine vision-based method for detecting appearance defects of leather sports goods.
Background
With the development of technology nowadays, the quality requirements of people on sports goods are higher and higher, and athletes want to improve the performance of the players in the competition through the optimization of the sports goods, and leather sports goods are made of leather as materials, and most common sports goods such as balls such as basketball and pommels in gymnastics are particularly important for detecting defects of natural leather used for making leather sports goods.
Because the defect area of the natural leather has the characteristic of texture loss, but because of the influence of illumination, the natural texture of a part of normal areas is not obvious in the natural leather image, and when the defects of the natural leather are detected by using the traditional threshold segmentation or edge detection methods, the illumination influence area can cause interference, so that the defect detection of the natural leather is inaccurate.
Disclosure of Invention
The invention provides a machine vision-based method for detecting appearance defects of leather sports goods, which aims to solve the existing problems.
The invention discloses a machine vision-based method for detecting appearance defects of leather sports goods, which adopts the following technical scheme:
one embodiment of the invention provides a machine vision-based method for detecting appearance defects of leather sports goods, which comprises the following steps:
collecting natural leather images; dividing the natural leather image into a plurality of sub-blocks with the same size, and acquiring texture variability of each sub-block according to gradient amplitude values of each pixel point in the natural leather image; acquiring an initial sub-block according to texture variability of all sub-blocks of the natural leather image;
for each initial sub-block, sub-block merging operations are performed respectively, including:
s1: taking the initial sub-block as a reference sub-block; taking the initial sub-block as a merging area;
s2: acquiring all pre-combined sub-blocks according to all sub-blocks in the neighborhood of each reference sub-block; when the pre-merging sub-block does not exist, taking the merging area as a target area, and ending the sub-block merging operation; when the pre-merging sub-blocks exist, merging all the pre-merging sub-blocks and the merging area into a large area as a new merging area, realizing one-time merging, and acquiring the doubtful degree of the current merging area according to the current merging times and each sub-block in the merging area obtained by the current merging;
s3: taking the difference between the doubtful degree of the current merging area and the doubtful degree of the merging area obtained by the last merging as the doubtful increasing degree of the current merging;
s4: acquiring a target area according to the doubtful degree of the current merging area and the doubtful growing degree of the current merging area, and if the target area does not exist, taking each pre-merging sub-block of the current merging as a new reference sub-block respectively, and repeating S2 to S4 until the target area is obtained, and stopping iteration;
obtaining the defect rate of the target area according to all the sub-blocks and adjacent sub-blocks in the target area; and marking the empty defect area by taking the target area with the defect rate larger than a preset fourth threshold value as the empty defect area, and finishing appearance defect detection.
Preferably, the obtaining the texture variability of each sub-block according to the gradient amplitude of each pixel point in the natural leather map includes the following specific steps:
and taking the sum of gradient magnitudes of all pixel points in each sub-block as texture variability of each sub-block.
Preferably, the method for obtaining the initial sub-block according to the texture variability of all sub-blocks of the natural leather image comprises the following specific steps:
performing linear normalization on the texture variability of all the sub-blocks to obtain normalized texture variability of each sub-block; local minima of normalized texture variability of all sub-blocks of the natural leather image are obtained, and the sub-block corresponding to each local minima is used as an initial sub-block.
Preferably, the step of obtaining all pre-combined sub-blocks according to all sub-blocks in the neighborhood of each reference sub-block includes the following specific steps:
and calculating the absolute value of the difference value of the normalized texture variability of each sub-block and the reference sub-block in the neighborhood of each reference sub-block, and taking the corresponding sub-block as a pre-merging sub-block if the absolute value of the difference value is smaller than a preset first threshold value.
Preferably, the step of obtaining the suspicion degree of the current merging area according to the number of times of the current merging and each sub-block in the merging area obtained by the current merging includes the following specific steps:
the number of times of current merging is recorded as J, and the doubt degree of the merging area obtained by the J-th merging is as follows:
;
wherein the method comprises the steps ofThe doubt degree of the merging area obtained by the J-th merging is determined; />Is->Sequence numbers of the secondary merging; />Is the firstThe number of pre-merging sub-blocks during secondary merging; />The number of times of current merging; />Is->Normalized texture variability of the kth pre-merge sub-block at the time of sub-merge; />The average of normalized texture variability for all sub-blocks in the merge region obtained after the J-th merge.
Preferably, the obtaining the target area according to the doubt degree of the current merge area and the doubt increase degree of the current merge area includes the following specific steps:
if the doubt degree of the current merging area is larger than or equal to a preset second threshold value or the doubt increase degree of the current merging is larger than or equal to a preset third threshold value, taking the merging area obtained by the last merging as a target area; if the suspicion degree of the current merging area is smaller than a preset second threshold value or the suspicion increase degree of the current merging area is smaller than a preset third threshold value, the target area does not exist.
Preferably, the step of obtaining the defect rate of the target area according to all the sub-blocks and the adjacent sub-blocks in the target area includes the following specific steps:
taking the average value of the normalized texture variability of all the sub-blocks in each target area as the texture complexity of each target area; taking the normalized texture variability of the sub-block adjacent to the target area as the texture complexity of the sub-block; and calculating the difference between the texture complexity of the target area and the texture complexity of each adjacent sub-block, and taking the average value of the difference between the texture complexity of the target area and the texture complexity of all adjacent sub-blocks as the defect rate of the target area.
The technical scheme of the invention has the beneficial effects that: according to the method, the natural leather image is segmented, the texture variability of each sub-block is obtained, the initial sub-block is screened out according to the texture variability of each sub-block, the initial sub-block is taken as a sub-block of a hole defect area or a lighting influence area, expansion and combination are carried out on the periphery of the initial sub-block by taking the initial sub-block as a reference sub-block, the doubtful degree of the combined area is obtained according to the texture variability of the combined sub-block and the combination times of the combined sub-blocks once for each expansion and combination, the doubtful increase degree of the current combined area is further obtained, the doubtful increase degree is collected, the doubtful increase degree and the doubtful increase degree are collected, the target area is obtained, the target area is a complete image feature in the natural leather image, the hole defect area is screened out according to the texture complexity of the target area and the texture variability of surrounding sub-blocks, and the sports appearance defect detection is realized.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart showing the steps of the machine vision-based method for detecting the appearance defects of leather sports goods according to the present invention.
Detailed Description
In order to further describe the technical means and effects adopted by the invention to achieve the preset aim, the following detailed description is given below of the machine vision-based method for detecting the appearance defects of the leather sports articles according to the invention, which is based on the drawings and the preferred embodiments. In the following description, different "one embodiment" or "another embodiment" means that the embodiments are not necessarily the same. Furthermore, the particular features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
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.
The following specifically describes a specific scheme of the machine vision-based method for detecting the appearance defects of the leather sports goods.
Referring to fig. 1, a flowchart of a method for detecting an appearance defect of a leather sports product based on machine vision according to an embodiment of the invention is shown, and the method includes the following steps:
s001, collecting natural leather images.
In order to ensure the quality of the leather-made sporting goods, it is necessary to detect defects in natural leather from which the leather-made sporting goods is made, and first, it is necessary to collect an image of the natural leather.
In the production of leather sports goods, it is necessary to convey natural leather to a cutting process by a conveyor belt for cutting, a camera is installed above the conveyor belt before the cutting process, an RGB image of the natural leather on the conveyor belt is photographed by the camera, and the RGB image of the natural leather is subjected to graying processing to obtain a gray image, which is referred to as a natural leather image, for convenience of subsequent processing. It should be noted that, the graying process is a known technique, and detailed description thereof is omitted in the embodiment of the present invention.
Thus, a natural leather image was obtained.
S002, partitioning the natural leather image to obtain texture variability of each sub-block.
It should be noted that the leather on the surface of the leather sports product is made of animal fur, and has natural texture characteristics, and the void defects on the leather are formed by the beating and collision of the animal before birth, and the natural texture characteristics of the void defect areas on the leather are not obvious, so that the natural texture is lost. Therefore, the texture distribution characteristics of each region in the natural leather image can be analyzed, and the region which is likely to be a cavity defect can be screened out by combining the texture distribution characteristics of each region. The natural texture features of the hollow defect areas are not obvious, the internal gray level change is small, and when no illumination is influenced, the natural texture features of the normal areas (non-hollow defect areas) on the leather are obvious, and the internal gray level change is large, so that the texture distribution features of each area can be reflected by combining the gray level change condition of each area in the natural leather image.
In the embodiment of the invention, the gradient amplitude of each pixel point in the natural leather image is firstly obtained, in the embodiment of the invention, the gradient amplitude of each pixel point in the natural leather image is obtained by utilizing a Sobel operator, and in other embodiments, an operator can select other image gradient algorithms, including but not limited to Laplacian operator and scharr operator.
Dividing a natural leather image into a plurality ofIn the embodiment of the present invention, n=5, and in other embodiments, the operator may set the size of N according to the actual implementation situation.
Obtaining texture variability of each sub-block according to gradient amplitude values of all pixel points in each sub-block, wherein if the texture variability of the m-th sub-block is:
;
wherein the method comprises the steps ofTexture variability for the m-th sub-block; />Is the mth sub-block +.>Gradient magnitude of each pixel point; n is the side length of the sub-block, < >>The sub-block size is the number of pixel points contained in the sub-block; />For the sum of the gradient magnitudes of all the pixels of the mth sub-block, when the gradient magnitude of each pixel in the mth sub-block is smaller, the mth sub-block isThe sum of gradient amplitudes of the pixel points is smaller, the gray level change of the mth sub-block is small, and the texture variability of the mth sub-block is small; when the gradient amplitude of each pixel point in the mth sub-block is larger, the sum of the gradient amplitudes of all the pixel points in the mth sub-block is larger, the gray level change of the mth sub-block is large, the texture variability of the mth sub-block is large, and the sub-block is more likely to be a sub-block of a normal area.
Thus, the texture variability of each sub-block is obtained. And carrying out linear normalization on the texture variability of all the sub-blocks to obtain the normalized texture variability of each sub-block, and marking the normalized texture variability of each sub-block as the normalized texture variability of each sub-block.
S003, merging the sub-blocks according to the texture variability of the sub-blocks.
It should be noted that, when the normalized texture variability of a sub-block approaches 1, it is explained that the more likely the sub-block is a normal region; when the normalized texture variability of the sub-block approaches 0, it is indicated that the gray scale variation inside the sub-block is small and the texture features are not obvious. Since the natural leather image is obtained by taking a photograph of a camera mounted above a conveyor belt and then performing graying treatment, in the photographing environment, the natural texture of the illumination-affected area is not obvious and the area of the void defect appears more similar, so that when the normalized texture variability of the sub-block approaches 0, the sub-block is more likely to be the area of the void defect or the illumination-affected area. Meanwhile, as the sub-blocks which divide the natural leather image into small sub-blocks, the area of the cavity defect can be divided into a plurality of sub-blocks, and the illumination influence area can be divided into a plurality of sub-blocks, the sub-blocks are combined by combining the variation condition of the normalized texture variability among all the sub-blocks to obtain a combined area, the combined area can be a complete cavity defect area or an illumination influence area, and then the illumination influence area and the cavity defect area can be distinguished according to the variation condition among the combined areas to obtain the complete cavity defect area.
It should be further noted that, since the normalized texture variability of the hole defect region and the illumination influence region is low and approaches 0, merging between adjacent sub-blocks is performed starting from the sub-block with the low normalized texture variability in the natural leather image.
In the embodiment of the invention, local minima of normalized texture variability of all sub-blocks of the natural leather image are obtained, and the sub-block corresponding to each local minima is respectively used as an initial sub-block. It should be noted that, the obtaining of the local minimum is a known technique, and detailed description is omitted in the embodiment of the present invention.
For each initial sub-block, sub-block merging operation is performed respectively, specifically:
1. presetting a threshold valueThe first threshold is preset. Taking the initial sub-block as a reference sub-block, and taking the initial sub-block as a merging area;
2. for each sub-block in eight adjacent areas of each reference sub-block, if the absolute value of the difference value of the normalized texture variability of the sub-block and the reference area is smaller than a preset first threshold valueWhen the sub-block is used as a pre-merging sub-block. In the embodiment of the invention, a first threshold value is preset>In other embodiments, the practitioner can set a preset first threshold value according to the actual implementation>Is a value of (2).
Acquiring all the pre-merging sub-blocks, and when the pre-merging sub-blocks do not exist, taking the merging area as a target area, and ending the sub-block merging operation at the moment;
when the pre-merging sub-blocks exist, all the pre-merging sub-blocks and the merging area are merged into a large area as a new merging area, and one-time merging is realized. Calculating the doubt degree of the current merging region according to the current merging times, and recording the current merging times as J, wherein the doubt degree of the merging region obtained by the J-th merging (namely the current merging) is as follows:
;
wherein the method comprises the steps ofThe doubt degree of the merging area obtained by the J-th merging is determined; />Is->Sequence numbers of the secondary merging; />Is->The number of pre-merging sub-blocks during secondary merging; />The number of times of current merging; />Is->Normalized texture variability of the kth pre-merge sub-block at the time of sub-merge; />The average value of the normalized texture variability of all the sub-blocks in the merging area obtained after the J-th merging is obtained; />Indicate->The weight of each pre-merged sub-block at the time of sub-merging, when the number of merging times is smaller, the corresponding pre-merged sub-block is obtained compared with the initial sub-block or the reference sub-block closer to the initial sub-block, at this time, the pre-merged sub-blockThe more trusted, the less attention is paid to the pre-merged sub-block when the number of merging is small when calculating the doubt of the merged region, the weight of the pre-merged sub-block when the number of merging is small ≡>The smaller; conversely, when the merging times are larger, the corresponding pre-merging sub-block is obtained compared with the reference sub-block which is closer to the edge in the current merging region, and the pre-merging sub-block is more unreliable, so that when the doubt degree of the merging region is calculated, the normalized texture variability and +_of the pre-merging sub-block when the merging times are larger are compared with>The more concerned the difference of the characteristic is, the more concerned the sub-blocks representing different characteristics are merged into the same merging region, the more the merging times are, the weight of the pre-merged sub-blocks is increasedThe larger.
3. According to the doubt degree of the merging region obtained by current merging and the merging region obtained by last merging, obtaining the doubt increase degree of the current merging, if the doubt increase degree of the J-th merging is:
;
wherein the method comprises the steps ofThe suspected growth degree for the J-th merge; />The doubt degree of the merging area obtained by the J-th merging is determined; />The doubt degree of the merging area obtained by the J-1 time merging is the doubt degree of the merging area; when->The smaller the pre-merging sub-block is, the smaller the influence of the pre-merging sub-block on the merging area is, and the pre-merging sub-block and the merging area are the same characteristic in the natural leather image, such as the hollow defect area or the illumination influence area. When j=1, J-1=0, in this case, the +.>。
4. Presetting two threshold values、/>Respectively recording as a preset second threshold value and a preset third threshold value, wherein the second threshold value is preset in the embodiment of the invention>、/>In other embodiments, the practitioner can set a preset second threshold value according to the actual implementation>Presetting a third threshold +.>Is a value of (2).
If the doubt degree of the merging region obtained by the J-th merging is more than or equal to a preset second threshold valueOr the suspected increase in the J-th merge is greater than or equal to a preset third threshold +.>The effect of the J-th merging is poor, and the difference between the pre-merging sub-block and the merging area is smaller although the pre-merging sub-block and the reference sub-block are smallerIn this case, the merging area obtained by previous merging (i.e., J-1 st time) is taken as a final merging area, and is recorded as a target area, and it should be noted that when j=1, J-1=0, and the target area is the initial sub-block; if the doubtful degree of the merging area obtained by the J-th merging is smaller than the preset second threshold value +.>And the suspected growth degree of the J-th merge is smaller than a preset third threshold +.>The effect of the J-th merging is better, when the difference between the pre-merging sub-block of the J-th merging and the reference sub-block is smaller and the difference between the pre-merging sub-block and the whole merging area is smaller, the whole merging area obtained by the J-th merging is a feature in the natural leather image, such as a hole defect or an illumination influence area, at the moment, each pre-merging sub-block of the J-th merging is respectively used as a new reference sub-block, the steps 2 to 4 are repeated until the target area is obtained, iteration is stopped, and at the moment, the sub-block merging operation is ended.
One target area is available for each initial sub-block.
Thus, the merging of the sub-blocks is completed, and a plurality of target areas are obtained.
It should be noted that, in the embodiment of the present invention, texture variability of each sub-block is obtained by partitioning a natural leather image, an initial sub-block is screened out according to the texture variability of each sub-block, the initial sub-block is a sub-block of a hole defect area or an illumination influence area, expansion and combination are performed around the initial sub-block as a reference sub-block, once expansion and combination are performed, the doubtful degree of the combined area is obtained according to the texture variability of the combined sub-block and the combination times, the doubtful growth degree of the current combination is further obtained, the doubtful degree and the doubtful growth degree are collected to obtain a target area, so that the target area is a complete image feature in the natural leather image, and then the target area can be screened out as a hole defect area according to the texture complexity of the target area and the texture variability of surrounding sub-blocks, thereby realizing appearance defect detection of sports articles.
S004, obtaining the natural leather defect according to the merging area.
It should be noted that, the natural texture features of the hole defect area and the illumination influence area are missing, the normalized texture variability of the sub-blocks belonging to the hole defect area and the illumination influence area is small, and the initial sub-block selected in step S003 is the sub-block corresponding to the local minimum value of the normalized texture variability in the natural leather image, so that the initial sub-block is the sub-block belonging to the hole defect area or the illumination influence area, and the hole defect area or the illumination influence area with the complete target area is obtained. The difference of the natural texture difference characteristics of the hole defect area and the adjacent sub-blocks is larger, namely the normalized texture variability difference between the hole defect area and the adjacent sub-blocks is larger. While the texture complexity of the illumination-affected area is stepwise increased with smaller magnitudes of each increase, so that the normalized texture variability difference between the illumination-affected area and its neighboring sub-blocks is smaller. By combining the characteristics, the cavity defect area and the illumination influence area can be accurately distinguished.
In the embodiment of the invention, the average value of the normalized texture variability of all the sub-blocks in each target area is taken as the texture complexity of each target area. The normalized texture variability of a sub-block adjacent to the target region is taken as the texture complexity of that sub-block. And calculating the difference between the texture complexity of the target area and the texture complexity of each adjacent subblock, and taking the average value of the difference between the texture complexity of the target area and the texture complexity of all the adjacent subblocks as the defect rate of the target area.
Presetting a threshold valueRecording as a preset fourth threshold, when the defect rate of the target area is greater than the preset fourth thresholdAnd when the target area is a cavity defect area. In the embodiment of the invention, a fourth threshold value is preset>In other embodiments, the practitioner can set the preset fourth threshold value +.>Is a value of (2).
So far, the hollow defect area is obtained, the hollow defect area is marked, the marking result is sent to the cutting process, when the natural leather is conveyed to the cutting process for cutting, the cutting process avoids the hollow defect according to the marking result to cut the natural leather, and the situation that the hollow defect is not formed on the leather sports goods ball cover obtained by cutting is ensured.
Through the steps, the detection of the appearance defect of the ball cover of the leather sports goods is completed.
According to the embodiment of the invention, the texture variability of each sub-block is obtained by partitioning the natural leather image, the initial sub-block is screened out according to the texture variability of each sub-block, the initial sub-block is a sub-block of a hole defect area or an illumination influence area, expansion and combination are carried out on the periphery of the initial sub-block by taking the initial sub-block as a reference sub-block, once expansion and combination are carried out, the doubtful degree of the combined area is obtained according to the texture variability of the combined sub-block and the combination times, the doubtful increase degree of the current combination is further obtained, the doubtful increase degree is gathered, and the target area is obtained, so that the target area is a complete image feature in the natural leather image, and is screened out to be a hole defect area according to the texture complexity of the target area and the texture variability of surrounding sub-blocks, and the appearance defect detection of the sports is realized.
The foregoing description of the preferred embodiments of the invention is not intended to be limiting, but rather is intended to cover all modifications, equivalents, alternatives, and improvements that fall within the spirit and scope of the invention.
Claims (5)
1. The method for detecting the appearance defects of the leather sports goods based on the machine vision is characterized by comprising the following steps of:
collecting natural leather images; dividing the natural leather image into a plurality of sub-blocks with the same size, and acquiring texture variability of each sub-block according to gradient amplitude values of each pixel point in the natural leather image; acquiring an initial sub-block according to texture variability of all sub-blocks of the natural leather image;
for each initial sub-block, sub-block merging operations are performed respectively, including:
s1: taking the initial sub-block as a reference sub-block; taking the initial sub-block as a merging area;
s2: acquiring all pre-combined sub-blocks according to all sub-blocks in the neighborhood of each reference sub-block; when the pre-merging sub-block does not exist, taking the merging area as a target area, and ending the sub-block merging operation; when the pre-merging sub-blocks exist, merging all the pre-merging sub-blocks and the merging area into a large area as a new merging area, realizing one-time merging, and acquiring the doubtful degree of the current merging area according to the current merging times and each sub-block in the merging area obtained by the current merging;
s3: taking the difference between the doubtful degree of the current merging area and the doubtful degree of the merging area obtained by the last merging as the doubtful increasing degree of the current merging;
s4: acquiring a target area according to the doubtful degree of the current merging area and the doubtful growing degree of the current merging area, and if the target area does not exist, taking each pre-merging sub-block of the current merging as a new reference sub-block respectively, and repeating S2 to S4 until the target area is obtained, and stopping iteration;
obtaining the defect rate of the target area according to all the sub-blocks and adjacent sub-blocks in the target area; taking a target area with the defect rate larger than a preset fourth threshold value as a cavity defect area, marking the cavity defect area, and finishing appearance defect detection;
the method for acquiring the initial sub-block according to the texture variability of all the sub-blocks of the natural leather image comprises the following specific steps:
performing linear normalization on the texture variability of all the sub-blocks to obtain normalized texture variability of each sub-block; obtaining local minima of normalized texture variability of all sub-blocks of the natural leather image, and taking the sub-block corresponding to each local minima as an initial sub-block;
the method for acquiring the doubt degree of the current merging area according to the current merging times and each sub-block in the merging area obtained by the current merging comprises the following specific steps:
the number of times of current merging is recorded as J, and the doubt degree of the merging area obtained by the J-th merging is as follows:
;
wherein the method comprises the steps ofThe doubt degree of the merging area obtained by the J-th merging is determined; />Is->Sequence numbers of the secondary merging; />Is the firstThe number of pre-merging sub-blocks during secondary merging; />The number of times of current merging; />Is->Normalized texture variability of the kth pre-merge sub-block at the time of sub-merge; />Is->And obtaining an average value of normalized texture variability of all sub-blocks in the merging area after secondary merging.
2. The method for detecting the appearance defect of the leather sporting goods based on the machine vision according to claim 1, wherein the step of obtaining the texture variability of each sub-block according to the gradient amplitude of each pixel point in the natural leather map comprises the following specific steps:
and taking the sum of gradient magnitudes of all pixel points in each sub-block as texture variability of each sub-block.
3. The method for detecting the appearance defect of the leather sporting goods based on the machine vision according to claim 1, wherein the step of obtaining all the pre-combined sub-blocks according to all the sub-blocks in the neighborhood of each reference sub-block comprises the following specific steps:
and calculating the absolute value of the difference value of the normalized texture variability of each sub-block and the reference sub-block in the neighborhood of each reference sub-block, and taking the corresponding sub-block as a pre-merging sub-block if the absolute value of the difference value is smaller than a preset first threshold value.
4. The method for detecting the appearance defect of the leather sporting goods based on the machine vision according to claim 1, wherein the step of obtaining the target area according to the doubtful degree of the current merging area and the doubtful increasing degree of the current merging area comprises the following specific steps:
if the doubt degree of the current merging area is larger than or equal to a preset second threshold value or the doubt increase degree of the current merging is larger than or equal to a preset third threshold value, taking the merging area obtained by the last merging as a target area; if the suspicion degree of the current merging area is smaller than a preset second threshold value or the suspicion increase degree of the current merging area is smaller than a preset third threshold value, the target area does not exist.
5. The method for detecting the appearance defect of the leather sporting goods based on the machine vision according to claim 1, wherein the step of obtaining the defect rate of the target area according to all the sub-blocks and the adjacent sub-blocks in the target area comprises the following specific steps:
taking the average value of the normalized texture variability of all the sub-blocks in each target area as the texture complexity of each target area; taking the normalized texture variability of the sub-block adjacent to the target area as the texture complexity of the sub-block; and calculating the difference between the texture complexity of the target area and the texture complexity of each adjacent sub-block, and taking the average value of the difference between the texture complexity of the target area and the texture complexity of all adjacent sub-blocks as the defect rate of the target area.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310466834.0A CN116205911B (en) | 2023-04-27 | 2023-04-27 | Machine vision-based method for detecting appearance defects of leather sports goods |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310466834.0A CN116205911B (en) | 2023-04-27 | 2023-04-27 | Machine vision-based method for detecting appearance defects of leather sports goods |
Publications (2)
Publication Number | Publication Date |
---|---|
CN116205911A CN116205911A (en) | 2023-06-02 |
CN116205911B true CN116205911B (en) | 2023-07-18 |
Family
ID=86513180
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310466834.0A Active CN116205911B (en) | 2023-04-27 | 2023-04-27 | Machine vision-based method for detecting appearance defects of leather sports goods |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116205911B (en) |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115578389A (en) * | 2022-12-08 | 2023-01-06 | 青岛澳芯瑞能半导体科技有限公司 | Defect detection method of groove MOS device |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4988224B2 (en) * | 2006-03-01 | 2012-08-01 | 株式会社日立ハイテクノロジーズ | Defect inspection method and apparatus |
CN106683076B (en) * | 2016-11-24 | 2019-08-09 | 南京航空航天大学 | The method of train wheel tread damage detection based on textural characteristics cluster |
CN111896556B (en) * | 2020-08-04 | 2021-05-28 | 湖南大学 | Glass bottle bottom defect detection method and system based on machine vision |
CN114596290A (en) * | 2022-03-11 | 2022-06-07 | 腾讯科技(深圳)有限公司 | Defect detection method, defect detection device, storage medium, and program product |
CN115239704B (en) * | 2022-09-19 | 2023-11-03 | 南通友联新材料科技有限公司 | Accurate detection and repair method for wood surface defects |
CN115330781B (en) * | 2022-10-13 | 2023-07-28 | 启东谷诚不锈钢制品有限公司 | Steel plate defect identification method |
CN115880699B (en) * | 2023-03-03 | 2023-05-09 | 济南市莱芜区综合检验检测中心 | Food packaging bag detection method and system |
-
2023
- 2023-04-27 CN CN202310466834.0A patent/CN116205911B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115578389A (en) * | 2022-12-08 | 2023-01-06 | 青岛澳芯瑞能半导体科技有限公司 | Defect detection method of groove MOS device |
Also Published As
Publication number | Publication date |
---|---|
CN116205911A (en) | 2023-06-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111259982B (en) | Attention mechanism-based premature infant retina image classification method and device | |
CN113538433B (en) | Mechanical casting defect detection method and system based on artificial intelligence | |
CN107610087B (en) | Tongue coating automatic segmentation method based on deep learning | |
CN109509187B (en) | Efficient inspection algorithm for small defects in large-resolution cloth images | |
CN108288271A (en) | Image detecting system and method based on three-dimensional residual error network | |
CN111815564B (en) | Method and device for detecting silk ingots and silk ingot sorting system | |
CN108629775A (en) | A kind of hot high-speed rod surface image processing method | |
CN106940816A (en) | Connect the CT image Lung neoplasm detecting systems of convolutional neural networks entirely based on 3D | |
CN108364280A (en) | Structural cracks automation describes and width accurately measures method and apparatus | |
CN108009222B (en) | Three-dimensional model retrieval method based on better view and deep convolutional neural network | |
CN111860587B (en) | Detection method for small targets of pictures | |
CN107230203A (en) | Casting defect recognition methods based on human eye vision attention mechanism | |
CN104123554B (en) | SIFT image characteristic extracting methods based on MMTD | |
CN105513066B (en) | It is a kind of that the generic object detection method merged with super-pixel is chosen based on seed point | |
CN109087330A (en) | It is a kind of based on by slightly to the moving target detecting method of smart image segmentation | |
CN106296613B (en) | A kind of Dual Energy Subtraction method based on DR machine | |
CN115100206B (en) | Printing defect identification method for textile with periodic pattern | |
CN112037221B (en) | Multi-domain co-adaptation training method for cervical cancer TCT slice positive cell detection model | |
CN114972312A (en) | Improved insulator defect detection method based on YOLOv4-Tiny | |
CN111340019A (en) | Grain bin pest detection method based on Faster R-CNN | |
Khordehchi et al. | Automatic lung nodule detection based on statistical region merging and support vector machines | |
CN111383759A (en) | Automatic pneumonia diagnosis system | |
CN110766657A (en) | Laser interference image quality evaluation method | |
JPWO2021140602A5 (en) | Image processing system and program | |
CN111340780B (en) | Focus detection method based on three-dimensional ultrasonic image |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |