CN112446864A - Flaw detection method, flaw detection device, flaw detection equipment and storage medium - Google Patents

Flaw detection method, flaw detection device, flaw detection equipment and storage medium Download PDF

Info

Publication number
CN112446864A
CN112446864A CN202011335402.9A CN202011335402A CN112446864A CN 112446864 A CN112446864 A CN 112446864A CN 202011335402 A CN202011335402 A CN 202011335402A CN 112446864 A CN112446864 A CN 112446864A
Authority
CN
China
Prior art keywords
color
detected
image
template
preset
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011335402.9A
Other languages
Chinese (zh)
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.)
Ainnovation Hefei Technology Co ltd
Original Assignee
Ainnovation Hefei Technology 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 Ainnovation Hefei Technology Co ltd filed Critical Ainnovation Hefei Technology Co ltd
Priority to CN202011335402.9A priority Critical patent/CN112446864A/en
Publication of CN112446864A publication Critical patent/CN112446864A/en
Pending legal-status Critical Current

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
    • 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
    • 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/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/75Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries
    • G06V10/751Comparing pixel values or logical combinations thereof, or feature values having positional relevance, e.g. template matching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30144Printing quality

Abstract

The application provides a flaw detection method, a flaw detection device, flaw detection equipment and a storage medium, wherein the method comprises the following steps: acquiring a to-be-detected image of an object to be detected about a target area; mapping the image to be detected to a preset standard color card according to a preset mapping relation to obtain the standard color of each pixel point to be detected in the image to be detected; comparing the color of each pixel point to be detected with the color of a template pixel point in a preset template image, and screening abnormal pixel points with color out of range from the image to be detected; and outputting the flaw information of the object to be detected based on the abnormal pixel points. This application has realized automatic flaw to the object that awaits measuring and has detected, has avoided the artifical omission problem that brings, has improved the detection efficiency of printing quality.

Description

Flaw detection method, flaw detection device, flaw detection equipment and storage medium
Technical Field
The present application relates to the field of image processing technologies, and in particular, to a method, an apparatus, a device, and a storage medium for detecting a defect.
Background
The quality of printed matters refers to the comprehensive effect of the appearance characteristics of printed matters, and the comprehensive effect is mainly governed by four aspects of tone level reproduction, color reproduction, definition reproduction, non-uniformity and the like. In practical application, the key point of the quality detection of the printed product is to check whether the four aspects meet the standard, and if the four aspects meet the standard, the printed product can be considered to be qualified.
However, in an actual scene, printed matters are various in variety, and existing printing problems are complex and various, such as scratches, missing printing, multiple printing, misprinting, smudging, overprinting, color difference and the like.
At present, the printing quality detection work usually needs to compare and check a physical sample photo with a standard electronic manuscript manually, the task is heavy, the time consumption is long, and omission easily occurs.
Disclosure of Invention
An object of the embodiments of the present application is to provide a defect detection method, apparatus, device and storage medium, which implement automatic defect detection on an object to be detected, avoid omission problem caused by manual work, and improve detection efficiency of printing quality.
A first aspect of an embodiment of the present application provides a defect detection method, including: acquiring a to-be-detected image of an object to be detected about a target area; mapping the image to be detected to a preset standard color card according to a preset mapping relation to obtain the standard color of each pixel point to be detected in the image to be detected; comparing the color of each pixel point to be detected with the color of a template pixel point in a preset template image, and screening abnormal pixel points with color out of range from the image to be detected; and outputting the flaw information of the object to be detected based on the abnormal pixel points.
In an embodiment, before the mapping the image to be detected to a preset standard color card to obtain the standard color of each pixel point to be detected in the image to be detected, the method further includes: respectively acquiring at least one color card image of each standard color in the standard color card; for each standard color, converting the color card image into a preset color space, and calculating to obtain a value range of color card pixels in the color card image in the preset color space; and storing the mapping relation between the standard color and the value range.
In an embodiment, before the color comparison is performed between each pixel to be detected and a template pixel in a preset template image, and an abnormal pixel with a color out of range is screened from the image to be detected, the method further includes: and aligning the image to be detected with the template image.
In an embodiment, the color comparison between each pixel point to be detected and a template pixel point in a preset template image is performed, and an abnormal pixel point with a color out of range is screened from the image to be detected, including: generating a to-be-detected color matrix of the to-be-detected image based on the standard color of each to-be-detected pixel point in the to-be-detected image, and acquiring a template color matrix of the template image; calculating a color difference value between the color matrix to be detected and the template color matrix; and selecting target pixel points with the color difference value not being zero from the image to be detected, wherein the abnormal pixel points are the target pixel points.
In an embodiment, the outputting the defect information of the object to be tested based on the abnormal pixel point includes: in the image to be detected, assigning all the abnormal pixel points as first color values to generate a detection result image; and outputting the detection result image after assignment, wherein the flaw information of the object to be detected is the area information displayed by the first color value.
A second aspect of the embodiments of the present application provides a defect detection apparatus, including: the first acquisition module is used for acquiring an image to be detected of the object to be detected relative to a target area; the mapping module is used for mapping the image to be detected to a preset standard color card according to a preset mapping relation to obtain the standard color of each pixel point to be detected in the image to be detected; the comparison module is used for comparing the color of each pixel point to be detected with the color of a template pixel point in a preset template image, and screening abnormal pixel points with color out of range from the image to be detected; and the output module is used for outputting the flaw information of the object to be detected based on the abnormal pixel points.
In one embodiment, the method further comprises: the second obtaining module is used for respectively obtaining at least one color card image of each standard color in the standard color card before the image to be detected is mapped to a preset standard color card to obtain the standard color of each pixel point to be detected in the image to be detected; the conversion module is used for converting the color card image to a preset color space aiming at each standard color and calculating to obtain a value range of color card pixels in the color card image in the preset color space; and the storage module is used for storing the mapping relation between the standard color and the value range.
In one embodiment, the method further comprises: and the alignment module is used for aligning the image to be detected with the template image before color comparison is carried out on the template pixel points of each pixel point to be detected and the template pixel points in the preset template image and abnormal pixel points with color out-of-range are screened out from the image to be detected.
In one embodiment, the alignment module is configured to: generating a to-be-detected color matrix of the to-be-detected image based on the standard color of each to-be-detected pixel point in the to-be-detected image, and acquiring a template color matrix of the template image; calculating a color difference value between the color matrix to be detected and the template color matrix; and selecting target pixel points with the color difference value not being zero from the image to be detected, wherein the abnormal pixel points are the target pixel points.
In one embodiment, the output module is configured to: in the image to be detected, assigning all the abnormal pixel points as first color values to generate a detection result image; and outputting the detection result image after assignment, wherein the flaw information of the object to be detected is the area information displayed by the first color value.
A third aspect of embodiments of the present application provides an electronic device, including: a memory to store a computer program; the processor is configured to execute the method of the first aspect and any embodiment thereof to detect defect information of the object to be detected.
A fourth aspect of embodiments of the present application provides a non-transitory electronic device-readable storage medium, including: a program which, when run by an electronic device, causes the electronic device to perform the method of the first aspect of an embodiment of the present application and any embodiment thereof.
The defect detection method, the defect detection device, the defect detection equipment and the storage medium have the advantages that the standard color of each pixel point to be detected is obtained by converting the image to be detected of the object to be detected into the standard color card, then the color of the image is compared with the color of the template pixel at the corresponding position in the template image, the template pixel serves as a reference, the abnormal pixel point exceeding the color range of the template pixel point in the pixel point to be detected is selected, the information of the abnormal pixel point is output to serve as the defect information of the object to be detected, so that the defect detection of the object to be detected is automatically realized, the problem of omission caused by manpower is avoided, and the detection efficiency of the printing.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
FIG. 2 is a flowchart illustrating a defect detection method according to an embodiment of the present application;
FIG. 3 is a flowchart illustrating a defect detection method according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a defect detection apparatus according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. In the description of the present application, the terms "first," "second," and the like are used solely to distinguish one from another and are not to be construed as indicating or implying relative importance.
As shown in fig. 1, the present embodiment provides an electronic apparatus 1 including: at least one processor 11 and a memory 12, one processor being exemplified in fig. 1. The processor 11 and the memory 12 are connected by a bus 10. The memory 12 stores instructions executable by the processor 11, and the instructions are executed by the processor 11, so that the electronic device 1 can execute all or part of the process of the method in the following embodiments, so as to obtain the standard color of each pixel point to be detected by converting the image to be detected of the object to be detected to the standard color card, then perform color comparison with the template pixel at the corresponding position in the template image, select the abnormal pixel point exceeding the color range of the template pixel point in the pixel point to be detected by taking the template pixel as the reference, and output the information of the abnormal pixel point as the defect information of the object to be detected.
In an embodiment, the electronic device 1 may be a mobile phone, a tablet computer, a notebook computer, a desktop computer, or the like.
Please refer to fig. 2, which is a defect detection method according to an embodiment of the present application, which can be executed by the electronic device 1 shown in fig. 1 and can be applied in a printing quality detection scenario of a packaging material to identify printing defect information of the packaging material. The method comprises the following steps:
step 201: and acquiring a to-be-detected image of the to-be-detected object relative to the target area.
In this step, the object to be detected may be a commodity outer packaging material or other printed products, for example, a packaging material on which information such as characters or patterns is printed in advance is taken as an example, in order to ensure that each commodity package entering the market has perfect printing information, it is necessary to perform defect detection on the printing quality of the packaging material before shipment, and during the detection, an image to be detected of the packaging material is obtained first. The printed areas on the packaging material may be distributed at different locations, so that a picture can be taken for each target area to obtain an image to be measured for each target area.
In an embodiment, in an actual scene, a physical photograph of the packaging material to be detected is first taken, and a target area to be detected is selected. Generally, an electronic design draft of a packaging material is designed in advance, and then the packaging material is printed according to the electronic design draft, but the electronic design draft often adds a lot of other marking information, which is different from a printed real object of the packaging material to a certain extent, so that a target area needs to be selected. For example, after the image to be measured of the packaging material and the image of the electronic design manuscript are taken, the generally corresponding regions of the two pictures are found, and then the target regions with generally close contents are selected in the two pictures in a frame mode. At the moment, other irrelevant information is removed from the picture content of the framed target area, so that alignment is conveniently carried out subsequently through a program, and the corresponding pixel point is found.
Step 202: and mapping the image to be detected to a preset standard color card according to a preset mapping relation to obtain the standard color of each pixel point to be detected in the image to be detected.
In this step, the image to be measured in the target region selected in step 201 is subjected to color mapping and converted into a standard theoretical color number value. The color mapping aims at obtaining the standard color of each pixel point to be detected in the image to be detected. The preset mapping relation is the corresponding relation between the standard color card and each pixel point in the value range of the color space. The standard color represented by the HSV Value of each pixel point to be detected in the image to be detected can be found according to the Value range of a preset standard color card in HSV (Hue, Saturation, Value, Hue, Saturation, lightness, H, S, V) color space. That is, all pixels in the image to be measured are classified into the colors represented by the corresponding standard color cards through the mapping table. So just standardize the pixel of complicacy difference to be convenient for more closely with the colour value of standard electron picture, avoid the imaging interference that packaging material brought when shooing.
Step 203: and comparing the color of each pixel point to be detected with the color of the template pixel points in the preset template image, and screening abnormal pixel points with color out of range from the image to be detected.
In the application, the template image can be the template image of the standard sample of the packaging material to be tested, the template image contains the color information of the template pixels in each printing area, the color information of the template pixels accords with the factory standard, the pixel positions with differences are reserved and marked by comparing whether the color values of the pixels of the image to be tested and the template image are different, the positions of the different pixels in the image to be tested are abnormal pixel points, and then the abnormal pixel points with the color exceeding the standard range can be screened out from the image to be tested.
Step 204: and outputting flaw information of the object to be detected based on the abnormal pixel points.
In this step, the abnormal pixel points can represent defect information of a target printing area on the packaging material, so that the information of the abnormal pixel points can be output as defect information of the packaging material to be detected.
According to the defect detection method, the standard color of each pixel point to be detected is obtained by converting the image to be detected of the packaging material to be detected into the standard color card, then color comparison is carried out on the template pixel at the corresponding position in the template image, the abnormal pixel point exceeding the color range of the template pixel point in the pixel point to be detected is selected by taking the template pixel as a reference, and the information of the abnormal pixel point is output to serve as the defect information of the packaging material to be detected.
Please refer to fig. 3, which is a defect detection method according to an embodiment of the present application, which can be executed by the electronic device 1 shown in fig. 1 and can be applied in a printing quality detection scenario of a packaging material to identify printing defect information of the packaging material. The method comprises the following steps:
step 301: at least one color card image of each standard color in the standard color card is acquired respectively.
In this step, the standard color card may be a common standard color card in the field of packaging material printing, or may be a special color card customized by a manufacturer. In an actual scene, due to reasons such as illumination, camera imaging, material quality and printing ink, a digital image of a packaging material after being photographed by a real object is generally different from a packaging material printed electronic design draft, so that on one hand, the real image and the electronic image cannot be directly aligned, and on the other hand, the two images cannot be subjected to pixel comparison. Therefore, the standard color card printed with the standard color needs to be photographed for multiple times respectively for each standard color under given illumination and a given camera to obtain at least one color card image of each standard color, so as to perform color mapping on the image to be measured based on the standard color card.
In an embodiment, in the color mapping conversion process, the standard color chart may be a color of the standard physical print, and the color mapping may be completed based on a color value of the standard physical print. The printed matter refers to a sample which is directly printed by the printing equipment of the factory according to different color numbers. I.e. the colour chip printed directly by the printing apparatus.
Step 302: and for each standard color, converting the color card image into a preset color space, and calculating to obtain the value range of the color card pixel in the color card image in the preset color space.
In this step, the preset color space may be an HSV color space. After a camera photographs a standard color card to form an image, a value of each pixel in a color card image of each standard color is usually represented by three channels of RGB (Red, Green, Blue, Red, Green, Blue color mode), and colors cannot be sufficiently represented, so that the RGB value of the color card image needs to be converted into a value represented by HSV space. The HSV color space uses three channels of H, S and V, and the value range is 0-255. Taking the color card of the standard color a as an example, after a photograph, the values of the three channels H, S, and V in the HSV color space of each color card pixel in the color card image are obtained. Because all the color card pixels in one color card image are the color of the standard color A, but because the positions of the pixel points of each color card are different, the light rays are slightly different, and the HSV value of the pixel points of each color card is different. And respectively counting the values of the three HSV channels of all the color card pixel points in one color card image.
For example, in one color card image, for an H channel, the values of all color card pixels in the H channel are sorted to obtain the maximum value and the minimum value of the color card pixel points in the H channel. Similarly, the value ranges of the color card pixel points under the S channel and the V channel can be obtained. Therefore, the value range of the color card pixel in the color card image of the standard color A under the HSV color space is obtained.
In an embodiment, to improve the stability, the color chart of the standard color a may be collected and photographed for multiple times to obtain multiple color chart images, the color fluctuation range statistics may be performed on the multiple color chart images, and the imaging value range of the standard color a in the HSV color space may be further counted, which is the color value fluctuation range of the standard color a.
Step 303: and storing the mapping relation between the standard color and the value range.
In this step, in step 302, each standard color obtains an imaging value range of a color card pixel in a preset color space, each standard color is associated with its corresponding imaging value range in a one-to-one correspondence manner, and when the value of a certain pixel falls within the value range, the color of the pixel is the color represented by the standard color associated with the value range, so as to construct a color mapping relationship, and store the color mapping relationship in the database.
Step 304: and acquiring a to-be-detected image of the to-be-detected object relative to the target area. See the description of step 201 in the above embodiments for details.
Step 305: and mapping the image to be detected to a preset standard color card according to a preset mapping relation to obtain the standard color of each pixel point to be detected in the image to be detected. See the description of step 202 in the above embodiments for details.
In this step, when the value of a certain pixel point to be detected in the image to be detected in the HSV color space falls within the imaging value range of the certain standard color, for example, the imaging value range of the standard color a, the color of the pixel point to be detected is the standard color represented by the standard color a. And similarly, obtaining the standard color of each pixel point to be detected in the image to be detected.
Step 306: and aligning the image to be detected with the template image.
In this step, the alignment process may be processed as follows: first, ORB (ordered Fast and indexed Brief, an algorithm for Fast feature point extraction and description, abbreviated as "ORB") features of an image to be detected and a template image are extracted. Then, matching is carried out based on Surf (Speeded Up Robust Feature) features of the images, a Feature point pair which is most matched between the image to be detected and the template image is found, coordinates of the optimal matching point pair are extracted, a perspective transformation matrix is generated, and finally, the image to be detected which is to be aligned is subjected to perspective transformation, and the aligned image to be detected is generated.
Step 307: and generating a color matrix to be detected of the image to be detected based on the standard color of each pixel point to be detected in the image to be detected, and acquiring a template color matrix of the template image.
In this step, in a range recognizable by naked eyes, when there is a difference between two pictures, there is a difference position, the imaging effect of each pixel point is different, and the color value is also different. The color value represented by each pixel point of a picture can be represented by a certain number, so that the picture can be converted into a two-dimensional matrix, and each value in the matrix is the color value of the pixel at the position. Based on the principle, the color matrix to be detected of the image to be detected and the template color matrix of the template image can be obtained respectively.
Step 308: and calculating the color difference value between the color matrix to be detected and the template color matrix.
In this step, the color matrix to be measured of the image to be measured and the template color matrix of the template image may be subtracted from each other to obtain a color difference value.
Step 309: and selecting target pixel points with non-zero color difference values in the image to be detected, wherein the abnormal pixel points are the target pixel points.
In this step, in the difference result, the position of the same color value is 0, and the position of the different color value is not 0. And selecting the target pixel points with the color difference value not being zero from the image to be detected.
Step 310: and in the image to be detected, assigning all the abnormal pixel points as first color values to generate a detection result image.
In this step, 255 (the first color value) may be assigned to all the non-zero elements of the matrix obtained by subtracting the matrix in step 308, so as to obtain a difference map represented by a black-and-white map as a detection result image, where a white area (pixel value 255) is an area having a difference, and black (pixel value 0) is an area having the same color value.
Step 311: and outputting the detection result image after assignment, wherein the flaw information of the object to be detected is the area information displayed by the first color value.
In this step, the area of the abnormal pixel point continuous film in the detection result image can be circled on the original image to be detected, and here, a findContours () method of opencv (a cross-platform computer vision and machine learning software library) can be adopted, and the area of the abnormal pixel point continuous film is circled on the image to be detected, so that a worker can further perform manual secondary check on the corresponding position of the original image, and further eliminate the interference of other factors such as light, dust, sundries and the like.
According to the flaw detection method, through imaging color mapping and pixel alignment on the mapped image, flaw detection of the real printed matter can be achieved based on the electronic image of the standard color card, such as missing printing, multi-printing, misprinting, chromatic aberration and the like can be effectively detected, the manual workload is greatly reduced, and the reliability of acceptance and quality inspection of the printed matter is greatly improved.
Please refer to fig. 4, which is a defect detecting apparatus 400 according to an embodiment of the present application, applied to the electronic device 1 shown in fig. 1, and applied to a printing quality detection scenario of a packaging material to identify printing defect information of the packaging material. The device includes: the first obtaining module 401, the mapping module 402, the comparing module 403 and the output module 404, the principle relationship of each module is as follows:
the first obtaining module 401 is configured to obtain a to-be-measured image of a to-be-measured object with respect to a target area. See the description of step 201 in the above embodiments for details.
The mapping module 402 is configured to map the image to be detected to a preset standard color card according to a preset mapping relationship, so as to obtain a standard color of each pixel point to be detected in the image to be detected. See the description of step 202 in the above embodiments for details.
The comparison module 403 is configured to compare colors of each pixel to be detected with template pixels in a preset template image, and screen out an abnormal pixel having a color out of range from the image to be detected. See the description of step 203 in the above embodiments for details.
The output module 404 is configured to output defect information of the object to be detected based on the abnormal pixel point. See the description of step 204 in the above embodiments for details.
In one embodiment, the method further comprises: the second obtaining module 405 is configured to obtain at least one color card image of each standard color in the standard color card before mapping the image to be detected to the preset standard color card to obtain the standard color of each pixel point to be detected in the image to be detected. The conversion module 406 is configured to convert the color card image into a preset color space for each standard color, and calculate a value range of a color card pixel in the color card image in the preset color space. The storage module 407 is configured to store a mapping relationship between the standard color and the value range. See the description of steps 301 to 303 in the above embodiments in detail.
In one embodiment, the method further comprises: the aligning module 408 is configured to align the image to be detected with the template image before comparing the color of each pixel to be detected with the color of a template pixel in a preset template image and screening out an abnormal pixel having a color out-of-range from the image to be detected. See the description of step 306 in the above embodiments for details.
In one embodiment, the alignment module 403 is configured to: and generating a color matrix to be detected of the image to be detected based on the standard color of each pixel point to be detected in the image to be detected, and acquiring a template color matrix of the template image. And calculating the color difference value between the color matrix to be detected and the template color matrix. And selecting target pixel points with non-zero color difference values in the image to be detected, wherein the abnormal pixel points are the target pixel points. See the description of step 307 to step 309 in the above embodiments in detail.
In one embodiment, the output module 404 is configured to: and in the image to be detected, assigning all the abnormal pixel points as first color values to generate a detection result image. And outputting the detection result image after assignment, wherein the flaw information of the object to be detected is the area information displayed by the first color value. Refer to the description of steps 310 to 311 in the above embodiments in detail.
For a detailed description of the defect detection apparatus 400, please refer to the description of the related method steps in the above embodiments.
An embodiment of the present invention further provides a non-transitory electronic device readable storage medium, including: a program that, when run on an electronic device, causes the electronic device to perform all or part of the procedures of the methods in the above-described embodiments. The storage medium may be a magnetic Disk, an optical Disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a Flash Memory (Flash Memory), a Hard Disk (Hard Disk Drive, abbreviated as HDD), a Solid State Drive (SSD), or the like. The storage medium may also comprise a combination of memories of the kind described above.
Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations fall within the scope defined by the appended claims.

Claims (10)

1. A method of defect detection, comprising:
acquiring a to-be-detected image of an object to be detected about a target area;
mapping the image to be detected to a preset standard color card according to a preset mapping relation to obtain the standard color of each pixel point to be detected in the image to be detected;
comparing the color of each pixel point to be detected with the color of a template pixel point in a preset template image, and screening abnormal pixel points with color out of range from the image to be detected;
and outputting the flaw information of the object to be detected based on the abnormal pixel points.
2. The method according to claim 1, wherein before the mapping the image to be tested to a preset standard color chart to obtain a standard color of each pixel point to be tested in the image to be tested, the method further comprises:
respectively acquiring at least one color card image of each standard color in the standard color card;
for each standard color, converting the color card image into a preset color space, and calculating to obtain a value range of color card pixels in the color card image in the preset color space;
and storing the mapping relation between the standard color and the value range.
3. The method according to claim 1, wherein before comparing the color of each pixel point to be tested with the template pixel points in the preset template image and screening out the abnormal pixel points with color out of range from the image to be tested, the method further comprises:
and aligning the image to be detected with the template image.
4. The method according to claim 1, wherein the comparing the color of each pixel point to be tested with the template pixel points in the preset template image, and screening out the abnormal pixel points with color out of range from the image to be tested comprises:
generating a to-be-detected color matrix of the to-be-detected image based on the standard color of each to-be-detected pixel point in the to-be-detected image, and acquiring a template color matrix of the template image;
calculating a color difference value between the color matrix to be detected and the template color matrix;
and selecting target pixel points with the color difference value not being zero from the image to be detected, wherein the abnormal pixel points are the target pixel points.
5. The method of claim 4, wherein outputting defect information of the object to be tested based on the abnormal pixel points comprises:
in the image to be detected, assigning all the abnormal pixel points as first color values to generate a detection result image;
and outputting the detection result image after assignment, wherein the flaw information of the object to be detected is the area information displayed by the first color value.
6. A defect detection apparatus, comprising:
the first acquisition module is used for acquiring an image to be detected of the object to be detected relative to a target area;
the mapping module is used for mapping the image to be detected to a preset standard color card according to a preset mapping relation to obtain the standard color of each pixel point to be detected in the image to be detected;
the comparison module is used for comparing the color of each pixel point to be detected with the color of a template pixel point in a preset template image, and screening abnormal pixel points with color out of range from the image to be detected;
and the output module is used for outputting the flaw information of the object to be detected based on the abnormal pixel points.
7. The apparatus of claim 6, further comprising:
the second obtaining module is used for respectively obtaining at least one color card image of each standard color in the standard color card before the image to be detected is mapped to a preset standard color card to obtain the standard color of each pixel point to be detected in the image to be detected;
the conversion module is used for converting the color card image to a preset color space aiming at each standard color and calculating to obtain a value range of color card pixels in the color card image in the preset color space;
the storage module is used for storing the mapping relation between the standard color and the value range;
the device further comprises:
and the alignment module is used for aligning the image to be detected with the template image before color comparison is carried out on the template pixel points of each pixel point to be detected and the template pixel points in the preset template image and abnormal pixel points with color out-of-range are screened out from the image to be detected.
8. The apparatus of claim 6, wherein the alignment module is configured to:
generating a to-be-detected color matrix of the to-be-detected image based on the standard color of each to-be-detected pixel point in the to-be-detected image, and acquiring a template color matrix of the template image;
calculating a color difference value between the color matrix to be detected and the template color matrix;
selecting a target pixel point with the color difference value not being zero from the image to be detected, wherein the abnormal pixel point is the target pixel point;
the output module is used for:
in the image to be detected, assigning all the abnormal pixel points as first color values to generate a detection result image;
and outputting the detection result image after assignment, wherein the flaw information of the object to be detected is the area information displayed by the first color value.
9. An electronic device, comprising:
a memory to store a computer program;
a processor configured to perform the method of any one of claims 1 to 5 to detect defect information of the object to be tested.
10. A non-transitory electronic device readable storage medium, comprising: program which, when run by an electronic device, causes the electronic device to perform the method of any one of claims 1 to 5.
CN202011335402.9A 2020-11-25 2020-11-25 Flaw detection method, flaw detection device, flaw detection equipment and storage medium Pending CN112446864A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011335402.9A CN112446864A (en) 2020-11-25 2020-11-25 Flaw detection method, flaw detection device, flaw detection equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011335402.9A CN112446864A (en) 2020-11-25 2020-11-25 Flaw detection method, flaw detection device, flaw detection equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112446864A true CN112446864A (en) 2021-03-05

Family

ID=74738790

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011335402.9A Pending CN112446864A (en) 2020-11-25 2020-11-25 Flaw detection method, flaw detection device, flaw detection equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112446864A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112446865A (en) * 2020-11-25 2021-03-05 创新奇智(广州)科技有限公司 Flaw identification method, flaw identification device, flaw identification equipment and storage medium
CN113160145A (en) * 2021-03-29 2021-07-23 深圳中科飞测科技股份有限公司 Detection method, detection device, detection equipment and computer readable storage medium
CN113177939A (en) * 2021-05-25 2021-07-27 浙江大华技术股份有限公司 Lamp panel detection method and device, electronic equipment and storage medium
CN113627758A (en) * 2021-07-30 2021-11-09 苏州美声电子有限公司 Appearance-based power amplifier switch screening method and system
CN114466183A (en) * 2022-02-21 2022-05-10 江东电子材料有限公司 Copper foil flaw detection method and device based on characteristic spectrum and electronic equipment

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020146167A1 (en) * 2001-02-28 2002-10-10 Dainippon Screen Mfg. Co., Ltd. Region segmentation of color image
CN1719455A (en) * 2004-07-09 2006-01-11 大日本网目版制造株式会社 Segmentation technique of a color image according to colors
CN102221554A (en) * 2011-04-06 2011-10-19 天津科技大学 Presswork quality and flaw inspection method
CN105488820A (en) * 2016-02-25 2016-04-13 曹溯 Color comparing method and device
CN105787508A (en) * 2016-02-22 2016-07-20 青岛大学 Textile color identification method and system
CN107052086A (en) * 2017-06-01 2017-08-18 扬州苏星机器人科技有限公司 Stamping parts surface defect detection apparatus and detection method based on 3D vision
CN110443747A (en) * 2019-07-30 2019-11-12 Oppo广东移动通信有限公司 Image processing method, device, terminal and computer readable storage medium
CN110930352A (en) * 2019-02-25 2020-03-27 研祥智能科技股份有限公司 Object color difference defect detection method and device, computer equipment and storage medium
US20200288092A1 (en) * 2019-03-07 2020-09-10 Beijing Boe Display Technology Co., Ltd. Model training method, chromatic aberration correction method, apparatus, medium and electronic device
CN111784672A (en) * 2020-06-30 2020-10-16 创新奇智(上海)科技有限公司 Defect detection method and device, electronic equipment and readable storage medium
CN111798528A (en) * 2020-07-01 2020-10-20 西交利物浦大学 Fabric color difference detection method, device, storage medium and equipment

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020146167A1 (en) * 2001-02-28 2002-10-10 Dainippon Screen Mfg. Co., Ltd. Region segmentation of color image
CN1719455A (en) * 2004-07-09 2006-01-11 大日本网目版制造株式会社 Segmentation technique of a color image according to colors
CN102221554A (en) * 2011-04-06 2011-10-19 天津科技大学 Presswork quality and flaw inspection method
CN105787508A (en) * 2016-02-22 2016-07-20 青岛大学 Textile color identification method and system
CN105488820A (en) * 2016-02-25 2016-04-13 曹溯 Color comparing method and device
CN107052086A (en) * 2017-06-01 2017-08-18 扬州苏星机器人科技有限公司 Stamping parts surface defect detection apparatus and detection method based on 3D vision
CN110930352A (en) * 2019-02-25 2020-03-27 研祥智能科技股份有限公司 Object color difference defect detection method and device, computer equipment and storage medium
US20200288092A1 (en) * 2019-03-07 2020-09-10 Beijing Boe Display Technology Co., Ltd. Model training method, chromatic aberration correction method, apparatus, medium and electronic device
CN110443747A (en) * 2019-07-30 2019-11-12 Oppo广东移动通信有限公司 Image processing method, device, terminal and computer readable storage medium
CN111784672A (en) * 2020-06-30 2020-10-16 创新奇智(上海)科技有限公司 Defect detection method and device, electronic equipment and readable storage medium
CN111798528A (en) * 2020-07-01 2020-10-20 西交利物浦大学 Fabric color difference detection method, device, storage medium and equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
黄平: "低成本视觉检测平台及视觉检测关键技术研究", 《中国优秀博硕士学位论文全文数据库(硕士)信息科技辑》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112446865A (en) * 2020-11-25 2021-03-05 创新奇智(广州)科技有限公司 Flaw identification method, flaw identification device, flaw identification equipment and storage medium
CN113160145A (en) * 2021-03-29 2021-07-23 深圳中科飞测科技股份有限公司 Detection method, detection device, detection equipment and computer readable storage medium
CN113160145B (en) * 2021-03-29 2024-04-02 深圳中科飞测科技股份有限公司 Detection method, detection device, detection apparatus, and computer-readable storage medium
CN113177939A (en) * 2021-05-25 2021-07-27 浙江大华技术股份有限公司 Lamp panel detection method and device, electronic equipment and storage medium
CN113627758A (en) * 2021-07-30 2021-11-09 苏州美声电子有限公司 Appearance-based power amplifier switch screening method and system
CN114466183A (en) * 2022-02-21 2022-05-10 江东电子材料有限公司 Copper foil flaw detection method and device based on characteristic spectrum and electronic equipment

Similar Documents

Publication Publication Date Title
CN112446864A (en) Flaw detection method, flaw detection device, flaw detection equipment and storage medium
EP2713596B1 (en) Image evaluation device, image evaluation method and program storage medium
US9900472B2 (en) Color conversion table creation device and method, program, and recording medium
RU2567863C2 (en) Method and system for image colour definition
US5335292A (en) Document processing system and method
EP2713597B1 (en) Image evaluation device, image evaluation method and program storage medium
CN110675373B (en) Component installation detection method, device and system
JP2005190435A (en) Image processing method, image processing apparatus and image recording apparatus
CN104943421B (en) Method for making image detecting system automatically select inspection parameter
KR20080095743A (en) Image processing program and image processing device
CN111259891B (en) Method, device, equipment and medium for identifying identity card in natural scene
US7602967B2 (en) Method of improving image quality
KR100668267B1 (en) Image processing apparatus, image processing method and computer-readable medium on which image processing program is recorded
KR20120130684A (en) Image processing apparatus, image processing method, and computer readable medium
JP2012095002A (en) Image correction device and image correction method
CN112446865A (en) Flaw identification method, flaw identification device, flaw identification equipment and storage medium
JP5929282B2 (en) Image processing apparatus and image processing program
JP2005192162A (en) Image processing method, image processing apparatus, and image recording apparatus
JP5960320B2 (en) Image evaluation apparatus, image evaluation method, and program
Boiangiu et al. Target Validation and Image Color Calibration
JP4961370B2 (en) Inspection method and inspection apparatus
US11930153B2 (en) Feature extractions to optimize scanned images
TWI781835B (en) Fabric information digitization system and method thereof
JP4084257B2 (en) Printed circuit board inspection equipment
JP7106318B2 (en) Image processing device, image processing method and program

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20210305

RJ01 Rejection of invention patent application after publication