A backlight source online detection method based on optical equipment
Through the online detection method of optical equipment, video data preprocessing and multi-step analysis, the automation and accuracy problems of backlight detection in the prior art are solved, and the automation and accurate evaluation of screen brightness and color uniformity are achieved.
Patent Information
- Application Number
- CN202510694857.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-28
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2045-05-28
AI Technical Summary
In the prior art, the backlight detection method relies on simple maximum and minimum brightness ratio calculations, which cannot fully reflect the screen brightness uniformity, and relies on manual observation to lead to errors, lack of automation and accuracy.
The online detection method based on optical equipment is adopted to obtain real-time video data of the screen, pre-process and multi-step analysis are performed, including brightness uniformity, stability and color uniformity detection, and the screen's backlight abnormality is automatically detected using median filtering, gradient matrix and corner response technologies.
It realizes automated and precise detection of screen backlights, improves detection accuracy, reduces manual errors, and can fully evaluate the brightness and color uniformity of the screen.
Smart Images

Figure CN120213422B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of backlight source detection, and in particular is an optical device-based backlight source online detection method. Background Art
[0002] Backlight testing is a method used to evaluate the proper functioning of the backlight system of display devices (such as LED matrix screens and LCD screens). This test focuses on factors such as brightness uniformity, color uniformity, flicker, and low-light performance. By analyzing the screen's optical characteristics under specific test videos (such as pure white, pure black, or grayscale), and comparing real-time images captured by optical equipment with standard reference images, it can identify issues such as uneven backlight brightness, color difference, and localized abnormal light or flicker, ensuring the overall visual quality of the display device.
[0003] In existing technologies, screen backlight testing relies on a simple maximum-to-minimum brightness ratio calculation and uses only a small number of test points, which cannot fully reflect the brightness uniformity of the entire screen. Furthermore, traditional testing methods require manual observation and subjective judgment, resulting in errors in the screen backlight test results.
[0004] To this end, the present invention proposes an online backlight source detection method based on an optical device. Summary of the Invention
[0005] The purpose of the present invention is to propose an online detection method for backlight sources based on optical equipment to solve the problems raised in the above background technology.
[0006] The technical problems to be solved by the present invention are:
[0007] How to achieve automated detection of the screen's backlight source while improving detection accuracy.
[0008] In order to achieve the above object, the present invention adopts the following technical solutions:
[0009] A backlight online detection method based on optical equipment, the method is as follows:
[0010] Step S1, obtaining, through an optical device, the aspect ratio of a screen to be tested and first real-time video data when the screen to be tested plays a first video;
[0011] Step S2, preprocessing the first real-time video data to obtain a first screen image to be tested of the first real-time video data;
[0012] Step S3, performing a first backlight source detection on the first screen image to be tested, and obtaining the abnormality type of the screen to be tested according to the first backlight source detection result;
[0013] Step S4, obtaining, through an optical device, second real-time video data of the screen to be tested when the second video is played, and performing a second backlight detection on the second video and the second real-time video data, and obtaining a backlight state of the screen to be tested based on the second backlight detection result;
[0014] Step S5 , visually displaying the first backlight detection result and the second backlight detection result of the screen to be tested.
[0015] Further, the first real-time video data is a first video stream and a first video stream frame rate of the first video stream;
[0016] The second real-time video data includes a second video stream and a second video stream frame rate of the second video stream.
[0017] Furthermore, step S2 includes the following sub-steps:
[0018] Step S21, decomposing the first video stream in the first real-time video data into first video stream frames, specifically:
[0019] When the first video stream frame rate of the first video stream is greater than or equal to 30 frames per second, the first video stream is decomposed one by one to obtain first video stream images, and 15 first video stream images are randomly selected as first video stream frames of the screen to be tested; when the first video stream frame rate of the first video stream is less than 30 frames per second, the first video stream is decomposed one by one to obtain first video stream frames of the screen to be tested;
[0020] Step S22, denoising the first video stream frame using a median filtering technique;
[0021] Step S23: convert the first video stream frame into a first video stream frame grayscale image using a formula. The formula is as follows:
[0022] I(x, y) = 0.3R(x, y) + 0.59G(x, y) + 0.11B(x, y), where (x, y) is the coordinate of any pixel in the grayscale image of the first video stream frame;
[0023] Step S24, the horizontal gradient Ix and the vertical gradient Iy of any pixel in the grayscale image of the first video stream frame are calculated by the formula, which is as follows:
[0024] Ix= ∂ I / ∂ x;
[0025] Iy= ∂ I / ∂ y;
[0026] Step S25: Integrate the calculated horizontal gradients and vertical gradients corresponding to all pixel points to obtain the gradient matrix M of the grayscale image of the first video stream frame. The gradient matrix is specifically as follows:
[0027] ;
[0028] Step S26, calculate and obtain the corner point response value JDX of the grayscale image of the first video stream frame, and the specific formula is as follows:
[0029] JDX=det(M)-k×[trace(M)], where k is the empirical coefficient;
[0030] Step S27: when the corner point response value is greater than the corner point response threshold, the corresponding pixel point is determined to be a corner point;
[0031] When the corner point response value is less than or equal to the corner point response threshold, no operation is performed;
[0032] Step S28, calculating and obtaining a polygonal area in the grayscale image of the first video stream frame;
[0033] Step S29, repeating step S28, obtaining polygonal areas in the grayscale images of the first video stream frames corresponding to all first video stream frames, and analyzing the polygonal areas to obtain the first screen image to be tested of the screen to be tested.
[0034] Furthermore, the analysis process of the polygonal area is as follows:
[0035] Step S291, constructing a minimum bounding rectangle of a polygonal area in the grayscale image of the first video stream frame, and obtaining the coordinates of the rectangle vertices of the minimum bounding rectangle;
[0036] Step S292: Calculate the length and width of the minimum bounding rectangle based on the coordinates of the vertices of the minimum bounding rectangle, and divide the length and width of the minimum bounding rectangle to obtain the aspect ratio of the minimum bounding rectangle.
[0037] Step S293: Obtain the aspect ratio of the screen to be tested, and subtract the aspect ratios of the minimum bounding rectangles of all grayscale images of the first video stream frames from the aspect ratio of the screen to be tested one by one, and then take the absolute value to obtain the aspect ratio difference between the minimum bounding rectangles of the grayscale images of the first video stream frames and the screen to be tested;
[0038] Step S294 : Taking the minimum bounding rectangle corresponding to the minimum aspect ratio difference as the first screen image to be tested of the first real-time video data.
[0039] Furthermore, step S3 includes the following sub-steps:
[0040] Step S31, constructing a measurement grid of a first screen image to be tested;
[0041] Step S32, performing a brightness uniformity test on the first screen image to be tested;
[0042] Step S33: Perform brightness stability test on the first screen image to be tested
[0043] Step S34, performing color uniformity detection on the first screen image to be tested;
[0044] Step S35: the screen to be tested plays the black source video and the gray source video respectively, and repeats steps S31 to S34;
[0045] If none of the screens to be tested have abnormal types, proceed to step S4;
[0046] If any abnormality occurs on the screen to be tested, the detection of the first backlight source is stopped.
[0047] Furthermore, the brightness uniformity test is as follows:
[0048] Step S321, obtaining the pixel brightness values of all pixels in the measurement grid;
[0049] Step S322, obtaining the maximum pixel brightness value and the minimum pixel brightness value of all pixels in the measurement grid, dividing the minimum pixel brightness value by the maximum pixel brightness value to obtain the brightness uniformity value of the measurement grid;
[0050] Step S323: If the brightness uniformity value of the measurement grid is less than the brightness uniformity threshold, it is determined that the abnormality type of the screen to be tested is brightness uniformity abnormality;
[0051] If the brightness uniformity value of the measurement grid is greater than or equal to the brightness uniformity threshold, the subsequent detection steps are performed.
[0052] Furthermore, the brightness stability test is as follows:
[0053] Step S331: The screen to be tested plays a first video for a first fixed duration, captures a first image of the screen to be tested at intervals of a second fixed duration, and uses the first image of the screen to be tested captured when the first video starts playing as an initial grayscale image; wherein the first fixed duration is greater than the second fixed duration, and the second fixed duration is greater than zero;
[0054] Step S332, obtaining the initial average brightness CPL of the initial grayscale image;
[0055] Step S333: Obtain the node average brightness JPLi corresponding to the first screen image to be tested at any time node, where i is the number of the time node, i=1, 2, ..., n, and n is a positive integer. The brightness attenuation value SJZi of the first screen image to be tested is calculated by the formula, which is as follows:
[0056] SJZi=(CPL-JPLi) / CPL;
[0057] Step S334: when the brightness attenuation value of the first screen image to be tested at any time point is greater than or equal to the brightness attenuation threshold, it is determined that the abnormality type of the screen to be tested is brightness stability abnormality;
[0058] When the brightness attenuation values of the first screen image to be tested at all time nodes are less than the brightness attenuation threshold, subsequent detection steps are performed.
[0059] Furthermore, the color uniformity test is as follows:
[0060] Step S341, obtaining the grayscale values of all pixels in the measurement grid and calculating the grayscale average value of the measurement grid;
[0061] Step S342, obtaining the grayscale average values of all measurement grids in the first screen image to be tested one by one, and numbering all measurement grids;
[0062] Step S343: Obtain the maximum grayscale average value ZHP in all measurement grids, and calculate the color difference YSCj between the measurement grid corresponding to the maximum grayscale average value and the grayscale average values CHPj of other measurement grids using the formula. The specific formula is as follows:
[0063] , where j is the number of the measurement grid, j = 1, 2, ..., m, and m is the total number of measurement grids;
[0064] Step S344: when the color difference value is greater than or equal to the color difference threshold, it is determined that the abnormality type of the screen to be tested is color uniformity abnormality;
[0065] When the color difference is less than the color difference threshold, the subsequent detection steps are performed.
[0066] Furthermore, step S4 includes the following sub-steps:
[0067] Step S41, performing timestamp matching on the second video and the second video stream;
[0068] Step S42, repeating step S2, obtaining a second screen image to be tested of the second real-time video data, and simultaneously obtaining a second video frame corresponding to the second video at the same timestamp, and converting the second video frame into a second video frame grayscale image;
[0069] Step S43: Set a measurement grid for the second screen image to be tested, then obtain the grayscale value HDZk of any pixel in the measurement grid, where k is the number of the pixel in the measurement grid, k=1, 2, ..., p, and p is the total number of pixels in the measurement grid. Calculate the grayscale mean HDJl of all pixels in the measurement grid, where l is the number of the measurement grid, l=1, 2, ..., b, and b is the total number of measurement grids.
[0070] Step S44: Calculate the local variance JBFl in any measurement grid using the local variance formula. The formula is as follows:
[0071] .
[0072] Furthermore, the step S4 further includes the following sub-steps:
[0073] Step S45: Repeat steps S43 to S44 to obtain the grayscale mean EHJl and the grayscale value EDJk of any pixel in the measurement grid in the grayscale image of the second video frame, as well as the local variance EBFl of the grayscale image of the second video frame. The covariance XFC between the second screen image to be tested and the grayscale image of the second video frame is calculated using the covariance formula. The specific formula is as follows:
[0074] ;
[0075] Step S46, obtaining the number A of measurement grids in the second screen image to be tested, where A=1, 2, ..., o, and calculating the structural similarity value SSIM between the second screen image to be tested and the grayscale image of the second video frame using the SSIM formula, the specific formula is as follows:
[0076] SSIM=(1 / A)×[(2×HDJl×EHJl)×(2×XFC×C2)] / [(HDJl 2 +EHJl 2 +C1)×(JBFl 2 +EBFl 2 +C2)], where C1 and C2 are stability constants;
[0077] The number of measurement grids in the second screen image to be tested is the same as the number of measurement grids in the second video frame grayscale image;
[0078] Step S47, if the structural similarity value is greater than the structural similarity threshold, it is determined that the second screen image to be tested is similar to the second video frame grayscale image, and the backlight status of the screen to be tested is determined to be qualified;
[0079] If the structural similarity value is less than or equal to the structural similarity threshold, it is determined that the second screen image to be tested is dissimilar to the second video frame grayscale image, and the backlight status of the screen to be tested is determined to be unqualified.
[0080] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are:
[0081] 1. The present invention first obtains the aspect ratio of the screen to be tested and first real-time video data of the screen to be tested playing a first video, then preprocesses the first real-time video data to obtain a first screen to be tested image of the first real-time video data, performs a first backlight source detection on the first screen to be tested image, and obtains the abnormality type of the screen to be tested based on the first backlight source detection result;
[0082] 2. The present invention also obtains second real-time video data when the screen to be tested plays a second video, and performs a second backlight source detection on the second video and the second real-time video data, obtains the backlight source status of the screen to be tested based on the second backlight source detection result, and finally visualizes the first backlight source detection result and the second backlight source detection result of the screen to be tested. The present invention realizes automatic detection of the backlight source of the screen while improving the detection accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0083] To facilitate understanding by those skilled in the art, the present invention is further described below with reference to the accompanying drawings.
[0084] Figure 1 is a block diagram of the overall system of the present invention;
[0085] Figure 2 This is a flow chart of detecting the first screen image to be tested in the present invention;
[0086] Figure 3 It is a structural schematic diagram of the electronic device in the present invention. DETAILED DESCRIPTION
[0087] The technical solutions of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0088] Example 1: Please refer to Figure 1-Figure 2 As shown, the technical solution provided by the present invention is: an online backlight detection method based on optical equipment, which is used to detect the backlight of LED screens. The method is as follows:
[0089] Step S1, obtaining, through an optical device, the aspect ratio of a screen to be tested and first real-time video data when the screen to be tested plays a first video;
[0090] In practice, the optical device may be a camera, wherein the first real-time video data is a first video stream and a first video stream frame rate of the first video stream; the first video stream captured by the optical device is a video stream captured by the optical device when the screen to be tested plays the first video; the first video may be a white source video, a black source video, and a gray source video; the source video pixels of the white source video are (255, 255, 255), the source video pixels of the black source video are (0, 0, 0), and the source video pixels of the gray source video are (128, 128, 128); in this embodiment, the white source video is analyzed first;
[0091] It should be specifically explained that common backlight devices include direct-type LED backlights, edge-type LED backlights, CCFL backlights, and OLED backlights, and this embodiment tests direct-type LED backlights.
[0092] Step S2, preprocessing the first real-time video data to obtain a first screen image to be tested of the first real-time video data;
[0093] In this embodiment, step S2 includes the following sub-steps:
[0094] Step S21, decomposing the first video stream in the first real-time video data into first video stream frames, specifically:
[0095] When the first video stream frame rate of the first video stream is greater than or equal to 30 frames per second, the first video stream is decomposed one by one to obtain first video stream images, and 15 first video stream images are randomly selected as first video stream frames of the screen to be tested; when the first video stream frame rate of the first video stream is less than 30 frames per second, the first video stream is decomposed one by one to obtain first video stream frames of the screen to be tested;
[0096] Step S22, denoising the first video stream frame using a median filtering technique;
[0097] It should be specifically noted that the first video stream image can be denoised by using median filtering, mean filtering, or Gaussian filtering. This embodiment is used for backlight detection of a direct-lit LED backlight source, and requires detecting information such as the brightness and color of the LED screen. Therefore, median filtering is used to denoise the first video stream image.
[0098] Step S23: convert the first video stream frame into a first video stream frame grayscale image using a formula. The formula is as follows:
[0099] I(x, y) = 0.3R(x, y) + 0.59G(x, y) + 0.11B(x, y), where (x, y) is the coordinate of any pixel in the grayscale image of the first video stream frame;
[0100] Step S24, the horizontal gradient Ix and the vertical gradient Iy of any pixel in the grayscale image of the first video stream frame are calculated by the formula, which is as follows:
[0101] Ix= ∂ I / ∂ x;
[0102] Iy= ∂ I / ∂ y;
[0103] Step S25: Integrate the calculated horizontal gradients and vertical gradients corresponding to all pixel points to obtain the gradient matrix M of the grayscale image of the first video stream frame. The gradient matrix is specifically as follows:
[0104] ;
[0105] Step S26: The corner response value JDX of the grayscale image of the first video stream frame is calculated using the Harris corner response function formula. The formula is as follows:
[0106] JDX=det(M)-k×[trace(M)], where k is an empirical coefficient. In this embodiment, k=0.05;
[0107] Step S27: when the corner point response value is greater than the corner point response threshold, the corresponding pixel point is determined to be a corner point;
[0108] When the corner point response value is less than or equal to the corner point response threshold, no operation is performed;
[0109] Step S28, obtaining a polygonal area in the grayscale image of the first video stream frame using a convex hull boundary calculation method;
[0110] It should be specifically noted that the convex hull boundary calculation method is an existing technology;
[0111] Step S29: Repeat the above steps to obtain polygonal areas in the grayscale images of the first video stream frames corresponding to all first video stream frames, and analyze the polygonal areas to obtain a first screen image to be tested. The analysis process of the polygonal areas is as follows:
[0112] Step S291, constructing a minimum bounding rectangle of a polygonal area in the grayscale image of the first video stream frame, and obtaining the coordinates of the rectangle vertices of the minimum bounding rectangle;
[0113] Step S292: Calculate the length and width of the minimum bounding rectangle based on the coordinates of the vertices of the minimum bounding rectangle, and divide the length and width of the minimum bounding rectangle to obtain the aspect ratio of the minimum bounding rectangle.
[0114] Step S293: Obtain the aspect ratio of the screen to be tested, and subtract the aspect ratios of the minimum bounding rectangles of all grayscale images of the first video stream frames from the aspect ratio of the screen to be tested one by one, and then take the absolute value to obtain the aspect ratio difference between the minimum bounding rectangles of the grayscale images of the first video stream frames and the screen to be tested;
[0115] Step S294, taking the minimum bounding rectangle corresponding to the minimum aspect ratio difference as the first screen image to be tested of the first real-time video data;
[0116] Specifically, the first screen image to be tested is a grayscale image.
[0117] Step S3, performing a first backlight source detection on the first screen image to be tested, and obtaining the abnormality type of the screen to be tested according to the first backlight source detection result;
[0118] In this embodiment, step S3 includes the following sub-steps:
[0119] Step S31, constructing a measurement grid of a first screen image to be tested;
[0120] The measurement grid size of the first screen image to be tested may be 3×3 or 5×5. In this embodiment, the measurement grid size is 5×5.
[0121] Step S32: Perform brightness uniformity detection on the first screen image to be tested. The brightness uniformity detection is as follows:
[0122] Step S321, obtaining the pixel brightness values of all pixels in the measurement grid;
[0123] In this embodiment, the grayscale value of each pixel is used as the pixel brightness value of the corresponding pixel;
[0124] Step S322, obtaining the maximum pixel brightness value and the minimum pixel brightness value of all pixels in the measurement grid, dividing the minimum pixel brightness value by the maximum pixel brightness value to obtain the brightness uniformity value of the measurement grid;
[0125] Step S323: If the brightness uniformity value of the measurement grid is less than the brightness uniformity threshold, it is determined that the abnormality type of the screen to be tested is brightness uniformity abnormality;
[0126] If the brightness uniformity value of the measurement grid is greater than or equal to the brightness uniformity threshold, proceed to the next step;
[0127] Step S33: Perform brightness stability test on the first screen image to be tested. The brightness stability test is as follows:
[0128] Step S331: the screen to be tested plays a first video of a first fixed duration, captures a first image of the screen to be tested at intervals of a second fixed duration, and uses the first image of the screen to be tested captured when the first video starts playing as an initial grayscale image;
[0129] The first fixed duration is greater than the second fixed duration, and the second fixed duration is greater than zero;
[0130] Step S332, obtaining the initial average brightness CPL of the initial grayscale image;
[0131] Step S333: Obtain the node average brightness JPLi corresponding to the first screen image to be tested at any time node, where i is the number of the time node, i=1, 2, ..., n, and n is a positive integer. The brightness attenuation value SJZi of the first screen image to be tested is calculated by the formula, which is as follows:
[0132] SJZi=(CPL-JPLi) / CPL;
[0133] Step S334: when the brightness attenuation value of the first screen image to be tested at any time point is greater than or equal to the brightness attenuation threshold, it is determined that the abnormality type of the screen to be tested is brightness stability abnormality;
[0134] When the brightness attenuation values of the first screen image to be tested at all time nodes are less than the brightness attenuation threshold, proceed to the next step;
[0135] Step S34: Perform color uniformity detection on the first screen image to be tested. The color uniformity detection is as follows:
[0136] Step S341, obtaining the grayscale values of all pixels in the measurement grid and calculating the grayscale average value of the measurement grid;
[0137] Step S342, obtaining the grayscale average values of all measurement grids in the first screen image to be tested one by one, and numbering all measurement grids;
[0138] Step S343: Obtain the maximum grayscale average value ZHP in all measurement grids, and calculate the color difference YSCj between the measurement grid corresponding to the maximum grayscale average value and the grayscale average values CHPj of other measurement grids using the formula. The specific formula is as follows:
[0139] , where j is the number of the measurement grid, j = 1, 2, ..., m, and m is the total number of measurement grids;
[0140] It should be specifically noted that the source video played on the screen to be tested is the first video, so the first screen image to be tested is a pure white image. At this time, the grayscale value of the pure white image should be 255. When the maximum grayscale average value is 255, it means that there is no abnormality in the corresponding measurement grid;
[0141] Step S344: when the color difference value is greater than or equal to the color difference threshold, it is determined that the abnormality type of the screen to be tested is color uniformity abnormality;
[0142] When the color difference is less than the color difference threshold, proceed to the next step;
[0143] Step S35: the screen to be tested plays the black source video and the gray source video respectively, and repeats steps S31 to S34;
[0144] If none of the screens to be tested have abnormal types, proceed to step S4;
[0145] If any abnormality occurs on the screen to be tested, the detection of the first backlight source is stopped.
[0146] Step S4, obtaining, through an optical device, second real-time video data of the screen to be tested when the second video is played, and performing a second backlight detection on the second video and the second real-time video data, and obtaining a backlight state of the screen to be tested based on the second backlight detection result;
[0147] It should be specifically noted that the second video is specifically a test source video for detecting the screen to be tested, and is not a pure color source video; the second real-time video data includes a second video stream and a second video stream frame rate of the second video stream;
[0148] In this embodiment, the above step S4 includes the following sub-steps:
[0149] Step S41, performing timestamp matching on the second video and the second video stream;
[0150] Specifically, the timestamp matching is used to make the second video identical to an image of any frame in the second video stream;
[0151] Step S42, repeating step S2, obtaining a second screen image to be tested of the second real-time video data, and simultaneously obtaining a second video frame corresponding to the second video at the same timestamp, and converting the second video frame into a second video frame grayscale image;
[0152] Step S43: Set a measurement grid for the second screen image to be tested, then obtain the grayscale value HDZk of any pixel in the measurement grid, where k is the number of the pixel in the measurement grid, k=1, 2, ..., p, and p is the total number of pixels in the measurement grid. Calculate the grayscale mean HDJl of all pixels in the measurement grid, where l is the number of the measurement grid, l=1, 2, ..., b, and b is the total number of measurement grids.
[0153] Step S44: Calculate the local variance JBFl in any measurement grid using the local variance formula. The formula is as follows:
[0154] ;
[0155] Step S45: Repeat steps S43 and S44 to obtain the grayscale mean EHJl and the grayscale value EDJk of any pixel in the measurement grid in the grayscale image of the second video frame, as well as the local variance EBFl of the grayscale image of the second video frame. The covariance XFC between the second screen image to be tested and the grayscale image of the second video frame is calculated using the covariance formula. The specific formula is as follows:
[0156] ;
[0157] Step S46, obtaining the number A of measurement grids in the second screen image to be tested, where A=1, 2, ..., o, and calculating the structural similarity value SSIM between the second screen image to be tested and the grayscale image of the second video frame using the SSIM formula, the specific formula is as follows:
[0158] SSIM=(1 / A)×[(2×HDJl×EHJl)×(2×XFC×C2)] / [(HDJl 2 +EHJl 2 +C1)×(JBFl 2 +EBFl 2 + C2)], where C1 and C2 are stability constants, which are specific values used to prevent excessive calculation errors caused by small mean and variance when the image contrast and brightness are very low. In this embodiment, C1=6.5 and C2=58.5;
[0159] The number of measurement grids in the second screen image to be tested is the same as the number of measurement grids in the second video frame grayscale image;
[0160] Step S47, if the structural similarity value is greater than the structural similarity threshold, it is determined that the second screen image to be tested is similar to the second video frame grayscale image, and the backlight status of the screen to be tested is determined to be qualified;
[0161] If the structural similarity value is less than or equal to the structural similarity threshold, it is determined that the second screen image to be tested is dissimilar to the second video frame grayscale image, and the backlight status of the screen to be tested is determined to be unqualified.
[0162] Step S5 , visually displaying the first backlight detection result and the second backlight detection result of the screen to be tested.
[0163] In this application, if a corresponding calculation formula appears, the above calculation formula is dimensionless and its numerical calculation is performed. The weight coefficient, proportional coefficient and other coefficients in the formula are set to a result value obtained by quantifying each parameter. Regarding the size of the weight coefficient and the proportional coefficient, as long as it does not affect the proportional relationship between the parameter and the result value, it is acceptable.
[0164] Example 2: Figure 3 The following is a schematic diagram of the structure of an electronic device, such as Figure 3 As shown, the electronic device may include: a processor, a communications interface, a memory, and a communications bus, wherein the processor, the communications interface, and the memory communicate with each other via the communications bus. The processor may call logic instructions in the memory to execute an online backlight detection method based on an optical device, the method comprising: obtaining, through the optical device, the aspect ratio of a screen to be tested and first real-time video data of a screen to be tested playing a first video; preprocessing the first real-time video data to obtain a first screen image to be tested of the first real-time video data; performing a first backlight detection on the first screen image to be tested, and obtaining an abnormality type of the screen to be tested based on the first backlight detection result; obtaining, through the optical device, second real-time video data of a screen to be tested playing a second video, and performing a second backlight detection on the second video and the second real-time video data, and obtaining a backlight status of the screen to be tested based on the second backlight detection result; and visually displaying the first backlight detection result and the second backlight detection result of the screen to be tested.
[0165] In addition, the logical instructions in the above-mentioned memory can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present application, or the part that contributes to the existing technology, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, and other media that can store program code.
[0166] On the other hand, the present application also provides a computer program product, which includes a computer program stored on a computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute a backlight online detection method based on an optical device provided by the above methods, the method including: obtaining the aspect ratio of the screen to be tested and the first real-time video data when the screen to be tested plays a first video through an optical device; preprocessing the first real-time video data to obtain a first screen image to be tested of the first real-time video data; performing a first backlight detection on the first screen image to be tested, and obtaining the abnormality type of the screen to be tested based on the first backlight detection result; obtaining the second real-time video data when the screen to be tested plays a second video through an optical device, and performing a second backlight detection on the second video and the second real-time video data, and obtaining the backlight status of the screen to be tested based on the second backlight detection result; visually displaying the first backlight detection result and the second backlight detection result of the screen to be tested.
[0167] On the other hand, the present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the above-mentioned online backlight detection method based on an optical device, the method comprising: obtaining the aspect ratio of the screen to be tested and the first real-time video data when the screen to be tested plays a first video through an optical device; preprocessing the first real-time video data to obtain a first screen image to be tested of the first real-time video data; performing a first backlight detection on the first screen image to be tested, and obtaining the abnormality type of the screen to be tested based on the first backlight detection result; obtaining the second real-time video data when the screen to be tested plays a second video through an optical device, and performing a second backlight detection on the second video and the second real-time video data, and obtaining the backlight status of the screen to be tested based on the second backlight detection result; visually displaying the first backlight detection result and the second backlight detection result of the screen to be tested.
[0168] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.
[0169] Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented using software plus a necessary general-purpose hardware platform, or of course, hardware. Based on this understanding, the essence of the above technical solution, or the portion that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, or an optical disk, and includes a number of instructions for causing a computer device (such as a personal computer, server, or network device) to execute the methods described in each embodiment or certain portions of the embodiments.
[0170] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A backlight online detection method based on optical equipment, characterized in that: Here’s how: Step S1, obtaining the aspect ratio of the screen to be tested and first real-time video data when the screen to be tested plays a first video; Step S2, preprocessing the first real-time video data to obtain a first screen image to be tested of the first real-time video data; Step S3, performing a first backlight source detection on the first screen image to be tested, and obtaining the abnormality type of the screen to be tested according to the first backlight source detection result; Wherein, the step S3 includes the following sub-steps: Step S31, constructing a measurement grid of a first screen image to be tested; Step S32, performing a brightness uniformity test on the first screen image to be tested; Step S33: Perform brightness stability test on the first screen image to be tested. The brightness stability test is as follows: Step S331: The screen to be tested plays a first video for a first fixed duration, captures a first image of the screen to be tested at intervals of a second fixed duration, and uses the first image of the screen to be tested captured when the first video starts playing as an initial grayscale image; wherein the first fixed duration is greater than the second fixed duration, and the second fixed duration is greater than zero; Step S332, obtaining the initial average brightness CPL of the initial grayscale image; Step S333: Obtain the node average brightness JPLi corresponding to the first screen image to be tested at any time node, where i is the number of the time node, i=1, 2, ..., n, and n is a positive integer. The brightness attenuation value SJZi of the first screen image to be tested is calculated by the formula, which is as follows: SJZi=(CPL-JPLi) / CPL; Step S334: when the brightness attenuation value of the first screen image to be tested at any time point is greater than or equal to the brightness attenuation threshold, it is determined that the abnormality type of the screen to be tested is brightness stability abnormality; When the brightness attenuation values of the first screen image to be tested at all time nodes are less than the brightness attenuation threshold, the subsequent detection steps are performed; Step S34, performing color uniformity detection on the first screen image to be tested; Step S35: the screen to be tested plays the black source video and the gray source video respectively, and repeats steps S31 to S34; If none of the screens to be tested have abnormal types, proceed to step S4; If any abnormality occurs on the screen to be tested, the detection of the first backlight source is stopped; Step S4, obtaining second real-time video data when the screen to be tested plays the second video, performing a second backlight detection on the second video and the second real-time video data, and obtaining a backlight state of the screen to be tested based on the second backlight detection result; Step S5 , visually displaying the first backlight detection result and the second backlight detection result of the screen to be tested.
2. The method for online backlight source detection based on optical equipment according to claim 1, characterized in that: The first real-time video data is a first video stream and a first video stream frame rate of the first video stream; The second real-time video data includes a second video stream and a second video stream frame rate of the second video stream.
3. The method for online backlight source detection based on optical equipment according to claim 1, characterized in that: The step S2 includes the following sub-steps: Step S21, decomposing the first video stream in the first real-time video data into first video stream frames, specifically: When the first video stream frame rate of the first video stream is greater than or equal to 30 frames per second, the first video stream is decomposed one by one to obtain first video stream images, and 15 first video stream images are randomly selected as the first video stream frames of the screen to be tested; When the first video stream frame rate of the first video stream is less than 30 frames per second, the first video stream is decomposed one by one to obtain first video stream frames of the screen to be tested; Step S22, denoising the first video stream frame using a median filtering technique; Step S23: convert the first video stream frame into a first video stream frame grayscale image using a formula. The formula is as follows: I(x, y) = 0.3R(x, y) + 0.59G(x, y) + 0.11B(x, y), where (x, y) is the coordinate of any pixel in the grayscale image of the first video stream frame; Step S24, the horizontal gradient Ix and the vertical gradient Iy of any pixel in the grayscale image of the first video stream frame are calculated by the formula, which is as follows: Ix= ∂ I / ∂ x; Iy= ∂ I / ∂ y; Step S25: Integrate the calculated horizontal gradients and vertical gradients corresponding to all pixel points to obtain the gradient matrix M of the grayscale image of the first video stream frame. The gradient matrix is specifically as follows: ; Step S26, calculate and obtain the corner point response value JDX of the grayscale image of the first video stream frame, and the specific formula is as follows: JDX=det(M)-k×[trace(M)], where k is the empirical coefficient; Step S27: when the corner point response value is greater than the corner point response threshold, the corresponding pixel point is determined to be a corner point; When the corner point response value is less than or equal to the corner point response threshold, no operation is performed; Step S28, calculating and obtaining a polygonal area in the grayscale image of the first video stream frame; Step S29, repeating step S28, obtaining polygonal areas in the grayscale images of the first video stream frames corresponding to all first video stream frames, and analyzing the polygonal areas to obtain the first screen image to be tested of the screen to be tested.
4. The method for online backlight source detection based on optical equipment according to claim 3, characterized in that: The analysis process of the polygonal area is as follows: Step S291, constructing a minimum bounding rectangle of a polygonal area in the grayscale image of the first video stream frame, and obtaining the coordinates of the rectangle vertices of the minimum bounding rectangle; Step S292: Calculate the length and width of the minimum bounding rectangle based on the coordinates of the vertices of the minimum bounding rectangle, and divide the length and width of the minimum bounding rectangle to obtain the aspect ratio of the minimum bounding rectangle. Step S293: Obtain the aspect ratio of the screen to be tested, and subtract the aspect ratios of the minimum bounding rectangles of all grayscale images of the first video stream frames from the aspect ratio of the screen to be tested one by one, and then take the absolute value to obtain the aspect ratio difference between the minimum bounding rectangles of the grayscale images of the first video stream frames and the screen to be tested; Step S294 : Taking the minimum bounding rectangle corresponding to the minimum aspect ratio difference as the first screen image to be tested of the first real-time video data.
5. The method for online backlight source detection based on optical equipment according to claim 1, characterized in that: The brightness uniformity test is as follows: Step S321, obtaining the pixel brightness values of all pixels in the measurement grid; Step S322, obtaining the maximum pixel brightness value and the minimum pixel brightness value of all pixels in the measurement grid, dividing the minimum pixel brightness value by the maximum pixel brightness value to obtain the brightness uniformity value of the measurement grid; Step S323: If the brightness uniformity value of the measurement grid is less than the brightness uniformity threshold, it is determined that the abnormality type of the screen to be tested is brightness uniformity abnormality; If the brightness uniformity value of the measurement grid is greater than or equal to the brightness uniformity threshold, the subsequent detection steps are performed.
6. The method for online backlight source detection based on optical equipment according to claim 1, characterized in that: The color uniformity test is as follows: Step S341, obtaining the grayscale values of all pixels in the measurement grid and calculating the grayscale average value of the measurement grid; Step S342, obtaining the grayscale average values of all measurement grids in the first screen image to be tested one by one, and numbering all measurement grids; Step S343: Obtain the maximum grayscale average value ZHP in all measurement grids, and calculate the color difference YSCj between the measurement grid corresponding to the maximum grayscale average value and the grayscale average values CHPj of other measurement grids using the formula. The specific formula is as follows: , where j is the number of the measurement grid, j = 1, 2, ..., m, and m is the total number of measurement grids; Step S344: when the color difference value is greater than or equal to the color difference threshold, it is determined that the abnormality type of the screen to be tested is color uniformity abnormality; When the color difference is less than the color difference threshold, the subsequent detection steps are performed.
7. The method for online backlight source detection based on optical equipment according to claim 1, characterized in that: The step S4 includes the following sub-steps: Step S41, performing timestamp matching on the second video and the second video stream; Step S42, repeating step S2, obtaining a second screen image to be tested of the second real-time video data, and simultaneously obtaining a second video frame corresponding to the second video at the same timestamp, and converting the second video frame into a second video frame grayscale image; Step S43: Set a measurement grid for the second screen image to be tested, then obtain the grayscale value HDZk of any pixel in the measurement grid, where k is the number of the pixel in the measurement grid, k=1, 2, ..., p, and p is the total number of pixels in the measurement grid. Calculate the grayscale mean HDJl of all pixels in the measurement grid, where l is the number of the measurement grid, l=1, 2, ..., b, and b is the total number of measurement grids. Step S44: Calculate the local variance JBFl in any measurement grid using the local variance formula. The formula is as follows: 。 8. The method for online backlight source detection based on optical equipment according to claim 7, characterized in that: The step S4 further includes the following sub-steps: Step S45: Repeat steps S43 to S44 to obtain the grayscale mean EHJl and the grayscale value EDJk of any pixel in the measurement grid in the grayscale image of the second video frame, as well as the local variance EBFl of the grayscale image of the second video frame. The covariance XFC between the second screen image to be tested and the grayscale image of the second video frame is calculated using the covariance formula. The specific formula is as follows: ; Step S46, obtaining the number A of measurement grids in the second screen image to be tested, where A=1, 2, ..., o, and calculating the structural similarity value SSIM between the second screen image to be tested and the grayscale image of the second video frame using the SSIM formula, the specific formula is as follows: SSIM=(1 / A)×[(2×HDJl×EHJl)×(2×XFC×C2)] / [(HDJl 2 +EHJl 2 +C1)×(JBFl 2 +EBFl 2 +C2)], where C1 and C2 are stability constants; The number of measurement grids in the second screen image to be tested is the same as the number of measurement grids in the second video frame grayscale image; Step S47, if the structural similarity value is greater than the structural similarity threshold, it is determined that the second screen image to be tested is similar to the second video frame grayscale image, and the backlight status of the screen to be tested is determined to be qualified; If the structural similarity value is less than or equal to the structural similarity threshold, it is determined that the second screen image to be tested is dissimilar to the second video frame grayscale image, and the backlight status of the screen to be tested is determined to be unqualified.
Citation Information
Patent Citations
Image multi-target information identification method and system and medium
CN114120320A
Air target detection method
CN116229084A
Calibration method based on mini LED backlight module
CN116256908A
Video quality detection method, device, equipment and medium
CN119788841A