CN118096732B - Display screen light leakage detection method, electronic equipment and storage medium - Google Patents

Display screen light leakage detection method, electronic equipment and storage medium Download PDF

Info

Publication number
CN118096732B
CN118096732B CN202410484274.6A CN202410484274A CN118096732B CN 118096732 B CN118096732 B CN 118096732B CN 202410484274 A CN202410484274 A CN 202410484274A CN 118096732 B CN118096732 B CN 118096732B
Authority
CN
China
Prior art keywords
light leakage
image
pixel
pixel point
display screen
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202410484274.6A
Other languages
Chinese (zh)
Other versions
CN118096732A (en
Inventor
请求不公布姓名
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Gaoshi Technology Suzhou Co ltd
Original Assignee
Gaoshi Technology Suzhou 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 Gaoshi Technology Suzhou Co ltd filed Critical Gaoshi Technology Suzhou Co ltd
Priority to CN202410484274.6A priority Critical patent/CN118096732B/en
Publication of CN118096732A publication Critical patent/CN118096732A/en
Application granted granted Critical
Publication of CN118096732B publication Critical patent/CN118096732B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Analysis (AREA)

Abstract

The application discloses a display screen light leakage detection method, electronic equipment and a storage medium. The method comprises the following steps: extracting a light leakage area detection image in an image to be detected of the display screen; determining a gray average value in each square window area in the light leakage area detection image, and obtaining a gray average value response chart; determining a central line outline frame of the light leakage region in the light leakage region detection image, and extracting pixel points corresponding to the central line outline frame of the light leakage region in the gray level average response chart; determining the minimum gray value of each pixel point in the corresponding preset pixel comparison range, and updating the gray value of each pixel point into a gray difference value between the original gray value and the minimum gray value to obtain a difference response diagram; and determining the position of the light leakage defect in the image to be detected of the display screen based on the difference response diagram. By utilizing the technical scheme of the application, the weak light leakage at the edge of the display screen can be efficiently detected, the detection cost is reduced, and the production quality of the display screen is improved.

Description

Display screen light leakage detection method, electronic equipment and storage medium
Technical Field
The present application relates generally to the field of image processing technology. More particularly, the application relates to a display screen light leakage detection method, electronic equipment and a storage medium.
Background
Edge leakage is a common defect phenomenon of display screens, which is more pronounced especially when displaying dark backgrounds or in dark environments. Light leakage is generally caused by structural features of a display screen, and light scattering may occur at edges or corners of the display screen, because the light scattering is mainly related to a manufacturing process of the display screen, and the corners or edges of the display screen may be subjected to uneven forces during assembly of a panel of the display screen, so that liquid crystal molecules are deformed, thereby causing light leakage. Furthermore, backlight systems of display screens, particularly the edge lighting, may cause scattering of light due to minor design or manufacturing errors. If the light leakage is serious, the normal use of the user is easily affected, and the user is not satisfied.
The existing screen detection method can only detect obvious light leakage, and is difficult to accurately detect the weak light leakage. And the calculation process is complex, the operand is large, and the detection cost is high.
In view of the foregoing, it is desirable to provide a method for detecting light leakage of a display screen, so as to efficiently detect weak light leakage at the edge of the display screen, reduce the detection cost, and improve the production quality of the display screen.
Disclosure of Invention
In order to solve at least one or more of the technical problems mentioned above, the present application provides, in various aspects, a display screen light leakage detection method, an electronic device, and a storage medium. The display screen light leakage detection method can efficiently detect the weak light leakage at the edge of the display screen, reduce the detection cost and improve the production quality of the display screen.
In a first aspect, the present application provides a display screen light leakage detection method, including: acquiring an image to be detected of a display screen; extracting a light leakage detection region in an image to be detected of the display screen to obtain a light leakage region detection image; determining a gray average value in each square window area in the light leakage area detection image, and updating the pixel value of the central pixel point of the square window area to the gray average value to obtain a gray average value response chart; the square window area is a window area with the edge length being larger than or equal to the width of the light leakage detection area and formed by taking a pixel point in the light leakage area detection image as a central pixel point; determining a central line outline frame of the light leakage region in the light leakage region detection image, and extracting pixel points corresponding to the central line outline frame of the light leakage region in the gray level average response chart; determining the minimum gray value of each pixel point in the pixel points corresponding to the line outline frame in the light leakage area within the corresponding preset pixel comparison range based on the preset pixel comparison range and the pixel points corresponding to the line outline frame in the light leakage area, and updating the gray value of each pixel point to be the gray difference value between the original gray value of each pixel point and the corresponding minimum gray value of each pixel point to obtain a difference response diagram; and determining the position of the light leakage defect in the image to be detected of the display screen based on the difference response diagram.
In some embodiments, extracting a light leakage detection region in an image to be detected of a display screen, the obtaining the light leakage region detection image includes: positioning the screen contour of the display screen in the image to be detected of the display screen to obtain a screen contour intersection point; extracting a screen region of interest based on the screen contour intersection points to obtain a screen region image; white is set in the region corresponding to the display screen in the screen region image, and a mask image of the region of interest is obtained; performing shrinking operation on the mask map of the region of interest to obtain a shrinking mask map; performing corrosion operation on the shrink mask map based on a first preset convolution kernel to obtain a midline outline mask map; performing etching operation on the centerline contour mask map based on a second preset convolution kernel to obtain a shrink-in termination mask map; performing difference between the shrinking mask image and the shrinking termination mask image to obtain an edge light leakage detection mask image; and reserving white pixel points in the edge light leakage detection mask image in the screen area image to obtain a light leakage area detection image.
In some embodiments, determining the gray-scale average within each square window region in the light leakage region detection image comprises: filtering the light leakage region detection image through a preset filter check, so that the pixel value of each pixel point in the light leakage region detection image is updated to be the gray value sum in the neighborhood range of the pixel point, and a light leakage detection filter image is obtained; updating the gray value of a white pixel point in the edge light leakage detection mask diagram into a unit gray value; filtering the edge light leakage detection mask image through a preset filter check, so that the pixel value of each pixel point in the edge light leakage detection mask image is updated to be the unit gray sum in the neighborhood range of the pixel point, and a light leakage detection mask filter image is obtained; the size of the preset filter kernel is equal to that of the square window area; and carrying out pixel-by-pixel division processing on the light leakage detection filtering image and the light leakage detection mask filtering image to obtain the gray average value in each square window area in the light leakage area detection image.
In some embodiments, determining the light leakage region centerline contour box in the light leakage region detection image comprises: in the light leakage region detection image, an outer contour frame of the center line contour mask map is determined as a center line contour frame of the light leakage region.
In some embodiments, determining, based on the preset pixel comparison range and the pixel points corresponding to the line outline frame of the light leakage region, a minimum gray value of each of the pixel points corresponding to the line outline frame of the light leakage region within the corresponding preset pixel comparison range includes: constructing an initial pixel point sequence image based on the pixel points corresponding to the line outline frame in the light leakage area; performing pixel point extension on the initial pixel point sequence image based on a preset pixel comparison range to obtain a target pixel point sequence image; and determining the minimum gray value of each pixel point in the target pixel point sequence image within the corresponding preset pixel comparison range based on the target pixel point sequence image.
In some embodiments, the preset pixel comparison range is from the first W pixels of the current pixel to the last W pixels of the current pixel; the pixel point extension of the initial pixel point sequence image based on the preset pixel comparison range comprises the following steps: copying the first W pixel points in the initial pixel point sequence image to the tail end position of the initial pixel point sequence image; copying the last W pixels in the initial pixel sequence image to the beginning position of the initial pixel sequence image.
In some embodiments, determining, based on the target pixel point sequence image, a minimum gray value of each pixel point in the target pixel point sequence image within its corresponding preset pixel comparison range includes: setting a corrosion convolution kernel, wherein the kernel size of the corrosion convolution kernel is (2W+1, 1); and determining the minimum gray value of each pixel point in the target pixel point sequence image within the corresponding preset pixel comparison range through the corrosion convolution kernel, and forming a corrosion pixel point sequence image.
In some embodiments, updating the gray value of each pixel point to be the gray difference between the original gray value of each pixel point and the corresponding minimum gray value, and obtaining the difference response map includes: and carrying out gray level difference processing on the target pixel point sequence image and the corroded pixel point sequence image to obtain a difference response graph.
In a second aspect, the present application provides an electronic device comprising: a processor; and a memory having stored thereon program code for display screen light leak detection, which when executed by the processor, causes the electronic device to implement the method as described above.
In a third aspect, the present application provides a non-transitory machine readable storage medium having stored thereon program code for display screen light leak detection, which when executed by a processor is capable of implementing a method as described above.
The technical scheme provided by the application can comprise the following beneficial effects:
According to the display screen light leakage detection method, the electronic equipment and the storage medium, the light leakage detection area in the display screen to-be-detected image is extracted by acquiring the display screen to-be-detected image, and the light leakage area detection image is obtained, so that calculation can be performed only on the possible light leakage area at the edge of the screen, the calculated amount is reduced, and the rapid positioning of the light leakage defect position is facilitated.
Further, the gray average value in each square window area in the light leakage area detection image can be determined, the pixel value of the central pixel point of the square window area is updated to be the gray average value, and a gray average value response chart is obtained, wherein the square window area is a window area which is formed by taking the pixel point in the light leakage area detection image as the central pixel point and the side length of which is larger than or equal to the width of the light leakage detection area, so that the possible light leakage area at the edge of a screen can be completely covered, and the condition of missing detection is avoided. And determining a central line outline frame of the light leakage area in the light leakage area detection image, extracting pixel points corresponding to the central line outline frame of the light leakage area in the gray level average response image, determining the minimum gray level of each pixel point in the pixel points corresponding to the central line outline frame of the light leakage area in the corresponding preset pixel comparison range based on the preset pixel comparison range and the pixel points corresponding to the central line outline frame of the light leakage area, and updating the gray level of each pixel point to be the gray level difference value between the original gray level of each pixel point and the corresponding minimum gray level of each pixel point to obtain a difference value response image. After the difference operation is performed, the gray value of the pixel point positioned in the non-defect area can be reduced, and the gray value of the pixel point positioned in the defect area is larger than the gray value of the pixel point positioned in the non-defect area, so that the pixel point positioned in the defect area is more obvious in the difference response diagram, the light leakage defect position can be determined in the to-be-detected image of the display screen based on the difference response diagram, the detection of the weak light leakage phenomenon is facilitated, and the detection accuracy of the weak light leakage phenomenon of the display screen is improved.
In general, the application can efficiently detect the weak light leakage at the edge of the display screen, reduce the detection cost and improve the production quality of the display screen.
Drawings
The above, as well as additional purposes, features, and advantages of exemplary embodiments of the present application will become readily apparent from the following detailed description when read in conjunction with the accompanying drawings. In the drawings, embodiments of the application are illustrated by way of example and not by way of limitation, and like reference numerals refer to similar or corresponding parts and in which:
FIG. 1 illustrates an exemplary flow chart of a display screen light leak detection method according to some embodiments of the application;
FIG. 2 is a flow chart illustrating an exemplary method for detecting light leakage of a display screen according to other embodiments of the present application;
FIG. 3 illustrates an exemplary flow chart of a display screen light leak detection method according to still further embodiments of the present application;
fig. 4 shows a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the application. For simplicity and clarity of illustration, where considered appropriate, reference numerals may be repeated among the figures to indicate corresponding or analogous elements. Furthermore, the application has been set forth in numerous specific details in order to provide a thorough understanding of the embodiments described herein. However, it will be understood by those of ordinary skill in the art that the embodiments described herein may be practiced without these specific details. In other instances, well-known methods, procedures, and components have not been described in detail so as not to obscure the embodiments described herein. Moreover, this description should not be taken as limiting the scope of the embodiments described herein. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
It should be understood that the possible terms "first" or "second" and the like in the claims, specification and drawings of the present disclosure are used for distinguishing between different objects and not for describing a particular sequential order. The terms "comprises" and "comprising" when used in the specification and claims of the present application are taken to specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the specification and claims, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should be further understood that the term "and/or" as used in the present specification and claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
As used in this specification and the claims, the term "if" may be interpreted as "when..once" or "in response to a determination" or "in response to detection" depending on the context. Similarly, the phrase "if a determination" or "if a [ described condition or event ] is detected" may be interpreted in the context of meaning "upon determination" or "in response to determination" or "upon detection of a [ described condition or event ]" or "in response to detection of a [ described condition or event ]".
Edge leakage is a common defect phenomenon of display screens, which is more pronounced especially when displaying dark backgrounds or in dark environments. Light leakage is generally caused by structural features of a display screen, and light scattering may occur at edges or corners of the display screen, because the light scattering is mainly related to a manufacturing process of the display screen, and the corners or edges of the display screen may be subjected to uneven forces during assembly of a panel of the display screen, so that liquid crystal molecules are deformed, thereby causing light leakage. Furthermore, backlight systems of display screens, particularly the edge lighting, may cause scattering of light due to minor design or manufacturing errors. If the light leakage is serious, the normal use of the user is easily affected, and the user is not satisfied. The existing screen detection method can only detect obvious light leakage, and is difficult to accurately detect the weak light leakage. And the calculation process is complex, the operand is large, and the detection cost is high.
In view of the foregoing, it is desirable to provide a method for detecting light leakage of a display screen, so as to efficiently detect weak light leakage at the edge of the display screen, reduce the detection cost, and improve the production quality of the display screen.
Specific embodiments of the present application are described in detail below with reference to the accompanying drawings.
In step S101, a display screen to-be-inspected image is acquired. In the embodiment of the present application, the aforementioned image to be detected of the display screen may be an image obtained after the display screen to be detected is photographed by an imaging device such as an industrial camera. It can be understood that the method for acquiring the image to be detected of the display screen can be various, and in practical application, the method for acquiring the image to be detected of the display screen needs to be determined according to practical application conditions, and the application is not limited in this respect.
In step S102, a light leakage detection region in the to-be-detected image of the display screen is extracted, and a light leakage region detection image is obtained. In order to reduce the detection operation amount, in the embodiment of the application, the light leakage detection area of one circle of the edge of the display screen can be extracted from the to-be-detected image of the display screen, so that operation can be performed only on the extracted light leakage area detection image in subsequent detection, and the interference of the main display area of the display screen on detection is avoided. It can be understood that the above light leakage detection area can be regarded as a rectangular frame after extraction, and four frames of the rectangular frame are frames with a certain width, and the width of the frames can be regarded as the width of the light leakage detection area.
In step S103, a gray average value in each square window area in the light leakage area detection image is determined, and a pixel value of a central pixel point of the square window area is updated to be the gray average value, so as to obtain a gray average value response chart. In the embodiment of the application, the square window area is a window area with a side length greater than or equal to the width of the light leakage detection area and formed by taking a pixel point in the light leakage detection image as a central pixel point. It is understood that the number of the square window regions is identical to the number of the pixels in the light leakage region detection image, so that the gray value of each pixel in the light leakage region detection image can be updated. For example, assuming that the gray value of the current pixel is 126 and the gray average value of the pixel in the square window area corresponding to the current pixel is 180, the gray value of the current pixel needs to be updated to 180. And after the gray value of each pixel point in the light leakage area detection image is updated, obtaining a gray average value response chart.
In step S104, a line contour frame of the light leakage region is determined in the light leakage region detection image, and a pixel point corresponding to the line contour frame of the light leakage region is extracted from the gray scale average response chart. In the embodiment of the application, the aforementioned light leakage region center line outline frame is an outline frame formed by four straight lines penetrating through the center line position of the rectangular frame of the light leakage detection region, and the long sides of the light leakage region center line outline frame are parallel to the long sides of the rectangular frame of the light leakage detection region, and the wide sides of the light leakage region center line outline frame are parallel to the wide sides of the rectangular frame of the light leakage detection region, so that the light leakage region center line outline frame is located in the light leakage region detection image.
Further, the pixel points at the corresponding positions of the line outline frame in the light leakage area are extracted from the gray average value response chart, and whether the positions corresponding to the square window area are defect positions or not can be reflected most because the gray values of the pixel points at the corresponding positions of the line outline frame in the light leakage area in the gray average value response chart represent the gray average values corresponding to the case that the square window area covers the rectangular frame width of the light leakage detection area.
In step S105, a minimum gray value of each pixel point in the pixels corresponding to the line outline frame in the light leakage area within the corresponding preset pixel comparison range is determined based on the preset pixel comparison range and the pixels corresponding to the line outline frame in the light leakage area, and the gray value of each pixel point is updated to be the gray difference between the original gray value of each pixel point and the corresponding minimum gray value of each pixel point, so as to obtain a difference response chart. In the embodiment of the present application, the preset pixel comparison range refers to a pixel range formed by a plurality of pixels before and after the current pixel and the current pixel, when the gray value of the current pixel is updated, the minimum gray value needs to be found out in the preset pixel comparison range corresponding to the current pixel, and then the gray value of the current pixel is differenced from the minimum gray value to obtain a gray difference value, and finally the gray value of the current pixel is updated to the gray difference value. It can be understood that if the current pixel is located at the light leakage defect position, the original gray value of the current pixel is larger, and the change is less obvious after the difference from the minimum gray value, whereas if the current pixel is located at the non-light leakage defect position, the original gray value of the current pixel is smaller, and the gray value is smaller or even approaches to 0 after the difference from the minimum gray value. Therefore, the difference of gray values between the pixel points at the light leakage defect position and the pixel points at the non-light leakage defect position can be further pulled through difference operation, and the pixel points at the light leakage defect position can be highlighted, so that the detection of weak light leakage defects is facilitated, and the leakage detection risk is reduced.
In step S106, the position of the light leakage defect is determined in the image to be inspected of the display screen based on the difference response map. In the embodiment of the application, the difference response graph can be segmented in a threshold segmentation mode, the gray value of the pixel point which is larger than or equal to the set threshold value can be updated to 255, and the gray value of the pixel point which is smaller than the set threshold value can be updated to 0, so that the segmentation response graph is obtained. Further, candidate light leakage defect positions with gray values of 255 in the split response map can be screened, the candidate light leakage defect positions with the light leakage defect length larger than the preset length are reserved as final light leakage defect positions, and finally the light leakage defect positions are mapped back to the to-be-detected image of the display screen according to pixel point coordinates.
It will be appreciated that the manner of determining the position of the light leakage defect is various, and in practical application, the manner of determining the position of the light leakage defect needs to be selected according to the practical application, and the present application is not limited in this respect.
According to the embodiment of the application, the light leakage detection area in the display screen to-be-detected image is extracted by acquiring the display screen to-be-detected image, so that the light leakage area detection image is obtained, calculation can be performed only on the possible light leakage area at the edge of the screen, the calculated amount is reduced, and the rapid positioning of the light leakage defect position is facilitated. Further, the gray average value in each square window area in the light leakage area detection image can be determined, the pixel value of the central pixel point of the square window area is updated to be the gray average value, and a gray average value response chart is obtained, wherein the square window area is a window area which is formed by taking the pixel point in the light leakage area detection image as the central pixel point and the side length of which is larger than or equal to the width of the light leakage detection area, so that the possible light leakage area at the edge of a screen can be completely covered, and the condition of missing detection is avoided. And determining a central line outline frame of the light leakage area in the light leakage area detection image, extracting pixel points corresponding to the central line outline frame of the light leakage area in the gray level average response image, determining the minimum gray level of each pixel point in the pixel points corresponding to the central line outline frame of the light leakage area in the corresponding preset pixel comparison range based on the preset pixel comparison range and the pixel points corresponding to the central line outline frame of the light leakage area, and updating the gray level of each pixel point to be the gray level difference value between the original gray level of each pixel point and the corresponding minimum gray level of each pixel point to obtain a difference value response image. After the difference operation is performed, the gray value of the pixel point positioned in the non-defect area can be reduced, and the gray value of the pixel point positioned in the defect area is larger than the gray value of the pixel point positioned in the non-defect area, so that the pixel point positioned in the defect area is more obvious in the difference response diagram, the light leakage defect position can be determined in the to-be-detected image of the display screen based on the difference response diagram, the detection of the weak light leakage phenomenon is facilitated, and the detection accuracy of the weak light leakage phenomenon of the display screen is improved. In general, the application can efficiently detect the weak light leakage at the edge of the display screen, reduce the detection cost and improve the production quality of the display screen.
In some embodiments, a light leakage detection region in an image to be detected of the display screen can be extracted in an image shrinking manner, and a gray average value in each square window region in the light leakage region detection image is determined in a filtering manner by a preset filtering kernel. The extraction process of the light leakage detection region and the determination process of the gray-scale average value within each square window region will be described in detail below with reference to fig. 2. Fig. 2 is a flowchart illustrating an exemplary method for detecting light leakage of a display screen according to other embodiments of the present application, referring to fig. 2, the method for detecting light leakage of a display screen according to an embodiment of the present application may include:
In step S201, a screen contour of a display screen is positioned in an image to be inspected of the display screen to obtain a screen contour intersection point, and a region of interest of the screen is extracted based on the screen contour intersection point to obtain a screen region image. In the embodiment of the application, the screen contour of the display screen, namely four sides of the display screen, can be positioned in the image to be detected of the display screen in an edge detection mode, so that four screen contour intersection points where the four sides intersect are obtained. And affine transformation can be carried out on the to-be-detected image of the display screen through the coordinates of the four screen contour intersection points, so that the interested region of the screen can be extracted, and the screen region image can be obtained.
In step S202, the region corresponding to the display screen is whitened in the screen region image, and the region-of-interest mask map is obtained. In the embodiment of the application, the gray value of the pixel point in the area corresponding to the display screen in the screen area image can be updated to 255, so that the mask map of the region of interest is obtained.
In step S203, the region-of-interest mask map is subjected to a shrink operation, so as to obtain a shrink mask map. In the embodiment of the application, the shrinking operation can be realized by carrying out the etching operation on the mask map of the region of interest through Erode () function, so that the white region in the mask map of the region of interest is reduced, the black region is increased, and the shrinking mask map is obtained. The reason why the shrinking operation is performed to obtain the shrinking mask image is that the outermost edge of some display screens is shiny, which is a normal phenomenon, and therefore, a part of the outermost edge needs to be removed to avoid over inspection. Illustratively, the shrink mask map may be shrunk by 2 pixels relative to the region of interest mask map.
In step S204, the shrink mask map is subjected to etching operation based on the first preset convolution kernel, so as to obtain a centerline contour mask map. In the embodiment of the present application, the foregoing setting manner of the first preset convolution kernel may specifically be that the column coordinate of the left edge of the white area in the shrink mask map is obtainedAnd acquiring the column coordinate/>, of the central position of the preset light leakage defectThe preset light leakage defect center position column coordinate may be a preset value obtained by performing statistical analysis (such as averaging or mode of taking a mode of mode) on the historically detected light leakage defect center position column coordinate. And then set/>Then the size of the first preset convolution kernel may be set to (2n+1 ). After performing etching operation on the shrink mask image by the first preset convolution kernel (the essence of the etching operation is that the gray value of the pixel at the kernel anchor point position (the kernel anchor point positions in the embodiment of the application are all located at the center of the convolution kernel) is replaced by the minimum value within the set size range of the etching kernel), the white area in the shrink mask image is shrunk by N pixels, so as to obtain a midline outline mask image.
In step S205, the centerline contour mask map is subjected to etching operation based on the second preset convolution kernel, resulting in a shrink-back termination mask map. In this embodiment of the present application, further, a second preset convolution kernel is used to perform the etching operation on the centerline contour mask, where the second preset convolution kernel may be set to (2 x (n+1) +1,2 x (n+1) +1), so that after performing the etching operation, the white area in the centerline contour mask will shrink by n+1 pixels, to obtain a shrink termination mask. The shrink termination mask is shrunk by 2n+1 pixels relative to the shrink mask.
In step S206, the shrink mask pattern and the shrink termination mask pattern are subjected to difference, and an edge light leakage detection mask pattern is obtained. It will be appreciated that, after the difference between the shrink mask pattern and the shrink termination mask pattern, the shrink region of 2n+1 pixels of the shrink termination mask pattern with respect to the shrink mask pattern remains as a white region, and the remaining regions become black regions, so that an edge light leakage detection mask pattern having an inner diameter width of 2n+1 can be obtained.
In step S207, white pixel points in the edge leak detection mask image remain in the screen region image, and a leak region detection image is obtained. It will be understood that the pixel points corresponding to the white pixel point (i.e., the pixel point with the gray level of 255) of the edge light leakage detection mask image in the screen area image will remain in the screen area image, and the gray level value of the pixel point corresponding to the black pixel point (i.e., the pixel point with the gray level of 0) of the edge light leakage detection mask image in the screen area image is updated to 0, so as to obtain the light leakage area detection image.
In step S208, a gray average value in each square window area in the light leakage area detection image is determined, and the pixel value of the central pixel point of the square window area is updated to be the gray average value, so as to obtain a gray average value response chart. In the embodiment of the present application, determining the gray average value in each square window area in the detection image of the light leakage area may be performed by: firstly, filtering processing can be performed on the light leakage region detection image through a preset filtering check, so that the pixel value of each pixel point in the light leakage region detection image is updated to be the gray value sum in the neighborhood range of the pixel point, namely, the light leakage region detection image is subjected to mean filtering through the preset filtering check, but normalization processing is not performed, and therefore the light leakage detection filtering image is obtained. In the embodiment of the application, the size of the preset filter kernel is equal to that of the square window area, and the length of the preset filter kernel is greater than or equal to the width 2n+1 of the light leakage detection area, so that the pixel value of each pixel point in the light leakage detection image can be updated to the gray value sum in the neighborhood range of the pixel point by utilizing the preset filter kernel to perform window sliding, and the gray value sum in each square window area in the light leakage detection image can be regarded as determination.
Then, the gray value of the pixel point of the white in the edge light leakage detection mask map may be updated to a unit gray value. The aforementioned unit gradation value may be set to 1. And then filtering the edge light leakage detection mask image through a preset filter check, so that the pixel value of each pixel point in the edge light leakage detection mask image is updated into the unit gray sum (equivalent to the number of non-zero pixel points) in the neighborhood range of the pixel point, namely, the average value filtering is performed on the edge light leakage detection mask image through the preset filter check, but the normalization processing is not performed, and the light leakage detection mask filter image is obtained. Thus, the pixel value of each pixel point in the edge light leakage detection mask image is updated to be the unit gray sum in the neighborhood range of the pixel point by utilizing the preset filter kernel to perform window sliding, which can be regarded as determining the unit gray sum (equivalent to the number of non-zero pixel points) in each square window area in the light leakage area detection image.
Then, as the positions of the pixels of the light leakage detection filtering image and the light leakage detection mask filtering image are in one-to-one correspondence, the light leakage detection filtering image and the light leakage detection mask filtering image can be subjected to pixel-by-pixel division processing one by one to obtain a gray average value in each square window area in the light leakage area detection image, and the pixel value of the central pixel point of the square window area is updated to the gray average value to obtain a gray average response image.
In some embodiments, the determination of the differential response map may be further designed. The determination of the differential response map will be described in detail below in conjunction with fig. 3. Fig. 3 is an exemplary flowchart illustrating a method for detecting light leakage of a display screen according to still other embodiments of the present application, and referring to fig. 3, the method for detecting light leakage of a display screen according to an embodiment of the present application may include:
In step S301, in the light leakage region detection image, the outer contour frame of the center line contour mask map is determined as the center line contour frame of the light leakage region. In the embodiment of the application, the middle line outline mask image is obtained by shrinking N pixels in the white area in the shrinking mask image, and the shrinking end mask image is obtained by shrinking n+1 pixels in the white area in the middle line outline mask image, so that the outer outline frame of the middle line outline mask image (a circle of pixel points on the periphery of the middle line outline mask image) is known to be the middle position of the shrinking distance of the shrinking end mask image relative to the shrinking mask image, namely, the outline frame of the rectangular frame middle line position of the light leakage detection area in the light leakage detection image is detected through the light leakage area. Therefore, the outer contour frame of the centerline contour mask map can be extracted as the centerline contour frame of the light leakage region by the contour edge detection function findContours ().
In step S302, an initial pixel point sequence image is constructed based on the pixels corresponding to the line outline box in the light leakage region. In the embodiment of the present application, it may be assumed that the number of pixels corresponding to the line outline frame in the light leakage area is countN, and then the pixels corresponding to the line outline frame in the light leakage area are placed in an image with row (rows) of 1 and column (cols) of countN, so as to form an initial pixel sequence image.
In step S303, pixel extension is performed on the initial pixel point sequence image based on the preset pixel comparison range, so as to obtain a target pixel point sequence image. Because the pixels on the line outline frame in the light leakage area are in an end-to-end connection state, and the pixels in the initial pixel sequence image are not in end-to-end connection, the pixels at the end-to-end positions cannot be compared in a preset pixel comparison range to obtain the minimum gray value, and therefore the initial pixel sequence image needs to be subjected to pixel extension. In the embodiment of the present application, the preset pixel comparison range may be from the first W pixels of the current pixel to the last W pixels of the current pixel, that is, the number of pixels in the preset pixel comparison range is 2w+1. Further, the first W pixels in the initial pixel sequence image are copied to the end position of the initial pixel sequence image, and the last W pixels in the initial pixel sequence image are copied to the beginning position of the initial pixel sequence image. Thus, the W pixels are ensured to be compared before the pixel located at the beginning of the initial pixel sequence image, and the W pixels are ensured to be compared after the pixel located at the end of the initial pixel sequence image. It will be appreciated that after pixel extension, a sequence of target pixel images with row (rows) of 1 and column (cols) of (countn+2w) is obtained.
In step S304, a minimum gray value of each pixel in the target pixel sequence image within the corresponding preset pixel comparison range is determined based on the target pixel sequence image. In the embodiment of the application, determining the minimum gray value of each pixel in the target pixel sequence image within the corresponding preset pixel comparison range can be regarded as performing the erosion operation of the selected erosion convolution kernel size on the target pixel sequence image, because the essence of the erosion operation in the image processing is that the gray value of the pixel at the kernel anchor point is replaced by the minimum value within the set erosion kernel size range. The corrosion convolution kernel may be set first to have a kernel size of (2w+1, 1). Then, by utilizing Erode () function, determining the minimum gray value of each pixel point in the target pixel point sequence image within the corresponding preset pixel comparison range through the corrosion convolution kernel (the kernel anchor points in the embodiment of the application are all positioned at the center of the convolution kernel), so as to form the corrosion pixel point sequence image.
In step S305, gray scale difference processing is performed on the target pixel point sequence image and the eroded pixel point sequence image, so as to obtain a difference response chart. In the embodiment of the application, the gray difference between the original gray value of each pixel point and the corresponding minimum gray value can be obtained by carrying out gray difference processing on the target pixel point sequence image and the corroded pixel point sequence image. It is understood that after the difference operation, the first W pixels in the initial pixel sequence image added at the end position of the initial pixel sequence image may be deleted, and the last W pixels in the initial pixel sequence image added at the beginning position of the initial pixel sequence image may be deleted, with the remaining row (rows) being 1 and the column (cols) being the difference response map of countN.
Corresponding to the embodiment of the application function implementation method, the application also provides electronic equipment for executing the display screen light leakage detection method and corresponding embodiments.
Fig. 4 is a block diagram illustrating a hardware configuration of an electronic device 400 in which a display screen light leakage detection method according to an embodiment of the present application may be implemented. As shown in fig. 4, electronic device 400 may include a processor 410 and a memory 420. In the electronic apparatus 400 of fig. 4, only constituent elements related to the present embodiment are shown. Thus, it will be apparent to those of ordinary skill in the art that: electronic device 400 may also include common constituent elements that are different from those shown in fig. 4. Such as: a fixed point arithmetic unit.
Electronic device 400 may correspond to a computing device having various processing functions, such as functions for generating a neural network, training or learning a neural network, quantifying a floating point type neural network as a fixed point type neural network, or retraining a neural network. For example, the electronic device 400 may be implemented as various types of devices, such as a Personal Computer (PC), a server device, a mobile device, and so forth.
The processor 410 controls all functions of the electronic device 400. For example, the processor 410 controls all functions of the electronic device 400 by executing programs stored in the memory 420 on the electronic device 400. The processor 410 may be implemented by a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), an Application Processor (AP), an artificial intelligence processor chip (IPU), etc. provided in the electronic device 400. However, the present application is not limited thereto.
In some embodiments, processor 410 may include an input/output (I/O) unit 411 and a computing unit 412. The I/O unit 411 may be used to receive various data, such as a display screen to-be-inspected image. Illustratively, the computing unit 412 may be configured to extract a light leakage detection region in the display screen to-be-detected image received via the I/O unit 411, to obtain a light leakage region detection image; further determining a gray average value in each square window area in the light leakage area detection image, and updating the pixel value of the central pixel point of the square window area to the gray average value to obtain a gray average value response chart; determining a central line outline frame of the light leakage region in the light leakage region detection image, and extracting pixel points corresponding to the central line outline frame of the light leakage region in the gray level average value response image; determining the minimum gray value of each pixel point in the pixel points corresponding to the line outline frame in the light leakage area within the corresponding preset pixel comparison range based on the preset pixel comparison range and the pixel points corresponding to the line outline frame in the light leakage area, and updating the gray value of each pixel point to be the gray difference value between the original gray value of each pixel point and the corresponding minimum gray value of each pixel point to obtain a difference response diagram; and determining the position of the light leakage defect in the to-be-detected image of the display screen based on the difference response diagram. This light leakage defect location may be output by the I/O unit 411, for example. The output data may be provided to memory 420 for reading by other devices (not shown) or may be provided directly to other devices for use.
The memory 420 is hardware for storing various data processed in the electronic device 400. For example, the memory 420 may store processed data and data to be processed in the electronic device 400. The memory 420 may store data sets involved in the display screen light leak detection method process that the processor 410 has processed or is to process, e.g., display screen images to be detected, etc. Further, the memory 420 may store applications, drivers, etc. to be driven by the electronic device 400. For example: the memory 420 may store various programs related to the display screen light leakage detection method to be executed by the processor 410. The memory 420 may be a DRAM, but the present application is not limited thereto. The memory 420 may include at least one of volatile memory or nonvolatile memory. The nonvolatile memory may include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), flash memory, phase change RAM (PRAM), magnetic RAM (MRAM), resistive RAM (RRAM), ferroelectric RAM (FRAM), and the like. Volatile memory can include Dynamic RAM (DRAM), static RAM (SRAM), synchronous DRAM (SDRAM), PRAM, MRAM, RRAM, ferroelectric RAM (FeRAM), and the like. In an embodiment, the memory 420 may include at least one of a Hard Disk Drive (HDD), a Solid State Drive (SSD), a high density flash memory (CF), a Secure Digital (SD) card, a Micro-secure digital (Micro-SD) card, a Mini-secure digital (Mini-SD) card, an extreme digital (xD) card, a cache (caches), or a memory stick.
In summary, specific functions implemented by the memory 420 and the processor 410 of the electronic device 400 provided in the embodiments of the present disclosure may be explained in comparison with the foregoing embodiments in the present disclosure, and may achieve the technical effects of the foregoing embodiments, which will not be repeated herein.
In this embodiment, the processor 410 may be implemented in any suitable manner. For example, the processor 410 may take the form of, for example, a microprocessor or processor, as well as computer-readable media, logic gates, switches, application SPECIFIC INTEGRATED Circuits (ASICs), programmable logic controllers, and embedded microcontrollers, etc., which store computer-readable program code (e.g., software or firmware) executable by the (micro) processor.
It should also be appreciated that any of the modules, units, components, servers, computers, terminals, or devices illustrated herein that execute instructions may include or otherwise access a computer readable medium, such as a storage medium, computer storage medium, or data storage device (removable) and/or non-removable) such as a magnetic disk, optical disk, or magnetic tape. Computer storage media may include volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data.
While various embodiments of the present application have been shown and described herein, it will be obvious to those skilled in the art that such embodiments are provided by way of example only. Numerous modifications, changes, and substitutions will occur to those skilled in the art without departing from the spirit and scope of the application. It should be understood that various alternatives to the embodiments of the application described herein may be employed in practicing the application. The appended claims are intended to define the scope of the application and are therefore to cover all equivalents or alternatives falling within the scope of these claims.

Claims (10)

1. The display screen light leakage detection method is characterized by comprising the following steps of:
Acquiring an image to be detected of a display screen;
Extracting a light leakage detection region in the to-be-detected image of the display screen to obtain a light leakage region detection image;
Determining a gray average value in each square window area in the light leakage area detection image, and updating a pixel value of a central pixel point of the square window area to the gray average value to obtain a gray average value response chart; the square window area is a window area with the side length being larger than or equal to the width of the light leakage detection area and formed by taking a pixel point in the light leakage detection image as a central pixel point;
Determining a light leakage area central line outline frame in the light leakage area detection image, and extracting pixel points corresponding to the light leakage area central line outline frame in the gray level average value response image;
Determining the minimum gray value of each pixel point in the pixel points corresponding to the line outline frame in the light leakage area within the corresponding preset pixel comparison range based on the preset pixel comparison range and the pixel points corresponding to the line outline frame in the light leakage area, and updating the gray value of each pixel point to be the gray difference value between the original gray value of each pixel point and the corresponding minimum gray value of each pixel point to obtain a difference response diagram;
And determining the position of the light leakage defect in the image to be detected of the display screen based on the difference response graph.
2. The method for detecting light leakage of a display screen according to claim 1, wherein the extracting the light leakage detection region in the image to be detected of the display screen to obtain the light leakage region detection image comprises:
positioning the screen contour of the display screen in the image to be detected of the display screen to obtain a screen contour intersection point;
Extracting a screen region of interest based on the screen contour intersection points to obtain a screen region image;
White the region corresponding to the display screen in the screen region image to obtain a mask image of the region of interest;
Performing shrinking operation on the mask map of the region of interest to obtain a shrinking mask map;
performing corrosion operation on the shrink mask map based on a first preset convolution kernel to obtain a midline outline mask map;
performing corrosion operation on the midline outline mask map based on a second preset convolution kernel to obtain a shrink-in termination mask map;
Performing difference between the shrinking mask image and the shrinking termination mask image to obtain an edge light leakage detection mask image;
and reserving white pixel points in the edge light leakage detection mask image in the screen region image to obtain the light leakage region detection image.
3. The method of claim 2, wherein determining the gray scale average value in each square window region in the light leakage region detection image comprises:
Filtering the light leakage region detection image through a preset filter check, so that the pixel value of each pixel point in the light leakage region detection image is updated to be the gray value sum in the neighborhood range of the pixel point, and a light leakage detection filter image is obtained;
Updating the gray value of the white pixel point in the edge light leakage detection mask map into a unit gray value;
Filtering the edge light leakage detection mask image through the preset filter check to update the pixel value of each pixel point in the edge light leakage detection mask image to be the unit gray sum in the neighborhood range of the pixel point to obtain a light leakage detection mask filter image;
the size of the preset filter kernel is equal to that of the square window area;
And dividing the light leakage detection filter image and the light leakage detection mask filter image by pixel points one by one to obtain the gray average value in each square window area in the light leakage area detection image.
4. The method according to claim 2, wherein determining a line outline box in the light leakage region detection image comprises:
and in the light leakage area detection image, determining an outer contour frame of the central line contour mask map as the central line contour frame of the light leakage area.
5. The method according to claim 1, wherein determining, based on the preset pixel comparison range and the pixel points corresponding to the line outline frame in the light leakage area, a minimum gray value of each pixel point in the pixel points corresponding to the line outline frame in the light leakage area within the preset pixel comparison range includes:
constructing an initial pixel point sequence image based on the pixel points corresponding to the line outline frame in the light leakage area;
performing pixel point extension on the initial pixel point sequence image based on the preset pixel comparison range to obtain a target pixel point sequence image;
And determining the minimum gray value of each pixel point in the target pixel point sequence image within the corresponding preset pixel comparison range based on the target pixel point sequence image.
6. The method for detecting light leakage of a display screen according to claim 5, wherein the preset pixel comparison range is from the first W pixels of the current pixel to the last W pixels of the current pixel; the pixel extending of the initial pixel sequence image based on the preset pixel comparison range comprises the following steps:
Copying the first W pixel points in the initial pixel point sequence image to the tail end position of the initial pixel point sequence image;
Copying the last W pixel points in the initial pixel point sequence image to the beginning position of the initial pixel point sequence image.
7. The method of claim 6, wherein determining, based on the target pixel sequence image, a minimum gray value of each pixel in the target pixel sequence image within a corresponding preset pixel comparison range comprises:
setting a corrosion convolution kernel, wherein the kernel size of the corrosion convolution kernel is (2W+1, 1);
and determining the minimum gray value of each pixel point in the target pixel point sequence image within the corresponding preset pixel comparison range through the corrosion convolution kernel, and forming a corrosion pixel point sequence image.
8. The method of claim 7, wherein updating the gray value of each pixel to the gray difference between the original gray value of each pixel and the corresponding minimum gray value of each pixel, and obtaining the difference response map comprises:
and carrying out gray level difference processing on the target pixel point sequence image and the corroded pixel point sequence image to obtain the difference response graph.
9. An electronic device, comprising:
A processor; and
A memory having stored thereon program code for display screen light leak detection, which when executed by the processor, causes the electronic device to implement the method of any of claims 1-8.
10. A non-transitory machine readable storage medium having stored thereon program code for display screen light leak detection, which when executed by a processor, causes the method of any of claims 1-8 to be implemented.
CN202410484274.6A 2024-04-22 2024-04-22 Display screen light leakage detection method, electronic equipment and storage medium Active CN118096732B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410484274.6A CN118096732B (en) 2024-04-22 2024-04-22 Display screen light leakage detection method, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410484274.6A CN118096732B (en) 2024-04-22 2024-04-22 Display screen light leakage detection method, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN118096732A CN118096732A (en) 2024-05-28
CN118096732B true CN118096732B (en) 2024-06-21

Family

ID=91150054

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410484274.6A Active CN118096732B (en) 2024-04-22 2024-04-22 Display screen light leakage detection method, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN118096732B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111627009A (en) * 2020-05-27 2020-09-04 歌尔股份有限公司 Screen detection method and device and head-mounted display equipment
CN113008524A (en) * 2019-12-20 2021-06-22 合肥欣奕华智能机器有限公司 Screen light leakage detection method and device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111815630B (en) * 2020-08-28 2020-12-15 歌尔股份有限公司 Defect detection method and device for LCD screen
CN114235758A (en) * 2021-12-10 2022-03-25 苏州凌云视界智能设备有限责任公司 Defect detection method, device, equipment and storage medium
CN117351011B (en) * 2023-12-04 2024-03-12 歌尔股份有限公司 Screen defect detection method, apparatus, and readable storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113008524A (en) * 2019-12-20 2021-06-22 合肥欣奕华智能机器有限公司 Screen light leakage detection method and device
CN111627009A (en) * 2020-05-27 2020-09-04 歌尔股份有限公司 Screen detection method and device and head-mounted display equipment

Also Published As

Publication number Publication date
CN118096732A (en) 2024-05-28

Similar Documents

Publication Publication Date Title
CN111340752A (en) Screen detection method and device, electronic equipment and computer readable storage medium
JP4657869B2 (en) Defect detection apparatus, image sensor device, image sensor module, image processing apparatus, digital image quality tester, defect detection method, defect detection program, and computer-readable recording medium
CN108960229B (en) Multidirectional character detection method and device
CN113870293B (en) Image processing method, image processing device, electronic equipment and storage medium
CN111539238B (en) Two-dimensional code image restoration method and device, computer equipment and storage medium
CN113469921B (en) Image defect repairing method, system, computer device and storage medium
CN110415237B (en) Skin flaw detection method, skin flaw detection device, terminal device and readable storage medium
CN112669301B (en) High-speed rail bottom plate paint removal fault detection method
CN114519714B (en) Method and system for judging smudgy defect of display screen
JP2021165888A (en) Information processing apparatus, information processing method of information processing apparatus, and program
CN114723677A (en) Image defect detection method, image defect detection device, image defect detection equipment and storage medium
CN116128849A (en) Method, device, equipment and storage medium for detecting underwater cracks of concrete dam
CN114674826A (en) Visual detection method and detection system based on cloth
CN118096732B (en) Display screen light leakage detection method, electronic equipment and storage medium
CN115345895B (en) Image segmentation method and device for visual detection, computer equipment and medium
CN116403114A (en) Remote sensing image target recognition method and system based on deep learning
CN111160358B (en) Image binarization method, device, equipment and medium
CN116343251A (en) Building drawing identification method and system based on AI building identification chart
CN116012322A (en) Camera dirt detection method, device, equipment and medium
CN115527023A (en) Image detection method, image detection device, electronic equipment and storage medium
WO2022143261A1 (en) Grid map quality evaluation method and apparatus, computer device, and storage medium
CN111818557B (en) Network coverage problem identification method, device and system
CN114648520A (en) Method, system, electronic device and storage medium for detecting track defects
CN116500042B (en) Defect detection method, device, system and storage medium
US20240020846A1 (en) Corner point detection method and apparatus

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant