CN114693651A - Rubber ring flow mark detection method and device based on image processing - Google Patents
Rubber ring flow mark detection method and device based on image processing Download PDFInfo
- Publication number
- CN114693651A CN114693651A CN202210346768.9A CN202210346768A CN114693651A CN 114693651 A CN114693651 A CN 114693651A CN 202210346768 A CN202210346768 A CN 202210346768A CN 114693651 A CN114693651 A CN 114693651A
- Authority
- CN
- China
- Prior art keywords
- image
- rubber ring
- gradient
- flow mark
- block
- 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.)
- Pending
Links
- 238000001514 detection method Methods 0.000 title claims abstract description 21
- 239000013598 vector Substances 0.000 claims abstract description 52
- 230000007547 defect Effects 0.000 claims abstract description 49
- 238000000034 method Methods 0.000 claims abstract description 49
- 238000003709 image segmentation Methods 0.000 claims abstract description 19
- 239000002699 waste material Substances 0.000 claims abstract description 10
- 230000008569 process Effects 0.000 claims description 17
- 238000010606 normalization Methods 0.000 claims description 13
- 238000004364 calculation method Methods 0.000 claims description 8
- 230000010339 dilation Effects 0.000 claims description 4
- 230000000877 morphologic effect Effects 0.000 claims description 3
- 239000004753 textile Substances 0.000 claims description 2
- 230000011218 segmentation Effects 0.000 description 9
- 238000005286 illumination Methods 0.000 description 5
- 238000004519 manufacturing process Methods 0.000 description 3
- 230000008859 change Effects 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000007689 inspection Methods 0.000 description 2
- 230000002411 adverse Effects 0.000 description 1
- 238000013528 artificial neural network Methods 0.000 description 1
- 239000003086 colorant Substances 0.000 description 1
- 238000000354 decomposition reaction Methods 0.000 description 1
- 230000002950 deficient Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000003708 edge detection Methods 0.000 description 1
- 230000004907 flux Effects 0.000 description 1
- 238000009499 grossing Methods 0.000 description 1
- 238000010191 image analysis Methods 0.000 description 1
- 238000002372 labelling Methods 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000005215 recombination Methods 0.000 description 1
- 230000006798 recombination Effects 0.000 description 1
Images
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
- G06T7/0006—Industrial image inspection using a design-rule based approach
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/22—Matching criteria, e.g. proximity measures
-
- 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
-
- 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/30—Subject of image; Context of image processing
- G06T2207/30108—Industrial image inspection
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Artificial Intelligence (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Evolutionary Biology (AREA)
- Evolutionary Computation (AREA)
- Life Sciences & Earth Sciences (AREA)
- General Engineering & Computer Science (AREA)
- Quality & Reliability (AREA)
- Image Analysis (AREA)
Abstract
The invention discloses a rubber ring flow mark detection method and device based on image processing, and relates to the field of image processing. The method mainly comprises the following steps: acquiring a rubber ring image and carrying out image segmentation to obtain a first image; graying the first image to obtain a second image; dividing the rubber ring part in the second image into units with the same size along the same radian in the radial direction; arranging points on the inner ring of the rubber ring in each unit to the same horizontal line to obtain a third image; respectively obtaining feature vectors corresponding to the gradient histograms of the units in the third image, and merging adjacent units with similarity between the feature vectors larger than a preset similarity threshold into the same block; and respectively calculating the gradient amplitude in each gradient direction in each block to respectively obtain the flow mark defect degree of each block, and taking the rubber ring as a waste product when the flow mark defect degree of at least one block is greater than a preset threshold value.
Description
Technical Field
The application relates to the field of image processing, in particular to a rubber ring flow mark detection method and device based on image processing.
Background
The flow mark circulation refers to a wavy surface defect of a rubber product near a gate, which is mainly caused by poor flowing and fusing processes of materials, the inspection standard of a rubber ring does not allow a radial directional flow mark, and the existence of the flow mark in the rubber ring can influence the subsequent use, so that the flow mark defect detection is an important step in the quality detection of the rubber ring.
In the prior art, the flow mark defect in the rubber ring is mainly identified or detected by threshold segmentation, but in the process of implementing the embodiment of the invention, the inventor finds that at least the following defects exist in the background art:
the accuracy of identifying the flow mark defect by using threshold segmentation is not high, and the flow mark defect is easily influenced by illumination change, and the radial flow mark in the rubber ring cannot be identified or detected.
Disclosure of Invention
Aiming at the technical problem, the invention provides a rubber ring flow mark detection method and a device based on image processing, wherein a rubber ring image is divided into a plurality of units along the radial direction, the units are combined into blocks through the similarity among the units, the flow mark defect probability of each block is obtained by utilizing the gradient amplitude value of each gradient direction in the gradient histogram of each block, and when the flow mark defect degree of at least one block is larger than a preset threshold value, the rubber ring is used as a waste report; compared with the threshold segmentation for identifying the flow mark defects, the method can identify and detect the radial flow marks in the rubber ring, and improves the detection efficiency while ensuring the detection precision.
In a first aspect, a method for detecting rubber ring flow marks based on image processing is provided, including:
and acquiring a rubber ring image.
And carrying out image segmentation on the rubber ring image to obtain a first image. And the pixel value of the part of the first image except the rubber ring is 0.
And graying the first image to obtain a second image.
And dividing the rubber ring part in the second image along the same radian to respectively obtain units corresponding to each pixel point on the inner ring of the rubber ring.
And arranging the points on the inner ring of the rubber ring in each unit to the same horizontal line to obtain a third image.
And acquiring the gradient amplitude and the gradient direction of the pixel points in each unit in the third image, and respectively acquiring the gradient histogram of each unit according to the gradient amplitude and the gradient direction of the pixel points in each unit.
And respectively obtaining the feature vectors corresponding to the gradient histograms of the units, and merging the adjacent units of which the similarity between the feature vectors is greater than a preset similarity threshold into the same block.
And respectively calculating the gradient amplitude in each gradient direction in each block to respectively obtain the flow mark defect degree of each block, and when the flow mark defect degree of at least one block is greater than a preset threshold value, the flow mark defect in the rubber ring is overlarge, and the rubber ring is used as a waste report.
In one possible embodiment, obtaining the degree of flow mark defect for each of the blocks comprises:
wherein m isθAnd e is a natural constant, and is the sum of the gradient amplitudes of all the pixel points with the gradient direction theta in the block.
In one possible embodiment, the calculation process of the similarity between the feature vectors includes:
wherein, O (d)j) Represents the value corresponding to the gradient direction I in the feature vector of the cell, I (d)j) And e is a natural constant, and represents a value corresponding to the gradient direction i in the feature vector of the adjacent cell of the cell.
In a possible embodiment, before calculating the similarity between the feature vectors, the method further includes, before calculating the similarity between the feature vectors, performing normalization processing on the two feature vectors with the similarity to be calculated, where the normalization processing includes:
wherein, O (d)i) To representThe value corresponding to the gradient direction I in the feature vector of the cell, I (d)i) A value representing the gradient direction i in the feature vectors of the neighboring cells of the cell, diIs the value corresponding to the gradient direction i in the feature vector of the unit before normalization, biIs the value corresponding to the gradient direction i in the feature vector of the unit after normalization.
In a possible embodiment, the image segmentation of the rubber ring image is performed by DNN.
In one possible embodiment, graying the first image to obtain the second image includes:
and taking the maximum value of the pixel values of the pixel points in the RGB three channels in the image right above the textile as the gray value of the pixel points in the second image.
In a possible embodiment, the obtaining the gradient magnitude and the gradient direction of the pixel point in each unit in the third image includes:
gradient amplitude of pixel pointThe gradient direction of the pixel points isWherein g denotes gradient amplitude, gxHorizontal gradient, g, representing pixel pointsyRepresenting the vertical gradient of the pixel points.
In a possible embodiment, before dividing the rubber ring portion of the gray-scale image into units of the same size in the radial direction, the method further comprises performing morphological dilation after image color inversion on the second image.
In a possible embodiment, before dividing the rubber ring part in the second image into units with the same size in the radial direction, histogram equalization processing is further performed on the second image.
In a second aspect, the present invention provides an image processing-based rubber circumfluence mark detection apparatus, comprising:
and the image acquisition module is used for acquiring images of the rubber ring.
And the image segmentation module is used for carrying out image segmentation on the rubber ring image to obtain a first image. And the pixel value of the part of the first image except the rubber ring is 0.
And the image graying module is used for graying the first image to obtain a second image.
And the image dividing module is used for dividing the rubber ring part in the second image along the same radian in the radial direction to respectively obtain units corresponding to each pixel point on the inner ring of the rubber ring.
And the image generation module is used for arranging the points on the inner ring of the rubber ring in each unit to the same horizontal line to obtain a third image.
And the gradient histogram acquisition module is used for acquiring the gradient amplitude and the gradient direction of the pixel points in each unit in the third image and respectively acquiring the gradient histogram of each unit according to the gradient amplitude and the gradient direction of the pixel points in each unit.
And the unit merging module is used for respectively obtaining the feature vectors corresponding to the gradient histograms of the units and merging the adjacent units of which the similarity between the feature vectors is greater than a preset similarity threshold into the same block.
And the flow mark defect degree calculation module is used for calculating the gradient amplitude in each gradient direction in each block respectively so as to obtain the flow mark defect degree of each block respectively.
And the judging module is used for taking the rubber ring as a waste product when the flow mark defect degree of at least one block is greater than a preset threshold value.
The invention provides a rubber ring flow mark detection method and device based on image processing.
The embodiment of the invention has the advantages that compared with the threshold segmentation, the flow mark defect identification is carried out, the radial flow mark in the rubber ring can be identified and detected, and whether the quality of the rubber ring is qualified or not is judged by judging whether the radial flow mark exists or not, so that the detection precision is ensured, and the detection efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a schematic flow chart of a method for detecting rubber flow marks based on image processing according to an embodiment of the present invention.
Fig. 2 is a schematic view showing a process of dividing the rubber ring portion in the second image into a plurality of cells in the radial direction in the embodiment of the present invention.
Fig. 3 is a schematic flow chart of a rubber flow mark detection apparatus based on image processing according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
The terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature; in the description of the present embodiment, "a plurality" means two or more unless otherwise specified.
The flow mark flux refers to a wavy surface defect of a rubber product near a gate, and for the rubber ring in the embodiment, the radial directional flow mark cannot exist in the production process, and the size of the non-radial flow mark cannot exceed the allowable range.
S101, acquiring a rubber ring image, and performing image segmentation on the rubber ring image to obtain a first image; the pixel value of the part of the first image except the rubber ring is 0.
And step S102, graying the first image to obtain a second image.
And step S103, dividing the rubber ring part in the second image along the same radian to respectively obtain units corresponding to all pixel points on the inner ring of the rubber ring, and arranging the points on the inner ring of the rubber ring in all the units to the same horizontal line to obtain a third image.
Step S104, obtaining the gradient amplitude and the gradient direction of the pixel point in each unit in the third image, and respectively obtaining the gradient histogram of each unit according to the gradient amplitude and the gradient direction of the pixel point in each unit.
And step S105, respectively obtaining the feature vectors corresponding to the gradient histograms of the units, and merging the adjacent units of which the similarity between the feature vectors is greater than a preset similarity threshold into the same block.
And S106, respectively calculating the gradient amplitude of each block in each gradient direction to respectively obtain the flow mark defect degree of each block, and when the flow mark defect degree of at least one block is larger than a preset threshold value, taking the rubber ring as a waste product if the flow mark defect degree in the rubber ring is too large.
Further, step S101, collecting a rubber ring image, and performing image segmentation on the rubber ring image to obtain a first image; the pixel value of the part of the first image except the rubber ring is 0. The method specifically comprises the following steps:
first, a rubber ring image in a production process is collected, the rubber ring image in this embodiment is an RGB image, RGB is a color standard, and various colors are obtained by changing three color channels of red (R), green (G), and blue (B) and superimposing the three color channels on each other, and RGB is a color representing the three channels of red, green, and blue.
Then, the image segmentation is performed on the rubber ring image to obtain a first image, the pixel value of the part of the first image except the rubber ring is 0, and it should be noted that the image segmentation is a technology and a process for dividing the image into a plurality of specific areas with unique properties and proposing an interested target, and the technology and the process are key steps from image processing to image analysis. The existing image segmentation methods mainly include the following categories: a threshold-based segmentation method, a region-based segmentation method, an edge-based segmentation method, a particular theory-based segmentation method, and the like. From a mathematical point of view, image segmentation is the process of dividing a digital image into mutually disjoint regions. The process of image segmentation is also a labeling process, i.e. pixels belonging to the same region are assigned the same number.
Specifically, in this embodiment, image segmentation of the rubber ring image is implemented by using a Deep Neural Network (DNN), where the DNN specifically includes: the dataset used is an acquired image dataset. The labels are of two types, a rubber ring area and a background area. The method is pixel-level classification, and all pixel points of the image are manually marked. The bottleneck region pixel point value is marked as 1 and the background region pixel point value is marked as 0. In this embodiment, a loss function used in the DNN is a cross entropy loss function, and the obtained binary mask corresponding to the rubber ring is multiplied by the original image to obtain the first image, so that the deduction of the image of the rubber ring can be realized, and interference of the part other than the rubber ring on the subsequent processing process is avoided.
Further, in step S102, the first image is grayed to obtain a second image.
The standards for the inspection of rubber rings specify that radially oriented flow marks are not permitted. The flow mark defect on the rubber ring is a linear recess, and the brightness of the flow mark defect is darker than that of the rubber ring, so that the embodiment of the invention judges whether the quality of the rubber ring meets the standard or not by detecting the direction of the flow mark.
Firstly, graying the first image to obtain a second image, wherein the graying process comprises the following steps: and taking the maximum value of the pixel values of the pixel points in the first image in the RGB three channels as the gray value of the pixel points in the second image.
Optionally, the color of the flow mark is darker than the color of the rubber ring itself, and the color of the image may be reversed on a gray scale map of the rubber ring, that is, the first image, in consideration of that the color of the middle position of the rubber ring is brighter due to illumination and the color of the reversed position is darker, so that the image after the color reversal is subjected to morphological dilation processing, where it should be noted that dilation refers to expanding the boundary points of the binarized object, and merging all background points in contact with the object into the object, so as to expand the boundary to the outside. If the two objects are close to each other, the two objects can be communicated together, so that adverse effects caused by illumination can be reduced to a certain extent.
Optionally, histogram equalization operation may be performed on the processed rubber ring grayscale image, that is, the second image, so that image contrast may be enhanced, and a result obtained in a subsequent processing process may be more accurate.
Further, step S103, dividing the rubber ring portion in the second image along the same radian to obtain units corresponding to each pixel point on the inner ring of the rubber ring, and arranging the points on the inner ring of the rubber ring in each unit to the same horizontal line to obtain a third image. The method specifically comprises the following steps:
first, the rubber ring portion in the second image is divided into units of the same size along the radial direction, fig. 2 shows a schematic diagram of a process of dividing the rubber ring portion in the second image into a plurality of units along the radial direction in this embodiment, it should be noted that effective features in a gradient map corresponding to the grayscale image are very sparse, therefore, the embodiment divides the rubber ring portion in the second image into a plurality of units, and calculates feature vectors of the units respectively, and the feature vectors in the embodiment refer to gradient histogram feature vectors corresponding to the units, so that relatively compact features can be obtained.
In this embodiment, it is necessary to determine whether the rubber ring is a defective product according to the direction of the flow mark of the rubber ring, and therefore, in this embodiment, it is important to pay attention to whether there is a radial directional flow mark on the rubber ring, and therefore, the direction in which the gradient needs to be calculated is determined as a radial direction and a tangential direction, and considering that the gradient of the pixel point along the radial direction or the tangential direction cannot be directly calculated, therefore, in this embodiment, the second image is divided along the radial direction and rotated to the centripetal direction along the vertical direction.
Specifically, the rule for performing the unit division in this embodiment includes: according to the number s of pixel points contained in the inner ring of the rubber ring1The outer contour of the rubber ring is uniformly divided into s1Each share contains pixel points of which the number isWherein s is2The number of the pixel points contained in the outer contour of the rubber ring is equal, and the distance between two adjacent outer ring points and the corresponding inner ring point is equal, as shown in fig. 2, so that the obtained units can cover all possible defect areas, the defect is prevented from being divided into two different units due to simple division, the existing defect cannot be effectively detected, and in the actual production process, the inner diameter and the outer diameter of the rubber ring are relatively close, so that the units obtained in the embodiment can effectively cover the corresponding fan-shaped areas.
It should be noted that a triangular region enclosed by two adjacent outer contours and points on the corresponding inner ring is a unit, so that the annular rubber ring gray scale map is divided into a plurality of units, and when the number of the divided units is large enough, the vertical and horizontal directions of each triangle respectively represent the radial and tangential directions required in the embodiment, so that the radial gradient and the tangential gradient of pixel points contained in each unit can be conveniently obtained.
Further, step S104, obtaining a gradient amplitude and a gradient direction of a pixel point in each unit in the third image, and obtaining a gradient histogram of each unit according to the gradient amplitude and the gradient direction of the pixel point in each unit. The method specifically comprises the following steps:
according to the characteristics of flow mark detection, whether the flow marks are distributed along the radial direction needs to be detected in an important mode. Therefore, in the present invention, the gradient calculation directions are a radial gradient and a tangential gradient, where the radial direction refers to a direction in which the pixel points point to the center of a circle, and the tangential line refers to a direction perpendicular to the direction in which the pixel points point to the center of a circle.
In this embodiment, a Sobel operator with an inner core size of 1 is used in calculating the gradient: -101 andin this embodiment, the gradient amplitude is includedAnd direction of gradientgxHorizontal gradient, g, representing pixel pointsyThe vertical gradient of the pixel point is represented, and the absolute value of the gradient direction is obtained in the calculation process, so that the obtained angle range of the gradient direction is [0,180 DEG ]]。
It should be noted that the Sobel operator is a typical edge detection operator based on a first derivative, and is a discrete difference operator. The Sobel operator has a smoothing effect on noise and can well eliminate the influence of the noise, and the Sobel operator comprises two groups of matrixes which are respectively a transverse template and a longitudinal template and is subjected to plane convolution with an image, so that the horizontal gradient and the vertical gradient of pixel points in the image can be obtained respectively.
Meanwhile, in the unit obtained after step 103 in this embodiment, the horizontal gradient of the pixel point corresponds to the tangential gradient of the pixel point in the rubber ring, and the vertical gradient of the pixel point corresponds to the radial gradient of the pixel point in the rubber ring.
Next, the gradient histograms of the pixels in each cell are computed, first, the angular range [0, 180%°]Divided into 9 groups of 20 °, and the pixels may be divided into 9 groups according to angle. Accumulating the gradient values corresponding to all pixels in each copy to obtain 9 values bθAnd θ is 0,20, …, 160. The feature vector in this embodiment is a vector consisting of these 9 values, corresponding to angles of 0 °,20 °,. 160 °.
Illustratively, the gradient direction of a certain pixel point is 80 °, the gradient amplitude is 2, so the value b corresponding to 80 ° on the histogram80Plus 2; the gradient direction of a pixel point is 10 degrees and is between 0 degrees and 20 degrees, the gradient amplitude is 4, and then the gradient value is proportionally divided into values corresponding to 0 degrees and 20 degrees, namely b0And b20Each plus 2; if the gradient direction of a pixel is greater than 160 degrees, i.e., between 160 and 180 degrees, then the gradient magnitude for that pixel is scaled to the values for 0 degrees and 160 degrees.
Further, step S105, obtaining feature vectors corresponding to the gradient histograms of the units, respectively, and merging adjacent units, whose similarity between the feature vectors is greater than a preset similarity threshold, into the same block. The method specifically comprises the following steps: a
The calculation process of the similarity between the feature vectors comprises the following steps:
wherein, O (d)j) Represents the value corresponding to the gradient direction I in the feature vector of the cell, I (d)j) And e is a natural constant, and when the similarity X of two adjacent units is greater than a preset similarity threshold value, the two units are combined into a block, so that all blocks in the rubber ring can be obtained.
Optionally, before the similarity between two adjacent units is calculated, normalization processing may be performed on the feature vectors corresponding to the units. Because the gradient of the image is very sensitive to the overall illumination, for example, when the gray values of all the pixel points are divided by 2 to darken the image, the gradient amplitude is also reduced by half, so that the value corresponding to each gradient direction in the gradient histogram is also reduced by half. Therefore, in order to avoid the influence of the illumination change on the feature vectors, normalization processing can be performed on the feature vectors corresponding to the units, and the normalization process specifically includes:
in a possible embodiment, before calculating the similarity between the feature vectors, the method further includes, before calculating the similarity between the feature vectors, performing normalization processing on the two feature vectors with the similarity to be calculated, where the normalization processing includes:
wherein, O (d)i) Represents the value corresponding to the gradient direction I in the feature vector of the cell, I (d)i) The values corresponding to the gradient direction i in the feature vectors of the neighboring cells of the cell are represented. diIs the value corresponding to the gradient direction i in the feature vector of the cell before normalization, biIs the value corresponding to the gradient direction i in the feature vector of the unit after normalization.
Further, step S106, the gradient amplitudes in each gradient direction in each block are respectively calculated to respectively obtain the flow mark defect degrees of each block, when the flow mark defect degree of at least one block is greater than a preset threshold value, the flow mark defect in the rubber ring is too large, and the rubber ring is used as a waste report. The method specifically comprises the following steps:
firstly, calculating gradient amplitudes in each gradient direction in a gradient direction histogram of each block obtained by combining the units, specifically, counting the gradient directions and amplitudes of the units constituting the block, wherein the statistical result is a refinement result, i.e., a sum m of amplitudes of 0 ° to 30 ° and 150 ° to 180 ° per 1 ° is obtainedθθ is 0,1, …,30,150,151, …,180, and the calculation formula of the flow mark defect degree is:
when the direction of the gradient is 0 ° or 180 °, the flow mark is a radially oriented flow mark, and the more the gradient direction deviates from 0 ° or 180 °, the more the flow mark direction deviates from the radial direction, and the magnitude of the gradient is corrected by the direction of the gradient to obtain the defect degree of the flow mark.
When the flow mark defect degree Q of one block in the rubber ring is greater than Y, the radial flow mark defect exists in the block, wherein Y is a preset threshold value, therefore, when the flow mark defect degree of at least one block is greater than the preset threshold value, the radial flow mark defect exists in the rubber ring, and the rubber ring is used as a scrapped product to be scrapped.
An embodiment of the present invention further provides an image processing-based rubber ring flow mark detection apparatus, as shown in fig. 3, including:
and the image acquisition module 201 is used for acquiring the rubber ring image.
The image segmentation module 202 is configured to perform image segmentation on the rubber ring image to obtain a first image. The pixel value of the part of the first image except the rubber ring is 0.
And the image graying module 203 is used for graying the first image to obtain a second image.
And the image dividing module 204 is configured to divide the rubber ring portion in the second image along the same radian to obtain units corresponding to each pixel point on the inner ring of the rubber ring.
And the image generating module 205 is configured to arrange the points on the inner ring of the rubber ring in each unit to the same horizontal line to obtain a third image.
A gradient histogram obtaining module 206, configured to obtain a gradient amplitude and a gradient direction of a pixel point in each unit in the third image, and obtain a gradient histogram of each unit according to the gradient amplitude and the gradient direction of the pixel point in each unit.
The unit merging module 207 is configured to obtain feature vectors corresponding to the gradient histograms of the units, respectively, and merge adjacent units, of which the similarity between the feature vectors is greater than a preset similarity threshold, into the same block.
And the flow mark defect degree calculating module 208 is configured to calculate gradient amplitudes in each gradient direction in each block, so as to obtain the flow mark defect degree of each block.
And the judging module 209 is used for taking the rubber ring as a waste product when the flow mark defect degree of at least one block is greater than a preset threshold value.
In summary, in the embodiment, the rubber ring image is divided into a plurality of units along the radial direction, the units are combined into blocks through the similarity between the units, the flow mark defect probability of each block is obtained by using the gradient amplitude in each gradient direction in the gradient histogram of each block, and when the flow mark defect degree of at least one block is greater than the preset threshold, the rubber ring is used as a waste report; compared with the threshold segmentation for identifying the flow mark defects, the method can identify and detect the radial flow marks in the rubber ring, and further judge whether the quality of the rubber ring is qualified or not through the existence of the radial flow marks, so that the detection precision is ensured and the detection efficiency is improved.
The use of words such as "including," "comprising," "having," and the like in this disclosure is an open-ended term that means "including, but not limited to," and is used interchangeably therewith. As used herein, the words "or" and "refer to, and are used interchangeably with, the word" and/or, "unless the context clearly dictates otherwise. The word "such as" is used herein to mean, and is used interchangeably with, the phrase "such as but not limited to".
It should also be noted that the various components or steps may be broken down and/or re-combined in the methods and systems of the present invention. These decompositions and/or recombinations are to be considered equivalents of the present disclosure.
The above-mentioned embodiments are merely examples for clearly illustrating the present invention and do not limit the scope of the present invention. It will be apparent to those skilled in the art that other variations and modifications may be made in the foregoing description, and it is not necessary or necessary to exhaustively enumerate all embodiments herein. All designs identical or similar to the present invention are within the scope of the present invention.
Claims (10)
1. A rubber circulation mark detection method based on image processing is characterized by comprising the following steps:
collecting a rubber ring image;
performing image segmentation on the rubber ring image to obtain a first image; the pixel value of the part of the first image except the rubber ring is 0;
graying the first image to obtain a second image;
dividing the rubber ring part in the second image along the same radian to respectively obtain units corresponding to each pixel point on the inner ring of the rubber ring;
arranging points on the inner ring of the rubber ring in each unit to the same horizontal line to obtain a third image;
acquiring gradient amplitude and gradient direction of pixel points in each unit in the third image, and respectively acquiring a gradient histogram of each unit according to the gradient amplitude and gradient direction of the pixel points in each unit;
respectively obtaining the feature vectors corresponding to the gradient histograms of the units, and merging the adjacent units with the similarity between the feature vectors larger than a preset similarity threshold into the same block;
and respectively calculating the gradient amplitude in each gradient direction in each block to respectively obtain the flow mark defect degree of each block, and taking the rubber ring as a waste product when the flow mark defect degree of at least one block is greater than a preset threshold value.
2. The method for detecting the rubber ring flow mark based on the image processing as claimed in claim 1, wherein the obtaining of the flow mark defect degree of each block comprises:
wherein m isθAnd e is a natural constant, and is the sum of the gradient amplitudes of all the pixel points with the gradient direction theta in the block.
3. The method for detecting the rubber flow mark based on the image processing as claimed in claim 1, wherein the calculation process of the similarity between the feature vectors comprises:
wherein, O (d)j) Represents the value corresponding to the gradient direction I in the feature vector of the cell, I (d)j) And e is a natural constant, and represents a value corresponding to the gradient direction i in the feature vector of the adjacent cell of the cell.
4. The method for detecting the rubber flow mark based on the image processing as claimed in claim 3, wherein before calculating the similarity between the feature vectors, the method further comprises normalizing the two feature vectors to be calculated, wherein the normalizing comprises:
wherein, O (d)i) Represents the value corresponding to the gradient direction I in the feature vector of the cell, I (d)i) A value representing the gradient direction i in the feature vectors of the neighboring cells of the cell, diIs the value corresponding to the gradient direction i in the feature vector of the unit before normalization, biIs the value corresponding to the gradient direction i in the feature vector of the unit after normalization.
5. The image processing-based rubber ring flow mark detection method according to claim 1, wherein image segmentation of the rubber ring image is achieved by DNN.
6. The method for detecting the rubber ring flow mark based on the image processing as claimed in claim 1, wherein the graying the first image to obtain the second image comprises:
and taking the maximum value of the pixel values of the pixel points in the RGB three channels in the image right above the textile as the gray value of the pixel points in the second image.
7. The method for detecting the rubber flow mark based on the image processing as claimed in claim 1, wherein obtaining the gradient amplitude and the gradient direction of the pixel point in each unit in the third image comprises:
8. The method for detecting rubber ring flow marks based on image processing according to claim 1, wherein before dividing the rubber ring part in the gray image into units with the same size in the radial direction, the method further comprises performing morphological dilation after image color inversion on the second image.
9. The method according to any one of claims 1 to 7, wherein before dividing the rubber ring portion in the second image into units of the same size in the radial direction, the method further comprises performing histogram equalization on the second image.
10. A rubber flow mark detection device based on image processing is characterized by comprising:
the image acquisition module is used for acquiring a rubber ring image;
the image segmentation module is used for carrying out image segmentation on the rubber ring image to obtain a first image; the pixel value of the part of the first image except the rubber ring is 0;
the image graying module is used for graying the first image to obtain a second image;
the image dividing module is used for dividing the rubber ring part in the second image along the same radian in the radial direction to respectively obtain units corresponding to each pixel point on the inner ring of the rubber ring;
the image generation module is used for arranging the points on the inner ring of the rubber ring in each unit to the same horizontal line to obtain a third image;
a gradient histogram obtaining module, configured to obtain a gradient amplitude and a gradient direction of a pixel point in each unit in the third image, and obtain a gradient histogram of each unit according to the gradient amplitude and the gradient direction of the pixel point in each unit;
the unit merging module is used for respectively obtaining the feature vectors corresponding to the gradient histograms of the units and merging the adjacent units of which the similarity between the feature vectors is greater than a preset similarity threshold into the same block;
the flow mark defect degree calculation module is used for calculating the gradient amplitude in each gradient direction in each block respectively so as to obtain the flow mark defect degree of each block respectively;
and the judging module is used for taking the rubber ring as a waste product when the flow mark defect degree of at least one block is greater than a preset threshold value.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210346768.9A CN114693651A (en) | 2022-03-31 | 2022-03-31 | Rubber ring flow mark detection method and device based on image processing |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210346768.9A CN114693651A (en) | 2022-03-31 | 2022-03-31 | Rubber ring flow mark detection method and device based on image processing |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114693651A true CN114693651A (en) | 2022-07-01 |
Family
ID=82141183
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210346768.9A Pending CN114693651A (en) | 2022-03-31 | 2022-03-31 | Rubber ring flow mark detection method and device based on image processing |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114693651A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115290661A (en) * | 2022-09-28 | 2022-11-04 | 江苏浚荣升新材料科技有限公司 | Rubber ring defect identification method based on computer vision |
CN117095444A (en) * | 2023-08-29 | 2023-11-21 | 广州市星飞达电子科技有限公司 | Image recognition method based on artificial intelligence |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2015135540A (en) * | 2014-01-16 | 2015-07-27 | 大日本印刷株式会社 | Image feature point extraction method, defect inspection method, and defect inspection device |
CN105784713A (en) * | 2016-03-11 | 2016-07-20 | 南京理工大学 | Sealing ring surface defect detection method based on machine vision |
US20170024840A1 (en) * | 2015-03-20 | 2017-01-26 | Digimarc Corporation | Sparse modulation for robust signaling and synchronization |
US20170176363A1 (en) * | 2015-12-21 | 2017-06-22 | Endress + Hauser Flowtec Ag | Measurement Device for Measuring a Property of a Flowing Fluid |
CN112164086A (en) * | 2020-10-12 | 2021-01-01 | 华雁智能科技(集团)股份有限公司 | Refined image edge information determining method and system and electronic equipment |
CN113850808A (en) * | 2021-12-01 | 2021-12-28 | 武汉泰盛包装材料有限公司 | Multilayer corrugated paper arrangement defect detection method and device based on image processing |
CN113936000A (en) * | 2021-12-16 | 2022-01-14 | 武汉欧易塑胶包装有限公司 | Injection molding wave flow mark identification method based on image processing |
CN113989280A (en) * | 2021-12-28 | 2022-01-28 | 武汉市鑫景诚路桥钢模有限公司 | Steel structure welding crack defect detection method based on image processing technology |
CN114240942A (en) * | 2022-02-25 | 2022-03-25 | 武汉市雷成龙液压机械有限公司 | Metal part surface quality control method and system based on image processing |
-
2022
- 2022-03-31 CN CN202210346768.9A patent/CN114693651A/en active Pending
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2015135540A (en) * | 2014-01-16 | 2015-07-27 | 大日本印刷株式会社 | Image feature point extraction method, defect inspection method, and defect inspection device |
US20170024840A1 (en) * | 2015-03-20 | 2017-01-26 | Digimarc Corporation | Sparse modulation for robust signaling and synchronization |
US20170176363A1 (en) * | 2015-12-21 | 2017-06-22 | Endress + Hauser Flowtec Ag | Measurement Device for Measuring a Property of a Flowing Fluid |
CN105784713A (en) * | 2016-03-11 | 2016-07-20 | 南京理工大学 | Sealing ring surface defect detection method based on machine vision |
CN112164086A (en) * | 2020-10-12 | 2021-01-01 | 华雁智能科技(集团)股份有限公司 | Refined image edge information determining method and system and electronic equipment |
CN113850808A (en) * | 2021-12-01 | 2021-12-28 | 武汉泰盛包装材料有限公司 | Multilayer corrugated paper arrangement defect detection method and device based on image processing |
CN113936000A (en) * | 2021-12-16 | 2022-01-14 | 武汉欧易塑胶包装有限公司 | Injection molding wave flow mark identification method based on image processing |
CN113989280A (en) * | 2021-12-28 | 2022-01-28 | 武汉市鑫景诚路桥钢模有限公司 | Steel structure welding crack defect detection method based on image processing technology |
CN114240942A (en) * | 2022-02-25 | 2022-03-25 | 武汉市雷成龙液压机械有限公司 | Metal part surface quality control method and system based on image processing |
Non-Patent Citations (2)
Title |
---|
ZEYU YANG: "Welding Wires Centerline Detection Method Based on Image Gradient Segmentation", 《2020 3RD IEEE INTERNATIONAL CONFERENCE ON INFORMATION COMMUNICATION AND SIGNAL PROCESSING》 * |
李琎: "注塑制品表面缺陷识别及工艺映射方法研究", 《中国优秀硕士学位论文全文数据库工程科技Ⅰ辑》 * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115290661A (en) * | 2022-09-28 | 2022-11-04 | 江苏浚荣升新材料科技有限公司 | Rubber ring defect identification method based on computer vision |
CN115290661B (en) * | 2022-09-28 | 2022-12-16 | 江苏浚荣升新材料科技有限公司 | Rubber ring defect identification method based on computer vision |
CN117095444A (en) * | 2023-08-29 | 2023-11-21 | 广州市星飞达电子科技有限公司 | Image recognition method based on artificial intelligence |
CN117095444B (en) * | 2023-08-29 | 2024-02-13 | 广州市星飞达电子科技有限公司 | Image recognition method based on artificial intelligence |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN114359274B (en) | Ventilation equipment blade quality detection method, device and system based on image processing | |
CN105334219B (en) | A kind of bottle mouth defect detection method of residual analysis dynamic threshold segmentation | |
CN108918526B (en) | Notch defect detection method for flexible IC packaging substrate circuit | |
CN115147414B (en) | Surface breakdown defect detection method for bipolar power transistor | |
CN114693651A (en) | Rubber ring flow mark detection method and device based on image processing | |
US7084968B2 (en) | Method for analyzing defect data and inspection apparatus and review system | |
CN115018828A (en) | Defect detection method for electronic component | |
CN115035122B (en) | Artificial intelligence-based integrated circuit wafer surface defect detection method | |
WO2021168733A1 (en) | Defect detection method and apparatus for defect image, and computer-readable storage medium | |
CN107084666B (en) | Comprehensive detection method for size of brake pad based on machine vision | |
CN107945155B (en) | Toothpaste tube shoulder defect detection method based on Gabor filter | |
CN103543394A (en) | Discharge ultraviolet imaging quantization parameter extraction method of high-voltage electric equipment | |
CN107192716A (en) | A kind of workpiece, defect quick determination method based on contour feature | |
CN109190742B (en) | Decoding method of coding feature points based on gray feature | |
CN115439476B (en) | Silk-screen defect detection method and device based on image analysis | |
CN117094916B (en) | Visual inspection method for municipal bridge support | |
CN115294116A (en) | Method, device and system for evaluating dyeing quality of textile material based on artificial intelligence | |
CN115797361B (en) | Aluminum template surface defect detection method | |
CN115690670A (en) | Intelligent identification method and system for wafer defects | |
CN115375629A (en) | Method for detecting line defect and extracting defect information in LCD screen | |
CN117094975A (en) | Method and device for detecting surface defects of steel and electronic equipment | |
CN116523922B (en) | Bearing surface defect identification method | |
Fang et al. | Towards real-time crack detection using a deep neural network with a Bayesian fusion algorithm | |
JP2004030188A (en) | Method, apparatus and program for dividing image into areas | |
CN112418226A (en) | Method and device for identifying opening and closing states of fisheyes |
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 |