CN114638822B - Method and system for detecting surface quality of automobile cover plate by using optical means - Google Patents

Method and system for detecting surface quality of automobile cover plate by using optical means Download PDF

Info

Publication number
CN114638822B
CN114638822B CN202210334433.5A CN202210334433A CN114638822B CN 114638822 B CN114638822 B CN 114638822B CN 202210334433 A CN202210334433 A CN 202210334433A CN 114638822 B CN114638822 B CN 114638822B
Authority
CN
China
Prior art keywords
pixel
cover plate
automobile cover
attention
different scales
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210334433.5A
Other languages
Chinese (zh)
Other versions
CN114638822A (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.)
Yangzhou Hengbang Machinery Manufacturing Co ltd
Original Assignee
Yangzhou Hengbang Machinery Manufacturing 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 Yangzhou Hengbang Machinery Manufacturing Co ltd filed Critical Yangzhou Hengbang Machinery Manufacturing Co ltd
Priority to CN202210334433.5A priority Critical patent/CN114638822B/en
Publication of CN114638822A publication Critical patent/CN114638822A/en
Application granted granted Critical
Publication of CN114638822B publication Critical patent/CN114638822B/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
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • 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/20021Dividing image into blocks, subimages or windows

Abstract

The invention discloses a method and a system for detecting the surface quality of an automobile cover plate by using an optical means, and relates to the field of material detection. Utilize optical means to carry out quality control to car apron material, include: s1: carrying out super-pixel block segmentation on the surface image of the automobile cover plate at different scales to obtain segmented images at different scales; s2: calculating the attention of each pixel block under different scales, and obtaining the attention image of the segmented image under different scales according to the attention of each pixel block; s3: extracting an abnormal area in the surface image of the automobile cover plate; s4: and calculating the quality evaluation value of the automobile cover plate to perform quality detection. According to the method, the attention image corresponding to the surface of the automobile cover plate is extracted, the feature difference degree of the normal area and the abnormal area of the surface of the automobile cover plate is increased, the accuracy of pixel point segmentation is improved, the cover plate quality is detected based on the extracted attention image, and the segmentation speed and the detection accuracy are effectively improved.

Description

Method and system for detecting surface quality of automobile cover plate by using optical means
Technical Field
The application relates to the field of material detection, in particular to a method and a system for detecting the surface quality of an automobile cover plate by using an optical means.
Background
The surface quality of the automobile cover plate is a key link for manufacturing the white automobile body of the automobile, and the surface quality of the covering part needs to be subjected to professional white automobile body AUDIT evaluation and is extremely strict; when the defects such as folds, cracks, scratches, ripples, defects and the like exist on the surface of the manufactured automobile cover plate, the appearance quality of an automobile is reduced under the diffuse reflection action of light after coating, and the service life of the automobile cover plate is seriously influenced, so that the method is a crucial step for detecting the surface quality of the automobile cover plate.
At present, the automobile cover plate is mostly placed on a fixed workbench for manual detection, because the covering part is a thin plate stamping part, the strength is not high, the surface of the covering part is frequently provided with an arc-shaped surface, if the contact surface of the covering part and the workbench is smaller in stress area when the arc-shaped surface is provided with the arc-shaped surface, deformation is extremely easy to generate in the detection process, the covering part is large in size and difficult to rotate, the operator is required to change different angles to detect the covering part, the labor capacity is increased, and the working efficiency is reduced. The invention provides a method for detecting the surface quality of an automobile cover plate by using an optical means, which is used for detecting the quality of a material by using the optical means and improving the detection efficiency and accuracy.
Disclosure of Invention
In order to solve the technical problems, the invention provides a method and a system for detecting the surface quality of an automobile cover plate by using an optical means.
In a first aspect, an embodiment of the present invention provides a method for detecting surface quality of an automobile cover plate by using an optical means, including:
acquiring an image of the surface of the automobile cover plate;
obtaining a target area of an image on the surface of the automobile cover plate by using a convex hull algorithm, and performing superpixel block segmentation on the target area under different scales to obtain a segmented image of the target area under different scales;
screening out pixel blocks in the segmented images in the target areas under different scales according to the gray value and the gray variance of each pixel block in the segmented images of the target areas under different scales to obtain suspected abnormal areas under different scales;
calculating first attention of each pixel block in the suspected abnormal region under different scales according to the position relation of each pixel block in the suspected abnormal region under different scales, and calculating second attention of each pixel block in the suspected abnormal region under different scales according to the color characteristic parameters of each pixel block in the suspected abnormal region under different scales;
calculating the attention of each pixel block in the suspected abnormal region under different scales according to the obtained first attention and second attention of each pixel block in the suspected abnormal region under different scales, and taking the attention value of each pixel block in the suspected abnormal region under different scales as the pixel value of an internal pixel point;
constructing suspected abnormal area attention images of suspected abnormal areas under different scales, and constructing an automobile cover plate surface image attention image by using the suspected abnormal area attention images of the suspected abnormal areas under different scales;
extracting abnormal regions according to pixel values of pixel points in the attention image of the surface image of the automobile cover plate;
and detecting the quality of the automobile cover plate according to the number of the pixel points in the abnormal area and the pixel value.
The method for extracting the abnormal region according to the pixel values of the pixel points in the attention image of the surface image of the automobile cover plate comprises the following steps:
according to the method, all abnormal pixel points in the attention image of the image on the surface of the automobile cover plate are extracted, and a connected domain obtained by the abnormal pixel points is an abnormal region.
The method for screening out the pixel blocks in the segmented images in the target areas under different scales to obtain the suspected abnormal areas under different scales comprises the following steps: obtaining the gray variance of the surface image of the automobile cover plate, and screening out the pixel blocks in the segmented images in the target areas under different scales according to the gray variance and the gray mean of the pixel blocks in the segmented images in the target areas under different scales and the gray variance of the surface image of the automobile cover plate to obtain suspected abnormal areas under different scales, namely updated target areas under different scales, wherein the specific screening conditions are as follows:
Figure BDA0003576094480000021
wherein σ ij The gray variance of the jth pixel block in the ith target region,
Figure BDA0003576094480000022
gray variance of the surface image of the vehicle cover plate, g ij Is the gray average value of the jth pixel block in the ith target area,
Figure BDA0003576094480000023
the gray level average value of all pixel points in the non-target area is obtained.
The method for calculating the first attention of each pixel block in the suspected abnormal area under different scales comprises the following steps: calculating the first attention of the pixel block based on the spatial information according to the center point coordinates of each pixel block in the suspected abnormal area under different scales and the center point coordinates of the suspected abnormal area containing the pixel block, wherein the specific calculation formula is as follows:
Figure BDA0003576094480000024
in the formula: z 1 Representing a first attention, P, of a block of pixels ij Is the jth pixel block in the ith suspected abnormal area, N is the number of the neighborhood pixel blocks of the pixel block to be calculated, N is the serial number of the neighborhood pixel blocks of the pixel block to be calculated, (x) n ,y n ) As the center point coordinate of the n-th neighborhood pixel block of the pixel block to be calculated, (x) 0 ,y 0 ) Coordinates of the center point of a suspected abnormal area containing the pixel block, c 1 、c 2 As influencing factor, P j n is a block P of pixels to be calculated ij D represents the euclidean distance.
The method for calculating the second attention of each pixel block in the suspected abnormal area under different scales comprises the following steps: extracting color characteristic parameters of R, G and B of each pixel block in the suspected abnormal area under different scales, and calculating second attention of each pixel block under different scales based on color information according to the color characteristic parameters under different scales, wherein the specific calculation formula is as follows:
Figure BDA0003576094480000031
in the formula: z 2 M is a suspected abnormal region P i The number of blocks of pixels within the block,
Figure BDA0003576094480000032
the R channel mean value representing the pixels in the mth pixel block,
Figure BDA0003576094480000033
for a block P of pixels to be calculated ij The average value of the R-channel of (a),
Figure BDA0003576094480000034
the G-channel mean value representing the pixels in the mth pixel block,
Figure BDA0003576094480000035
for a block P of pixels to be calculated ij The average value of the R-channel of (a),
Figure BDA0003576094480000036
represents the average of the B channels of the pixels in the mth pixel block,
Figure BDA0003576094480000037
for a block P of pixels to be calculated ij B channel mean, D jm For the mth pixel block and the pixel block P to be calculated ij C is half of the length of the edge of the suspected abnormal area containing the pixel block to be calculated.
The method for detecting the quality of the automobile cover plate according to the number of the pixel points in the abnormal area and the pixel values comprises the following steps: calculating the quality evaluation value of the automobile cover plate, and detecting the quality of the automobile cover plate according to the quality evaluation value of the automobile cover plate, wherein the specific method comprises the following steps:
the method for calculating the quality evaluation value of the automobile cover plate comprises the following steps: calculating the quality evaluation value of the automobile cover plate according to the number and the pixel value of the abnormal pixel points and the number of the pixel points of the surface image of the automobile cover plate, wherein the calculation formula is as follows:
Figure BDA0003576094480000038
wherein: q is the quality assessment value of the plate material of the automobile cover plate to be detected, U is the number of pixel points of the image on the surface of the automobile cover plate, and Z a Is the attention of the a-th abnormal pixel point, i.e. the pixel value, A is abnormalThe number of regular pixel points;
and comparing the obtained automobile cover plate quality evaluation value with a preset quality threshold value, and detecting the quality of the automobile cover plate according to the relation between the automobile cover plate quality evaluation value and the preset quality threshold value.
The method for constructing the attention image of the automobile cover plate surface image by using the suspected abnormal area attention image of the suspected abnormal area under different scales comprises the following steps: the attention of the pixel points at the same position in the attention map images of the segmented images under different scales of the surface image of the automobile cover plate is extracted, the mean value of the attention of the pixel points at the same position in the attention map images of the segmented images under different scales of the surface image of the automobile cover plate is used as the pixel value of the pixel point, and the attention image of the surface image of the automobile cover plate is constructed according to the obtained pixel value of the pixel point.
In a second aspect, an embodiment of the present invention provides an automobile cover surface quality detection system using optical means, including:
an image processing module: the system comprises a data acquisition unit, a data processing unit and a data processing unit, wherein the data acquisition unit is used for acquiring a data of a suspected abnormal area by processing an acquired surface image of an automobile cover plate, screening the target area to acquire the suspected abnormal area, and performing superpixel segmentation on the suspected abnormal area at different scales to acquire a segmented image of the suspected abnormal area at different scales;
an image data analysis module: the system comprises a suspected abnormal area, a color information acquisition unit and a processing unit, wherein the suspected abnormal area is used for analyzing the spatial information and the color information of the suspected abnormal area, respectively obtaining the attention of each pixel block in the segmentation image of the suspected abnormal area under different scales as the pixel value of the pixel point inside each pixel block, obtaining the attention image of the suspected abnormal area according to the pixel value of each pixel point in the segmentation image of the suspected abnormal area under different scales, and obtaining the abnormal area according to the pixel value of the pixel point in the attention image of the suspected abnormal area;
a quality detection module: the quality evaluation method is used for detecting and evaluating the quality of the automobile cover plate, calculating the quality evaluation value of the automobile cover plate according to the number of pixel points in the abnormal area and the pixel values of the pixel points, and detecting the quality of the automobile cover plate according to the quality evaluation value.
Compared with the prior art, the embodiment of the invention has the beneficial effects that: according to the method, the attention image corresponding to the surface of the automobile cover plate can be extracted by analyzing the spatial characteristic parameters and the color characteristic parameters of the image, the characteristic difference degree of a normal area and an abnormal area of the surface of the automobile cover plate is increased, the fine granularity division of pixel points on the surface of a covering part is realized, the accuracy of pixel point division is improved, and meanwhile, the quality of the surface of the covering part plate is detected and evaluated based on the extracted attention image, so that a worker can know the quality condition of the surface of the automobile cover plate to be detected in real time.
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 embodiments or the description of the prior art will be briefly described below, 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 the drawings without creative efforts.
Fig. 1 is a schematic flow chart of a method and a system for detecting surface quality of an automobile cover plate by using an optical means according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not limit the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the following description, for purposes of explanation and not limitation, specific details are set forth such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
The terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature; in the description of the present embodiment, "a plurality" means two or more unless otherwise specified.
Example 1
The embodiment of the invention provides a method for detecting the surface quality of an automobile cover plate by using an optical means, which comprises the following steps of:
s101, acquiring surface images of the automobile cover plate
Carry out image acquisition to the automobile cover plate through optics CCD information acquisition equipment, in the image acquisition process, consider that the environment has a large amount of noises and the superficial floating dust of automobile cover plate etc. all can exert an influence to the collection of automobile cover plate image, carry out image processing to the automobile cover plate image of gathering and obtain automobile cover plate surface image for carry out quality testing to the automobile cover plate.
S102, obtaining segmentation images of target areas under different scales
The embodiment sets different super-pixel segmentation scales to perform pixel point preliminary division on the target area, analyzes pixel points of the target area under different scales in a single scale, can improve the division accuracy of the pixel points, and can obtain the attention value of each corresponding pixel point and improve the extraction accuracy of an abnormal area based on the pixel blocks obtained under different scales.
S103, obtaining a suspected abnormal area
For the pixel blocks in the target area, the pixel blocks are analyzed in the embodiment, and the target area is updated according to the data information analysis result to obtain a suspected abnormal area, so that the detection precision of abnormal pixel points in the target area is improved.
S104, obtaining the pixel values of the suspected abnormal areas under different scales
In the embodiment, fine-grained detection is performed on each segmented image after preliminary segmentation, the precision of surface quality detection of the automobile cover plate is improved, for the preliminary segmented images with different scales, each target area obtained after preliminary segmentation is analyzed, attention is calculated, attention detection is performed on each pixel block in the target area, the attention value of each super pixel block is obtained, and therefore fine detection and division are performed on each pixel block, and the pixel value of each pixel point in a suspected abnormal area under different scales is obtained.
S105, acquiring abnormal areas
And obtaining the attention of each pixel point under different scales according to the corresponding attention images under different scales, thereby calculating the pixel value of each pixel point, analyzing according to the pixel value, extracting all abnormal pixel points in the suspected abnormal area, and obtaining the abnormal area.
S106, detecting the quality of the automobile cover plate
And calculating the quality evaluation value of the automobile cover plate according to the obtained attention image of the abnormal area and the number of the abnormal pixel points, and detecting the quality of the automobile cover plate according to the quality evaluation value of the automobile cover plate.
Example 2
The embodiment of the invention provides a method for detecting the surface quality of an automobile cover plate by using an optical means, which comprises the following specific contents as shown in figure 1:
s201, acquiring surface image of automobile cover plate
Carry out image acquisition to the car apron through optics CCD information acquisition equipment, in the image acquisition process, consider that the environment has a large amount of noises and the superficial floating dust of car apron etc. all can exert an influence to the collection of car apron image, carry out image processing to the car apron image of collection and obtain car apron surface image for carry out quality control to the car apron.
1. Collecting automobile cover plate images
This embodiment passes through optics CCD information acquisition equipment for gather the image data on car apron surface, wherein, the person is implemented according to actual conditions self-adjustment to the shooting scope and the angle of camera. It should be noted here that the camera shooting range can cover the automobile cover plate to be detected, so as to comprehensively detect the automobile cover plate, or the implementer can set multiple cameras to acquire images of the automobile cover plate to be detected, and then perform fusion processing on image data acquired by adjacent cameras through an image fusion technology, so as to acquire integral image data of the surface of the automobile cover plate to be detected.
2. Obtaining a surface image of a vehicle cover
After the automobile cover plate image is obtained, the defect detection is carried out on the automobile cover plate mainly based on the image data in the embodiment, and in the image acquisition process, the influence on the acquisition of the automobile high plate image is generated by considering that a large amount of noise exists in the environment and floating dust and the like on the surface of the automobile cover plate, so that the embodiment carries out filtering and denoising processing on the acquired image data of the automobile cover plate, noise points of the image on the surface of the automobile cover plate are eliminated, and the image denoising processing method has the following steps: the mean filtering algorithm, the median filtering algorithm, the Gaussian filtering algorithm, the bilinear filtering algorithm and the like, and an implementer can select the denoising algorithm by himself to realize the denoising operation of the surface image of the automobile covering part and obtain the denoised filtering image. Then, illumination equalization is carried out on the filtered image through gamma conversion, so that the brightness in the image is more uniform, and the influence of uneven brightness and the like on the surface anomaly detection result caused by light source irradiation on the surface of the automobile cover plate is avoided. And taking the finally processed image data as the automobile cover plate surface image data for detecting the cover plate surface quality, and detecting and analyzing the surface quality based on the image data.
S202, obtaining segmentation images of target areas under different scales
The embodiment sets different super-pixel segmentation scales to perform pixel point preliminary division on the target area, analyzes pixel points of the target area under different scales in a single scale, can improve the division accuracy of the pixel points, and can obtain the attention value of each corresponding pixel point and improve the extraction accuracy of an abnormal area based on the pixel blocks obtained under different scales.
1. Acquiring target area in surface image of automobile cover plate
The convex hull detection algorithm is the prior known technology, and is not elaborated in detail herein. According to the embodiment, the image is processed by adopting the convex hull detection algorithm, the target area can be obtained, and the system workload is reduced.
2. Obtaining pixel blocks of target areas under different scales
For the target region and the surface normal region, different super-pixel segmentation scales are set to perform pixel point preliminary segmentation on the target region and the surface normal region in the present embodiment, and the super-pixel segmentation scales are set to be 100, 180, 260, and 340 in the present embodiment, that is, the number of the divided pixel blocks is respectively 100, 180, 260, and 340.
Thus, segmented images of the target region under different scales are obtained.
S203, obtaining a suspected abnormal area
For the pixel blocks in the target area, the pixel blocks are analyzed in the embodiment, and the target area is updated according to the data information analysis result to obtain the suspected abnormal area, so that the detection precision of the abnormal pixel points in the target area is improved.
Considering that each target region acquired by the convex hull detection algorithm is only a rough region capable of reflecting abnormal conditions and cannot accurately extract the abnormal region, for the segmented images corresponding to different scales, in order to improve the partition precision of pixel points, the invention analyzes the pixel blocks corresponding to the target region and the non-target region under different scales, and the target region P i ={P i1 ,P i2 ,...,P ik Where k represents the superpixel segmentation scale, k =100, 180, 260, 340 i Represents the ith target area, P i1 Representing the 1 st pixel block in the target region Pi, and analyzing the super pixel block in the target region to improve the detection accuracy of the abnormal pixel point in the target region: the present embodiment uses the target region P i For example, the same analysis method is applied to each of the other target regions to divide the target region into two or more pixel blocks P i ={P i1 ,P i2 ,...,P ik Will first calculate the gray-scale variance σ of each pixel block ij J =1, 2.. K, setting the pixel block screening model:
Figure BDA0003576094480000071
in the formula, σ ij The gray variance of the pixel block j within the target region Pi,
Figure BDA0003576094480000081
gray variance of the surface image of the vehicle cover plate, g ij Is a target region P i The mean value of the gray levels of the inner pixel block j,
Figure BDA0003576094480000082
the gray level mean value of all pixel points in the non-target area is obtained; in the embodiment, a filtering analysis is performed on a target area through a screening model to obtain a suspected abnormal area, and a pixel block meeting the above condition in the suspected abnormal target area Pi is filtered to be used as a super pixel block with a normal surface. By means of the method, all pixel blocks in the segmented image of the target region under different scales are analyzed, pixel points in the target region are divided again, and the problem of low detection accuracy in the convex hull detection algorithm is solved.
And at this point, updating the target area to obtain the suspected abnormal area.
S204, obtaining the pixel values of the suspected abnormal areas under different scales
In the embodiment, fine-grained detection is performed on each segmented image after preliminary segmentation, the precision of surface quality detection of the automobile cover plate is improved, for the preliminary segmented images with different scales, each target area obtained after preliminary segmentation is analyzed, attention is calculated, attention detection is performed on each pixel block in the target area, the attention value of each super pixel block is obtained, and therefore fine detection and division are performed on each pixel block, and the pixel value of each pixel point in a suspected abnormal area under different scales is obtained.
1. Calculating the first attention of each pixel block in each suspected abnormal area
Calculating the first attention of the pixel block based on the spatial information according to the center point coordinate of each pixel block and the center point coordinate of the suspected abnormal area containing the pixel block, wherein the specific calculation formula is as follows:
Figure BDA0003576094480000083
in the formula: z is a linear or branched member 1 Representing a first attention, P, of a block of pixels ij Is the jth pixel block in the ith suspected abnormal area, N is the number of the neighborhood pixel blocks of the pixel block to be calculated, N is the serial number of the neighborhood pixel blocks of the pixel block to be calculated, (x) n ,y n ) As the center point coordinate of the n-th neighborhood pixel block of the pixel block to be calculated, (x) 0 ,y 0 ) Coordinates of the center point of a suspected abnormal area containing the pixel block, c 1 、c 2 As influencing factor, P jn For a block P of pixels to be calculated ij D represents the euclidean distance.
The higher the first attention, the greater the significance of the corresponding pixel block and the more obvious the difference with other pixel blocks.
2. Calculating the second attention of each pixel block in each suspected abnormal area
Extracting color characteristic parameters of R, G and B of each pixel block, and calculating the second attention of the pixel block based on color information according to the color characteristic parameters, wherein the specific calculation formula is as follows:
Figure BDA0003576094480000084
in the formula: z is a linear or branched member 2 Showing the second attention of the pixel block, M being a suspected abnormal region P i The number of blocks of pixels within the block,
Figure BDA0003576094480000091
represents the R channel mean of the pixels in the mth pixel block,
Figure BDA0003576094480000092
for a block P of pixels to be calculated ij The mean value of the R-channel of (a),
Figure BDA0003576094480000093
the G-channel mean value representing the pixels in the mth pixel block,
Figure BDA0003576094480000094
for a block P of pixels to be calculated ij The average value of the R-channel of (a),
Figure BDA0003576094480000095
represents the average value of B channels of pixel points in the mth pixel block,
Figure BDA0003576094480000096
for a block P of pixels to be calculated ij B channel mean of (1), D jm The centroid distance between the mth pixel block and the pixel block Pij to be calculated is c, which is half of the edge length of the suspected abnormal area containing the pixel block to be calculated.
And the larger the second attention is, the higher the difference between the color characteristics of the corresponding pixel block and other pixel blocks in the suspected abnormal area is, namely the more abnormal the pixel block is, the second attention of each pixel block is acquired according to the method and is used for performing fine-grained segmentation on each suspected abnormal area.
3. Obtaining the pixel value of each pixel point based on the first attention and the second attention
The attention calculation formula is: z (P) ij )=Z 1 (P ij )×Z 2 (P ij ) Thus, the attention of each pixel block can be obtained, the attention value of each pixel block is taken as the pixel value of the pixel point in the pixel block, and the attention calculation formula is normalized to ensure that the attention range is in [0,1]]Meanwhile, the subsequent accurate division of the pixel points based on attention is facilitated, and the pixel values of other non-suspected abnormal areas are set to be 0. Similarly, according to the method of this embodiment, the above analysis process is performed on the pixel blocks in each suspected abnormal region under different scales, and the attention corresponding to each pixel block in each suspected abnormal region under different scales is obtained for performing fine-grained division on the pixel points in the suspected abnormal region. Meanwhile, the attention of each pixel block in each suspected abnormal area under different scales is obtained through the method of the embodiment and is used as the pixel value of each pixel point in each suspected abnormal area.
S205, obtaining abnormal areas
And calculating the final pixel value of each pixel point according to the pixel value of each pixel point in the suspected abnormal area under different scales, analyzing according to the pixel value of each pixel point, and extracting all abnormal pixel points in the suspected abnormal area to obtain the abnormal area.
In this embodiment, based on the pixel values of the pixels in the suspected abnormal area under different scales, the pixel value of the suspected abnormal pixel is finally determined as:
Figure BDA0003576094480000097
in the formula, Z v (x, y) represents the pixel value of the pixel point at (x, y) corresponding to the v-th scale, v =1,2, 3, 4 respectively correspond to the 4 super-pixel division scales, and Z (x, y) represents the pixel value of the pixel point at (x, y). And acquiring the pixel value of each pixel point, and further acquiring the final attention image of the surface image of the automobile cover plate.
In the embodiment, each pixel point in each suspected abnormal area is analyzed based on the pixel value thereof, the preset abnormal threshold Zt =0.45, and the embodiment sets the pixel point with the pixel value (i.e. the attention of the pixel point in the attention image) lower than the preset threshold as the pixel point corresponding to the normal surface of the automobile cover plate, and sets the pixel value to 0; otherwise, the pixel point is judged as an abnormal pixel point.
Therefore, each abnormal pixel point can be accurately acquired, and the extraction of the abnormal area on the surface of the automobile cover plate is realized.
S206, detecting the quality of the automobile cover plate
And calculating the quality evaluation value of the automobile cover plate according to the obtained attention image of the abnormal area and the quantity of the abnormal pixel points, and detecting the quality of the automobile cover plate according to the quality evaluation value of the automobile cover plate.
Calculating the quality evaluation value of the automobile cover plate according to the number of the abnormal pixel points and the pixel values thereof, wherein the specific calculation formula is as follows:
Figure BDA0003576094480000101
wherein: q is the quality assessment value of the automobile cover plate to be detected, U is the number of pixel points of the surface image of the automobile cover plate, and Z a The attention of the a-th abnormal pixel is also the pixel value, and A is the number of the abnormal pixels.
The quality detection model is normalized, so that the function value is in the range of 0,1, and workers can visually know the quality of the automobile cover plate to be detected.
Based on the same inventive concept as the above method, the present embodiment further provides a system for detecting the surface quality of an automobile cover plate by using an optical means, and the system for detecting the surface quality of an automobile cover plate by using an optical means in the present embodiment comprises an image processing module, an image data analysis module and a quality detection module, which are used to implement a specific method for detecting the quality of the surface of an automobile cover plate by using the steps described in the embodiment of the method for detecting the surface quality of an automobile cover plate by using an optical means.
Since a specific method for detecting the quality of the automobile cover plate has been described in the embodiment of the method for detecting the surface quality of the automobile cover plate by using an optical means, details thereof are not repeated herein.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and should not be taken as limiting the scope of the present invention, which is intended to cover any modifications, equivalents, improvements, etc. within the spirit and scope of the present invention.

Claims (8)

1. A method for detecting the surface quality of an automobile cover plate by using an optical means is characterized by comprising the following steps:
acquiring an image of the surface of the automobile cover plate;
obtaining a target area of an image on the surface of the automobile cover plate by using a convex hull algorithm, and performing superpixel block segmentation on the target area under different scales to obtain a segmented image of the target area under different scales;
screening out pixel blocks in the segmented images in the target areas under different scales according to the gray value and the gray variance of each pixel block in the segmented images of the target areas under different scales to obtain suspected abnormal areas under different scales;
calculating first attention of each pixel block in the suspected abnormal region under different scales according to the position relation of each pixel block in the suspected abnormal region under different scales, and calculating second attention of each pixel block in the suspected abnormal region under different scales according to the color characteristic parameters of each pixel block in the suspected abnormal region under different scales;
calculating the attention of each pixel block in the suspected abnormal region under different scales according to the obtained first attention and second attention of each pixel block in the suspected abnormal region under different scales, and taking the attention value of each pixel block in the suspected abnormal region under different scales as the pixel value of an internal pixel point;
constructing suspected abnormal area attention images of suspected abnormal areas under different scales, and constructing an automobile cover plate surface image attention image by using the suspected abnormal area attention images of the suspected abnormal areas under different scales;
extracting abnormal regions according to pixel values of pixel points in the attention image of the surface image of the automobile cover plate;
and detecting the quality of the automobile cover plate according to the number of the pixel points in the abnormal area and the pixel value.
2. The method for detecting the surface quality of the automobile cover plate by using the optical means as claimed in claim 1, wherein the method for extracting the abnormal region according to the pixel values of the pixel points in the attention image of the surface image of the automobile cover plate comprises the following steps:
according to the method, all abnormal pixel points in the attention image of the image on the surface of the automobile cover plate are extracted, and a connected domain obtained by the abnormal pixel points is an abnormal region.
3. The method for detecting the surface quality of the automobile cover plate by using the optical means as claimed in claim 1, wherein the method for screening out the pixel blocks in the segmented images in the target areas under different scales to obtain the suspected abnormal areas under different scales comprises the following steps: obtaining the gray variance of the surface image of the automobile cover plate, and screening out the pixel blocks in the segmented image in the target area under different scales according to the gray variance and the gray mean of the pixel blocks in the segmented image in the target area under different scales and the gray variance of the surface image of the automobile cover plate to obtain suspected abnormal areas under different scales, namely updated target areas under different scales, wherein the specific screening conditions are as follows:
Figure DEST_PATH_IMAGE002
wherein the content of the first and second substances,
Figure DEST_PATH_IMAGE004
is as follows
Figure DEST_PATH_IMAGE006
Within the target area
Figure DEST_PATH_IMAGE008
The variance of the gray levels of the individual blocks of pixels,
Figure DEST_PATH_IMAGE010
is the gray variance of the surface image of the automobile cover plate,
Figure DEST_PATH_IMAGE012
is as follows
Figure 603390DEST_PATH_IMAGE006
Within a target area
Figure 254951DEST_PATH_IMAGE008
The mean value of the gray levels of the individual pixel blocks,
Figure DEST_PATH_IMAGE014
the gray level average value of all pixel points in the non-target area is obtained.
4. The method for detecting the surface quality of the automobile cover plate by using the optical means as claimed in claim 1, wherein the method for calculating the first attention of each pixel block in the suspected abnormal area under different scales comprises the following steps: calculating the first attention of the pixel block based on the spatial information according to the center point coordinates of each pixel block in the suspected abnormal area under different scales and the center point coordinates of the suspected abnormal area containing the pixel block, wherein the specific calculation formula is as follows:
Figure DEST_PATH_IMAGE016
in the formula:
Figure DEST_PATH_IMAGE018
a first attention of the pixel block is represented,
Figure DEST_PATH_IMAGE020
is as follows
Figure 847738DEST_PATH_IMAGE006
In the suspected abnormal area
Figure 102001DEST_PATH_IMAGE008
A plurality of pixel blocks, each pixel block having a plurality of pixels,
Figure DEST_PATH_IMAGE022
the number of neighborhood pixel blocks of the pixel block to be calculated,
Figure DEST_PATH_IMAGE024
the serial number of the neighborhood pixel block of the pixel block to be calculated,
Figure DEST_PATH_IMAGE026
is the first of the pixel blocks to be calculated
Figure 119636DEST_PATH_IMAGE024
The coordinates of the center point of each of the neighborhood pixel blocks,
Figure DEST_PATH_IMAGE028
the coordinates of the center point of the suspected abnormal area containing the pixel block,
Figure DEST_PATH_IMAGE030
in order to influence the factors, the method comprises the following steps,
Figure DEST_PATH_IMAGE032
for a block of pixels to be calculated
Figure 519262DEST_PATH_IMAGE020
The n-th neighborhood pixel block of (a),
Figure DEST_PATH_IMAGE034
representing the euclidean distance.
5. The method for detecting the surface quality of the automobile cover plate by using the optical means as claimed in claim 1, wherein the method for calculating the second attention of each pixel block in the suspected abnormal area under different scales comprises the following steps: extracting color characteristic parameters of R, G and B of each pixel block in the suspected abnormal area under different scales, and calculating the second attention of each pixel block under different scales based on color information according to the color characteristic parameters under different scales, wherein the specific calculation formula is as follows:
Figure DEST_PATH_IMAGE036
in the formula:
Figure DEST_PATH_IMAGE038
a second attention is shown for a block of pixels,
Figure DEST_PATH_IMAGE040
is a first
Figure DEST_PATH_IMAGE042
The first suspected abnormal area
Figure DEST_PATH_IMAGE044
A plurality of pixel blocks, wherein each pixel block comprises a plurality of pixel blocks,
Figure DEST_PATH_IMAGE046
is a suspected abnormal area
Figure DEST_PATH_IMAGE048
The number of blocks of pixels within the image,
Figure DEST_PATH_IMAGE050
represents the first
Figure DEST_PATH_IMAGE052
The R channel mean of the pixels within a pixel block,
Figure DEST_PATH_IMAGE054
for a block of pixels to be calculated
Figure 661662DEST_PATH_IMAGE020
Is
Figure DEST_PATH_IMAGE056
The mean value of the channels is calculated,
Figure DEST_PATH_IMAGE058
represents the first
Figure 188458DEST_PATH_IMAGE052
Of pixels within a pixel block
Figure DEST_PATH_IMAGE060
The mean value of the channels is calculated,
Figure DEST_PATH_IMAGE062
for blocks of pixels to be calculated
Figure 326178DEST_PATH_IMAGE020
Is/are as follows
Figure 319542DEST_PATH_IMAGE056
The average value of the channels is calculated,
Figure DEST_PATH_IMAGE064
represents the first
Figure 916614DEST_PATH_IMAGE052
Of pixels within a pixel block
Figure DEST_PATH_IMAGE066
The average value of the channels is calculated,
Figure DEST_PATH_IMAGE068
for a block of pixels to be calculated
Figure 122468DEST_PATH_IMAGE020
Is/are as follows
Figure 645853DEST_PATH_IMAGE066
The mean value of the channels is calculated,
Figure DEST_PATH_IMAGE070
is as follows
Figure 669173DEST_PATH_IMAGE052
A pixel block and a pixel block to be calculated
Figure 910798DEST_PATH_IMAGE020
C is half of the length of the edge of the suspected abnormal area containing the pixel block to be calculated.
6. The method for detecting the surface quality of the automobile cover plate by using the optical means as claimed in claim 1, wherein the method for detecting the quality of the automobile cover plate according to the number of the pixel points and the pixel value in the abnormal area comprises the following steps: calculating the quality evaluation value of the automobile cover plate, and detecting the quality of the automobile cover plate according to the quality evaluation value of the automobile cover plate, wherein the specific method comprises the following steps:
the method for calculating the quality evaluation value of the automobile cover plate comprises the following steps: calculating the quality evaluation value of the automobile cover plate according to the number of the abnormal pixel points, the pixel values of the abnormal pixel points and the number of the pixel points of the surface image of the automobile cover plate, wherein the calculation formula is as follows:
Figure DEST_PATH_IMAGE072
wherein:
Figure DEST_PATH_IMAGE074
for the quality evaluation value of the automobile cover plate material to be detected,
Figure DEST_PATH_IMAGE076
the number of the pixel points of the image on the surface of the automobile cover plate,
Figure DEST_PATH_IMAGE078
is a first
Figure DEST_PATH_IMAGE080
The attention of the abnormal pixel point is also the pixel value,
Figure DEST_PATH_IMAGE082
the number of abnormal pixel points;
and comparing the obtained quality evaluation value of the automobile cover plate with a preset quality threshold value, and detecting the quality of the automobile cover plate according to the relation between the quality evaluation value of the automobile cover plate and the preset quality threshold value.
7. The method for detecting the surface quality of the automobile cover plate by using the optical means as claimed in claim 1, wherein the method for constructing the attention image of the surface image of the automobile cover plate by using the attention images of the suspected abnormal areas at different scales comprises the following steps: the attention of the pixel points at the same position in the attention map images of the segmented images of the automobile cover plate surface image under different scales is extracted, the average value of the attention of the pixel points at the same position in the attention map images of the segmented images of the automobile cover plate surface image under different scales is used as the pixel value of the pixel point, and the attention image of the automobile cover plate surface image is constructed according to the obtained pixel value of the pixel point.
8. A system for detecting surface quality of a vehicle cover panel by optical means, comprising: image processing module, image data analysis module and quality detection module, its characterized in that:
an image processing module, an image data analysis module and a quality detection module perform the method of any one of claims 1-7.
CN202210334433.5A 2022-03-31 2022-03-31 Method and system for detecting surface quality of automobile cover plate by using optical means Active CN114638822B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210334433.5A CN114638822B (en) 2022-03-31 2022-03-31 Method and system for detecting surface quality of automobile cover plate by using optical means

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210334433.5A CN114638822B (en) 2022-03-31 2022-03-31 Method and system for detecting surface quality of automobile cover plate by using optical means

Publications (2)

Publication Number Publication Date
CN114638822A CN114638822A (en) 2022-06-17
CN114638822B true CN114638822B (en) 2022-12-13

Family

ID=81951117

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210334433.5A Active CN114638822B (en) 2022-03-31 2022-03-31 Method and system for detecting surface quality of automobile cover plate by using optical means

Country Status (1)

Country Link
CN (1) CN114638822B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115082427B (en) * 2022-07-20 2022-11-11 山东智领新材料有限公司 Aluminum material calendering process parameter control method based on artificial intelligence

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109741293A (en) * 2018-11-20 2019-05-10 武汉科技大学 Conspicuousness detection method and device
CN111695482A (en) * 2020-06-04 2020-09-22 华油钢管有限公司 Pipeline defect identification method
CN113793337A (en) * 2021-11-18 2021-12-14 汶上海纬机车配件有限公司 Locomotive accessory surface abnormal degree evaluation method based on artificial intelligence
CN113888461A (en) * 2021-08-26 2022-01-04 华能大理风力发电有限公司 Method, system and equipment for detecting defects of hardware parts based on deep learning
WO2022027949A1 (en) * 2020-08-04 2022-02-10 湖南大学 Machine vision-based detecting method and system for glass bottle bottom defects

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3271894B1 (en) * 2015-03-20 2019-02-13 Ventana Medical Systems, Inc. System and method for image segmentation
CN105957063B (en) * 2016-04-22 2019-02-15 北京理工大学 CT image liver segmentation method and system based on multiple dimensioned weighting similarity measure
CN109636784B (en) * 2018-12-06 2021-07-27 西安电子科技大学 Image saliency target detection method based on maximum neighborhood and super-pixel segmentation
CN113989279B (en) * 2021-12-24 2022-03-22 武汉华康龙兴工贸有限公司 Plastic film quality detection method based on artificial intelligence and image processing

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109741293A (en) * 2018-11-20 2019-05-10 武汉科技大学 Conspicuousness detection method and device
CN111695482A (en) * 2020-06-04 2020-09-22 华油钢管有限公司 Pipeline defect identification method
WO2022027949A1 (en) * 2020-08-04 2022-02-10 湖南大学 Machine vision-based detecting method and system for glass bottle bottom defects
CN113888461A (en) * 2021-08-26 2022-01-04 华能大理风力发电有限公司 Method, system and equipment for detecting defects of hardware parts based on deep learning
CN113793337A (en) * 2021-11-18 2021-12-14 汶上海纬机车配件有限公司 Locomotive accessory surface abnormal degree evaluation method based on artificial intelligence

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"Saliency detection for strip steel surface defects using multiple constraints and improved texture features";GuorongSong 等;《Optics and Lasers in Engineering》;20200531;第128卷;第1-11页 *
"基于机器视觉的产品表面缺陷检测关键算法研究";王帅;《中国博士学位论文全文数据库信息科技辑》;20210915(第09期);全文 *

Also Published As

Publication number Publication date
CN114638822A (en) 2022-06-17

Similar Documents

Publication Publication Date Title
CN109870461B (en) Electronic components quality detection system
CN107490582B (en) Assembly line workpiece detection system
CN108318491A (en) A kind of fabric defect detection method based on frequency spectrum curvature analysis
CN114494210A (en) Plastic film production defect detection method and system based on image processing
CN115100206B (en) Printing defect identification method for textile with periodic pattern
CN116777907A (en) Sheet metal part quality detection method
CN111539927B (en) Detection method of automobile plastic assembly fastening buckle missing detection device
CN115797473B (en) Concrete forming evaluation method for civil engineering
CN116990323B (en) High-precision printing plate visual detection system
CN113155839A (en) Steel plate outer surface defect online detection method based on machine vision
CN114638822B (en) Method and system for detecting surface quality of automobile cover plate by using optical means
CN116883408B (en) Integrating instrument shell defect detection method based on artificial intelligence
CN114549441A (en) Sucker defect detection method based on image processing
CN115684176A (en) Online visual inspection system for film surface defects
CN114140384A (en) Transverse vibration image recognition algorithm for hoisting steel wire rope based on contour fitting and centroid tracking
CN112927223A (en) Glass curtain wall detection method based on infrared thermal imager
CN115018785A (en) Hoisting steel wire rope tension detection method based on visual vibration frequency identification
CN116152242A (en) Visual detection system of natural leather defect for basketball
CN114332081A (en) Textile surface abnormity determination method based on image processing
CN113096062B (en) Gaussian image quality analysis tool and operation method
CN111598845A (en) Pavement crack detection and positioning method based on deep learning and NEO-6M positioning module
CN115035000B (en) Road dust image identification method and system
CN114998346B (en) Waterproof cloth quality data processing and identifying method
CN116309416A (en) Visual inspection method for surface of part
CN113869407A (en) Monocular vision-based vehicle length measuring method and device

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