CN115082418A - Precise identification method for automobile parts - Google Patents

Precise identification method for automobile parts Download PDF

Info

Publication number
CN115082418A
CN115082418A CN202210822912.1A CN202210822912A CN115082418A CN 115082418 A CN115082418 A CN 115082418A CN 202210822912 A CN202210822912 A CN 202210822912A CN 115082418 A CN115082418 A CN 115082418A
Authority
CN
China
Prior art keywords
defect
window
run
gray level
frequency
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.)
Granted
Application number
CN202210822912.1A
Other languages
Chinese (zh)
Other versions
CN115082418B (en
Inventor
李振鹏
张延飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong Liaocheng Fufeng Auto Parts Co ltd
Original Assignee
Shandong Liaocheng Fufeng Auto Parts Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shandong Liaocheng Fufeng Auto Parts Co ltd filed Critical Shandong Liaocheng Fufeng Auto Parts Co ltd
Priority to CN202210822912.1A priority Critical patent/CN115082418B/en
Publication of CN115082418A publication Critical patent/CN115082418A/en
Application granted granted Critical
Publication of CN115082418B publication Critical patent/CN115082418B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20076Probabilistic image processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30164Workpiece; Machine component

Abstract

The invention relates to the field of image processing, in particular to a precise identification method for automobile parts. Acquiring a gear gray level image for window segmentation; performing edge detection on each window to obtain a defect window; calculating the defect degree of edge pixel points in a defect window to obtain defect pixel points; calculating direction probability according to the number of the defective pixel points in each direction on the neighborhood by taking the defective pixel points as centers; acquiring gray level run matrix of each direction of the defect window, and acquiring final gray level run matrix of each defect window; dividing the final gray level run matrix into a long run area and a short run area; calculating the difference degree of the run frequency; dividing the final gray level run matrix into a high gray level area and a low gray level area; calculating the difference degree of the gray frequency; and calculating the confidence of each defect window to judge the defect type of the window. The invention can more accurately identify the defect type by combining the gray frequency difference characteristic and the run length difference characteristic of the pixels in the matrix.

Description

Precise identification method for automobile parts
Technical Field
The invention relates to the field of image processing, in particular to a precise identification method for automobile parts.
Background
The gear is an important part forming an automobile, but production defects are caused by forging strength, temperature and the like in the production and processing process, including surface cracks or scratches of the gear, once the automobile adopts defective gears with cracks, the gear is possibly damaged under the conditions of heavy load and excessive stress, even the whole mechanical equipment is damaged and scrapped, and personal safety is seriously threatened, when the surface of the gear is the scratches, the surface defects are possibly generated only by friction, if the surface defects are judged to be the cracks, the gear needs to be replaced, unnecessary economic loss is caused to an automobile owner, and therefore the defect type of the gear needs to be accurately judged.
At present mainly detect according to the manual work to gear surface defect, artifical detection inefficiency just is difficult to accurately distinguish crackle and mar, causes easily to miss to examine and the false retrieval, and the subjectivity is too strong, and current mostly is to the degree of wear after the gear uses carries out the analysis, and is less to the surface production quality analysis of gear, and the image processing technique of conventionality simultaneously can't make accurate differentiation to the defect type of gear, exists certain error.
The invention provides a precise identification method of the surface defects of the gear, which combines the characteristics of the defect areas in the gear image to construct a run matrix, thereby identifying whether the gear defects are cracks or scratches according to the characteristics of pixel points in each area in the run matrix.
Disclosure of Invention
The invention provides a precise identification method for automobile parts, which aims to solve the existing problems and comprises the following steps: acquiring a gear gray level image for window segmentation; performing edge detection on each window to obtain a defect window; calculating the defect degree of edge pixel points in a defect window to obtain defect pixel points; calculating direction probability according to the number of the defective pixel points in each direction on the neighborhood by taking the defective pixel points as centers; acquiring gray level run matrix of each direction of the defect window, and acquiring final gray level run matrix of each defect window; dividing the final gray level run matrix into a long run area and a short run area; calculating the difference degree of the run frequency; dividing the final gray level run matrix into a high gray level area and a low gray level area; calculating the difference degree of the gray frequency; and calculating the confidence of each defect window to judge the defect type of the window.
According to the invention, firstly, the pixels in the gear image are preliminarily judged through edge detection, so that the gray level run matrix is established for the obtained suspected defect window, the calculated amount is greatly reduced, meanwhile, when the gray level run matrix is established, the run matrix of each direction of the window is weighted through the distribution of the defect pixels in the window in each direction, the characteristics of the pixels in the defect window can be more completely represented by the obtained final gray level run matrix, and further, the gray level frequency difference characteristic and the run length difference characteristic of the pixels in the matrix are combined, and the dual characteristics are closely combined with texture information, so that the defect type can be more accurately identified.
The invention adopts the following technical scheme that the method for precisely identifying the automobile parts comprises the following steps:
and acquiring a gear gray image, and performing window segmentation on the gray image to obtain a plurality of windows.
And carrying out edge detection on each window, and taking the window with the number ratio of the edge pixel points obtained by detection larger than a threshold value as a defect window.
And calculating the defect degree of the edge pixel points in each defect window, taking the edge pixel points with the defect degrees larger than the threshold value as defect pixel points, and acquiring all the defect pixel points in each defect window.
And counting the number of the defective pixel points in each direction in the neighborhood of each defective pixel point by taking each defective pixel point as a center, and calculating the direction probability of each direction according to the number of the defective pixel points in each direction.
And obtaining the gray level run matrix of each defect window in each direction, and obtaining the final gray level run matrix of each defect window according to the gray level run matrix of each window in each direction and the direction probability of the corresponding direction.
And averagely dividing the final gray scale run matrix of each defect window into a long run area and a short run area.
And calculating the difference degree of the running frequency of each defect window according to the frequency of the elements in the long-running area and the short-running area in the final gray level running matrix.
And averagely dividing the final gray level run matrix of each defect window into a high gray level area and a low gray level area.
And calculating the gray frequency difference degree of each defect window according to the frequency of the elements in the high gray level region and the low gray level region in the final gray level run matrix.
And calculating the confidence coefficient of each defect window according to the run frequency difference and the gray frequency difference of each defect window, and judging the defect type of each defect window according to the confidence coefficient of each defect window.
Further, a method for precisely identifying automobile parts, which is used for calculating the defect degree of edge pixel points in each defect window, comprises the following steps:
acquiring the number of pixel points in the neighborhood of each edge pixel point, wherein the pixel points are the same as the gray value of the edge pixel point;
sequentially traversing the pixels in the neighborhood of each edge pixel, and acquiring the number of continuous pixels with the same gray value of the edge pixel as the pixel aggregation degree of each edge pixel;
and calculating the defect degree of each edge pixel according to the pixel aggregation degree of each edge pixel and the number of pixels in the neighborhood which are the same as the gray value of the edge pixel.
Further, a method for precisely identifying automobile parts, which is used for acquiring a final gray level run matrix of each defect window, and comprises the following steps:
acquiring corresponding direction probabilities according to the number of pixel points in the directions of 0 degree, 45 degrees, 90 degrees and 135 degrees in each defect window;
and obtaining the gray level run matrix of each defect window in the directions of 0 degree, 45 degrees, 90 degrees and 135 degrees, and carrying out weighted summation according to the gray level run matrix in each direction and the direction probability of the corresponding direction to obtain the final gray level run matrix of each defect window.
Further, a method for precisely identifying automobile parts, which calculates the difference degree of the run frequency of each defect window, comprises the following steps:
averagely dividing the final gray level run matrix into a long run area and a short run area according to the run length, and respectively counting the frequency of all elements in the long run area and the short run area;
calculating the difference degree of the frequency of the runlength of each defect window according to the frequency of all elements in the long-run area and the frequency of all elements in the short-run area, wherein the expression is as follows:
Figure 30602DEST_PATH_IMAGE002
wherein the content of the first and second substances,
Figure DEST_PATH_IMAGE003
indicating the run-rate disparity of each defective window,
Figure 867846DEST_PATH_IMAGE004
the frequency count indicating the short runs,
Figure DEST_PATH_IMAGE005
indicating the frequency of long runs.
Further, a method for precisely identifying automobile parts, which calculates the difference degree of the gray frequency of each defect window, comprises the following steps:
averagely dividing the final gray level run matrix into a high gray level area and a low gray level area according to the gray level, and respectively counting the frequency of all elements in the high gray level area and the low gray level area;
calculating the gray frequency difference degree of each defect window according to the frequency of all elements in the high gray scale area and the low gray scale area, wherein the expression is as follows:
Figure DEST_PATH_IMAGE007
wherein the content of the first and second substances,
Figure 25289DEST_PATH_IMAGE008
representing the degree of difference in the gray frequency of each defect window,
Figure DEST_PATH_IMAGE009
indicating the pixel frequency number of the run length j and the gray level i, m indicating the run length of the final gray run matrix,
Figure 159817DEST_PATH_IMAGE010
representing the gray scale length of the final gray scale run matrix.
Further, a method for precisely identifying automobile parts, which calculates the confidence of each defect window, comprises the following steps:
calculating the confidence coefficient of each defect window according to the run frequency difference and the gray frequency difference of each defect window, wherein the expression is as follows:
Figure 134726DEST_PATH_IMAGE012
wherein the content of the first and second substances,
Figure DEST_PATH_IMAGE013
the confidence level of each of the defect windows is indicated,
Figure 226310DEST_PATH_IMAGE003
indicating the run-rate disparity of each defective window,
Figure 810613DEST_PATH_IMAGE008
representing the difference of the gray frequency of each defect window.
Further, a method for precisely identifying automobile parts, which judges the defect type of each defect window according to the confidence of the window, comprises the following steps:
when the confidence of the defect window is larger than a threshold value, a crack defect exists in the defect window;
when the confidence of the defect window is less than the threshold, a scratch exists in the defect window.
The invention has the beneficial effects that: according to the invention, firstly, the pixels in the gear image are preliminarily judged through edge detection, so that the gray level run matrix is established for the obtained suspected defect window, the calculated amount is greatly reduced, meanwhile, when the gray level run matrix is established, the run matrix of each direction of the window is weighted through the distribution of the defect pixels in the window in each direction, the characteristics of the pixels in the defect window can be more completely represented by the obtained final gray level run matrix, and further, the gray level frequency difference characteristic and the run length difference characteristic of the pixels in the matrix are combined, and the dual characteristics are closely combined with texture information, so that the defect type can be more accurately identified.
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 structural diagram of a precise identification method for automobile parts according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of dividing the final gray level run matrix of each defect window along the vertical direction according to the embodiment of the present invention;
fig. 3 is a schematic diagram of dividing the final gray scale run matrix of each defect window along the horizontal direction according to the embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. 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.
As shown in fig. 1, a schematic structural diagram of a precision identification method for automobile parts according to an embodiment of the present invention is provided, which includes:
101. and acquiring a gear gray image, and performing window segmentation on the gray image to obtain a plurality of windows.
And carrying out edge detection on each window, and taking the window with the number ratio of the edge pixel points obtained by detection larger than a threshold value as a defect window.
The specific scenes aimed by the invention are as follows: the defects of cracks or scratches generated in the gear production and processing process are difficult to accurately and efficiently distinguish by human eyes, so that the defect images are analyzed by using an image processing technology, and the defect types are identified by a computer.
The cross section of the gear is horizontally placed upwards, the fixed light source is arranged above the gear, an industrial professional collection camera is used in the collection process, the collection is started right above the gear, the collected image is subjected to Gaussian filtering noise reduction processing due to noise interference, the collected image is subjected to semantic segmentation to remove a background area, a gear area is reserved, and the gear area image is converted into a gray level image.
Because the cross section of the gear may have a plurality of defects, the texture characteristics of the defects need to be analyzed by combining the gray run matrix of each defect, so that an image needs to be segmented, each defect is segmented into a window as much as possible, the windows with the defects are further screened, and the crack types of the defects are analyzed according to the difference of texture information reflected in the window gray co-occurrence matrix.
The gray level of the normal defect-free area is uniform and abnormal, the difference exists between the pixel gray level of the defect area and the pixel gray level of the normal area, the pixel gray level of the crack area is lower than the pixel gray level of the normal area, and the pixel gray level of the scratch area is higher than the pixel gray level of the normal area, so that the gray level co-occurrence matrix of the whole gear does not need to be acquired, and only a window area with the defect needs to be acquired.
And (4) performing edge detection on each window by using a sobel operator, and when more edges are detected in the slider, considering that the slider has a defect, otherwise, considering that the current slider has no defect.
Setting the number of pixels on the detected edge to be more than a threshold value in the total number of window pixels
Figure 366359DEST_PATH_IMAGE014
The subsequent identification processing of the defects is considered to be required,
Figure DEST_PATH_IMAGE015
>0.03, N is the number of pixels on the edge detection line, and N is the number of pixels of the window.
102. And calculating the defect degree of the edge pixel points in each defect window, and taking the edge pixel points with the confidence degrees larger than the threshold value as defect pixel points to obtain all the defect pixel points in each defect window.
Since the crack is cracked along the grain, the statistical direction when the crack gray scale run matrix is counted should be more finely divided into different weights for each direction, and the gray scale co-occurrence matrix of the scratch area does not need to be calculated and weighted and summed towards all directions. In summary, we obtain the self-adaptive gray level co-occurrence matrix statistical direction by analyzing the real-time image texture features of cracks and scratches, so that the frequency information of the subsequent gray level run-length matrix is more real.
Because the gray level quantization is based on the conventional segmentation quantization, the values of the pixel points of the non-defect region and the pixel points of the defect region are possibly merged into the same class, and the false defect points just appear in the eight neighborhoods of the defect points, so that the points with the same gray value need to be screened in the eight neighborhoods, the false defect points are isolated and scattered, no continuous false defect points exist around the false defect points, and one side of the general neighborhood of the real defect points or most regions of the whole neighborhood are the defect points.
Firstly, screening out points with the same gray value as the point A in the neighborhood of the current defect point A:
Figure 449853DEST_PATH_IMAGE016
and H is the gray value corresponding to the pixel point, the points with different gray values in the neighborhood of the defect point A are marked as 0, and the points with the same gray value are marked as 1.
Analyzing the distribution characteristics of the pixels in the neighborhood of the A point, namely counting the number of the pixels with the same gray level in the neighborhood and the distribution aggregation of the pixelsThus, the defect degree of the point a as the defect point is calculated as:
Figure DEST_PATH_IMAGE017
in the formula
Figure 795777DEST_PATH_IMAGE018
The number of pixels with the same gray value in the neighborhood of the point A, and HP as a pixel point
Figure DEST_PATH_IMAGE019
The aggregation degree of pixels with the same gray value in the neighborhood is calculated by the following formula:
Figure 357340DEST_PATH_IMAGE020
HP is pixel aggregation degree, an initial value is 0, statistics is started from the point expansion of the first pixel value of 0 in a pixel neighborhood, when the gray value of the next pixel is the same as that of the previous pixel and is not 0, the aggregation degree of the central pixel is added with 1, when the gray value of the next pixel is different from that of the previous pixel, the aggregation degree is kept unchanged, and finally the defect degree of the current point which is a true defect point is obtained
Figure DEST_PATH_IMAGE021
In the invention, the defect degree of the pixel point is used as
Figure 705275DEST_PATH_IMAGE022
And then, the pixel point is considered as a defective pixel point.
The method for calculating the defect degree of the edge pixel point in each defect window comprises the following steps:
acquiring the number of pixel points in the neighborhood of each edge pixel point, wherein the pixel points are the same as the gray value of the edge pixel point;
sequentially traversing the pixels in the neighborhood of each edge pixel, and acquiring the number of continuous pixels with the same gray value of the edge pixel as the pixel aggregation degree of each edge pixel;
and calculating the defect degree of each edge pixel according to the pixel aggregation degree of each edge pixel and the number of pixels in the neighborhood which are the same as the gray value of the edge pixel.
103. And counting the number of the defective pixel points in each direction in the neighborhood of each defective pixel point by taking each defective pixel point as a center, and calculating the direction probability of each direction according to the number of the defective pixel points in each direction.
And taking the defective pixel point A as a center, acquiring all defective pixel points in the neighborhood of the defective pixel point, and calculating the distribution angles of the true defective points in the neighborhood of the point A:
Figure DEST_PATH_IMAGE023
in the formula
Figure 723785DEST_PATH_IMAGE024
The horizontal and vertical coordinate values of the pixel of the true defect point with the same gray value of the neighborhood are shown, and x and y are the coordinates of the central pixel point A.
Counting the direction angles of pixels with the same gray value in the neighborhood of all the true defect points relative to the central pixel point:
Figure DEST_PATH_IMAGE025
and carrying out sequential probability distribution statistics on the direction angles, and respectively calculating the 0-degree direction probability as follows:
Figure 55540DEST_PATH_IMAGE026
wherein
Figure DEST_PATH_IMAGE027
In the formula
Figure 916399DEST_PATH_IMAGE028
For counting the pixel quantity of 0 degree and 180 degree angles, i is the total quantity of true defect pixel points, and the probability of 45 degrees direction is calculated in the same way as follows:
Figure DEST_PATH_IMAGE029
wherein
Figure 572561DEST_PATH_IMAGE030
(ii) a The 90 ° directional probability is:
Figure DEST_PATH_IMAGE031
wherein
Figure 997858DEST_PATH_IMAGE032
(ii) a The 135 ° directional probability is:
Figure DEST_PATH_IMAGE033
wherein
Figure 335952DEST_PATH_IMAGE034
104. And obtaining the gray level run matrix of each defect window in each direction, and obtaining the final gray level run matrix of each defect window according to the gray level run matrix of each window in each direction and the direction probability of the corresponding direction.
The method for acquiring the final gray level run matrix of each defect window comprises the following steps:
acquiring corresponding direction probabilities according to the number of pixel points in the directions of 0 degree, 45 degrees, 90 degrees and 135 degrees in each defect window;
and obtaining the gray level run matrix of each defect window in the directions of 0 degree, 45 degrees, 90 degrees and 135 degrees, and carrying out weighted summation according to the gray level run matrix in each direction and the direction probability of the corresponding direction to obtain the final gray level run matrix of each defect window.
Taking the probability of each direction as the weight of the gray level run matrix of each direction, and finally counting the gray level run matrix:
Figure DEST_PATH_IMAGE035
where P is the weight in each direction, and P (i, j) is the gray level run matrix obtained in each direction.
105. And averagely dividing the final gray scale run matrix of each defect window into a long run area and a short run area.
The final gray level run matrix of each defect window is divided into 2 rectangles with the same size along the vertical direction, and the division schematic diagram is shown in fig. 2.
In the figure, the run length of the A1 area matrix is short, the run length of the A2 area matrix is longer, the longer the run length is, the higher the possibility that the current defect is a scratch is, and the shorter the run length is, the higher the possibility that the current defect is a crack is.
Counting the frequency difference between long run and short run of each area pixel of the current window gray level run matrix, and analyzing the type of the current defect for the first time according to the frequency difference, wherein the calculation formula for counting the short run frequency of the A1 area is as follows:
Figure 770476DEST_PATH_IMAGE036
where the frequency of the short run is represented, i is the ith gray level, j is the run length, the interval is (1,
Figure DEST_PATH_IMAGE037
) P (i, j) is the frequency of the run-length with the gray value i and the length j,
Figure 358583DEST_PATH_IMAGE004
the larger the value of (d), the larger the short run frequency.
Counting the long run frequency calculation formula of the A2 area:
Figure 250053DEST_PATH_IMAGE038
Figure 353139DEST_PATH_IMAGE005
frequency number representing long run, i is ith gray level, j is run length, interval is (
Figure DEST_PATH_IMAGE039
) P (i, j) is the frequency of the run-length with the gray value i and the length j,
Figure 325774DEST_PATH_IMAGE005
the larger the value of (d), the larger the long run frequency.
And calculating the difference degree of the running frequency of each defect window according to the frequency of the elements in the long-running area and the short-running area in the final gray level running matrix.
The method for calculating the difference degree of the run frequency of each defect window comprises the following steps:
averagely dividing the final gray level run matrix into a long run area and a short run area according to the run length, and respectively counting the frequency of all elements in the long run area and the short run area;
calculating the difference degree of the run frequency of each defect window according to the frequency of all elements in the long run region and the frequency of all elements in the short run region, wherein the expression is as follows:
Figure 830704DEST_PATH_IMAGE002
wherein the content of the first and second substances,
Figure 896006DEST_PATH_IMAGE003
indicating the run-rate disparity of each defective window,
Figure 486387DEST_PATH_IMAGE004
the frequency count indicating the short runs,
Figure 59451DEST_PATH_IMAGE005
frequency of long runs, when
Figure 153309DEST_PATH_IMAGE003
>A time of 1 indicates a higher frequency of short runs, reflecting a higher probability that the defect in the current window is a crack. On the contrary, when
Figure 888047DEST_PATH_IMAGE003
<A time of 1 indicates a higher frequency of long runs, reflecting a higher probability that the defect in the current window is a scratch.
106. And averagely dividing the final gray level run matrix of each defect window into a high gray level area and a low gray level area.
The gray scale run matrix of the window is divided into two regions with equal size along the horizontal direction, and the division schematic diagram is shown in fig. 3.
In the figure, A3 region is a low gray region, and a4 region is a high gray region. A higher grey value indicates a higher probability that the current defect is a scratch, whereas a lower grey value indicates a higher probability that the current defect is considered to be a crack.
And calculating the gray frequency difference degree of each defect window according to the frequency of the elements in the high gray level region and the low gray level region in the final gray level run matrix.
The method for calculating the gray frequency difference degree of each defect window comprises the following steps:
averagely dividing the final gray level run matrix into a high gray level area and a low gray level area according to the gray level, and respectively counting the frequency of all elements in the high gray level area and the low gray level area;
calculating the difference degree of the gray frequency of each defect window according to the frequency of all elements in the high gray level area and the low gray level area, wherein the expression is as follows:
Figure 464259DEST_PATH_IMAGE007
wherein the content of the first and second substances,
Figure 841014DEST_PATH_IMAGE008
representing the degree of difference in the gray frequency of each defect window,
Figure 54958DEST_PATH_IMAGE009
indicating the pixel frequency number of the run length j and the gray level i, m indicating the run length of the final gray run matrix,
Figure 226176DEST_PATH_IMAGE010
represents the gray scale length of the final gray scale run matrix when
Figure 525570DEST_PATH_IMAGE040
When the defect is a crack, the probability that the defect is a crack is higher, otherwise
Figure DEST_PATH_IMAGE041
1 indicates that the greater the probability that the defect is currently a scratch.
107. And calculating the confidence coefficient of each defect window according to the run frequency difference and the gray frequency difference of each defect window, and judging the defect type of each defect window according to the confidence coefficient of each defect window.
The difference between the cracks and the tooth marks cannot be directly identified according to a single element, and the combination of the gray value and the run length is needed, so that the identification accuracy can be improved to a great extent.
The method for calculating the confidence of each defect window comprises the following steps:
calculating the confidence coefficient of each defect window according to the run frequency difference and the gray frequency difference of each defect window, wherein the expression is as follows:
Figure 873725DEST_PATH_IMAGE012
wherein the content of the first and second substances,
Figure 942175DEST_PATH_IMAGE013
the confidence level of each of the defect windows is indicated,
Figure 284295DEST_PATH_IMAGE003
indicating the run-rate disparity of each defective window,
Figure 70985DEST_PATH_IMAGE008
indicating the difference of the gray frequency of each defect window
Figure 789543DEST_PATH_IMAGE013
The larger the value of (A) is, the more frequent the low-gray short run in the matrix is, the more possibility that the reflection defect tends to crack is, otherwise, the higher the frequency of the low-gray short run in the matrix is
Figure 211034DEST_PATH_IMAGE013
The smaller the number of pixels showing a high gray scale long run in the matrix, the more likely it is to reflect the tendency of defects to scratch.
The characteristics of the pixel low-gray short-run region are matched with the texture characteristics of the crack very much, the pixel of the high-gray short-run region possibly containing a small part of the crack region also possibly containing a small part of the scratch region, the pixel of the pixel low-gray long-run region also possibly containing a small part of the crack region also possibly containing a small part of the scratch region, and the characteristics of the high-gray long-run region are matched with the texture characteristics of the scratch very much, so that the run difference and the gray difference in the window region are reflected according to the confidence coefficient of each window, and the defect type in the defect window is judged.
The method for judging the defect type of each defect window according to the confidence coefficient of the window comprises the following steps:
when the confidence of the defect window is larger than a threshold value, a crack defect exists in the defect window;
when the confidence of the defect window is less than the threshold, a scratch exists in the defect window.
Confidence level
Figure 458476DEST_PATH_IMAGE013
When approaching 1, the probability that the current defect is a crack is high, and conversely
Figure 732463DEST_PATH_IMAGE013
Considering that the probability of the current defect being a scratch is high when the trend is 0, the invention sets an empirical threshold value of 0.5 when
Figure 989132DEST_PATH_IMAGE042
The current defect is considered to be a crack when
Figure DEST_PATH_IMAGE043
The current defect is treated as a scratch.
According to the invention, firstly, the pixels in the gear image are preliminarily judged through edge detection, so that the gray level run matrix is established for the obtained suspected defect window, the calculated amount is greatly reduced, meanwhile, when the gray level run matrix is established, the run matrix of each direction of the window is weighted through the distribution of the defect pixels in the window in each direction, the characteristics of the pixels in the defect window can be more completely represented by the obtained final gray level run matrix, and further, the gray level frequency difference characteristic and the run length difference characteristic of the pixels in the matrix are combined, and the dual characteristics are closely combined with texture information, so that the defect type can be more accurately identified.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (7)

1. A precise identification method for automobile parts is characterized by comprising the following steps:
acquiring a gear gray image, and performing window segmentation on the gray image to obtain a plurality of windows;
performing edge detection on each window, and taking the window with the number ratio of the edge pixel points larger than a threshold value obtained by detection as a defect window;
calculating the defect degree of the edge pixel points in each defect window, taking the edge pixel points with the defect degrees larger than a threshold value as defect pixel points, and acquiring all the defect pixel points in each defect window;
counting the number of defective pixel points in each direction in the neighborhood of each defective pixel point by taking each defective pixel point as a center, and calculating the direction probability of each direction according to the number of the defective pixel points in each direction;
obtaining a gray level run matrix of each defect window in each direction, and obtaining a final gray level run matrix of each defect window according to the gray level run matrix of each window in each direction and the direction probability of the corresponding direction;
averagely dividing the final gray level run matrix of each defect window into a long run area and a short run area;
calculating the difference degree of the running frequency of each defect window according to the frequency of the elements in the long-running area and the short-running area in the final gray level running matrix;
averagely dividing the final gray level run matrix of each defect window into a high gray level area and a low gray level area;
calculating the difference degree of the gray frequency of each defect window according to the frequency of elements in the high gray level region and the low gray level region in the final gray level run matrix;
and calculating the confidence coefficient of each defect window according to the run frequency difference and the gray frequency difference of each defect window, and judging the defect type of each defect window according to the confidence coefficient of each defect window.
2. The precision identification method of automobile parts according to claim 1, wherein the method for calculating the defect degree of the edge pixel points in each defect window comprises the following steps:
acquiring the number of pixel points in the neighborhood of each edge pixel point, wherein the pixel points are the same as the gray value of the edge pixel point;
sequentially traversing the pixels in the neighborhood of each edge pixel, and acquiring the number of continuous pixels with the same gray value of the edge pixel as the pixel aggregation degree of each edge pixel;
and calculating the defect degree of each edge pixel according to the pixel aggregation degree of each edge pixel and the number of pixels in the neighborhood which are the same as the gray value of the edge pixel.
3. The method for precisely identifying the automobile parts as claimed in claim 1, wherein the method for obtaining the final gray level run matrix of each defect window comprises:
acquiring corresponding direction probabilities according to the number of pixel points in the directions of 0 degree, 45 degrees, 90 degrees and 135 degrees in each defect window;
and obtaining the gray level run matrix of each defect window in the directions of 0 degree, 45 degrees, 90 degrees and 135 degrees, and carrying out weighted summation according to the gray level run matrix in each direction and the direction probability of the corresponding direction to obtain the final gray level run matrix of each defect window.
4. The method for precisely identifying the automobile parts as claimed in claim 1, wherein the method for calculating the difference of the run frequency of each defect window comprises:
averagely dividing the final gray level run matrix into a long run area and a short run area according to the run length, and respectively counting the frequency of all elements in the long run area and the short run area;
calculating the difference degree of the run frequency of each defect window according to the frequency of all elements in the long run region and the frequency of all elements in the short run region, wherein the expression is as follows:
Figure DEST_PATH_IMAGE001
wherein the content of the first and second substances,
Figure 6327DEST_PATH_IMAGE002
indicating the run-rate disparity of each defective window,
Figure 346173DEST_PATH_IMAGE003
the frequency count indicating the short runs,
Figure 749472DEST_PATH_IMAGE004
indicating the frequency of long runs.
5. The method for precisely identifying the automobile parts as claimed in claim 1, wherein the method for calculating the difference degree of the gray frequency of each defect window comprises:
averagely dividing the final gray level run matrix into a high gray level region and a low gray level region according to the gray level, and respectively counting the frequency numbers of all elements in the high gray level region and the low gray level region;
calculating the gray frequency difference degree of each defect window according to the frequency of all elements in the high gray scale area and the low gray scale area, wherein the expression is as follows:
Figure 414940DEST_PATH_IMAGE005
wherein the content of the first and second substances,
Figure 873997DEST_PATH_IMAGE006
representing the degree of difference in the gray frequency of each defect window,
Figure 60212DEST_PATH_IMAGE007
indicating the pixel frequency number of the run length j and the gray level i, m indicating the run length of the final gray run matrix,
Figure 318018DEST_PATH_IMAGE009
representing the gray scale length of the final gray scale run matrix.
6. The method for precisely identifying the automobile parts as claimed in claim 1, wherein the confidence of each defect window is calculated by:
calculating the confidence coefficient of each defect window according to the run frequency difference and the gray frequency difference of each defect window, wherein the expression is as follows:
Figure 685545DEST_PATH_IMAGE010
wherein the content of the first and second substances,
Figure 100740DEST_PATH_IMAGE011
the confidence level of each of the defect windows is indicated,
Figure 313546DEST_PATH_IMAGE002
indicating the run-rate disparity of each defective window,
Figure 691438DEST_PATH_IMAGE006
indicating the degree of difference in the gray frequency of each defect window.
7. The method for precisely identifying the automobile parts as claimed in claim 1, wherein the method for judging the defect type of each defect window according to the confidence of the window comprises the following steps:
when the confidence of the defect window is larger than a threshold value, a crack defect exists in the defect window;
when the confidence of the defect window is less than the threshold, a scratch exists in the defect window.
CN202210822912.1A 2022-07-14 2022-07-14 Precise identification method for automobile parts Active CN115082418B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210822912.1A CN115082418B (en) 2022-07-14 2022-07-14 Precise identification method for automobile parts

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210822912.1A CN115082418B (en) 2022-07-14 2022-07-14 Precise identification method for automobile parts

Publications (2)

Publication Number Publication Date
CN115082418A true CN115082418A (en) 2022-09-20
CN115082418B CN115082418B (en) 2022-11-04

Family

ID=83259462

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210822912.1A Active CN115082418B (en) 2022-07-14 2022-07-14 Precise identification method for automobile parts

Country Status (1)

Country Link
CN (1) CN115082418B (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115270894A (en) * 2022-09-27 2022-11-01 山东行创科技有限公司 Abnormal vibration signal extraction method for methanol generator
CN115330773A (en) * 2022-10-12 2022-11-11 南通红运金属科技有限公司 Metal grinding pockmark defect detection method
CN115359053A (en) * 2022-10-19 2022-11-18 江苏万森绿建装配式建筑有限公司 Intelligent detection method and system for defects of metal plate
CN115526890A (en) * 2022-11-25 2022-12-27 深圳市腾泰博科技有限公司 Method for identifying fault factors of record player head
CN115731239A (en) * 2023-01-06 2023-03-03 山东建筑大学鉴定检测中心有限公司 Method for detecting quality of steel
CN115953398A (en) * 2023-03-13 2023-04-11 无锡斯达新能源科技股份有限公司 Defect identification method for strip steel surface
CN116229335A (en) * 2023-05-10 2023-06-06 山东大佳机械有限公司 Livestock and poultry farm environment recognition method based on image data
CN116309561A (en) * 2023-05-17 2023-06-23 威海赛宝工业信息技术研究院有限公司 Surface defect identification method based on anti-creeping insulating material
CN116468728A (en) * 2023-06-20 2023-07-21 深圳市锦红兴科技有限公司 Production quality detection method for hardware stamping part die
CN116993722A (en) * 2023-09-26 2023-11-03 山东奥斯登房车有限公司 Visual detection method for defects of trailer body of trailer
CN117173703A (en) * 2023-11-02 2023-12-05 温州华嘉电器有限公司 Isolating switch state identification method

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006331163A (en) * 2005-05-27 2006-12-07 Matsushita Electric Ind Co Ltd Image processing device
US20160078613A1 (en) * 2013-04-19 2016-03-17 Stichting Maastricht Radiation Oncology "Maastro-Clinic" Method and System for Determining a Phenotype of a Neoplasm in a Human or Animal Body
CN112998649A (en) * 2015-01-06 2021-06-22 大卫·伯顿 Movable wearable monitoring system
CN114049489A (en) * 2022-01-13 2022-02-15 山东鹰联光电科技股份有限公司 Early warning method for breakage of optical fiber cable sheath
CN114202541A (en) * 2022-02-17 2022-03-18 湖北中海电线电缆有限公司 Cable defect detection method based on artificial intelligence
CN114240888A (en) * 2021-12-17 2022-03-25 沭阳安宏木制品厂 Furniture assembly paint spraying defect repairing method and system based on image processing
CN114399635A (en) * 2022-03-25 2022-04-26 珞石(北京)科技有限公司 Image two-classification ensemble learning method based on feature definition and deep learning
CN114419025A (en) * 2022-01-27 2022-04-29 江苏泰和木业有限公司 Fiberboard quality evaluation method based on image processing
CN114445387A (en) * 2022-01-29 2022-05-06 泗阳富艺木业股份有限公司 Fiberboard quality classification method based on machine vision
CN114529549A (en) * 2022-04-25 2022-05-24 南通东德纺织科技有限公司 Cloth defect labeling method and system based on machine vision
CN114708325A (en) * 2022-03-31 2022-07-05 南通华烨塑料工业有限公司 Method for quickly positioning rubber production problem based on rubber blooming defect

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006331163A (en) * 2005-05-27 2006-12-07 Matsushita Electric Ind Co Ltd Image processing device
US20160078613A1 (en) * 2013-04-19 2016-03-17 Stichting Maastricht Radiation Oncology "Maastro-Clinic" Method and System for Determining a Phenotype of a Neoplasm in a Human or Animal Body
CN112998649A (en) * 2015-01-06 2021-06-22 大卫·伯顿 Movable wearable monitoring system
CN114240888A (en) * 2021-12-17 2022-03-25 沭阳安宏木制品厂 Furniture assembly paint spraying defect repairing method and system based on image processing
CN114049489A (en) * 2022-01-13 2022-02-15 山东鹰联光电科技股份有限公司 Early warning method for breakage of optical fiber cable sheath
CN114419025A (en) * 2022-01-27 2022-04-29 江苏泰和木业有限公司 Fiberboard quality evaluation method based on image processing
CN114445387A (en) * 2022-01-29 2022-05-06 泗阳富艺木业股份有限公司 Fiberboard quality classification method based on machine vision
CN114202541A (en) * 2022-02-17 2022-03-18 湖北中海电线电缆有限公司 Cable defect detection method based on artificial intelligence
CN114399635A (en) * 2022-03-25 2022-04-26 珞石(北京)科技有限公司 Image two-classification ensemble learning method based on feature definition and deep learning
CN114708325A (en) * 2022-03-31 2022-07-05 南通华烨塑料工业有限公司 Method for quickly positioning rubber production problem based on rubber blooming defect
CN114529549A (en) * 2022-04-25 2022-05-24 南通东德纺织科技有限公司 Cloth defect labeling method and system based on machine vision

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
BI MINGDE等: "Real-time textural defect detection based on label run length co-occurrence matrix", 《PROCEEDINGS 2011 INTERNATIONAL CONFERENCE ON TRANSPORTATION, MECHANICAL, AND ELECTRICAL ENGINEERING (TMEE)》 *
FUQIAN SHI等: "Texture features based microscopic image classification of liver cellular granuloma using artificial neural networks", 《2019 IEEE 8TH JOINT INTERNATIONAL INFORMATION TECHNOLOGY AND ARTIFICIAL INTELLIGENCE CONFERENCE (ITAIC)》 *
于彩香: "基于纹理分析的皮革可视缺陷检测方法的研究", 《中古优秀硕士学位论文全文数据库 信息科技辑》 *
于彩香等: "基于灰度―游程累加的皮革缺陷自动检测", 《皮革与化工》 *

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115270894A (en) * 2022-09-27 2022-11-01 山东行创科技有限公司 Abnormal vibration signal extraction method for methanol generator
CN115270894B (en) * 2022-09-27 2022-12-27 山东行创科技有限公司 Abnormal vibration signal extraction method for methanol generator
CN115330773A (en) * 2022-10-12 2022-11-11 南通红运金属科技有限公司 Metal grinding pockmark defect detection method
CN115359053A (en) * 2022-10-19 2022-11-18 江苏万森绿建装配式建筑有限公司 Intelligent detection method and system for defects of metal plate
CN115526890A (en) * 2022-11-25 2022-12-27 深圳市腾泰博科技有限公司 Method for identifying fault factors of record player head
CN115731239A (en) * 2023-01-06 2023-03-03 山东建筑大学鉴定检测中心有限公司 Method for detecting quality of steel
CN115953398A (en) * 2023-03-13 2023-04-11 无锡斯达新能源科技股份有限公司 Defect identification method for strip steel surface
CN116229335A (en) * 2023-05-10 2023-06-06 山东大佳机械有限公司 Livestock and poultry farm environment recognition method based on image data
CN116309561A (en) * 2023-05-17 2023-06-23 威海赛宝工业信息技术研究院有限公司 Surface defect identification method based on anti-creeping insulating material
CN116468728A (en) * 2023-06-20 2023-07-21 深圳市锦红兴科技有限公司 Production quality detection method for hardware stamping part die
CN116468728B (en) * 2023-06-20 2023-08-29 深圳市锦红兴科技有限公司 Production quality detection method for hardware stamping part die
CN116993722A (en) * 2023-09-26 2023-11-03 山东奥斯登房车有限公司 Visual detection method for defects of trailer body of trailer
CN116993722B (en) * 2023-09-26 2023-12-08 山东奥斯登房车有限公司 Visual detection method for defects of trailer body of trailer
CN117173703A (en) * 2023-11-02 2023-12-05 温州华嘉电器有限公司 Isolating switch state identification method
CN117173703B (en) * 2023-11-02 2024-01-16 温州华嘉电器有限公司 Isolating switch state identification method

Also Published As

Publication number Publication date
CN115082418B (en) 2022-11-04

Similar Documents

Publication Publication Date Title
CN115082418B (en) Precise identification method for automobile parts
CN115170576B (en) Aluminum pipe surface defect detection method based on machine vision
CN114842017B (en) HDMI cable surface quality detection method and system
CN115311292B (en) Strip steel surface defect detection method and system based on image processing
CN115082467B (en) Building material welding surface defect detection method based on computer vision
CN116758061B (en) Casting surface defect detection method based on computer vision
CN114549522B (en) Textile quality detection method based on target detection
CN115239704B (en) Accurate detection and repair method for wood surface defects
CN114419025A (en) Fiberboard quality evaluation method based on image processing
CN116645367B (en) Steel plate cutting quality detection method for high-end manufacturing
CN115953398B (en) Defect identification method for strip steel surface
CN110310275B (en) Chain conveyor belt defect detection method based on image processing
CN114820625B (en) Automobile top block defect detection method
CN106934801A (en) A kind of fluorescentmagnetic particle(powder) defect inspection method based on Laws texture filterings
CN114782330B (en) Grate abnormity detection method and system based on artificial intelligence
CN109239073A (en) A kind of detection method of surface flaw for body of a motor car
CN115018838A (en) Method for identifying pitting defects on surface of oxidized steel pipe material
CN116883408B (en) Integrating instrument shell defect detection method based on artificial intelligence
CN116758075B (en) Artificial intelligence-based blower motor operation fault detection method
CN115063423A (en) Mechanical casting cold and hot crack self-adaptive identification method based on computer vision
CN115100191A (en) Metal casting defect identification method based on industrial detection
CN117011292B (en) Method for rapidly detecting surface quality of composite board
CN114049316A (en) Steel wire rope defect detection method based on metallic luster area
CN1106572C (en) Automatic evaluation method of casting ingot cross section quality
CN115266732A (en) Carbon fiber tow defect detection method based on machine vision

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