Method, device, and storage medium for positioning dead pixels of a liquid crystal screen based on rule restrictions
Through the method of positioning the bad points of the LCD screen based on rule limitations, and using the propensity score matching algorithm and rule limitation algorithm, the problems of low detection accuracy and high error judgment rate of the bad points of the LCD screen in the prior art are solved, and high-precision detection and accurate determination of the bad points of the sub-pixel level are achieved.
Patent Information
- Application Number
- CN202411107524.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-13
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2044-08-13
AI Technical Summary
The existing LCD screen bad point detection methods have problems such as low accuracy, easy to misjudgment of the size and number of bad points, and almost impossible to detect sub-pixel-level defects.
The method of locating the bad points of the LCD screen based on rule limitations is adopted, and the set of candidate points of the bad points is obtained using the propensity score matching algorithm, and the screen pixel where each candidate point is located is based on rule limitations can be detected. The number and area of the bad points can be accurately determined.
It realizes high-precision detection of the broken points of the LCD screen, can accurately distinguish independent and continuous broken points, avoid misjudgment and misjudgment, and has good detection stability and accuracy.
Smart Images

Figure CN118762624B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of liquid crystal display screen detection, and particularly relates to a method, device, and storage medium for positioning dead pixels of a liquid crystal display screen based on rule constraints. Background Art
[0002] Liquid crystal display screens are widely used in fields such as laptop computers, desktop monitors, liquid crystal televisions, and various mobile display terminals. Dead pixels on a liquid crystal screen are a common defect of liquid crystal screens and can seriously affect the customer experience. Therefore, detecting screen point defects during the production process is an important process. Currently, manual inspection is mainly used in the industry to detect dead pixels of liquid crystal screens. However, manual inspection has problems such as low efficiency, easy omission of inspections, high dependence on the experience of inspectors, and long-term observation of the lit liquid crystal screen can damage the eye health of inspectors.
[0003] Existing automatic methods for detecting screen dead pixels use Gabor filters to remove periodic textures in the imaging of liquid crystal screens and retain the defective areas. However, the frequency and angle of Gabor filters need to be customized, making it difficult to adapt to various screen sizes in the production line. There are also some detection methods that use multiple opening and closing operations to remove texture interference in the imaging and highlight the defective areas, but this method has low detection accuracy and can hardly detect sub-pixel-level defects.
[0004] A relatively mature automatic detection method uses PSM (Pixel Singularity Method) to remove periodic textures in the imaging, generates a defective binary map based on a threshold, and then uses a contour detection operator to determine whether the detected defect is a point defect. The PSM method can detect independent pixel defects, but there will be misjudgments when adjacent dead pixels appear; especially for continuous point defects, it is easy to misjudge; and due to the existence of camera calibration errors and magnification errors, the positioning of dead pixels is not accurate enough to accurately locate the pixel where the defect is located, resulting in errors in the evaluation of the size and number of dead pixels. In addition, the parameter settings of filters in the prior art need to be determined through a large number of tests, and the effect is not stable enough. Summary of the Invention
[0005] The present invention overcomes the deficiencies of the prior art and provides a method, device, and storage medium for positioning dead pixels of a liquid crystal display screen based on rule constraints. The propensity score matching algorithm is used to obtain a candidate point set of dead pixels, and the screen pixels where each candidate point is located are positioned based on rule constraints; it can detect sub-pixel-level dead pixels and can determine the number and area of dead pixels, having good detection stability and accuracy.
[0006] To achieve the above object, the technical solution adopted by the present invention is: A method for positioning dead pixels of a liquid crystal display screen based on rule constraints, comprising the following steps:
[0007] Step 1: Use an area array camera to collect images of the lit LCD screen to be detected, determine the magnification of the camera resolution according to the resolution of the LCD screen to be detected, and update the images of the lit LCD screen to be detected collected by the area array camera.
[0008] Step 2: The images of the LCD screen to be detected collected by the area array camera include the screen edge of the LCD screen to be detected and the background workbench carrying the LCD screen to be detected; convert the coordinate system of the area to be detected through a calibration matrix and remove radial and tangential distortions; the calibration matrix refers to the transformation relationship matrix between the world coordinate system and the image pixel coordinate system.
[0009] Step 3: Use a pixel singularity algorithm to detect defects.
[0010] Step 4: Based on the detected defects, locate the pixels where the defect points are located based on rules.
[0011] Step 5: Distinguish the pixels to which consecutive adjacent defective points belong through the saved pixel coordinates.
[0012] Step 6: Screen defective pixels based on a set area value, where the set area value is the number of times each saved pixel coordinate appears in Step 5, representing the size of each display defect point in the camera imaging.
[0013] Step 7: Divide the X-axis and Y-axis coordinate values of the saved pixel coordinates by the magnification factor MR and map them to the LCD screen coordinate system.
[0014] Step 8: Output the final defect point detection result.
[0015] In a preferred embodiment of the present invention, the calculation steps of the calibration matrix include:
[0016] Step a: Obtain a standard grid map displayed on the LCD screen, where the standard grid map contains N standard and clear reference positioning points, N≥4.
[0017] Step b: The camera takes pictures of the LCD screen to obtain images of the LCD screen.
[0018] Step c: One-to-one correspond the reference positioning points of the standard grid map with the reference positioning points in the images of the LCD screen collected by the camera.
[0019] Step d: Use the homography relationship projection mapping of the plane. The homography relationship of the plane is a projection mapping from one plane to another plane. The homography relationship projection mapping formula is:
[0020] ;
[0021] Among them, q represents the coordinates of the reference positioning point in the imaging plane coordinate system, s represents the mapping scaling factor, Q represents the coordinates of the reference positioning point in the world coordinate system, H represents the homography matrix, and it is the calibration matrix to be solved.
[0022] In a preferred embodiment of the present invention, in step 1, the resolution of the area array camera is greater than the resolution of the liquid crystal display screen to be detected, and multiple pixels of the image collected by the area array camera correspond to a single pixel of the liquid crystal display screen to be detected.
[0023] Specifically, in step 1, in the test environment of the present invention, two area array cameras with a resolution of 14208×10640 are used to collect images of the left and right sides of the liquid crystal display screen respectively. The resolution magnification rate (Magnificationrate, MR) is determined. Since the resolution of the area array camera is greater than the resolution of the liquid crystal display screen to be detected, multiple pixels of the image collected by the camera correspond to a single pixel of the screen, and the detection accuracy can reach the sub-pixel level. For example, when using a camera with a row resolution of 10640 to photograph a screen with a row resolution of 1440, by calculating 10640÷1440≈7.4>7, it is known that the maximum integer MR of the camera photographing the screen is 7.
[0024] In a preferred embodiment of the present invention, in step 2, pixels outside the area to be detected of the obtained liquid crystal display screen to be detected are removed by cropping, and the remaining image resolution is the product of the resolution of the area to be detected of the liquid crystal display screen to be detected and the resolution magnification rate.
[0025] Specifically, in step 2, pixels outside the area to be detected are removed by cropping, and the finally remaining image resolution is the product of the resolution of the area to be detected of the liquid crystal display screen and the resolution magnification rate. As Figure 2 shown, the test environment sets the detection area to be half of the horizontal direction of a 2560×1440 liquid crystal display screen, that is, 1290 (including 10 pixels at the overlapping junction)×1440, and the calibrated image resolution is 9030×10080.
[0026] Specifically, in step 3, the resolution of the color liquid crystal display screen represents the number of pixels of the display screen, and a pixel is the smallest unit of the picture display. Each pixel is composed of three colors: red (R), green (G), and blue (B). When one or two of R, G, and B are constantly on or constantly off, sub-pixel-level defects occur.
[0027] Specifically, in step 5, the detection accuracy of the defective points is accurate to the sub-pixel level.
[0028] In a preferred embodiment of the present invention, step 4 further includes the following steps:
[0029] Name the digital image matrix of the original image in the detection area as Original, where Original is a variable name representing the original image in the detection area;
[0030] Add a boundary of MR pixels with an n-fold magnification ratio to Original, and the pixels of the boundary are copied from the MR pixels with an n-fold magnification ratio of the corresponding boundary; n is a non-zero natural number;
[0031] Assign 0 to the four corners in the image after Original adds the boundary;
[0032] Name the region matrix of Original in the image after adding the boundary as Center, and translate the Center region n times MR pixels in the up, down, left, and right directions respectively to obtain the matrix Up after upward translation, the matrix Down after downward translation, the matrix Left after leftward translation, and the matrix Right after rightward translation;
[0033] Use several matrices to subtract from the Center matrix respectively to obtain several result matrices, and the several result matrices include Up - Center, Down - Center, Left - Center, Right - Center;
[0034] The algorithm for obtaining the binary matrix of screen defects includes:
[0035] ;
[0036] ;
[0037] Among them, represents the binary matrix of bright defects, represents the binary matrix of dark defects, represents the binary threshold segmentation for bright defect detection, represents the binary threshold segmentation for dark defect detection; Min represents taking the smaller value of the elements with the same index in the two matrices, and Max represents taking the larger value of the elements with the same index in the two matrices.
[0038] In a preferred embodiment of the present invention, in step 4, n is 2, and 2×MR pixels are added to each of the 4 boundaries in the up, down, left, and right directions; assign 0 to the 4 corners in the image after adding the boundary in the initial command, and the area of each corner is 4×MR×MR pixels;
[0039] Translate the Center region 2 times MR pixels in the up, down, left, and right directions respectively;
[0040] Four matrices are used to subtract from the Center matrix respectively to obtain four result matrices, which include Up-Center, Down-Center, Left-Center, and Right-Center.
[0041] Specifically, in step 4, when MR is 7, for an image with a size of 9030×10080, after adding the border, the size becomes 9044×10094. The increased pixel values are equal to the corresponding values of 2×MR pixels of the Original border.
[0042] In a preferred embodiment of the present invention, step 5 includes the following steps;
[0043] Step 5.1, set the pixel limit rule based on the magnification ratio MR; take a picture of the liquid crystal screen to be detected through an area array camera, observe the imaging after single-pixel magnification, and the pixel value distribution of the pixel imaging is related to the distribution of electrical components;
[0044] When the screen is lit, the center of a single pixel of the liquid crystal screen to be detected is a luminous component, and the surrounding is non-luminous components;
[0045] The pixel imaging matrix should show that the gray value in the middle area of the matrix is greater than that in the border area, and there is a gradual change process;
[0046] By circularly comparing the gray value sizes of adjacent elements, the limit rules under different MRs and different lighting modes can be obtained;
[0047] Set limit rule one as that the horizontal and vertical pixel values increase pixel by pixel from the corners to the center within the 1 / 2 interval, and rule two as that the point with the minimum gray value in the single-pixel imaging is at the four corners and the point with the maximum gray value is within the middle 3×3 range;
[0048] In step 5.2, after determining the pixel rule, initialize an empty list L to record the starting points of single pixels; initialize another empty list N to record the occurrence times of different starting points;
[0049] Step 5.3, iterate the non-zero point coordinates in the defect binary matrix or Set the current non-zero point coordinate as P0(x,y);
[0050] In step 5.4, judge whether the gray value distribution of the pixels in the MR×MR size matrix with P0 as the upper left corner point satisfies the limit rule. If it is satisfied, add the coordinates of P0 to L, add 1 to the occurrence times of P0, and add 1 to the saved value of the corresponding index bit of P0 in N;
[0051] If P0 does not meet the limit condition, modify the coordinates of P0 to P1 according to the outward expanding circular algorithm;
[0052] Step 5.6, continue to determine whether P1 has appeared in L. If it has appeared, increment the occurrence count of the coordinates of P1 by 1. If it has not appeared, add P1 to L and set the occurrence count of the coordinates of P1 to 1;
[0053] Step 5.7, return to Step 5.3 until all non-zero point coordinates in or are traversed;
[0054] Step 5.8, at this time, L stores the pixel origin coordinates of all bad points, and N has recorded the number of bad points in this pixel. The number of bad points is the bad area in the corresponding pixel.
[0055] In a preferred embodiment of the present invention, the outward expansion ring algorithm includes the following steps:
[0056] Step 5.5.1, initialize the offset offsetX = 0, offsetY = 0, and the direction vector V = (0, 0);
[0057] Step 5.5.2, initialize the coordinates of P1 as (x + offsetX, y + offsetY), where x is the abscissa of point P0 and y is the ordinate of point P0;
[0058] Step 5.5.3, when offsetX = offsetY and offsetX >= 0, modify the direction vector downward, V = (0, 1);
[0059] Step 5.5.4, when offsetX + 1 = offsetY and offsetX >= 0, modify the direction vector to the left, V = (-1, 0);
[0060] Step 5.5.5, when offsetX = -offsetY, offsetX < 0, and offsetY > 0, modify the direction vector upward, V = (0, -1);
[0061] Step 5.5.6, when offsetX = offsetY and offsetX < 0, modify the direction vector to the right, V = (1, 0);
[0062] Step 5.5.7, if offsetX and offsetY do not meet the restrictions of (5-5-3)-(5-5-6), keep the direction vector V unchanged;
[0063] Step 5.5.8, update (offsetX, offsetY) = (offsetX, offsetY) + V;
[0064] Step 5.5.9, if offsetX + 1 + MR is greater than the number of columns of the image or offsetX is less than 0, and or there are still unvisited points in , then keep the updated offsetX and offsetY and return to Step 5.5.2;
[0065] Step 5.5.10, if offsetY + 1 + MR is greater than the number of rows of the image or offsetY is less than 0, and or there are still unvisited points in , then keep the updated offsetX and offsetY and return to Step 5.5.2;
[0066] Step 5.5.11, re - execute the steps of Step 5.5.2 until (x + offsetX, y + offsetY) meets the restriction rules, then set P0 = P1.
[0067] In a preferred embodiment of the present invention, a positioning device for accurately positioning dead pixels of a liquid crystal display based on rule restrictions includes:
[0068] A memory;
[0069] A processor;
[0070] And
[0071] A computer program;
[0072] Wherein, the computer program is stored in the memory and is configured to be executed by the processor to implement a method for positioning dead pixels of a liquid crystal display based on rule restrictions.
[0073] In a preferred embodiment of the present invention, a storage medium stores a computer program, and when the computer program is executed by a processor, it implements a method for positioning dead pixels of a liquid crystal display based on rule restrictions.
[0074] The present invention solves the defects in the technical background, and the beneficial technical effects of the present invention are:
[0075] A method, device, and storage medium for positioning dead pixels of a liquid crystal display based on rule restrictions according to the present invention use the PSM algorithm to obtain a candidate point set of dead pixels and position the screen pixels where each candidate point is located based on rule restrictions; it can detect dead pixels at the sub - pixel level, and can determine the number and area of dead pixels, having good detection stability and accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0076] The present invention will be further described below with reference to the drawings and embodiments.
[0077] Figure 1 is the system flow chart of the preferred embodiment of the present invention;
[0078] Figure 2 are images acquired by the camera in the preferred embodiment of the present invention;
[0079] Figure 3 are the calibrated and cropped images in the preferred embodiment of the present invention;
[0080] Figure 4 is a schematic diagram of pixel translation of the image matrix in the preferred embodiment of the present invention;
[0081] Figure 5 is a schematic diagram of the difference between the translation matrix and the Center matrix in the preferred embodiment of the present invention;
[0082] Figure 6 is a schematic diagram of the imaging of a single pixel on the liquid crystal screen when MR = 7 in the preferred embodiment of the present invention;
[0083] Figure 7 is a schematic diagram of the imaging of a single pixel on the liquid crystal screen when MR = 5 in the preferred embodiment of the present invention;
[0084] Figure 8 is a schematic diagram of the external extended ring calculation method in the preferred embodiment of the present invention;
[0085] Figure 9 is a schematic diagram of the imaging of different point defects in the preferred embodiment of the present invention (wherein, columns a - c respectively represent the imaging of different point defects, the first row is the original image, the second row is the output of the detection result of the present invention, and the third row is the detection result of the PSM algorithm without using rule restrictions). Detailed implementation manners
[0086] Now, the present invention will be further described in detail with reference to the accompanying drawings and embodiments. These drawings are all simplified schematic diagrams, only illustrating the basic structure of the present invention in a schematic way, so they only show the components related to the present invention.
[0087] It should be noted that if there are directional indications (such as up, down, bottom, top, etc.) involved in the embodiments of the present invention, then such directional indications are only used to explain the relative positional relationship, movement conditions, etc. between components in a certain specific posture. If this specific posture changes, then the directional indication also changes accordingly. The terms "first" and "second" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of such features. Unless otherwise clearly specified and limited, the terms "set", "connected", and "connected to" should be understood in a broad sense. For example, it may be a fixed connection, a detachable connection, or an integral connection; it may be directly connected or indirectly connected through an intermediate medium, and it may be the communication inside two components. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0088] There are problems in the existing liquid crystal screen dead pixel detection with low accuracy and easy misjudgment of size and number. The present invention proposes a high-precision liquid crystal screen dead pixel detection method based on rule constraints. This method uses the propensity score matching algorithm (PSM algorithm) to obtain a candidate point set of dead pixels and locates the screen pixels where each candidate point is located based on rule constraints. This method can detect dead pixels at the sub-pixel level and accurately determine the number and area of dead pixels. Embodiment 1
[0089] As Figures 1-9 shown, a method for locating dead pixels of a liquid crystal screen based on rule constraints includes the following steps:
[0090] Step 1, use an area array camera to collect an image of the lit liquid crystal screen to be detected, and determine the magnification ratio of the camera resolution according to the resolution of the liquid crystal screen to be detected, and update the image of the lit liquid crystal screen collected by the area array camera.
[0091] Specifically, the resolution of the area array camera is greater than the resolution of the liquid crystal screen to be detected, and multiple pixels of the image collected by the area array camera correspond to a single pixel of the liquid crystal screen to be detected. Further, in the test environment of the present invention, two black and white area array cameras with a resolution of 14208×10640 are used to collect images on the left and right sides of the liquid crystal screen respectively. Determine the resolution magnification ratio (Magnificationrate, MR). The resolution of the area array camera is greater than the resolution of the liquid crystal screen to be detected. Therefore, multiple pixels of the image collected by the camera correspond to a single pixel of the screen, and the detection accuracy can reach the sub-pixel level. For example, when using a camera with a row resolution of 10640 to photograph a screen with a row resolution of 1440, by calculating 10640÷1440≈7.4>7, it can be known that the maximum integer MR of the camera photographing the screen is 7.
[0092] Step 2: The LCD screen image to be detected captured by the area array camera includes the screen edge of the LCD screen to be detected and the background workbench carrying the LCD screen to be detected; the coordinate system of the area to be detected is converted through a calibration matrix, and radial and tangential distortions are removed; the calibration matrix refers to the transformation relationship matrix between the world coordinate system and the image pixel coordinate system.
[0093] Specifically, in Step 2, pixels outside the area to be detected of the obtained LCD screen to be detected are removed by cropping, and the remaining image resolution is the product of the resolution of the area to be detected of the LCD screen to be detected and the resolution magnification factor. Further, pixels outside the area to be detected are removed by cropping, and the finally remaining image resolution is the product of the resolution of the area to be detected of the LCD screen and the resolution magnification factor. As Figure 2 shown, the test environment sets the detection area to be half of the horizontal direction of a 2560×1440 LCD screen, that is, 1290 (including 10 pixels of overlapping at the junction) × 1440, and the calibrated image resolution is 9030×10080.
[0094] The calibration matrix refers to the transformation relationship matrix between the world coordinate system and the image pixel coordinate system. The calculation steps of the calibration matrix include:
[0095] Step a: Obtain a standard grid map displayed on the LCD screen, where the standard grid map contains N standard and clear reference positioning points, N≥4;
[0096] Step b: The camera takes a picture of the LCD screen to obtain an LCD screen image;
[0097] Step c: One-to-one correspondence is established between the reference positioning points of the standard grid map and the reference positioning points in the LCD screen image captured by the camera.
[0098] Step d: Using the homography relationship projection mapping of a plane, the homography relationship of a plane is the projection mapping from one plane to another plane, and the homography relationship projection mapping formula is:
[0099] ;
[0100] where q represents the coordinates of the reference positioning point in the imaging plane coordinate system, s represents the scaling factor of the mapping, Q represents the coordinates of the reference positioning point in the world coordinate system, H represents the homography matrix, which is the calibration matrix to be solved.
[0101] Step 3: The pixel singularity algorithm is used to detect defects.
[0102] Specifically, in step 3, the resolution of the color liquid crystal display represents the number of pixels of the display, and a pixel is the smallest unit for image display. Each pixel is composed of three colors: red (R), green (G), and blue (B). When one or two of R, G, and B are constantly on or off, defects at the sub-pixel level occur.
[0103] Step 4: Based on the detected defects, locate the defective pixel according to the rule limit.
[0104] Step 4 further includes the following steps:
[0105] Name the digital image matrix of the original image in the detection area as Original, where Original is a variable name representing the original image in the detection area;
[0106] Add a boundary of MR pixels with an n-fold magnification ratio to Original, and the pixels of the boundary are copied from the MR pixels with an n-fold magnification ratio of the corresponding boundary; n is a non-zero natural number;
[0107] Assign 0 to the four corners in the image of Original after adding the boundary;
[0108] Name the region matrix of Original in the image after adding the boundary as Center, and translate the Center region upward, downward, left, and right by n times MR pixels respectively to obtain the matrix Up after upward translation, the matrix Down after downward translation, the matrix Left after left translation, and the matrix Right after right translation;
[0109] Use several matrices to subtract from the Center matrix respectively, and several result matrices can be obtained. The several result matrices include Up - Center, Down - Center, Left - Center, and Right - Center;
[0110] The algorithm for obtaining the binary matrix of screen defects includes:
[0111] ;
[0112] ;
[0113] Among them, represents the binary matrix of bright defects, represents the binary matrix of dark defects, represents the binary threshold segmentation for bright defect detection, represents the binary threshold segmentation for dark defect detection; Min represents taking the smaller value of the same-index elements in the two matrices, and Max represents taking the larger value of the same-index elements in the two matrices.
[0114] In a preferred embodiment of the present invention, in step 4, n is 2, that is, 2×MR pixels are added to each of the upper, lower, left, and right 4 boundaries; in the image after adding the boundaries of the initial command, the four corners are assigned 0, and the area of each corner is 4×MR×MR pixels;
[0115] The Center region is translated 2 times MR pixels in the upper, lower, left, and right directions respectively;
[0116] Four matrices are used to subtract from the Center matrix respectively, and 4 result matrices can be obtained. The 4 result matrices include Up-Center, Down-Center, Left-Center, and Right-Center.
[0117] Specifically, in step 4, when MR is 7, for an image with a size of 9030×10080, after adding the boundaries, the size becomes 9044×10094. The increased pixel values are equal to the corresponding values of 2×MR pixels of the Original boundary;
[0118] Step 5, distinguish the pixels to which consecutive adjacent defective points belong through the saved pixel coordinates; and precise the detection accuracy of the defective points to the sub-pixel level.
[0119] Step 5.1, set pixel limit rules based on the magnification factor MR; photograph the liquid crystal display screen to be detected through an area array camera, observe the imaging after single-pixel magnification, and the pixel value distribution of the pixel imaging is related to the distribution of electrical components;
[0120] When the screen is lit, the center of a single pixel of the liquid crystal display screen to be detected is a glowing component, and the surrounding is non-glowing components;
[0121] The pixel imaging matrix should present that the gray value in the middle area of the matrix is greater than the gray value in the boundary area, and there is a gradual change process;
[0122] By looping through and comparing the gray values of adjacent elements, the limit rules under different MR and different lighting modes can be obtained;
[0123] Set limit rule one as that the horizontal and vertical pixel values increase pixel by pixel from the corners to the center within the 1 / 2 interval, and rule two as that the point with the smallest gray value in the single-pixel imaging is at the four corners and the point with the largest gray value is within the middle 3×3 range;
[0124] Step 5.2, after determining the pixel rules, initialize an empty list L to record the starting points of single pixels; initialize another empty list N to record the occurrence times of different starting points;
[0125] Step 5.3, iterate the defect binary matrix or The non-zero point coordinates in it. Let the current non-zero point coordinate be P0(x, y);
[0126] Step 5.4, determine whether the gray value distribution of the pixels in the MR×MR size matrix with P0 as the upper left corner point satisfies the restriction rule. If it is satisfied, add the coordinates of P0 to L, increment the occurrence count of P0 by 1, and increment the saved value of the index bit corresponding to P0 in N by 1;
[0127] Step 5.5, if P0 does not meet the restriction conditions, modify the coordinates of P0 to P1 according to the outward expanding circular algorithm;
[0128] The outward expanding circular algorithm includes the following steps:
[0129] Step 5.5.1, initialize the offset offsetX = 0, offsetY = 0, and the direction vector V = (0, 0);
[0130] Step 5.5.2, initialize the coordinates of P1 as (x + offsetX, y + offsetY), where x is the abscissa of point P0 and y is the ordinate of point P0;
[0131] Step 5.5.3, if offsetX = offsetY and offsetX >= 0, modify the direction vector downward, that is, V = (0, 1);
[0132] Step 5.5.4, if offsetX + 1 = offsetY and offsetX >= 0, modify the direction vector to the left, that is, V = (-1, 0);
[0133] Step 5.5.5, if offsetX = -offsetY and offsetX < 0 and offsetY > 0, modify the direction vector upward, that is, V = (0, -1);
[0134] Step 5.5.6, if offsetX = offsetY and offsetX < 0, modify the direction vector to the right, that is, V = (1, 0);
[0135] Step 5.5.7, if offsetX and offsetY do not meet the restrictions of (5-5-3)-(5-5-6), keep the direction vector V unchanged;
[0136] Step 5.5.8, update (offsetX, offsetY) = (offsetX, offsetY) + V;
[0137] Step 5.5.9, if offsetX + 1 + MR is greater than the number of columns of the image or offsetX is less than 0, and or If there are still unvisited points, then keep the updated offsetX and offsetY and go back to step 5.5.2;
[0138] Step 5.5.10, if offsetY + 1 + MR is greater than the number of rows of the image or offsetY is less than 0, and or If there are still unvisited points, then keep the updated offsetX and offsetY and go back to step 5.5.2;
[0139] Step 5.5.11, re - execute the steps of step 5.5.2 until (x + offsetX, y + offsetY) meets the restriction rules, then set P0 = P1.
[0140] Step 5.6, continue to determine whether P1 has appeared in L. If it has appeared, increase the number of occurrences of the coordinates of P1 by 1. If it has not appeared, add P1 to L and set the number of occurrences of the coordinates of P1 to 1;
[0141] Step 5.7, go back to step 5.3 until all non - zero point coordinates in or are traversed;
[0142] Step 5.8, at this time, L stores the pixel origin coordinates of all defective points, N has recorded the number of defective points in this pixel, and the number of defective points is the defective area corresponding to the pixel.
[0143] Step 6, screen defective pixels based on the set area value, where the set area value is the number of occurrences of each saved pixel coordinate in step 5, representing the size of each display screen dead pixel in camera imaging;
[0144] Step 7, divide the X - axis and Y - axis coordinate values of the saved pixel coordinates by the magnification factor MR and map them to the liquid crystal screen coordinate system. Further, divide the non - zero point coordinate P0 by the magnification factor MR and map it to the liquid crystal screen coordinate system.
[0145] Step 8, output the final defective point detection result.
[0146] As Figure 9 shown, in the third row, the PSM algorithm without using rule restrictions detects the point defects of two pixels in column (b) as one defective, and misjudges the defect of one pixel in column (c) as two. In the second row, the dead pixel detection method based on rule restrictions accurately distinguishes the number of dead pixels in (b) and (c). Columns (a - c) in Figure 9 represent the imaging of different point defects. The first row is the original image, the second row is the output of the detection result of the present invention, and the third row is the detection result of the PSM algorithm without using rule restrictions.
[0147] Working principle:
[0148] A method for locating dead pixels on a liquid crystal screen based on rule restrictions according to the present invention uses the PSM algorithm to obtain a candidate point set of dead pixels and locates the screen pixels where each candidate point is located based on rule restrictions; it can detect dead pixels at the sub-pixel level and can determine the number and area of dead pixels, having good detection stability and accuracy.
[0149] Advantages of the present invention: The present invention can detect independent and continuous dead pixels, and allocate continuous dead pixels to the respective pixels one by one, which can be further distinguished by area or contour, avoiding the missed judgment and misjudgment of continuous dead pixels. The present invention can accurately judge the area of dead pixels and can detect defects at the sub-pixel level. The rules in the rule restrictions of the present invention can be flexibly modified, and only one photograph is needed to determine the rule content, avoiding a large amount of parameter adjustment work, and can quickly switch the detection to new model materials. Embodiment 2
[0150] In a preferred embodiment of the present invention, a positioning device for accurately locating dead pixels on a liquid crystal screen based on rule restrictions includes:
[0151] A memory;
[0152] A processor;
[0153] And
[0154] A computer program;
[0155] Wherein, the computer program is stored in the memory and is configured to be executed by the processor to implement the method for locating dead pixels on a liquid crystal screen based on rule restrictions. Embodiment 3
[0156] A storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the method for locating dead pixels on a liquid crystal screen based on rule restrictions.
[0157] The present invention is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, and the combination of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the specified functions in one process Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0158] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to work in a particular manner, such that the instructions stored in the computer-readable memory produce a manufacture including an instruction device that implements the functions specified in one or more of the processes and / or blocks Figure 1 one or more of the processes and / or blocks Figure 1 specified in the block or blocks.
[0159] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable apparatus provide steps for implementing the functions specified in one or more of the processes and / or blocks Figure 1 one or more of the processes and / or blocks Figure 1 specified in the block or blocks.
[0160] The above specific embodiments are specific supports for the proposed solution idea of the present invention, and the protection scope of the present invention cannot be limited thereby. Any equivalent changes or equivalent modifications made on the basis of the technical solution of the present invention in accordance with the technical idea proposed by the present invention still fall within the protection scope of the technical solution of the present invention.
Claims
1. A method for locating bad pixels of a liquid crystal screen based on rule restrictions, characterized in that: The following steps are involved: Step 1: Use an area array camera to collect an image of the lit LCD screen to be detected, determine the magnification of the camera resolution according to the resolution of the LCD screen to be detected, and update the area array camera to collect the image of the lit LCD screen to be detected; Step 2: The image of the LCD screen to be detected collected by the area array camera includes the screen edge of the LCD screen to be detected and the background workbench carrying the LCD screen to be detected; The coordinate system of the area to be detected is converted by a calibration matrix and radial and tangential distortions are removed; the calibration matrix refers to a transformation relationship matrix between a world coordinate system and an image pixel coordinate system; Step 3, using pixel singularity algorithm to detect defects; Step 4: According to the detected defects, the pixels where the defect points are located are located based on rule restrictions; Step 5, distinguishing the pixels to which the continuous adjacent bad points belong by using the saved pixel coordinates; Step 6, filtering bad pixels based on a set area value, wherein the set area value is the number of occurrences of each pixel coordinate saved in step 5, expressed as the size of each bad pixel on the display screen in the camera imaging; Step 7, dividing the X-axis and Y-axis coordinate values of the saved pixel coordinates by the magnification MR respectively and mapping them to the LCD screen coordinate system; Step 8: Output the final defect point detection result; Step 4 also includes the following steps: The digital image matrix of the original image of the detection area is named Original, where Original is a variable name representing the original image of the detection area; Add a border of n times magnification MR pixels to Original, and copy the pixels of the border to the n times magnification MR pixels of the corresponding border; n is a non-zero natural number; Original After adding the border, the four corners of the image are assigned 0; Name the region matrix of Original in the image after adding the border as Center, and translate the Center region up, down, left, and right by n times MR pixels respectively, to obtain the upward translation matrix Up, the downward translation matrix Down, the left translation matrix Left, and the right translation matrix Right; Use several matrices to make differences with the Center matrix respectively to obtain several result matrices, including Up-Center, Down-Center, Left-Center, and Right-Center; The algorithm for obtaining the screen defect binarization matrix includes: ; ; in, represents the bright defect binarization matrix, represents the dark defect binarization matrix, represents the binary threshold segmentation of bright defect detection, Indicates the binary threshold segmentation of dark defect detection; Min means taking the smaller value of the same index element in the two matrices, and Max means taking the larger value of the same index element in the two matrices; The step 5 comprises the following steps: Step 5.1, set pixel restriction rules based on magnification MR; photograph the LCD screen to be tested by using an area array camera, observe the image after single pixel magnification, and the pixel value distribution of pixel imaging is related to the distribution of electrical components; when the screen is lit, the center of the single pixel of the LCD screen to be tested is a luminous element, and the surrounding is a non-luminous element; the pixel imaging matrix should show that the grayscale value of the middle area of the matrix is greater than the grayscale value of the boundary area, and there is a gradual process; by cyclically comparing the grayscale values of adjacent elements, the restriction rules under different MR and different lighting modes are obtained; Step 5.2, after determining the pixel rule, initialize an empty list L to record the starting point of a single pixel; initialize another empty list N to record the number of occurrences of different starting points; Step 5.3, iterative defect binarization matrix or The non-zero point coordinates in , let the current non-zero point coordinates be P0(x,y); Step 5.4, determine whether the grayscale value distribution of the pixels in the MR×MR matrix with P0 as the upper left corner meets the restriction rule. If it does, add the coordinates of P0 to L, increase the number of occurrences of P0 by 1, and increase the index bit corresponding to P0 in N by 1; Step 5.5, if P0 does not meet the restriction condition, the coordinates of P0 are modified to P1 according to the outward expansion ring algorithm; Step 5.6, continue to determine whether P1 has appeared in L. If it has, add 1 to the number of times the coordinate of P1 appears. If it has not appeared, add P1 to L and set the number of times the coordinate of P1 appears to 1. Step 5.7, return to step 5.3 until the entire or The coordinates of the non-zero points in ; Step 5.8, at this time, L stores the pixel origin coordinates of all bad points, and N has recorded the number of bad points in this pixel. The number of bad points is the bad area in the corresponding pixel.
2. The method for locating bad pixels of a liquid crystal display based on rule restrictions according to claim 1, characterized in that: The calculation step of the calibration matrix includes: Step a, obtaining a standard grid diagram displayed on a liquid crystal screen, wherein the standard grid diagram includes N standard and clear reference positioning points, where N≥4; Step b, photographing the LCD screen with a camera to obtain an LCD screen image; Step c, one-to-one correspondence between the reference positioning points of the standard grid diagram and the reference positioning points in the LCD screen image captured by the camera; Step d, using the homography relationship of the plane for projection mapping. The homography relationship of the plane is the projection mapping from one plane to another plane. The projection mapping formula of the homography relationship of the plane is: ; Among them, q represents the coordinates of the reference positioning point in the imaging plane coordinate system, s represents the scaling factor of the mapping, Q represents the coordinates of the reference positioning point in the world coordinate system, and H represents the homography matrix, which is the calibration matrix to be solved.
3. The method for locating bad pixels of a liquid crystal display based on rule restrictions according to claim 1, characterized in that: In step 1, the resolution of the area array camera is greater than the resolution of the LCD screen to be inspected, and multiple pixels of the image captured by the area array camera correspond to a single pixel of the LCD screen to be inspected.
4. The method for locating bad pixels of a liquid crystal display based on rule restrictions according to claim 1, characterized in that: In step 2, pixels outside the area to be inspected of the LCD screen to be inspected are removed by cropping, and the retained image resolution is the product of the resolution of the area to be inspected of the LCD screen to be inspected and the resolution magnification.
5. The method for locating bad pixels of a liquid crystal display based on rule restrictions according to claim 1, characterized in that: In step 4, n is 2; and the four boundaries of top, bottom, left, and right are increased by 2×MR pixels each; the initial command assigns the four corners of the image after the boundary is increased to 0, and the area of each corner is 4×MR×MR pixels; Shift the Center area by 2 times MR pixels upward, downward, left, and right respectively; Use 4 matrices to perform subtraction with the Center matrix respectively to obtain 4 result matrices, including Up-Center, Down-Center, Left-Center, and Right-Center.
6. The method for locating bad pixels of a liquid crystal display based on rule restrictions according to claim 1, characterized in that: The outward expanding ring algorithm comprises the following steps: Step 5.5.1, initialize offset offsetX=0, offsetY=0, direction vector V=(0,0); Step 5.5.2, initialize the coordinates of P1 to (x+offsetX, y+offsetY), where x is the horizontal coordinate of point P0 and y is the vertical coordinate of point P0; Step 5.5.3, if offsetX=offsetY and offsetX>=0, modify the direction vector downward, V=(0,1); Step 5.5.4, if offsetX+1=offsetY and offsetX>=0, modify the direction vector to the left, V=(-1,0); Step 5.5.5, if offsetX=-offsetY and offsetX<0 and offsetY>0, modify the direction vector upward, V=(0,-1); Step 5.5.6, if offsetX=offsetY and offsetX<0, modify the direction vector to the right, V=(1,0); Step 5.5.7, if offsetX and offsetY do not meet the restrictions of (5-5-3)-(5-5-6), keep the direction vector V unchanged; Step 5.5.8, update (offsetX, offsetY) = (offsetX, offsetY) + V; Step 5.5.9, if offsetX+1+MR is greater than the number of image columns or offsetX is less than 0, and or If there are still untraversed points in the , keep the updated offsetX, offsetY and return to step 5.5.2; Step 5.5.10, if offsetY+1+MR is greater than the number of image rows or offsetY is less than 0, and or If there are still untraversed points in the , keep the updated offsetX, offsetY and return to step 5.5.2; Step 5.5.11, re-execute the steps of step 5.5.2 until (x+offsetX,y+offsetY) satisfies the restriction rules confirmed in step 5.1, then set P0=P1.
7. A positioning device for high-precision positioning of liquid crystal screen bad pixels based on rule restrictions, characterized in that: include: Memory; processor; as well as Computer programs; The computer program is stored in the memory and is configured to be executed by the processor to implement the method for locating bad pixels of a liquid crystal screen based on rule restrictions as described in any one of claims 1 to 5.
8. A storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor, the method for locating bad pixels of a liquid crystal screen based on rule restrictions as described in any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Detection method and detection machine for defective pixels of panel of flat panel display
CN101620815A
Pixel defect detection method and device
CN104732900A