A bright spot defect detection method, device, computer equipment and storage medium

By using the pixel with the largest gray value to determine the target area in bright spot defect detection, the problem of insufficient applicability of existing detection methods is solved, and bright spot defect detection is achieved in a wider range and with higher efficiency.

CN115330704BActive Publication Date: 2026-01-02合肥欣奕华智能机器股份有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210933346.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-04
Publication Date
2026-01-02
Estimated Expiration
2042-08-04

AI Technical Summary

Technical Problem

Existing bright spot defect detection technologies, by arranging and combining basic methods, are only applicable to a certain type of bright spot defect and cannot be widely applied to multiple types of bright spot defects, resulting in insufficient applicability and robustness of the detection methods.

Method used

By obtaining the pixel with the highest gray value in the image to be processed, the target region is determined, and bright spot defects are identified based on the target region. The method is not limited by the type of bright spot defects, which simplifies the detection process.

Benefits of technology

It improves the versatility and robustness of bright spot defect detection, enabling it to be applied more broadly to different types of bright spot defects, simplifying the detection process and improving efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115330704B_ABST
    Figure CN115330704B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of bright spot defect detection, in particular to a bright spot defect detection method and device, computer equipment and a storage medium. The bright spot defect detection method comprises the following steps: obtaining a to-be-processed image; determining a target region in the to-be-processed image according to a pixel point with the maximum gray value in the to-be-processed image, wherein the difference between the gray value of any pixel point in the target region and the gray value of the pixel point with the maximum gray value is within a preset numerical range; and determining bright spot defects in the to-be-processed image based on at least one target region. The technical problem that the bright spot defect detection technology in the related art cannot be widely applied to multiple types of bright spot defects is solved, the bright spot defect detection technology is obtained by arranging and combining basic methods, and the detection algorithm of a certain type of bright spot defect is obtained.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of bright spot defect detection, and particularly relates to a bright spot defect detection method and device, computer equipment and a storage medium. BACKGROUND

[0002] In the panel industry, in order to improve product quality, save manpower, reduce costs and other purposes, the mode of "manual + machine vision" has been widely used for screen quality detection, product classification and defect repair in the process from production to delivery of panels. In related detection technologies, defect detection and classification account for a large proportion, and bright spot defect detection and classification is one of them.

[0003] Related bright spot defect detection technology mainly arranges and combines various basic methods such as filtering, segmentation and morphological analysis of screen images to obtain a detection method suitable for a certain type of bright spot defect. When designing a detection method by arranging and combining basic methods for a certain type of bright spot defect, it is generally necessary to rearrange, adjust parameters, add and / or delete various basic methods according to the pixel arrangement characteristics in different bright spot defects. However, due to the large number of parameters to be adjusted and the great changes in the architecture of the bright spot defect detection method, such bright spot defect detection technology is only suitable for a certain type of bright spot defect and is not suitable for other types of bright spot defects, and cannot be widely used. SUMMARY

[0004] The present application provides a bright spot defect detection method, device, computer equipment and storage medium, which is used to solve the technical problem that the related art bright spot defect detection technology arranges and combines basic methods to obtain a detection method for a certain type of bright spot defect, which cannot be widely used for multiple types of bright spot defects.

[0005] To achieve the above object, the present application adopts the following technical solutions:

[0006] In a first aspect, the present application provides a bright spot defect detection method, comprising:

[0007] obtaining a to-be-processed image;

[0008] determining a target region in the to-be-processed image according to a pixel point with the maximum gray value in the to-be-processed image, wherein the difference between the gray value of any pixel point in the target region and the gray value of the pixel point with the maximum gray value is within a preset numerical range;

[0009] determining a bright spot defect in the to-be-processed image based on at least one target region.

[0010] In one embodiment, obtaining the to-be-processed image comprises:

[0011] acquire an original image, the original image comprising a plurality of sub-images;

[0012] determine a center pixel gray value of each sub-image according to a gray value of a pixel point of the sub-image;

[0013] determine a to-be-processed image with a highlight defect in the plurality of sub-images according to the center pixel gray value.

[0014] In one embodiment, the determining of the center pixel gray value of each sub-image according to the gray value of the pixel point of the sub-image comprises:

[0015] taking an average gray value of the pixel points in the sub-image as the center pixel gray value.

[0016] In one embodiment, the determining of the to-be-processed image with the highlight defect in the plurality of sub-images according to the center pixel gray value comprises:

[0017] determining a gray value standard deviation of the sub-image according to the center pixel gray value, the gray value standard deviation representing a dispersion degree of the gray values of the pixel points in the sub-image relative to the center pixel gray value;

[0018] determining the sub-image with the center pixel gray value greater than or equal to a gray value threshold and the gray value standard deviation greater than or equal to a gray value standard deviation threshold as the to-be-processed image.

[0019] In one embodiment, the determining of a target region in the to-be-processed image according to a pixel point with a maximum gray value in the to-be-processed image comprises: traversing a target pixel point in an eight-neighbor domain of the pixel point with the maximum gray value, and traversing the target pixel point in the eight-neighbor domain of the target pixel point until there is no target pixel point in the eight-neighbor domain of the target pixel point; a difference between a gray value of the target pixel point and a gray value of the pixel point with the maximum gray value is within a preset numerical range.

[0020] determining a region composed of positions of the pixel point with the maximum gray value and all the target pixel points found as the target region.

[0021] In one embodiment, the determining of the highlight defect in the to-be-processed image based on at least one target region comprises:

[0022] determining a row number and a column number of the pixel points in the target region;

[0023] determining the target region with the row number greater than a preset row number and / or the column number greater than a preset column number as the highlight defect.

[0024] In a second aspect, the present application provides a highlight defect detection device, comprising:

[0025] an acquisition module configured to acquire a to-be-processed image;

[0026] a target region determination module configured to determine a target region in the to-be-processed image according to a pixel point with a maximum gray value in the to-be-processed image, wherein a difference between a gray value of any pixel point in the target region and a gray value of a pixel point with a gray value greater than a preset threshold is within a preset numerical range;

[0027] a bright spot defect determination module configured to determine a bright spot defect in the to-be-processed image based on at least one target region.

[0028] In a third aspect, the present application further provides a computer device. The computer device comprises a memory and a processor. The memory stores a computer program. The processor implements the following steps when executing the computer program:

[0029] an acquisition module configured to acquire a to-be-processed image;

[0030] a target region determination module configured to determine a target region in the to-be-processed image according to a pixel point with a maximum gray value in the to-be-processed image, wherein a difference between a gray value of any pixel point in the target region and a gray value of a pixel point with a gray value greater than a preset threshold is within a preset numerical range;

[0031] a bright spot defect determination module configured to determine a bright spot defect in the to-be-processed image based on at least one target region.

[0032] In a fourth aspect, the present application further provides a computer readable storage medium. The computer readable storage medium stores a computer program. The computer program is executed by a processor to implement the following steps:

[0033] an acquisition module configured to acquire a to-be-processed image;

[0034] a target region determination module configured to determine a target region in the to-be-processed image according to a pixel point with a maximum gray value in the to-be-processed image, wherein a difference between a gray value of any pixel point in the target region and a gray value of a pixel point with a gray value greater than a preset threshold is within a preset numerical range;

[0035] a bright spot defect determination module configured to determine a bright spot defect in the to-be-processed image based on at least one target region.

[0036] The application provides a bright spot defect detection method and device. First, an image to be processed is acquired. A target region in the image to be processed is determined according to a pixel point with the maximum gray value in the image to be processed. Bright spot defects in the image to be processed are determined based on at least one target region. The method determines the target region only through one pixel point with the maximum gray value in the image to be processed, is not limited by the type of bright spot defects, and does not need to arrange and combine the basic method to design detection methods of different bright spot defect types. The method solves the technical problem that, in the related art, a bright spot defect detection technology cannot be widely applied to multi-type bright spot defect detection by arranging and combining the basic method to obtain a detection algorithm of a certain type of bright spot defect. The method achieves the effects of increasing the wide applicability of bright spot defect detection and improving the robustness of bright spot defect detection.

[0037] The detailed description of the second aspect to the fourth aspect and various implementation manners thereof in the application can refer to the detailed description in the first aspect and various implementation manners thereof; and the beneficial effects of the second aspect to the fourth aspect and various implementation manners thereof can refer to the beneficial effect analysis in the first aspect and various implementation manners thereof, which will not be described herein again.

[0038] These aspects or other aspects of the application will be more apparent in the following description. BRIEF DESCRIPTION OF DRAWINGS

[0039] In order to more clearly illustrate the technical solutions in the embodiments of the application, the following will briefly introduce the drawings needed to be used in the embodiment description. Obviously, the drawings in the following description only some of the embodiments of the application, and for those skilled in the art, other drawings can also be obtained without creative labor on the basis of these drawings.

[0040] Figure 1 A flowchart of a bright spot defect detection method in an embodiment;

[0041] Figure 2 Another flowchart of a bright spot defect detection method in an embodiment;

[0042] Figure 3 A sub-image diagram of a bright spot defect detection method in an embodiment;

[0043] Figure 4 A target sub-image diagram of a bright spot defect detection method in an embodiment;

[0044] Figure 5 A target region diagram of a bright spot defect detection method in an embodiment;

[0045] Figure 6 A diagram of a bright spot defect detection device in an embodiment;

[0046] Figure 7 Figure 1 is a diagram of an internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0047] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the scope of protection of the present application.

[0048] The terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the technical features indicated. Therefore, the features defined with "first", "second" can explicitly or implicitly include one or more of the features. In the description of the present application, unless otherwise specified, the meaning of "a plurality of" is two or more.

[0049] The highlight defect detection method provided by the present application can be applied to the application environment of display screen highlight defect detection. The highlight defect, also known as bright spot, is a physical damage on the display screen, mainly caused by the slight deformation of the internal reflector of the screen due to external force compression or heat. The highlight defect is divided into different highlight defect types according to the shape, and the shape of the highlight defect is actually the number and arrangement of the pixel points in the highlight defect. In the related art, the common highlight defect type determination method is template matching. When the highlight defect type is complex, the number of required templates is large, the template matching process is complex, and the determination time is long. For example, if the upper limit of the highlight defect type is a 2*2 square, the acceptable highlight defect types are as follows Figure 1Shown in (a)-(f). Among them, (a) the bright point defect contains 1 pixel; (b) the bright point defect contains two pixels, arranged horizontally; (c) the bright point defect contains two pixels, arranged vertically; (d) the bright point defect contains 3 pixels, arranged in a triangle; (e) the bright point defect contains 2 pixels, arranged obliquely; (f) the bright point defect contains four pixels, arranged in a square, which is the shape of the bright point at the maximum tolerable limit. Unacceptable bright point defect types include but are not limited to (g)-(l). Among them, (g) the bright point defect contains 3 pixels, arranged horizontally; (h) the bright point defect contains 3 pixels, arranged vertically; (i) the bright point defect contains 4 pixels, arranged in the shape of "tu"; (j) the bright point defect contains 4 pixels, arranged in a "Z" shape; (k) the bright point defect contains 5 pixels, arranged beyond the limit; (l) the bright point defect contains 3 pixels, arranged obliquely. The maximum number of pixels of the above bright point defects is 4. There are also bright point defects with 3 or 4 pixels among the unacceptable bright point defect types. It can be seen that at least three templates are required for template matching, namely: (d), (e), and (f) correspond to one template, (a)-(c) correspond to one template, and the unacceptable bright point defect shape corresponds to one template. It can be seen that when the bright point defect types are complex, the template matching process is also complex and requires a large number of templates. In order to adapt to the template matching process, the filtering and segmentation of the screen image also need to be adjusted accordingly. Since there are many parameters to be adjusted and the architecture of the bright point defect detection method is also greatly changed, that is, the bright point defect detection method obtained based on such a bright point defect detection technology is only applicable to a certain type of bright point defect, rather than other types of bright point defects.

[0050] The bright point defect detection method provided by the embodiment of the present application first obtains an image to be processed; determines a target area in the image to be processed according to the pixel point with the largest gray value in the image to be processed; and determines the bright point defect in the image to be processed based on at least one target area. This method only determines the target area through one pixel point with the largest gray value in the image to be processed, is not limited by the bright point defect type, and does not need to design detection methods for different bright point defect types by arranging and combining the basic methods. It solves the technical problem that in the related technology, the bright point defect detection technology obtains the detection algorithm for a certain type of bright point defect by arranging and combining the basic methods, and cannot be widely applied to the detection of multiple types of bright point defects. It achieves the effect of increasing the wide applicability of bright point defect detection and improving the robustness of bright point defect detection.

[0051] In one embodiment, as Figure 2 shown, a bright point defect detection method is provided. This method can be executed by a bright point defect detection device and includes the following steps:

[0052] S210: Obtain an image to be processed.

[0053] For example, the image to be processed can be an image obtained by taking a picture of a display screen to be detected that is illuminated. Alternatively, the image to be processed can be a sub-image obtained by cropping the aforementioned image.

[0054] S220: Determine a target region in the image to be processed according to the pixel point with the maximum gray value, wherein the gray value of any pixel point in the target region is within a preset numerical range from the gray value of the pixel point with the maximum gray value.

[0055] For example, the target region is visually composed of a group of "brighter" pixel points, and the gray values of the pixel points in the target region are similar, i.e., the gray value of a single pixel is within a preset numerical range from the maximum gray value in the bright region, i.e., similar internally. In addition, the pixel points in the target region are adjacent to each other and are eight-neighbor pixel points. The pixel set A composed of the pixel points in the target region and the pixel set B composed of the pixel points outside the target region have a regional inclusion relationship, i.e., the pixel set A is included in the pixel set B, and the average gray values of the pixel set A and the pixel set B are quite different, i.e., repelling externally.

[0056] Specifically, in this step, the bright spot defect detection device is based on the fact that the pixel points of the bright spot defect are adjacent to each other and are eight-neighbor pixel points, and the gray value of any pixel point in the target region is within a first preset numerical range from the gray value of the pixel point with the maximum gray value, i.e., similar internally, wherein the first preset numerical range is the preset numerical range in step S220. In addition, the gray value of the pixel point in the target region is within a second preset numerical range from the gray value of the pixel point outside the target region, i.e., repelling externally. The numerical values in the first preset numerical range are all smaller than the numerical values in the second preset numerical range.

[0057] Specifically, the similarity internally can be represented as GrayDiff∈[0, GrayDiffMin], and the repelling externally can be represented as GrayDiff∈[GrayDiffMax, 255]. Wherein, GrayDiff is the difference between the gray value of the pixel point in the eight-neighbor region and the gray value of the pixel point with the maximum gray value, and GrayDiffMin and GrayDiffMax are the minimum value of the gray value difference and the maximum value of the gray value difference for the similarity internally and the repelling externally, respectively.

[0058] Specifically, in the image to be processed, the bright spot defect detection device sequentially calculates the difference between the gray value of the pixel point with the maximum gray value and the gray values of the pixel points in the eight-neighbor region of the pixel point, and determines the pixel points with the difference within a preset numerical range as the pixel points in the target region, so as to determine the target region in the target sub-image.

[0059] S230: Determine the bright spot defect in the image to be processed based on the at least one target region.

[0060] For example, the bright spot defect can be divided into acceptable bright spot defect and unacceptable bright spot defect. The acceptable bright spot defect refers to that the display screen containing the bright spot defect is an acceptable good screen; and the unacceptable bright spot defect refers to that the display screen containing the bright spot defect is an unacceptable bad screen.

[0061] Specifically, since the target region determined in step S220 can be an acceptable bright spot defect, the bright spot defect detection device determines whether the bright spot defect in the target sub-image is an unacceptable bright spot defect again based on the at least one target region.

[0062] In this embodiment, the bright spot defect detection method and device provided by the present application first acquire an image to be processed; determine a target region in the image to be processed according to a pixel point with the maximum gray value in the image to be processed; and determine a bright spot defect in the image to be processed based on the at least one target region. The method only determines the target region through one pixel point with the maximum gray value in the image to be processed, is not limited by the type of bright spot defect, and does not need to arrange and combine the basic method to design detection methods of different types of bright spot defects, so that the bright spot defect detection method of the present application is more widely applied. The technical problem that the bright spot defect detection technology in the related art cannot be widely applied to the detection of multiple types of bright spot defects by arranging and combining the basic method to obtain the detection algorithm of a certain type of bright spot defect is solved. The effect of increasing the wide applicability of the bright spot defect detection and improving the robustness of the bright spot defect detection is achieved.

[0063] In one of the embodiments, step S210 of acquiring the image to be processed includes:

[0064] S211: Acquire an original image, and the original image includes multiple sub-images.

[0065] Specifically, the bright spot defect detection device reads the original image, generates a mask with a size of width (MaskWidth) x height (MaskHeight) smaller than the original image according to the size of the original image, traverses the original image in a left-to-right and top-to-bottom manner, and extracts multiple sub-images of the original image.

[0066] S212: Determine the center pixel point gray value of each sub-image according to the gray value of the pixel point of each sub-image.

[0067] Specifically, in order to facilitate comparison in the step of screening out the target region containing the image to be processed, the bright spot defect detection device represents the gray value of each sub-image by the gray value of the center pixel. The bright spot defect detection device acquires the gray value of each pixel in the sub-image, and then determines the gray value of the center pixel of the sub-image according to the gray value of each pixel. In the same way, the bright spot defect detection device determines the gray value of the center pixel of each sub-image in turn.

[0068] S213: Determine the target sub-image with bright spot defects in the plurality of sub-images according to the gray value of the center pixel of each sub-image. The target sub-image is the image to be processed.

[0069] Specifically, the bright spot defect detection device determines the target sub-image with bright spot defects by comparing the preset criterion with the gray value of the center pixel of each sub-image.

[0070] In this embodiment, the bright spot defect detection device acquires an original image including a plurality of sub-images, determines the gray value of the center pixel of each sub-image according to the gray value of each pixel in the sub-image, and determines the image to be processed with bright spot defects in the plurality of sub-images according to the gray value of the center pixel. The gray value of the sub-image is represented by the gray value of the center pixel, which facilitates comparison of the sub-images and accelerates the screening speed of the target sub-image.

[0071] In one of the embodiments, the determination of the gray value of the center pixel of each sub-image according to the gray value of each pixel in the sub-image includes: taking the average gray value of the pixels in the sub-image as the gray value of the center pixel.

[0072] Specifically, the bright spot defect detection device acquires the gray value of each pixel in the sub-image, obtains the average gray value (GrayMean) of the pixels in the sub-image according to the gray value of each pixel, and determines the average gray value as the gray value of the center pixel of the sub-image. In the same way, the bright spot defect detection device determines the gray value of the center pixel of each sub-image in turn.

[0073] In this embodiment, the bright spot defect detection device takes the average gray value of the sub-image as the gray value of the center pixel according to the gray value of the pixels in the sub-image. In this way, the gray value of the entire sub-image is represented by the virtual gray value of the center pixel, so as to compare the gray value of the center pixel of each sub-image, quickly find the target sub-image, and improve the detection efficiency.

[0074] In one of the embodiments, the determination of the target sub-image with bright spot defects in the plurality of sub-images according to the gray value of the center pixel of each sub-image includes:

[0075] S2131: Determine the gray value standard deviation of each sub-image according to the center pixel gray value of each sub-image, and the gray value standard deviation represents the dispersion degree of the gray value of the pixel points in the sub-image relative to the center pixel gray value.

[0076] Specifically, the bright spot defect detection device determines the gray value standard deviation (GrayDevation) of each sub-image according to the center pixel gray value of each sub-image, and the specific formula is as follows:

[0077] σ = sqrt(((x1-x) 2 +(x2-x) 2 +……(x n -x) 2 ) / n)

[0078] Wherein, σ represents the gray value standard deviation, representing the dispersion degree of the gray value of the pixel points in the sub-image relative to the center pixel gray value. x1……x n represent the gray value of the first pixel point to the nth pixel point in the sub-image, x represents the center pixel gray value, and n represents a positive integer.

[0079] S2132: Determine the target sub-image, i.e. the image to be processed, as the sub-image whose center pixel gray value is greater than or equal to the gray value threshold and whose gray value standard deviation is greater than or equal to the gray value standard deviation threshold.

[0080] Specifically, the bright spot defect detection device screens the sub-images according to the pre-set gray value average threshold (MeanThresh) and gray value standard deviation threshold (DevationThresh). The sub-image whose center pixel gray value is greater than or equal to the gray value average threshold and whose center pixel gray value standard deviation is greater than or equal to the gray value standard deviation threshold is determined as the target sub-image, i.e. the image to be processed.

[0081] In this embodiment, the bright spot defect detection device determines the sub-image whose center pixel gray value is greater than or equal to the gray value threshold and whose gray value standard deviation is greater than or equal to the gray value standard deviation threshold as the image to be processed. That is, the bright spot defect detection device preliminarily selects the sub-image with relatively high brightness and large dispersion degree as the sub-image with bright spot defects. After preliminary screening, the image to be processed with bright spot defects is selected, which narrows the range of target determination and further improves the bright spot defect detection efficiency.

[0082] In one of the embodiments, the target region in the image to be processed is determined according to the pixel point with the maximum gray value in the image to be processed, comprising:

[0083] S221: traversing to find a target pixel point in the eight-neighborhood of the pixel point with the maximum gray value, and traversing to find a target pixel point in the eight-neighborhood of the target pixel point until there is no target pixel point in the eight-neighborhood of the target pixel point; the difference between the gray value of the target pixel point and the gray value of the pixel point with the maximum gray value is within a preset numerical range.

[0084] Specifically, the bright spot defect detection device obtains the width (RegionWidth) and the height (RegionHeight) of the image to be processed, and obtains the position array one (Indices1) of each pixel point in the image to be processed in the order from top to bottom and from left to right, and the gray value (GrayValue) of each pixel point. The bright spot defect detection device sorts the gray values of each pixel point in the image to be processed according to the size of the gray value, and obtains a pixel gray value array with the gray value from high to low. The position of each pixel point in the position array one is corresponded to the sorted pixel gray value array, and the position array two (Indices2) is obtained. The bright spot defect detection device obtains the gray value and the position value of the pixel point with the maximum gray value according to the position array two.

[0085] Specifically, when the bright spot defect detection device traverses to find a target pixel point in the eight-neighborhood of the pixel point with the maximum gray value. According to the internal proximity, the pixel points with the difference between the gray value of the pixel point in the eight-neighborhood and the gray value of the pixel point with the maximum gray value within a preset numerical range are determined as the target pixel points. The target pixel points are traversed in the eight-neighborhood of the target pixel point until there is no target pixel point in the eight-neighborhood of the target pixel point.

[0086] S222: determining the region composed of the pixel point with the maximum gray value and the positions of all the target pixel points found as the target region.

[0087] Specifically, the bright spot defect detection device determines the region composed of the n adjacent target pixel points determined in step S222 and the pixel point with the maximum gray value as the target region.

[0088] In the embodiment, the bright spot defect detection device traverses to find a target pixel point in the eight-neighborhood of the pixel point with the maximum gray value, and traverses to find a target pixel point in the eight-neighborhood of the target pixel point until there is no target pixel point in the eight-neighborhood of the target pixel point; and determines the region composed of the pixel point with the maximum gray value and the positions of all the target pixel points found as the target region. The determination method of the target region is not limited by the shape of the target region, the detection process of the target region is simplified, the method is applicable to any type of target region, and the wide applicability of the target region detection algorithm is increased.

[0089] In one of the embodiments, the bright spot defect detection method further comprises: determining the bright spot defect in the target sub-image based on the at least one target region, comprising:

[0090] S241: determining the number of rows and the number of columns of the pixel points of the target region.

[0091] Specifically, the bright spot defect detection device analyzes the determined target region to determine whether the target region is a bright spot defect. The bright spot defect detection device first determines the number of rows and the number of columns of the target region.

[0092] S242: determining the target region with the number of rows greater than a preset number of rows and / or the number of columns greater than a preset number of columns as a bright spot defect.

[0093] Specifically, the bright spot defect detection device obtains RowDiff and ColumnDiff by taking the difference between the maximum value and the minimum value of the number of rows and the number of columns of the target region, respectively, and determines whether the target region is a bright spot defect according to the set row difference threshold (RowThresh) and column difference threshold (ColumnThresh).

[0094] The determination formula is as follows:

[0095] RowDiff∈[0,RowThresh]

[0096] ColumnDiff∈[0,ColumnThresh]

[0097] The bright spot defect detection device determines the target region with the number of rows greater than a preset number of rows and / or the number of columns greater than a preset number of columns as a bright spot defect.

[0098] In this embodiment, the bright spot defect detection device determines whether the target region is a bright spot defect according to the row difference threshold and the column difference threshold of the target region. This effectively reduces the number of templates used by the bright spot defect detection device when determining whether the target region is a bright spot defect, thereby saving the cost of bright spot defect detection.

[0099] In one embodiment, the bright spot defect detection method comprises the following steps:

[0100] S310: obtaining an image I to be processed.

[0101] After the bright spot defect detection device obtains the image I to be processed, a mask with a size smaller than the image to be processed and a size of MaskWidth x MaskHeight is generated. The mask is traversed through the image I to be processed from left to right and from top to bottom to obtain a plurality of sub-images, as shown in Figure 2 The gray values of the plurality of sub-images are extracted;

[0102] S320: preliminary extraction of target sub-image, specifically including:

[0103] S321: the bright spot defect detection device calculates the average gray value and the average gray value standard deviation of each sub-image, respectively as the gray value (GrayMean) and the gray value standard deviation (GrayDevation) of the center pixel point of the sub-image;

[0104] S322: the bright spot defect detection device performs image extraction according to the set gray mean value threshold (MeanThresh) and the set gray value standard deviation threshold (DevationThresh). The sub-image that meets the conditions "GrayMean≥MeanThresh" and "GrayDevation≥DevationThresh" is determined as the target sub-image, which can be shown as Figure 3

[0105] S330: secondary extraction of each target sub-image to obtain the target region, i.e. the bright core (RegionKernel), including:

[0106] S331: the bright spot defect detection device calculates the position array one (Indices1) of each pixel point in the target sub-image in the order from top to bottom and from left to right;

[0107] S332: the bright spot defect detection device obtains the pixel gray value of the target sub-image, sorts the gray values, obtains a pixel gray value array from high to low, adjusts the position array one (Indices1) corresponding to the gray value array, and obtains the position array two (Indices2);

[0108] S333: the bright spot defect detection device obtains the gray value and position value of the pixel point with the largest gray value according to the position array two, i.e. locates the brightest pixel point, determines the brightest pixel point as the initial bright spot (KernelGrayValue), then calculates the position serial number (KernelNeiborIndice) of the eight neighborhood pixel points according to the position array one (Indices1), and then obtains the eight neighborhood pixel gray values (KernelNeiborGray) according to the position array one (Indices1) and the corresponding pixel gray value (GrayValue).

[0109] S334: the bright spot defect detection device determines whether the pixel points in the eight neighborhood belong to the target region. When the pixel gray values in the neighborhood of the brightest pixel point meet the two conditions of "internal proximity" and "external repulsion", the target pixel point is determined, and the target pixel point is expanded to the target region, which can be shown as Figure 4 ​The white coil-outlined region is the target region. The pixel position serial number and the gray value of each pixel in the target region are set as KernelIndices and KernelGrayValue, respectively.

[0110] S340: determining whether the target region is a bright spot defect, including:

[0111] S341: the bright spot defect detection device sequentially traverses the position serial number KernelIndices of the pixel points in the target region, and calculates the corresponding row number and column number;

[0112] S342: the bright spot defect detection device takes the difference RowDiff and ColumnDiff between the maximum value and the minimum value of the row number and the column number, respectively, and according to the set row difference threshold (RowThresh) and column difference threshold (ColumnThresh), the bright spot defect detection device determines that the target region with a row number greater than a preset row number and / or a column number greater than a preset column number is a bright spot defect. The bright spot defect can be as Figure 5 The black coil-outlined region.

[0113] In one embodiment, as Figure 6 shown, a bright spot defect detection device is provided, including:

[0114] The acquisition module 100 is configured to acquire a to-be-processed image.

[0115] The target region determination module 200 is configured to determine a target region in the to-be-processed image according to a pixel point with the maximum gray value in the to-be-processed image. The difference between the gray value of any pixel point in the target region and the gray value of the pixel point with the gray value greater than the preset threshold is within a preset numerical range.

[0116] The bright spot defect determination module 300 is configured to determine a bright spot defect in the to-be-processed image based on at least one target region.

[0117] In one embodiment, the to-be-processed image is acquired, including:

[0118] The acquisition module is configured to acquire an original image, and the original image includes a plurality of sub-images.

[0119] The center pixel point gray value determination module is configured to determine a center pixel point gray value of each sub-image according to the gray values of the pixel points of the sub-image.

[0120] The to-be-processed image determination module is configured to determine a to-be-processed image with a bright spot defect in the plurality of sub-images according to the center pixel point gray value.

[0121] In one embodiment, the center pixel point gray value of each sub-image is determined according to the gray values of the pixel points of the sub-image, including:

[0122] The center pixel gray value determination module is configured to determine the average gray value of the pixel points in the sub-image as the center pixel gray value.

[0123] In one embodiment, the image to be processed in which the bright spot defect exists in the plurality of sub-images is determined according to the center pixel gray value, including:

[0124] The gray value standard deviation determination module is configured to determine the gray value standard deviation of the sub-image according to the center pixel gray value of the sub-image, the gray value standard deviation representing the dispersion degree of the gray values of the pixel points in the sub-image relative to the center pixel gray value.

[0125] The image to be processed determination module is configured to determine the sub-image in which the center pixel gray value is greater than or equal to the gray value threshold and the gray value standard deviation is greater than or equal to the gray value standard deviation threshold as the image to be processed.

[0126] In one embodiment, the target region in the image to be processed is determined according to the pixel point with the maximum gray value in the image to be processed, including:

[0127] The traversal search module is configured to search for the target pixel points in the eight neighborhoods of the pixel point with the maximum gray value, and search for the target pixel points in the eight neighborhoods of the target pixel points until there is no target pixel point in the eight neighborhoods of the target pixel points; the difference between the gray value of the target pixel point and the gray value of the pixel point with the maximum gray value is within a preset numerical range.

[0128] The target region determination module is configured to determine the region composed of the positions of the pixel point with the maximum gray value and all the target pixel points searched as the target region.

[0129] In one embodiment, the bright spot defect in the target sub-image is determined based on at least one target region, including:

[0130] The row number and column number determination module is configured to determine the row number and column number of the pixel points in the target region.

[0131] The bright spot defect determination module is configured to determine the target region in which the row number is greater than a preset row number and / or the column number is greater than a preset column number as the bright spot defect.

[0132] The specific limitations of the bright spot defect detection device can be referred to the limitations of the bright spot defect detection method in the foregoing, which will not be repeated here. Each module in the bright spot defect detection device described above can be realized by software, hardware and combinations thereof, in whole or in part. The above-mentioned modules can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory in the computer device in software form, so that the processor calls and executes the operations corresponding to each of the above modules. It should be noted that the division of modules in the embodiments of the present application is illustrative, and is only a logical functional division. In actual implementation, there can be another division manner.

[0133] In one of the embodiments, a computer device, which can be a server, is provided, and an internal structure diagram of the computer device can be as shown in Figure 7 The computer device includes a processor, a memory, a network interface and a database connected through a system bus. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The database of the computer device is configured to store periodic task allocation data, such as configuration files, theoretical running parameters and theoretical deviation value ranges, task attribute information, etc. The network interface of the computer device is configured to communicate with an external terminal through a network connection. The computer program is executed by the processor to implement a bright spot defect detection method.

[0134] Those skilled in the art can understand that Figure 7 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different component arrangement.

[0135] In one embodiment, a computer device is provided, including a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the following steps:

[0136] obtaining a to-be-processed image;

[0137] determining a target region in the to-be-processed image according to a pixel point with the maximum gray value in the to-be-processed image, any pixel point in the target region having a gray value difference from the gray value of the pixel point with the maximum gray value within a preset numerical range;

[0138] determining a bright spot defect in the to-be-processed image based on at least one target region.

[0139] In one embodiment, the processor implements, when executing the computer program, acquiring an image to be processed, comprising:

[0140] acquiring an original image, the original image comprising a plurality of sub-images;

[0141] determining a center pixel gray value of each sub-image according to a gray value of a pixel point of the sub-image;

[0142] determining the image to be processed with a highlight defect in the plurality of sub-images according to the center pixel gray value.

[0143] In one embodiment, the processor implements, when executing the computer program, determining a center pixel gray value of each sub-image according to a gray value of a pixel point of the sub-image, comprising:

[0144] taking an average gray value of the pixel points in the sub-image as the center pixel gray value.

[0145] In one embodiment, the processor implements, when executing the computer program, determining the image to be processed with a highlight defect in the plurality of sub-images according to the center pixel gray value, comprising:

[0146] determining a gray value standard deviation of the sub-image according to the center pixel gray value of the sub-image, the gray value standard deviation representing a dispersion degree of the gray values of the pixel points in the sub-image relative to the center pixel gray value;

[0147] determining the sub-image with the center pixel gray value greater than or equal to a gray value threshold and the gray value standard deviation greater than or equal to a gray value standard deviation threshold as the image to be processed.

[0148] In one embodiment, the processor implements, when executing the computer program, determining a target region in the image to be processed according to a pixel point with a maximum gray value in the image to be processed, comprising:

[0149] traversing a target pixel point in an eight-neighbor domain of the pixel point with the maximum gray value, and traversing the target pixel point in the eight-neighbor domain of the target pixel point until there is no target pixel point in the eight-neighbor domain of the target pixel point; the difference between the gray value of the target pixel point and the gray value of the pixel point with the maximum gray value is within a preset numerical range;

[0150] determining a region composed of the position of the pixel point with the maximum gray value and the positions of all the target pixel points found as the target region.

[0151] In one embodiment, the processor implements, when executing the computer program, determining a highlight defect in a target sub-image based on at least one target region, comprising:

[0152] determining the number of rows and columns of the pixel points of the target region;

[0153] The target region with a number of rows greater than the preset number of rows and / or a number of columns greater than the preset number of columns is determined as the bright spot defect.

[0154] In one embodiment, a computer readable storage medium is provided, having stored thereon a computer program, which when executed by a processor implements the following steps:

[0155] Obtaining a to-be-processed image;

[0156] Determining a target region in the to-be-processed image according to a pixel point with a maximum gray value in the to-be-processed image, wherein a difference between a gray value of any pixel point in the target region and the gray value of the pixel point with the maximum gray value is within a preset value range;

[0157] Determining a bright spot defect in the to-be-processed image based on at least one target region.

[0158] In one embodiment, the computer program, when executed by the processor, implements obtaining the to-be-processed image, including:

[0159] Obtaining an original image, the original image including a plurality of sub-images;

[0160] Determining a center pixel point gray value of each sub-image according to a gray value of a pixel point of each sub-image;

[0161] Determining the to-be-processed image in which a bright spot defect exists in the plurality of sub-images according to the center pixel point gray value.

[0162] In one embodiment, the computer program, when executed by the processor, implements determining the center pixel point gray value of each sub-image according to the gray value of the pixel point of each sub-image, including:

[0163] Taking an average gray value of the pixel points in the sub-image as the center pixel point gray value.

[0164] In one embodiment, the computer program, when executed by the processor, implements determining the to-be-processed image in which a bright spot defect exists in the plurality of sub-images according to the center pixel point gray value, including:

[0165] Determining a gray value standard deviation of each sub-image according to the center pixel point gray value of the sub-image, the gray value standard deviation representing a dispersion degree of the gray values of the pixel points in the sub-image relative to the center pixel point gray value;

[0166] Determining the sub-image with the center pixel point gray value greater than or equal to a gray value threshold and the gray value standard deviation greater than or equal to a gray value standard deviation threshold as the to-be-processed image.

[0167] In one embodiment, the computer program, when executed by the processor, implements determining the target region in the to-be-processed image according to the pixel point with the maximum gray value in the to-be-processed image, including:

[0168] traversing to find a target pixel point in the eight-neighbor domain of the pixel point with the maximum gray value, and traversing to find a target pixel point in the eight-neighbor domain of the target pixel point until there is no target pixel point in the eight-neighbor domain of the target pixel point; a difference between the gray value of the target pixel point and the gray value of the pixel point with the maximum gray value is within a preset numerical range;

[0169] determining a region composed of the position of the pixel point with the maximum gray value and all the target pixel points found as a target region.

[0170] In an embodiment, the computer program is executed by a processor to realize determining a bright spot defect in the target sub-image based on at least one target region, comprising:

[0171] determining the number of rows and the number of columns of the pixel points in the target region;

[0172] determining the target region with the number of rows greater than a preset number of rows and / or the number of columns greater than a preset number of columns as a bright spot defect.

[0173] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the above-mentioned embodiments. Any reference to memory, storage, database or other medium used in the embodiments provided by the present application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0174] Any coupling of the technical features of the above embodiments can be performed. In order to make the description simple, not all possible couplings of the technical features in the above embodiments are described, however, as long as the coupling of the technical features does not exist contradictory, it should be considered as the scope of the present application.

[0175] The above embodiments only express several implementation ways of the present application, and the description is more specific and detailed, but it should not be understood as a limitation to the patent scope of the application. It should be pointed out that for ordinary skilled in the art, without departing from the concept of the present application, several modifications and improvements can be made, which are all within the protection scope of the present application. Therefore, the protection scope of the patent of the present application should be subject to the appended claims.

Claims

1. A method of detecting bright spot defects, characterized by, The method comprises the following steps: acquiring a to-be-processed image; traversing to find a target pixel point in the eight-neighbor domain of a pixel point with the maximum gray value in the to-be-processed image, and traversing to find a target pixel point in the eight-neighbor domain of the target pixel point until there is no target pixel point in the eight-neighbor domain of the target pixel point; the difference between the gray value of the target pixel point and the gray value of the pixel point with the maximum gray value is within a preset numerical range; determining a region composed of the positions of the pixel point with the maximum gray value and all the found target pixel points as a target region, and the difference between the gray value of any pixel point in the target region and the gray value of the pixel point with the maximum gray value is within a preset numerical range; determining the bright spot defect in the to-be-processed image based on the pixel point information of the at least one target region.

2. The bright defect detection method of claim 1, wherein, The acquiring of the to-be-processed image comprises the following steps: acquiring an original image, wherein the original image comprises a plurality of sub-images; determining the center pixel point gray value of each sub-image according to the gray value of the pixel point of the sub-image; determining the to-be-processed image in which the bright spot defect exists in a plurality of sub-images according to the center pixel point gray value.

3. The bright defect detection method of claim 2, wherein, The determining of the center pixel point gray value of each sub-image according to the gray value of the pixel point of the sub-image comprises the following steps: taking the average gray value of the pixel point in the sub-image as the center pixel point gray value.

4. The bright defect detection method of claim 3, wherein, The determining of the to-be-processed image in which the bright spot defect exists in a plurality of sub-images according to the center pixel point gray value of the sub-image comprises the following steps: determining the gray value standard deviation of the sub-image according to the center pixel point gray value of the sub-image, wherein the gray value standard deviation represents the discrete degree of the gray value of the pixel point in the sub-image relative to the center pixel point gray value; determining the sub-image in which the center pixel point gray value is greater than or equal to a gray value threshold and the gray value standard deviation is greater than or equal to a gray value standard deviation threshold as the to-be-processed image.

5. The bright defect detection method according to any one of claims 1 to 4, characterized in that, The determining of the bright spot defect in the to-be-processed image based on the pixel point information of the at least one target region comprises the following steps: determining the number of rows and the number of columns of the pixel points of the target region; determining the target region in which the number of rows is greater than a preset number of rows and / or the number of columns is greater than a preset number of columns as an unacceptable bright spot defect.

6. A bright spot defect detection apparatus characterized by comprising: The method comprises the following steps: an acquiring module is configured to acquire a to-be-processed image; a target region determining module is configured to traverse to find a target pixel point in the eight-neighbor domain of a pixel point with the maximum gray value in the to-be-processed image, and traverse to find a target pixel point in the eight-neighbor domain of the target pixel point until there is no target pixel point in the eight-neighbor domain of the target pixel point; the difference between the gray value of the target pixel point and the gray value of the pixel point with the maximum gray value is within a preset numerical range; the target region determining module is further configured to determine a region composed of the positions of the pixel point with the maximum gray value and all the found target pixel points as a target region, and the difference between the gray value of any pixel point in the target region and the gray value of the pixel point with the maximum gray value is within a preset numerical range; A bright spot defect determination module is configured to determine the bright spot defect in the image to be processed based on pixel point information of the at least one target region. 7.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-6 when the computer program is executed by the processor. The computer program is executed by the processor to implement the steps of the method of any one of claims 1 to 5.

8. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method of any one of claims 1 to 5.

Citation Information

Patent Citations

  • Defect detection method and device, equipment and storage medium

    CN114235758A

  • Method and system for processing image

    US20180101951A1