CN114820625A - Automobile top block defect detection method - Google Patents

Automobile top block defect detection method Download PDF

Info

Publication number
CN114820625A
CN114820625A CN202210754325.3A CN202210754325A CN114820625A CN 114820625 A CN114820625 A CN 114820625A CN 202210754325 A CN202210754325 A CN 202210754325A CN 114820625 A CN114820625 A CN 114820625A
Authority
CN
China
Prior art keywords
threshold
processed
defect
obtaining
region
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
CN202210754325.3A
Other languages
Chinese (zh)
Other versions
CN114820625B (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.)
Epp Vehicles Co ltd
Original Assignee
Epp Vehicles 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 Epp Vehicles Co ltd filed Critical Epp Vehicles Co ltd
Priority to CN202210754325.3A priority Critical patent/CN114820625B/en
Publication of CN114820625A publication Critical patent/CN114820625A/en
Application granted granted Critical
Publication of CN114820625B publication Critical patent/CN114820625B/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
    • G06T7/0008Industrial image inspection checking presence/absence
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/213Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods
    • G06F18/2135Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods based on approximation criteria, e.g. principal component analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • 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
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/28Quantising the image, e.g. histogram thresholding for discrimination between background and foreground patterns
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/762Arrangements for image or video recognition or understanding using pattern recognition or machine learning using clustering, e.g. of similar faces in social networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/772Determining representative reference patterns, e.g. averaging or distorting patterns; Generating dictionaries

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Software Systems (AREA)
  • Medical Informatics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Databases & Information Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Quality & Reliability (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Image Analysis (AREA)

Abstract

The invention relates to the field of artificial intelligence, and provides a method for detecting defects of an automobile top block, which is a method based on artificial intelligence in the production field and comprises the following steps: acquiring a grey-scale image of the car roof leather; obtaining a white spot pixel point set; obtaining a candidate defect area; obtaining a binary image after each threshold value is segmented; extracting a region to be processed; obtaining a dictionary matrix of each region to be processed; obtaining the change rate of the comprehensive dictionary of each region to be processed; resulting in the final defect area. The invention can divide accurate defect areas and has high detection precision.

Description

Automobile top block defect detection method
Technical Field
The invention relates to the field of artificial intelligence, in particular to a method for detecting defects of an automobile top block.
Background
Along with the development of social economy and the improvement of the living standard of people, the usage amount of automobiles is also improved. The quality of the automobile roof in the automobile is an important part of the appearance of the automobile, and the defects of the automobile roof directly influence the sale of the automobile. Meanwhile, the automobile roof is easy to scratch when being installed, so that the quality of the roof area needs to be detected before the automobile is on the market, and texture structures exist in the leather area of the automobile roof and can interfere with the identification of the scratch defect.
The traditional defect identification method comprises threshold segmentation and edge detection. However, the color difference between the car roof leather and the scratch defect is small, and the accurate defect area is difficult to divide by directly utilizing the threshold value division. Meanwhile, the car roof leather has a unique texture structure, the texture can interfere with defect identification, and it is difficult to respectively determine which areas are the defects and which areas are the leather textures by using an edge detection method. Meanwhile, certain texture intervals exist among scratch defects, and accurate defect regions are difficult to segment by directly utilizing the area information of the connected region. The invention provides a method for detecting defects of an automobile top block, which is a detection method based on artificial intelligence in the production field, and is characterized in that the characteristics that scratch defects have direction consistency characteristics and the continuity of the scratch defects is increased under different thresholds are considered, an initial threshold is firstly utilized to segment out a white spot region, then cluster analysis is carried out based on the direction consistency characteristics to obtain a candidate defect region, and then a dictionary change rate different from the threshold is combined to obtain a defect probability, so that an accurate defect region is segmented out.
Disclosure of Invention
The invention provides a method for detecting defects of an automobile top block, which aims to solve the problem of low detection precision in the prior art.
The invention discloses a method for detecting defects of an automobile top block, which adopts the following technical scheme:
acquiring a grey-scale image of the car roof leather;
performing threshold segmentation on the grey-scale image of the car roof leather through a first segmentation threshold of pixel points to obtain a white spot pixel point set which is larger than the segmentation threshold;
obtaining a principal component direction of the white spot pixel point set by adopting a PCA algorithm, obtaining an included angle of each white spot pixel point by utilizing a gradient direction angle and a principal component direction of each white spot pixel point in the white spot pixel point set, and clustering all white spot pixel points through the included angle to obtain a candidate defect region;
respectively carrying out threshold segmentation on the grey-scale images of the car roof leather through different thresholds to obtain binary images after each threshold segmentation;
extracting a region corresponding to the candidate defect region in the binarized image after each threshold segmentation as a region to be processed;
obtaining a dictionary matrix of each to-be-processed area under the corresponding binary image through the pixel information of each to-be-processed area in the corresponding binary image;
obtaining the comprehensive dictionary change rate of each to-be-processed area through the dictionary matrix of each to-be-processed area under the binary image after all threshold segmentation;
and obtaining the defect probability of each to-be-processed area through the average value of the included angles of all pixel points in the candidate defect area corresponding to each to-be-processed area and the change rate of the comprehensive dictionary of the to-be-processed area, and judging whether each to-be-processed area is a defect area according to the defect probability to obtain a final defect area.
Further, the method for detecting the defect of the top block of the automobile comprises the following steps of:
obtaining a gray level histogram corresponding to the image through the gray level image of the car roof leather;
acquiring gray values corresponding to the maximum peak value and the second peak value in the gray histogram;
and averaging the gray values corresponding to the maximum peak value and the second peak value to be used as a first segmentation threshold of the pixel point.
Further, the method for detecting the defect of the automobile top block comprises the following steps:
clustering all white spot pixel points through included angle angles to obtain different white spot pixel point categories;
and selecting the white spot pixel point category of which the average included angle of the pixel points is smaller than the included angle threshold value from all the white spot pixel point categories as candidate defect regions.
Further, the method for detecting the defect of the automobile top block, which is used for obtaining the binary image after each threshold value is segmented, comprises the following steps:
threshold segmentation is carried out on the grey-level image of the car roof leather through different thresholds, and a pixel point set which is larger than the threshold and smaller than the threshold under each threshold are obtained;
and setting the pixel points which are larger than the threshold value under each threshold value to be 1, and setting the pixel points which are smaller than the threshold value to be 0, so as to obtain the binary image after each threshold value is segmented.
Further, the method for detecting the defect of the automobile top block is to obtain the change rate of the comprehensive dictionary of each region to be processed, and comprises the following steps:
obtaining the change rate of the dictionary matrix of each to-be-processed area under the adjacent threshold value by the dictionary matrix of each to-be-processed area under the binary image after the adjacent threshold value is divided;
and obtaining the comprehensive dictionary change rate of each to-be-processed area according to the change rate of the dictionary matrix of each to-be-processed area under all pairwise adjacent threshold values.
Further, in the method for detecting defects of the top block of the automobile, the expression of the change rate of the dictionary matrix of each to-be-processed area under the adjacent threshold values in pairs is as follows:
Figure 100002_DEST_PATH_IMAGE002
in the formula:
Figure 100002_DEST_PATH_IMAGE004
representing the change rate of the dictionary matrix of the ith to-be-processed area under the jth threshold value and the dictionary matrix under the adjacent threshold value,
Figure 100002_DEST_PATH_IMAGE006
a dictionary matrix representing the ith area to be processed under the jth threshold,
Figure 100002_DEST_PATH_IMAGE008
representing the dictionary matrix of the ith to-be-processed area under the j-1 st threshold,
Figure 100002_DEST_PATH_IMAGE010
representing the norm of the matrix.
Further, in the method for detecting the defect of the automobile top block, the expression of the defect probability of the region to be processed is as follows:
Figure 100002_DEST_PATH_IMAGE012
in the formula:
Figure 100002_DEST_PATH_IMAGE014
indicates the defect probability of the ith area to be processed,
Figure 100002_DEST_PATH_IMAGE016
represents the integrated dictionary change rate of the ith region to be processed,
Figure 100002_DEST_PATH_IMAGE018
and representing the average value of included angles of all pixel points in the candidate defect region corresponding to the ith region to be processed.
The invention has the beneficial effects that: the invention relates to a method based on artificial intelligence in the production field, which is characterized in that an initial threshold value is utilized to segment out a white spot region, then clustering analysis is carried out based on direction consistency characteristics to obtain a candidate defect region, and then the change rate of a dictionary different from the threshold value is combined to obtain the defect probability, so that the accurate defect region is segmented out. Compared with the prior art, the method can be used for segmenting accurate defect areas, is high in detection precision, simple in detection method and labor-saving.
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 an embodiment of a method for detecting defects of an automobile top block according to 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.
Example 1
An embodiment of a method for detecting defects of an automobile top block of the present invention, as shown in fig. 1, includes:
101. acquiring a grey-scale image of the car roof leather;
the embodiment processes the collected car roof leather image, and then cuts off the scratch defect on the car roof leather.
The scratch defect is similar to the original color of the car roof leather, so that the defect area is hardly accurately segmented by utilizing a threshold value, the car roof leather has original shading texture, the edge boundary of the scratch defect is not clear enough, the internal defect in the middle of the scratch defect has discontinuous texture, the scratch defect which is segmented can have a plurality of communicated areas, and the defect area is also hardly accurately positioned by directly utilizing the area information.
Firstly, arranging a camera, collecting a car roof leather image, and analyzing the image to obtain an accurate defect area.
The operation is to fix the camera on a device, drive the camera to extend into the interior of the automobile carriage by the device, and acquire the leather image on the roof of the carriage.
Further converting the leather image from RGB image to gray image
Figure DEST_PATH_IMAGE020
And subsequently, analyzing through the gray level image to obtain an accurate defect position.
At this point, a camera is erected to collect an image, and the image is subjected to graying processing to obtain a grayscale image.
102. Performing threshold segmentation on the grey-scale image of the car roof leather through a first segmentation threshold of pixel points to obtain a white spot pixel point set which is larger than the segmentation threshold;
because the defect area is an area with larger gray scale, a pixel set with larger gray scale value is divided by a segmentation threshold value, and meanwhile, because the scratch defect has a direction consistency characteristic, the candidate defect area is obtained by carrying out cluster analysis based on the characteristic, and because the scratch defect area shows larger characteristic change compared with the common leather texture spot along with the change of the threshold value, the defect probability of each candidate defect needs to be calculated by utilizing the change characteristic of each candidate area dictionary. The specific operation is as follows:
firstly, a region with a larger gray value is segmented by using an initial threshold, specifically: counting the frequency of the gray value of each pixel point of the gray image to generate a gray histogram, solving the gray value corresponding to the maximum peak value and the gray value corresponding to the second peak value in the gray histogram, taking the average value of the two gray values as a segmentation threshold, and screening out a pixel point set which is larger than the threshold, wherein the pixel in the pixel point set is a white spot pixel point.
103. Obtaining a principal component direction of the white spot pixel point set by adopting a PCA algorithm, obtaining an included angle of each white spot pixel point by utilizing a gradient direction angle and a principal component direction of each white spot pixel point in the white spot pixel point set, and clustering all white spot pixel points through the included angle to obtain a candidate defect region;
PCA principal component analysis is carried out on each exudate pixel based on the texture direction characteristics, and the principal component direction with the maximum feature value of the exudate pixel is obtained and becomes the first principal component direction. A direction angle of the first principal component direction is acquired, the direction angle being obtained based on the horizontal direction being the 0-degree direction. The direction angle is the main texture direction of the white spot pixel in the image. Since the white spot pixels have both defective pixels and leather texture pixels, the leather texture is an irregular polygon, the texture has no obvious directionality, and the scratch-off defective pixels have obvious directional characteristics, the main texture direction obtained here mainly reflects the main texture direction of the defective pixels.
And obtaining the gradient direction angle of each white spot pixel point, and calculating the included angle between the gradient direction angle of each white spot pixel point and the direction angle of the first principal component direction. And carrying out density clustering on each white spot pixel point based on the included angle to obtain a plurality of category sets. The probability that the class set with the smaller included angle is a defect is higher, so that a candidate defect area is screened out based on the probability, and the specific method is as follows:
and acquiring the average included angle of the pixel point sets of all categories, and acquiring the category set with the included angle smaller than 30 degrees.
And taking the area surrounded by the boundary pixel points as a candidate defect area through the boundary pixel points of each category set.
Clustering white spot pixel points according to the included angle to obtain different categories, then calculating the average value of the included angle of all the pixel points in each category, and selecting the cluster with the smaller average value of the included angle as a candidate defect region.
104. Respectively carrying out threshold segmentation on the grey-scale images of the car roof leather through different thresholds to obtain binary images after each threshold segmentation;
each candidate defect region is obtained in the above manner, however, there may be non-defect regions in these regions, so it is necessary to analyze the possibility that each region belongs to a defect through the feature change of each defect region under different thresholds.
Since scratch defects may exhibit different characteristics at different thresholds, for example discrete points at high thresholds and progressive formation of connected directional scratch areas at low thresholds. And the white spots of the non-defective region do not have directional connected regions under different thresholds. The scratch-off defect area thus exhibits a greater rate of change in characteristics at different thresholds than the non-defect area.
Respectively utilize
Figure DEST_PATH_IMAGE022
Figure DEST_PATH_IMAGE024
Figure DEST_PATH_IMAGE026
Figure DEST_PATH_IMAGE028
Figure DEST_PATH_IMAGE030
Figure DEST_PATH_IMAGE032
Figure DEST_PATH_IMAGE034
Figure DEST_PATH_IMAGE036
The original gray level image is subjected to threshold segmentation by the threshold value, pixel sets larger than the threshold value and pixel sets smaller than the threshold value under different threshold values are segmented, binarization processing is carried out on each image (the pixel set larger than the threshold value is set to be 1, and the pixel set smaller than the threshold value is set to be 0, wherein the pixel set of the center 1 is the white spot pixel 2 obtained under the threshold value), and binary images under different threshold value segmentation are obtained. Here, the
Figure DEST_PATH_IMAGE038
Is the initial threshold in the previous step.
The above steps are to segment the gray-scale image by using different thresholds respectively, for example, using
Figure 453503DEST_PATH_IMAGE022
Segmenting the gray level image to obtain a value greater than
Figure 636222DEST_PATH_IMAGE022
Sum of pixel points less than
Figure 321019DEST_PATH_IMAGE022
Then, the image is subjected to binarization processing, and the value of the pixel point set is larger than that of the pixel point set
Figure 247387DEST_PATH_IMAGE022
The pixel value of the pixel point of (1) is less than
Figure 202705DEST_PATH_IMAGE022
Setting the pixel value of the pixel point to 0 to obtain a corresponding binary image, namely the threshold value
Figure 556326DEST_PATH_IMAGE022
And (4) corresponding to the binary image.
105. Extracting a region corresponding to the candidate defect region in the binarized image after each threshold segmentation as a region to be processed;
and finding out pixel points of the pixel points of each candidate defect region at corresponding positions in the binary image corresponding to different thresholds to obtain candidate defect regions of the binary image corresponding to different thresholds.
106. Obtaining a dictionary matrix of each to-be-processed area under the corresponding binary image through the pixel information of each to-be-processed area in the corresponding binary image;
acquiring pixel information of each candidate defect region in each threshold value binary image, taking the pixel information of the binary image under each threshold value in each candidate defect region as input, training to obtain a dictionary matrix and a sparse matrix, wherein the dictionary matrix is obtained through a dictionary learning algorithm, and the method is a known technology. By the method, dictionary matrixes of all candidate defect regions under different threshold values are obtained.
107. Obtaining the comprehensive dictionary change rate of each to-be-processed area through the dictionary matrix of each to-be-processed area under the binary image after all threshold segmentation;
analyzing the change rate of dictionary matrixes of the same candidate defect region under different threshold values, wherein the higher the change rate is, the higher the probability that the candidate defect region belongs to the defect is, and the calculation mode of the change rate of the dictionary is as follows:
analyzing based on a single candidate defect area, acquiring dictionary matrixes under different thresholds, and calculating the change rate of every two dictionary matrixes, wherein the expression is as follows:
Figure DEST_PATH_IMAGE002A
in the formula:
Figure 167567DEST_PATH_IMAGE004
representing the change rate of the dictionary matrix of the ith candidate defect region under the jth threshold value and the dictionary matrix under the adjacent threshold value,
Figure 897625DEST_PATH_IMAGE006
a dictionary matrix representing the ith defect candidate area under the jth threshold,
Figure 832083DEST_PATH_IMAGE008
a dictionary matrix representing the ith defect candidate area under the j-1 th threshold value
Figure DEST_PATH_IMAGE040
J-1, the adjacent threshold value,
Figure 261665DEST_PATH_IMAGE010
representing the norm of the matrix.
Analogy to this method to obtain the dictionary matrix change rate under two adjacent threshold values.
Averaging the dictionary change rates of the ith candidate defect area and the adjacent threshold values to obtain the comprehensive dictionary change rate of the ith candidate defect area
Figure 156940DEST_PATH_IMAGE016
108. And obtaining the defect probability of each to-be-processed area through the average value of the included angles of all pixel points in the candidate defect area corresponding to each to-be-processed area and the change rate of the comprehensive dictionary of the to-be-processed area, and judging whether each to-be-processed area is a defect area according to the defect probability to obtain a final defect area.
The salient features of the scratch defects include directional consistency and dictionary presenting large-variation features along with threshold variation, so that the defect probability of each candidate defect area can be calculated by utilizing the directional consistency and the dictionary variation rate, specifically:
Figure DEST_PATH_IMAGE012A
in the formula:
Figure 362794DEST_PATH_IMAGE014
indicating the defect probability of the ith candidate defect region,
Figure 292704DEST_PATH_IMAGE016
the change rate of the comprehensive dictionary representing the ith candidate defect area is used for describing the change condition of the characteristics of the candidate defect area,
Figure 988127DEST_PATH_IMAGE018
and representing the average value of included angle angles of all pixel points in the ith candidate defect region, and reflecting the direction consistency characteristic of the region through the value.
And obtaining candidate defect regions through direction consistency, and then obtaining the defect probability of each candidate defect region by combining the dictionary change rates under different thresholds.
Screening out the defect probability greater than the threshold value
Figure DEST_PATH_IMAGE042
The candidate defect area is judged to be the accurate defect area.
The invention relates to a method based on artificial intelligence in the production field, which is characterized in that an initial threshold value is utilized to segment out a white spot region, then clustering analysis is carried out based on direction consistency characteristics to obtain a candidate defect region, and then the change rate of a dictionary different from the threshold value is combined to obtain the defect probability, so that the accurate defect region is segmented out. Compared with the prior art, the method can be used for segmenting accurate defect areas, is high in detection precision, simple in detection method and labor-saving.
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 method for detecting defects of an automobile top block is characterized by comprising the following steps:
acquiring a grey-scale image of the car roof leather;
performing threshold segmentation on the grey-scale image of the car roof leather through a first segmentation threshold of pixel points to obtain a white spot pixel point set which is larger than the segmentation threshold;
obtaining a principal component direction of the white spot pixel point set by adopting a PCA algorithm, obtaining an included angle of each white spot pixel point by utilizing a gradient direction angle and a principal component direction of each white spot pixel point in the white spot pixel point set, and clustering all white spot pixel points through the included angle to obtain a candidate defect region;
respectively carrying out threshold segmentation on the grey-scale images of the car roof leather through different thresholds to obtain binary images after each threshold segmentation;
extracting a region corresponding to the candidate defect region in the binarized image after each threshold segmentation as a region to be processed;
obtaining a dictionary matrix of each to-be-processed area under the corresponding binary image through the pixel information of each to-be-processed area in the corresponding binary image;
obtaining the comprehensive dictionary change rate of each region to be processed through the dictionary matrix of each region to be processed under the binarized image after all threshold segmentation;
and obtaining the defect probability of each to-be-processed area through the average value of the included angle angles of all the pixel points in the candidate defect area corresponding to each to-be-processed area and the change rate of the comprehensive dictionary of the to-be-processed area, and judging whether each to-be-processed area is a defect area according to the defect probability to obtain a final defect area.
2. The method for detecting the defect of the automobile top block according to claim 1, wherein the method for obtaining the first segmentation threshold of the pixel point comprises the following steps:
obtaining a gray level histogram corresponding to the image through the gray level image of the car roof leather;
acquiring gray values corresponding to the maximum peak value and the second peak value in the gray histogram;
and averaging the gray values corresponding to the maximum peak value and the second peak value to be used as a first segmentation threshold of the pixel point.
3. The method for detecting the defect of the automobile top block according to claim 1, wherein the method for obtaining the candidate defect area comprises the following steps:
clustering all white spot pixel points through included angle angles to obtain different white spot pixel point categories;
and selecting the white spot pixel point category of which the average included angle of the pixel points is smaller than an included angle threshold value from all the white spot pixel point categories as candidate defect regions.
4. The method for detecting the defect of the automobile top block according to claim 1, wherein the method for obtaining the binarized image after each threshold segmentation comprises the following steps:
threshold segmentation is carried out on the grey-level image of the car roof leather through different thresholds, and a pixel point set which is larger than the threshold and smaller than the threshold under each threshold are obtained;
and setting the pixel points which are larger than the threshold value under each threshold value to be 1, and setting the pixel points which are smaller than the threshold value to be 0, so as to obtain the binary image after each threshold value is segmented.
5. The method for detecting the defects of the automobile top block according to claim 1, wherein the method for obtaining the change rate of the comprehensive dictionary of each region to be processed comprises the following steps:
obtaining the change rate of the dictionary matrix of each to-be-processed area under the adjacent threshold value by the dictionary matrix of each to-be-processed area under the binary image after the adjacent threshold value is divided;
and obtaining the comprehensive dictionary change rate of each to-be-processed area according to the change rate of the dictionary matrix of each to-be-processed area under all pairwise adjacent threshold values.
6. The method for detecting the defects of the automobile top block according to claim 5, wherein the expression of the change rate of the dictionary matrix of each to-be-processed area under the adjacent threshold values in pairs is as follows:
Figure DEST_PATH_IMAGE002
in the formula:
Figure DEST_PATH_IMAGE004
representing the change rate of the dictionary matrix of the ith to-be-processed area under the jth threshold value and the dictionary matrix under the adjacent threshold value,
Figure DEST_PATH_IMAGE006
a dictionary matrix representing the ith area to be processed under the jth threshold,
Figure DEST_PATH_IMAGE008
representing the dictionary matrix of the ith to-be-processed area under the j-1 st threshold,
Figure DEST_PATH_IMAGE010
representing the norm of the matrix.
7. The method for detecting the defect of the automobile ceiling block according to claim 1, wherein the defect probability expression of the region to be processed is as follows:
Figure DEST_PATH_IMAGE012
in the formula:
Figure DEST_PATH_IMAGE014
indicates the defect probability of the ith area to be processed,
Figure DEST_PATH_IMAGE016
represents the integrated dictionary change rate of the ith region to be processed,
Figure DEST_PATH_IMAGE018
and representing the average value of included angles of all pixel points in the candidate defect region corresponding to the ith region to be processed.
CN202210754325.3A 2022-06-30 2022-06-30 Automobile top block defect detection method Active CN114820625B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210754325.3A CN114820625B (en) 2022-06-30 2022-06-30 Automobile top block defect detection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210754325.3A CN114820625B (en) 2022-06-30 2022-06-30 Automobile top block defect detection method

Publications (2)

Publication Number Publication Date
CN114820625A true CN114820625A (en) 2022-07-29
CN114820625B CN114820625B (en) 2022-09-09

Family

ID=82523253

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210754325.3A Active CN114820625B (en) 2022-06-30 2022-06-30 Automobile top block defect detection method

Country Status (1)

Country Link
CN (1) CN114820625B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115049713A (en) * 2022-08-11 2022-09-13 武汉中导光电设备有限公司 Image registration method, device, equipment and readable storage medium
CN115082488A (en) * 2022-08-23 2022-09-20 南通浩盛汽车科技有限公司 Surface feather mark control method and device in automobile part galvanizing process
CN115082683A (en) * 2022-08-22 2022-09-20 南通三信塑胶装备科技股份有限公司 Injection molding defect detection method based on image processing
CN116152242A (en) * 2023-04-18 2023-05-23 济南市莱芜区综合检验检测中心 Visual detection system of natural leather defect for basketball

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104504674A (en) * 2014-10-15 2015-04-08 西北工业大学 Space debris star extraction and positioning method
CN109454006A (en) * 2018-10-08 2019-03-12 杭州慧知连科技有限公司 Chemical fiber wire ingot is stumbled the device and its detection stage division of a defect on-line checking and classification
CN114581475A (en) * 2022-03-02 2022-06-03 西南石油大学 Laser stripe segmentation method based on multi-scale saliency features

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104504674A (en) * 2014-10-15 2015-04-08 西北工业大学 Space debris star extraction and positioning method
CN109454006A (en) * 2018-10-08 2019-03-12 杭州慧知连科技有限公司 Chemical fiber wire ingot is stumbled the device and its detection stage division of a defect on-line checking and classification
CN114581475A (en) * 2022-03-02 2022-06-03 西南石油大学 Laser stripe segmentation method based on multi-scale saliency features

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
郭慧等: "基于灰度共生矩阵和分层聚类的刨花板表面图像缺陷提取方法", 《林业科学》 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115049713A (en) * 2022-08-11 2022-09-13 武汉中导光电设备有限公司 Image registration method, device, equipment and readable storage medium
CN115049713B (en) * 2022-08-11 2022-11-25 武汉中导光电设备有限公司 Image registration method, device, equipment and readable storage medium
CN115082683A (en) * 2022-08-22 2022-09-20 南通三信塑胶装备科技股份有限公司 Injection molding defect detection method based on image processing
CN115082488A (en) * 2022-08-23 2022-09-20 南通浩盛汽车科技有限公司 Surface feather mark control method and device in automobile part galvanizing process
CN115082488B (en) * 2022-08-23 2022-11-11 南通浩盛汽车科技有限公司 Surface feather mark control method and device in automobile part galvanizing process
CN116152242A (en) * 2023-04-18 2023-05-23 济南市莱芜区综合检验检测中心 Visual detection system of natural leather defect for basketball
CN116152242B (en) * 2023-04-18 2023-07-18 济南市莱芜区综合检验检测中心 Visual detection system of natural leather defect for basketball

Also Published As

Publication number Publication date
CN114820625B (en) 2022-09-09

Similar Documents

Publication Publication Date Title
CN114820625B (en) Automobile top block defect detection method
CN115018828B (en) Defect detection method for electronic component
CN115082683B (en) Injection molding defect detection method based on image processing
CN115294140B (en) Hardware part defect detection method and system
CN108961235A (en) A kind of disordered insulator recognition methods based on YOLOv3 network and particle filter algorithm
CN111539330B (en) Transformer substation digital display instrument identification method based on double-SVM multi-classifier
CN115147414A (en) Method for detecting surface breakdown defect of bipolar power transistor
CN116645367B (en) Steel plate cutting quality detection method for high-end manufacturing
CN114972356B (en) Plastic product surface defect detection and identification method and system
CN115100199B (en) Method for detecting wafer low-texture defects
CN108734131B (en) Method for detecting symmetry of traffic sign in image
CN110648330B (en) Defect detection method for camera glass
CN116152242B (en) Visual detection system of natural leather defect for basketball
CN113256624A (en) Continuous casting round billet defect detection method and device, electronic equipment and readable storage medium
CN114359288B (en) Medical image cerebral aneurysm detection and positioning method based on artificial intelligence
CN116883408B (en) Integrating instrument shell defect detection method based on artificial intelligence
CN113870202A (en) Far-end chip defect detection system based on deep learning technology
CN117635609B (en) Visual inspection method for production quality of plastic products
CN102214290A (en) License plate positioning method and license plate positioning template training method
CN118096739B (en) Metal forging surface defect detection method based on image processing
CN117437228B (en) Photovoltaic steel structure component fracture detection method based on image characteristics
CN117078678B (en) Waste silicon wafer shape detection method based on image recognition
CN110349119A (en) Pavement disease detection method and device based on edge detection neural network
CN115471494A (en) Wo citrus quality inspection method, device, equipment and storage medium based on image processing
CN114677428A (en) Power transmission line icing thickness detection method based on unmanned aerial vehicle image processing

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