A method, device, and storage medium for background subtraction based on a display screen
By placing the display screen in a dark room environment in the display production process, generating a set of exposure time to be divided and performing linear interval segment segmentation, the problem of low grayscale mura is solved, and a clearer display screen detection and compensation effect is achieved.
Patent Information
- Application Number
- CN202510495326.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-21
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2045-04-21
AI Technical Summary
In the De-Mura compensation process of the display screen, low gray-scale mura is difficult to repair, and is affected by ambient light and invisible light, resulting in an extended exposure time, further amplifying the optical influence, affecting the detection effect.
In the display production process, the display screen is placed in a dark room environment to generate an exposure time set to be divided, a background subtraction exposure time set is generated through linear interval segmentation, and an image acquisition and background subtraction process is used to use a sampling camera.
The impact of ambient light and invisible light on the display screen image is reduced, the detection clarity and repair effect of low grayscale mura are improved, and the De-Mura compensation process is optimized.
Smart Images

Figure CN120013983B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present application relate to the field of display screen detection, and in particular, to a method, device, and storage medium based on background subtraction of a display screen. Background Art
[0002] In the field of display screen detection, it is usually necessary to detect different types of defects on the display screen. The links of defect detection and defect compensation are important production links. When different display screen structures generate the same type of defect, their manifestation forms are also different. In order to improve the quality of display screen products, De-Mura is still an essential link in the panel process.
[0003] The compensation process of De-Mura is based on the gray-scale values of each Pattern image captured by a high-resolution camera. Before starting the algorithm processing, the program will go through a series of image preprocessings to make the gray-scale difference of each image better restore the mura form of the panel itself. However, as the structure of the display screen is continuously updated and iterated, in order to adapt to the improvement of the functionality of the display screen, the pixel points of the display screen are usually arranged more closely and complexly, and an under-panel thin film circuit is added under the pixel layer of the display screen. These new types of display screens all affect the De-Mura compensation process. Specifically, in order to capture the real mura form of the panel, the high-resolution camera of the De-Mura system must work in a dark room. When the De-Mura system is running normally, there will inevitably be many indicator lights of other devices. Moreover, we have found that the mura form of the panel captured by the camera is affected not only by visible light but also by invisible light, and the structure of the new type of display screen just increases the influence of visible light and invisible light on the production line.
[0004] Whether it is the Lcd Demura process or the Oled Demura process, when observing the compensation effect of De-Mura, the mura of low gray levels is always more difficult to repair or shows more complexity. The mura of low gray levels is more difficult to repair, mainly because the brightness of low gray levels is relatively low and the mura is more diverse and more easily affected by ambient light. Therefore, in order to capture the mura of low gray level images more clearly, the camera needs to set a longer exposure time when shooting low gray level images, but at the same time, it will also amplify the influence of ambient light on the mura state of low gray levels, further increasing the influence of visible light and invisible light. Summary of the Invention
[0005] The present application discloses a method, device, and storage medium based on background subtraction of a display screen, which are used to reduce the influence of ambient light and invisible light.
[0006] In a first aspect, an embodiment of the present application provides a method for background subtraction based on a display screen, including:
[0007] In the scenario of the display screen production process, place the target display screen in a darkroom environment so that the target display screen displays a preset background picture; generate a set of exposure times to be segmented according to the maximum gray saturation of the sampling camera; perform image acquisition on the target display screen according to the set of exposure times to be segmented to generate a set of images to be segmented; perform class-linear interval segmentation on the set of exposure times to be segmented according to the gray data in the set of images to be segmented to generate a set of class-linear exposure intervals, where the set of class-linear exposure intervals includes at least two class-linear exposure intervals; generate a set of background subtraction exposure times according to the set of acquisition exposure times corresponding to the display screen Pattern picture set of the current production process and the set of class-linear exposure intervals; use the sampling camera and perform acquisition on the target display screen according to the set of background subtraction exposure times to generate a set of background images; use the target display screen to display each display screen Pattern picture; perform image acquisition on the target display screen according to the set of acquisition exposure times to generate a set of display screen acquisition images; use the set of background images to perform background subtraction processing on the images in the set of display screen acquisition images.
[0008] Optionally, the step of generating a set of exposure times to be segmented according to the maximum gray saturation of the sampling camera includes: setting a target gray upper limit and a target gray lower limit according to the maximum gray saturation of the acquisition camera; adjusting the exposure time of the acquisition camera so that the gray levels of the images acquired by the acquisition camera are the target gray upper limit and the target gray lower limit respectively, and record the corresponding exposure time upper limit and exposure time lower limit; obtain the exposure time interval; generate a set of exposure times to be segmented according to the exposure time upper limit, exposure time lower limit and exposure time interval.
[0009] Optionally, the target display screen does not include the in-screen circuit area; the step of performing class-linear interval segmentation on the set of exposure times to be segmented according to the gray data in the set of images to be segmented to generate a set of class-linear exposure intervals includes: determining the sampling area of each image to be segmented in the set of images to be segmented, and determining the gray mean of the sampling area; generating a segmentation interval value for each exposure time to be segmented according to the gray mean of the sampling area; performing interval analysis on the segmentation interval values of all exposure times to be segmented in order; if two adjacent exposure times to be segmented belong to the same class-linear exposure time interval, then incorporate the latter exposure time to be segmented into the class-linear exposure time interval of the former exposure time to be segmented; if two adjacent exposure times to be segmented do not belong to the same class-linear exposure time interval, then use the latter exposure time to be segmented as the starting point of a new class-linear exposure time interval; when all the exposure time interval analyses of the exposure times to be segmented are completed, generate a set of class-linear exposure intervals.
[0010] Optionally, the target display screen includes an in-screen circuit area, the non-in-screen circuit area is used as the effective area, and the in-screen circuit area is used as the background area. The camera center point of the sampling camera is aligned with the in-screen circuit area. In the scenario of the display screen production process, the step of placing the target display screen in a dark room environment so that the target display screen displays a preset background picture includes: in the scenario of the display screen production process, placing the target display screen in a dark room environment to obtain the first display screen Pattern picture, where the first display screen Pattern picture is the picture when the non-circuit area is used as the background area; generating target gray-scale data based on the gray-scale data of the first display screen Pattern picture and the reflectivity data of the in-screen circuit area; adjusting the arrangement rule according to the arrangement rule of the pixels to be lit in the first display screen Pattern picture and the reflectivity data of the in-screen circuit area; generating the second display screen Pattern picture according to the adjusted arrangement rule and the target gray-scale data; obtaining the image features of the circuit area of the target display screen, and integrating the image features of the circuit area into the second display screen Pattern picture through a feature fusion model to generate a background picture; making the target display screen display the background picture.
[0011] Optionally, the camera center point of the sampling camera is aligned with the in-screen circuit area. The step of generating a class-linear exposure interval set by performing a class-linear interval segmentation on the set of exposure times to be segmented according to the gray-scale data in the set of images to be segmented includes: determining the sampling area of each image to be segmented in the set of images to be segmented according to the camera optical axis center and detecting the gray-scale mean value of the sampling area, where the sampling area is located in the in-screen circuit area; generating a segmentation interval value for each exposure time to be segmented according to the reflectivity data of the in-screen circuit area and the gray-scale mean value of the sampling area; performing interval analysis on the segmentation interval values of all exposure times to be segmented in order; if two adjacent exposure times to be segmented belong to the same class-linear exposure time interval, then incorporating the latter exposure time to be segmented into the class-linear exposure time interval of the former exposure time to be segmented; if two adjacent exposure times to be segmented do not belong to the same class-linear exposure time interval, then using the latter exposure time to be segmented as the starting point of a new class-linear exposure time interval; when all the exposure time intervals to be segmented have been analyzed, generating a class-linear exposure interval set.
[0012] Optionally, the circuit type of the in-screen circuit area is a uniform circuit area. The step of generating a segmentation interval value for each exposure time to be segmented according to the reflectivity data of the in-screen circuit area and the gray-scale mean value of the sampling area includes: determining the reflectivity parameter corresponding to the uniform circuit area from the reflectivity data; adjusting the gray-scale mean value of the sampling area according to the reflectivity parameter to generate a first gray-scale mean value; generating a segmentation interval value for each exposure time to be segmented according to the first gray-scale mean value and the gray-scale mean value of the sampling area.
[0013] Optionally, the circuit type of the in-screen circuit area is a gradient circuit area; the step of generating a segmentation interval value for each exposure time to be segmented according to the reflectivity data of the in-screen circuit area and the gray-scale mean value of the sampling area includes: determining the maximum reflectivity parameter, the minimum reflectivity parameter, and the line ratio corresponding to the gradient circuit area from the reflectivity data; adjusting the gray-scale mean value of the sampling area according to the maximum reflectivity parameter, the minimum reflectivity parameter, and the line ratio to generate a second gray-scale mean value; generating a segmentation interval value for each exposure time to be segmented according to the second gray-scale mean value and the gray-scale mean value of the sampling area.
[0014] Optionally, the step of generating a background subtraction exposure time set according to the acquisition exposure time set corresponding to the display screen Pattern picture set and the class-linear exposure interval set in the current production process includes: determining the acquisition exposure time corresponding to each display screen Pattern picture in the display screen Pattern picture set of the current production process; classifying each acquisition exposure time into the corresponding class-linear exposure interval; screening the acquisition exposure times in each class-linear exposure interval, and determining a background subtraction exposure time from each class-linear exposure interval to generate a background subtraction exposure time set, and each background subtraction exposure time corresponds to at least one display screen Pattern picture.
[0015] In a second aspect, an embodiment of the present application provides an apparatus for background subtraction based on a display screen, including: a setting unit configured to place a target display screen in a darkroom environment in the scenario of a display screen production process, so that the target display screen displays a preset background picture; a first generation unit configured to generate a set of exposure times to be segmented according to the maximum gray-scale saturation of a sampling camera; a second generation unit configured to perform image acquisition on the target display screen according to the set of exposure times to be segmented to generate a set of images to be segmented; a third generation unit configured to perform class-linear interval segmentation on the set of exposure times to be segmented according to the gray-scale data in the set of images to be segmented to generate a set of class-linear exposure intervals, and the set of class-linear exposure intervals includes at least two class-linear exposure intervals; a fourth generation unit configured to generate a set of background subtraction exposure times according to the acquisition exposure time set corresponding to the display screen Pattern picture set and the set of class-linear exposure intervals in the current production process; a fifth generation unit configured to use the sampling camera and perform acquisition on the target display screen according to the set of background subtraction exposure times to generate a set of background images; a display unit configured to use the target display screen to display each display screen Pattern picture; a sixth generation unit configured to perform image acquisition on the target display screen according to the acquisition exposure time set to generate a set of display screen acquisition images; and a subtraction unit configured to perform background subtraction processing on the images in the set of display screen acquisition images using the set of background images.
[0016] Optionally, the first generating unit includes: setting a target gray upper limit and a target gray lower limit according to the maximum gray saturation of the acquisition camera; adjusting the exposure time of the acquisition camera so that the gray levels of the images acquired by the acquisition camera are the target gray upper limit and the target gray lower limit respectively, and recording the corresponding exposure time upper limit and exposure time lower limit; obtaining the exposure time interval; generating a set of exposure times to be segmented according to the exposure time upper limit, exposure time lower limit and exposure time interval.
[0017] Optionally, the target display screen does not include the in-screen circuit area; the third generating unit includes: determining the sampling area of each to-be-segmented image in the set of to-be-segmented images, and determining the gray mean value of the sampling area; generating a segmentation interval value for each to-be-segmented exposure time according to the gray mean value of the sampling area; performing interval analysis on the segmentation interval values of all to-be-segmented exposure times in order; if two adjacent to-be-segmented exposure times belong to the same type of linear exposure time interval, incorporating the latter to-be-segmented exposure time into the linear exposure time interval of the former to-be-segmented exposure time; if two adjacent to-be-segmented exposure times do not belong to the same type of linear exposure time interval, using the latter to-be-segmented exposure time as the starting point of a new type of linear exposure time interval; when the interval analysis of all to-be-segmented exposure times is completed, generating a set of linear exposure intervals.
[0018] Optionally, the target display screen includes an in-screen circuit area, the non-in-screen circuit area is used as the effective area, the in-screen circuit area is used as the background area, and the camera center point of the sampling camera is aligned with the in-screen circuit area. The setting unit includes: in the scenario of the display screen production process, placing the target display screen in a dark room environment to obtain a first display screen Pattern image, where the first display screen Pattern image is the image when the non-circuit area is used as the background area; generating target gray scale data according to the gray scale data of the first display screen Pattern image and the reflectivity data of the in-screen circuit area; adjusting the arrangement rule according to the arrangement rule of the pixel points to be lit in the first display screen Pattern image and the reflectivity data of the in-screen circuit area; generating a second display screen Pattern image according to the adjusted arrangement rule and the target gray scale data; obtaining the image features of the circuit area of the target display screen, and integrating the image features of the circuit area into the second display screen Pattern image through a feature fusion model to generate a background image; making the target display screen display the background image.
[0019] Optionally, the camera center point of the sampling camera is aligned with the in-screen circuit area. The third generating unit includes: a determining module, which determines the sampling area of each to-be-segmented image in the to-be-segmented image set according to the camera optical axis center, and detects the gray mean value of the sampling area, where the sampling area is located in the in-screen circuit area. A first generating module, which is used to generate a segmentation interval value for each to-be-segmented exposure time according to the reflectivity data of the in-screen circuit area and the gray mean value of the sampling area. An analysis module, which is used to perform interval analysis on the segmentation interval values of all to-be-segmented exposure times in sequence; a merging module, which is used to merge the latter to-be-segmented exposure time into the class linear exposure time interval of the former to-be-segmented exposure time if two adjacent to-be-segmented exposure times belong to the same class linear exposure time interval; a partitioning unit, which is used to use the latter to-be-segmented exposure time as the starting point of a new class linear exposure time interval if two adjacent to-be-segmented exposure times do not belong to the same class linear exposure time interval; a second generating module, which is used to generate a set of class linear exposure intervals when the interval analysis of all to-be-segmented exposure times is completed.
[0020] Optionally, the circuit type of the in-screen circuit area is a uniform circuit area; the steps of the first generating module include: determining the reflectivity parameter corresponding to the uniform circuit area from the reflectivity data; adjusting the gray mean value of the sampling area according to the reflectivity parameter to generate a first gray mean value; generating a segmentation interval value for each to-be-segmented exposure time according to the first gray mean value and the gray mean value of the sampling area.
[0021] Optionally, the circuit type of the in-screen circuit area is a gradient line area; the steps of the first generating module include: determining the maximum reflectivity parameter, the minimum reflectivity parameter and the line ratio corresponding to the gradient circuit area from the reflectivity data; adjusting the gray mean value of the sampling area according to the maximum reflectivity parameter, the minimum reflectivity parameter and the line ratio to generate a second gray mean value; generating a segmentation interval value for each to-be-segmented exposure time according to the second gray mean value and the gray mean value of the sampling area.
[0022] Optionally, the fourth generating unit includes: determining the acquisition exposure time corresponding to each display screen Pattern picture in the display screen Pattern picture set of the current production process; classifying each acquisition exposure time into the corresponding class linear exposure interval; screening the acquisition exposure times in each class linear exposure interval, and determining a background subtraction exposure time from each class linear exposure interval to generate a background subtraction exposure time set, where each background subtraction exposure time corresponds to at least one display screen Pattern picture.
[0023] In a third aspect, an embodiment of the present application provides a device for background subtraction based on a display screen, including:
[0024] A processor, a memory, an input-output unit, and a bus;
[0025] The processor is connected to a memory, an input / output unit, and a bus;
[0026] The memory stores a program, and the processor calls the program to execute the methods of the first aspect and any optional methods of the first aspect.
[0027] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a program is stored. When the program is executed on a computer, it executes the methods of the first aspect and any optional methods of the first aspect.
[0028] From the above technical solutions, it can be seen that the embodiments of the present application have the following advantages:
[0029] First, in the scenario of the display screen production process, the target display screen is placed in a dark room environment, so that the target display screen displays a preset background picture to create a real on-site environment. A set of exposure times to be segmented is generated according to the maximum gray saturation of the sampling camera. Then, image acquisition is performed on the target display screen according to the set of exposure times to be segmented to generate a set of images to be segmented. Class-linear interval segmentation is performed on the set of exposure times to be segmented according to the gray data in the set of images to be segmented to generate a set of class-linear exposure intervals, and the set of class-linear exposure intervals includes at least two class-linear exposure intervals. A set of background subtraction exposure times is generated according to the set of acquisition exposure times corresponding to the display screen Pattern picture set of the current production process and the set of class-linear exposure intervals. The sampling camera is used to perform acquisition on the target display screen according to the set of background subtraction exposure times to generate a set of background images. The target display screen is used to display each display screen Pattern picture. Image acquisition is performed on the target display screen according to the set of acquisition exposure times to generate a set of display screen acquisition images. Background subtraction processing is performed on the images in the set of display screen acquisition images using the set of background images.
[0030] By preprocessing the target display screen placed in the production line, displaying the background image and collecting images through the set of exposure times to be segmented generated by the maximum gray saturation, the background image is an exposure time-sensitive image generated for the current detection project. Classify the image gray data obtained through collection into intervals for the exposure times in the set of exposure times to be segmented to generate a class-linear exposure interval, and the class-linear exposure interval represents the approximate degree data of different exposure times of this type of target display screen when using the current system (acquisition camera and lens) for this detection project. Next, only need to obtain the display screen Pattern image corresponding to the detection project according to the current production process, and select the corresponding class-linear exposure interval according to the exposure time matched by the display screen Pattern image, so as to match all the display screen Pattern images with the corresponding class-linear exposure intervals, and then determine the effective and minimum background subtraction exposure time within this range according to the class-linear exposure interval and the matched exposure time. Use the background subtraction exposure time to collect the background images for background subtraction of the detection project, and finally use the set of background images to perform background subtraction processing on the images in the set of display screen acquisition images. This solution enables all display screen Pattern images to use the most suitable background images for background subtraction, and can better reduce the influence of visible light and invisible light on the display screen images in this detection project. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for use in the embodiments or the description of the prior art. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0032] Figure 1 Schematic diagram of an embodiment of the method for background subtraction based on a display screen of the present application;
[0033] Figure 2 Schematic diagram of an embodiment of the method for generating a set of exposure times to be segmented of the present application;
[0034] Figure 3 Schematic diagram of an embodiment of the method for generating a set of class-linear exposure intervals of the present application;
[0035] Figure 4 Schematic diagram of an embodiment of the method for generating a background image of the present application;
[0036] Figure 5 Schematic diagram of an embodiment of the method for generating a set of class-linear exposure intervals of the present application;
[0037] Figure 6Schematic diagram of an embodiment of the method for dividing interval values in the present application;
[0038] Figure 7 Schematic diagram of another embodiment of the method for dividing interval values in the present application;
[0039] Figure 8 Schematic diagram of an embodiment of the method for generating a background subtraction exposure time set in the present application;
[0040] Figure 9 Schematic diagram of an embodiment of the device for background subtraction based on a display screen in the present application;
[0041] Figure 10 Schematic diagram of another embodiment of the device for background subtraction based on a display screen in the present application. Detailed implementation manners
[0042] In the following description, specific details such as specific system architectures and technologies are presented for the purpose of illustration rather than limitation, so as to thoroughly understand the embodiments of the present application. However, those skilled in the art should clearly understand that the present application can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid unnecessary details from interfering with the description of the present application.
[0043] It should be understood that when used in the specification and appended claims of the present application, the term "comprising" indicates the presence of the described features, wholes, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their combinations.
[0044] It should also be understood that the term "and / or" as used in the specification and appended claims of the present application refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0045] As used in the specification and appended claims of the present application, the term "if" can be interpreted as "when", "once", "in response to a determination", or "in response to a detection" depending on the context. Similarly, the phrase "if a determination is made" or "if [the described condition or event] is detected" can be interpreted as meaning "once a determination is made", "in response to a determination", "once [the described condition or event] is detected", or "in response to a detection of [the described condition or event]" depending on the context.
[0046] In addition, in the description of the specification and appended claims of the present application, the terms "first", "second", "third", etc. are only used for distinguishing descriptions and cannot be understood as indicating or implying relative importance.
[0047] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that a particular feature, structure, or characteristic described in connection with that embodiment is included in one or more embodiments of this application. Thus, statements such as "in one embodiment", "in some embodiments", "in other some embodiments", "in still other embodiments", etc. that appear in different places in this specification do not necessarily all refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized. The terms "comprising", "including", "having" and their variants all mean "including but not limited to", unless otherwise specifically emphasized.
[0048] In the prior art, the De-Mura compensation process is based on the gray-scale values of each Pattern image captured by a high-resolution camera. Before starting the algorithm processing, the program will go through a series of image preprocessings to make the gray-scale differences of each image more accurately restore the mura form of the panel itself. However, as the structure of the display screen is continuously updated and iterated, in order to adapt to the improvement of the functionality of the display screen, the pixel arrangement of the display screen is usually made more compact and complex, and an under-panel thin-film circuit is added below the pixel layer of the display screen. These new types of display screens all affect the De-Mura compensation process. Specifically, in order to capture the true mura form of the panel, the high-resolution camera of the De-Mura system must work in a dark room. When the De-Mura system is running normally, there will inevitably be many indicator lights of other devices. Moreover, we have found that the mura form of the panel captured by the camera is affected not only by visible light but also by invisible light, and the structure of the new type of display screen happens to increase the influence of visible light and invisible light on the production line. Whether it is the Lcd Demura process or the Oled Demura process, when observing the compensation effect of De-Mura, the mura of low gray levels is always more difficult to repair or shows more complexity. The mura of low gray levels is more difficult to repair mainly because the brightness of low gray levels is relatively low and the mura is more diverse and more easily affected by ambient light. Therefore, in order to capture the mura of low gray-level images more clearly, the camera needs to set a longer exposure time when shooting low gray-level images, but at the same time, it will also amplify the influence of ambient light on the mura state of low gray levels, further increasing the influence of visible light and invisible light.
[0049] Based on this, the present application discloses a method, device and storage medium based on background subtraction of a display screen for reducing the influence of ambient light and invisible light.
[0050] The technical solutions in the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Apparently, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the scope of protection of the present application.
[0051] The method of the present application can be applied to a server, a device, a terminal, or other devices with logical processing capabilities, and the present application does not make any limitations thereto. For the sake of convenience of description, the following will take the execution entity as a terminal for description.
[0052] Please refer to Figure 1 , an embodiment of a method for background subtraction based on a display screen is provided in the present application, including:
[0053] 101. In the scenario of the display screen production process, place the target display screen in a darkroom environment so that the target display screen displays a preset background image.
[0054] The De-Mura system in the embodiments of the present application is composed of an industrial camera (i.e., a sampling camera, which includes dark field correction and flat field correction functions and is turned on during calibration and measurement), a long focal length industrial lens, a human-machine interface, a computer, a display screen controller, etc. Throughout the entire process of background subtraction, it is under darkroom conditions. The background subtraction in the embodiments of the present application is mainly used in the detection items on the production line.
[0055] Place the De-Mura system and the target display screen (after adjusting Pgamma) in a darkroom working environment, and keep the sampling camera gain, the working distance of the sampling camera, the lens aperture, and the lens focal length. The above parameters are all kept in the working state corresponding to the same type of display screen model (the same type as the target display screen) during normal Demura. The computer sends a power-on and image-cutting instruction to the display screen controller to light up the target display screen and make the display screen display the W0 image. The W0 image is the background image corresponding to the current detection item of the target display screen. The detection item in the embodiments of the present application is a defect detection item. In the detection items of the display screen, it is divided into screen body defect detection and display defect detection. The screen body defect detection is mainly for physical traumas generated during the production process of the screen body, such as: chipping, scratching, etc. The display defect is mainly for the display damage of pixel points, such as: high brightness, poor display, etc. The embodiments of the present application mainly focus on display defects, and generate background images according to the specific types to be detected, and need to be designed in combination with the scenario and Pattern image of this detection item.
[0056] In this step, after placing the target display screen in the darkroom environment, for the display defects of the current detection item, it is necessary to first generate a background image before display can be performed.
[0057] The background screen can generate the background screen according to the Pattern screen. In the De-Mura process, for a display screen without complex layers set, each part of the entire display screen area has a similar structure, and the difficulty of detecting display screen defects is relatively low. For a Pattern screen where the exposure time is determined to be within the same interval, the same background image with the same exposure time within the area can be used as the background screen.
[0058] 102. Generate a set of exposure times to be segmented according to the maximum gray saturation of the sampling camera.
[0059] The terminal generates a set of exposure times to be segmented according to the maximum gray saturation of the sampling camera, that is, it is necessary to generate a valid exposure time interval (upper and lower limits of the exposure time) according to the maximum gray saturation of the sampling camera, and then generate multiple exposure times to be segmented that can be used as the interval range according to the preset step size. The exposure times to be segmented here may be the upper and lower limits of the subsequent quasi-linear exposure interval, so it is necessary to limit the range through the maximum gray saturation of the sampling camera, and then design the step size to generate the exposure times to be segmented.
[0060] The step size can be set according to the content of the detection item, and its purpose is to ensure that the subsequent generated interval is more accurate, so that the background image can better subtract the background from the images collected by the display screen.
[0061] Specifically, when the valid exposure time interval is determined to be [t0, th], set t0 as the starting exposure time of the sampling camera and th as the ending exposure time of the camera, and start determining the values of each linear exposure interval T = {t0, t0 + ∆t, t0 + 2*∆t... th} (set of exposure times to be segmented) of the background image at intervals of the calculated step size ∆t (unit: millisecond ms).
[0062] 103. Perform image acquisition on the target display screen according to the set of exposure times to be segmented, and generate a set of images to be segmented.
[0063] The terminal first controls the exposure time of the sampling camera so that it performs image acquisition on the target display screen according to the exposure times to be segmented in the set of exposure times to be segmented. At this time, the background screen is displayed on the target display screen, and the gray data is different due to different exposure times.
[0064] 104. Perform quasi-linear interval segmentation on the set of exposure times to be segmented according to the gray data in the set of images to be segmented, and generate a set of quasi-linear exposure intervals. The set of quasi-linear exposure intervals includes at least two quasi-linear exposure intervals.
[0065] The terminal performs a quasi-linear interval segmentation on the to-be-segmented exposure time set according to the gray-scale data in the to-be-segmented image set, that is, through a joint analysis of the gray-scale data of each to-be-segmented image and its corresponding to-be-segmented exposure time, to determine the to-be-segmented exposure times belonging to the same interval, and then integrate the to-be-segmented exposure times in the same interval to generate a quasi-linear exposure interval set. The specific method for generating the to-be-segmented image set will be described in detail in the following embodiments.
[0066] The core purpose of this step is to generate a comparison coefficient based on the gray-scale data of the to-be-segmented image and the corresponding to-be-segmented exposure time. Through this comparison coefficient, it is possible to better determine the influence of different exposure times on the display ability of the picture on the target display screen, and then integrate the to-be-segmented images with similar display abilities, so that the corresponding exposure times are also integrated, thereby generating a quasi-linear exposure interval set. However, the quasi-linear exposure intervals of different types of display screens are different because the pixel density and arrangement of different display screens are different, and the hierarchical structure of some display screens makes the background area different from the conventional display area, resulting in different influences of different exposure times on the display screen.
[0067] 105. Generate a background subtraction exposure time set based on the acquisition exposure time set corresponding to the display screen Pattern picture set in the current production process and the quasi-linear exposure interval set.
[0068] After obtaining the quasi-linear exposure interval set, the exposure times corresponding to the display screen Pattern picture set on the production line can be classified by interval. Specifically, it is necessary to match each display screen Pattern picture and its corresponding exposure time with all the quasi-linear exposure intervals to find the quasi-linear exposure interval to which each display screen Pattern picture and its corresponding exposure time belong. This may cause a quasi-linear exposure interval to be associated and matched with multiple display screen Pattern pictures and their corresponding exposure times, while some quasi-linear exposure intervals may not have display screen Pattern pictures and their corresponding exposure times.
[0069] Subsequently, the terminal aggregates all the associated quasi-linear exposure intervals, and selects an exposure time from each of these associated quasi-linear exposure intervals as the background subtraction exposure time according to a preset rule to generate a background subtraction exposure time set. The specific method for selecting the background subtraction exposure time will be described in detail in the following embodiments.
[0070] 106. Use a sampling camera to collect the target display screen according to the background subtraction exposure time set to generate a background image set.
[0071] 107. Use the target display screen to display each display screen Pattern picture.
[0072] 108. Image acquisition is performed on the target display screen according to the acquired exposure time set to generate a display screen acquisition image set.
[0073] 109. The background subtraction process is performed on the images in the display screen acquisition image set using the background image set.
[0074] In steps 106 to 109, the terminal sets the sampling camera according to the background subtraction exposure time in the background subtraction exposure time set, and then takes pictures of the target display screen to generate a number of background images. The number of background images is the same as the number of background subtraction exposure times.
[0075] After the segmented background subtraction scheme of the De-Mura scheme is determined, each time the De-Mura process is started, the terminal will first display the W0 screen (background screen) on the target display screen, and take a background image for each exposure time of the background subtraction exposure time T={T1, T2...Tm} to generate m background images. Then the program will then take pictures of each display screen Pattern screen in the order of W={w1, w2, w3......wn} and its acquisition exposure time set. After each display screen Pattern screen is taken, the corresponding display screen acquisition image is obtained. The terminal will perform background subtraction processing on the corresponding background image. Each display screen acquisition image is associated with a background image through the acquisition exposure time.
[0076] In the embodiment of the present application, first, in the scenario of the display screen production process, the target display screen is placed in a darkroom environment so that the target display screen displays a preset background screen to create a real field environment. The to-be-segmented exposure time set is generated according to the maximum gray saturation of the sampling camera. Then, image acquisition is performed on the target display screen according to the to-be-segmented exposure time set to generate a to-be-segmented image set. Class-linear interval segmentation is performed on the to-be-segmented exposure time set according to the gray data in the to-be-segmented image set to generate a class-linear exposure interval set, and the class-linear exposure interval set includes at least two class-linear exposure intervals. The background subtraction exposure time set is generated according to the acquisition exposure time set corresponding to the display screen Pattern screen set of the current production process and the class-linear exposure interval set. The sampling camera is used and the target display screen is acquired according to the background subtraction exposure time set to generate a background image set. Each display screen Pattern screen is displayed on the target display screen. Image acquisition is performed on the target display screen according to the acquisition exposure time set to generate a display screen acquisition image set. The background subtraction process is performed on the images in the display screen acquisition image set using the background image set.
[0077] By preprocessing the target display screen placed in the production line, displaying the background image, and collecting images using the set of exposure times to be segmented generated with the maximum gray saturation, the background image is an exposure time-sensitive image generated for the current detection item. Classify the image gray data obtained by collection into intervals for the exposure times in the set of exposure times to be segmented, so as to generate a class-linear exposure interval. The class-linear exposure interval represents the approximate degree data of different exposure times of this type of target display screen when using the current system (acquisition camera and lens) for this detection item. Next, only need to obtain the display screen Pattern image corresponding to the detection item according to the current production process, and select the corresponding class-linear exposure interval according to the exposure time matched by the display screen Pattern image, so as to match all the display screen Pattern images with the corresponding class-linear exposure intervals. Then, determine the effective and minimum background subtraction exposure time within this range according to the class-linear exposure interval and the matched exposure time. Use the background subtraction exposure time to collect the background image for background subtraction of the detection item. Finally, perform background subtraction processing on the images in the display screen acquisition image set using the set of background images. This solution enables all display screen Pattern images to use the most suitable background image for background subtraction, and can better reduce the influence of visible light and invisible light on the display screen image in this detection item.
[0078] Please refer to Figure 2 , an embodiment of a method for generating a set of exposure times to be segmented provided by this application includes:
[0079] 201. Set the target gray upper limit and the target gray lower limit according to the maximum gray saturation of the acquisition camera.
[0080] 202. Adjust the exposure time of the acquisition camera so that the image gray levels collected by the acquisition camera are respectively the target gray upper limit and the target gray lower limit, and record the corresponding exposure time upper limit and exposure time lower limit.
[0081] 203. Obtain the exposure time interval.
[0082] 204. Generate a set of exposure times to be segmented according to the exposure time upper limit, the exposure time lower limit, and the exposure time interval.
[0083] In the embodiment of this application, the target gray upper limit and the target gray lower limit are set according to the maximum gray saturation of the acquisition camera.
[0084] The following is an example: First, turn on the sampling camera to take pictures of the target display screen. It is necessary to set the target gray levels of the sampling camera to 1% and 90% of the maximum gray saturation (for example, 255 for an 8-bit image), and this value can be adjusted according to the detection project. Use the automatic exposure function of the camera or manually adjust the camera exposure so that the gray level of the image collected by the camera is near the target gray levels set above. Record the camera exposure times corresponding to these two target gray levels as t0 and th respectively, with the unit of ms. The terminal sets t0 as the starting exposure time of the camera and th as the ending exposure time of the camera, and starts to find the linear exposure interval points T = {t0, t0 + ∆t, t0 + 2*∆t... th} of the background image at the time interval (step size) ∆t.
[0085] The method for obtaining the exposure time interval is mainly determined by the target defect of the detection project. One specific method can be as follows: First, determine the range where the target defect is greatly affected by the exposure time, which is the defect exposure time range. This data can be set based on human experience. Then, set the exposure time detection so that the exposure time points in the linear exposure interval points T = {t0, t0 + ∆t, t0 + 2*∆t... th} are as close as possible to the upper and lower limits of the defect exposure time range.
[0086] Please refer to Figure 3 , this application provides an embodiment of a method for generating a set of quasi-linear exposure intervals, including:
[0087] 301. Determine the sampling area of each image to be segmented in the set of images to be segmented, and determine the average gray level of the sampling area.
[0088] 302. Generate segmentation interval values for each exposure time to be segmented according to the average gray level of the sampling area.
[0089] 303. Conduct interval analysis on the segmentation interval values of all exposure times to be segmented in sequence;
[0090] 304. If two adjacent exposure times to be segmented belong to the same quasi-linear exposure time interval, incorporate the latter exposure time to be segmented into the quasi-linear exposure time interval of the former exposure time to be segmented;
[0091] 305. If two adjacent exposure times to be segmented do not belong to the same quasi-linear exposure time interval, use the latter exposure time to be segmented as the starting point of a new quasi-linear exposure time interval;
[0092] 306. When the interval analysis of all exposure time intervals to be segmented is completed, generate a set of quasi-linear exposure intervals.
[0093] The terminal first captures the target display screen showing the W0 image with the exposure time t0 to be segmented, and then takes the central area of this image to be segmented as the sampling area. Specifically, a rectangular area with a 2-field of view relative to the center of the camera optical axis is taken, and the average gray value G is calculated. t0 Then, the W0 image is captured with the exposure time t0 + ∆t to be segmented, and the average gray value G of the corresponding area of the image to be segmented is calculated. t0+∆t Next, the W0 image is captured with the exposure time t0 + 2*∆t to be segmented, and the average gray value G of the corresponding area of the image to be segmented is calculated. t0+2*∆t And so on. For each exposure time to be segmented, an image to be segmented is generated, and an average gray value is calculated.
[0094] Next, the terminal generates segmentation interval values for each exposure time to be segmented based on the average gray value of the sampling area, compares and analyzes the segmentation interval values of two adjacent exposure times to be segmented, and generates a set of quasi-linear exposure intervals.
[0095] When the target display screen does not contain the in-screen circuit area and is a uniformly distributed flat screen, denote the segmentation interval value k t0 = G t0 / t0, denote the segmentation interval value k t0+∆t = G t0+∆t / (t0 + ∆t), and so on, to generate multiple segmentation interval values. Then, if abs(k t0 - k t0+∆t ) < ∆k, it means that t0 and t0 + ∆t are in a linear exposure interval. First, mark this interval as [t0, t0 + ∆t], where abs() is the absolute value operation.
[0096] Then, for t0 + 2*∆t, denote k t0+2*∆t = G t0+2*∆t / (t0 + 2*∆t), and then determine if abs(k t0+∆t - k t0+2*∆t ) < ∆k. If the condition is still satisfied, update the current linear exposure area to [t0, t0 + 2*∆t], and so on, and judge in turn until abs(k t0+(N-1)*∆t - k t0+N*∆t ) < ∆k is satisfied, while abs(k t0+N*∆t - k t0+(N+1)*∆t ) < ∆k is not satisfied. At this time, the optimization of the current linear interval [t0, t0 + N*∆t] is completed.
[0097] The new linear exposure interval starts from (t0 + N*∆t, t0 + (N + 1)*∆t] (note that the starting interval is an open interval on the left and a closed interval on the right), and still uses ∆t as the time interval. Judge the slope difference of two adjacent exposure time intervals in turn until abs(k t0+(M-1)*∆t - kt0+M*∆t ) When the <∆k condition is satisfied and abs(k t0+M*∆t - k t0+(M+1)*∆t ) When the <∆k is not satisfied, the optimization of the current linear interval (t0 + N * ∆t, t0 + M * ∆t) is completed;
[0098] A new linear exposure interval starts from (t0 + M * ∆t, t0 + (M + 1) * ∆t]. Referring to the above steps, until [t0, th] is divided into several quasi-linear exposure intervals [t0, t0 + N * ∆t], (t0 + N * ∆t, t0 + M * ∆t]......(t0 + X * ∆t, th] (N < M <...... < X). At this point, the division of the quasi-linear intervals of the background screen in its exposure area [t0, th] is completed.
[0099] The above quasi-linear interval division method is the fastest and most accurate for a flat screen without complex layers (such as an internal circuit layer).
[0100] Please refer to Figure 4 , this application provides an embodiment of a method for generating a background screen, including:
[0101] 401. In the scenario of the display screen production process, place the target display screen in a darkroom environment and obtain the first display screen Pattern image, where the first display screen Pattern image is the image when the non-circuit area is used as the background area.
[0102] 402. Generate target grayscale data based on the grayscale data of the first display screen Pattern image and the reflectivity data of the in-screen circuit area.
[0103] 403. Adjust the arrangement rule according to the arrangement rule of the pixels to be lit in the first display screen Pattern image and the reflectivity data of the in-screen circuit area.
[0104] 404. Generate the second display screen Pattern image according to the adjusted arrangement rule and the target grayscale data.
[0105] 405. Obtain the image features of the circuit area of the target display screen, and integrate the image features of the circuit area into the second display screen Pattern image through a feature fusion model to generate a background screen.
[0106] 406. Make the target display screen display the background screen.
[0107] In the embodiments of the present application, the target display screen is a screen body with a thin-film circuit (in-screen circuit) provided on the pixel layer. For a display screen with an internal circuit, it is more difficult to detect defects. Such display screens usually have a thin-film circuit provided on the pixel layer and are usually not located at the center of the display screen. They are usually distributed around the perimeter or at a corner of the display screen. Since the thin-film circuit is mainly made of metal and has a high degree of integration, it has a certain reflection ability, which brings difficulties to the detection of display defects. Because the detection of display defects usually requires lighting the Pattern screen of the display screen on the pixel layer, the thin-film circuit may reflect the light of the pixel points, thereby affecting the detection of surrounding defects. In the embodiments of the present application, for a display screen with an internal thin-film circuit and the circuit area is used as the background area in the detection items (i.e., the detection of defects in the non-circuit area). For this display screen and the display screen Pattern screen, the generation of the background screen requires design, and the design scheme is as follows:
[0108] First, the terminal obtains the grayscale data of the first display screen Pattern screen when the non-circuit area is used as the background area, and then adjusts the grayscale data according to the reflectivity of the in-screen thin-film circuit to generate the target grayscale data when the circuit area is used as the background area. After obtaining the target grayscale data, obtain the arrangement rule of the pixel points to be lit in the first display screen Pattern screen. It is necessary to determine whether the reflectivity of the in-screen thin-film circuit is greater than the preset value. If it is greater than the preset value, the original arrangement rule of the first display screen Pattern screen needs to be adjusted to be sparser. For example, if the first display screen Pattern screen is fully lit, the new arrangement method is to light every other row or select 2 diagonal pixel points out of 3*3 pixel points not to be lit.
[0109] Next, generate the second display screen Pattern screen according to the new arrangement rule and the target grayscale data. Then determine the captured image of the thin-film circuit on the target display screen, extract the image features of the circuit area from the captured image, and then fuse the image features of the circuit area into the first display screen Pattern screen to generate at least one background screen. Specifically, use an image fusion model to fuse the first display screen Pattern screen after grayscale adjustment and the image features of the circuit area. This background screen will incorporate a small part of the thin-film circuit features, that is, the grayscale of the pixel points will be adjusted again. Such a background screen can better fit the circuit area as the background area. Taking a picture of this background screen, the captured image's response to the change in exposure time is more in line with the target display screen (with a circuit area), increasing the linear exposure interval has strong pertinence. For the circuit area used as the background area, it further improves the background subtraction effect of the captured image for subsequent defect detection (the captured image in the actual detection process, and the detection item is to detect defects in the non-circuit area).
[0110] Please refer toFigure 5 , an embodiment of a method for generating a set of quasi-linear exposure intervals provided by this application includes:
[0111] 501. Determine the sampling area of each to-be-segmented image in the to-be-segmented image set according to the camera optical axis center, and detect the average gray value of the sampling area, where the sampling area is located in the in-screen circuit area.
[0112] 502. Generate a segmentation interval value for each to-be-segmented exposure time according to the reflectivity data of the in-screen circuit area and the average gray value of the sampling area.
[0113] 503. Perform interval analysis on the segmentation interval values of all to-be-segmented exposure times in sequence;
[0114] 504. If two adjacent to-be-segmented exposure times belong to the same quasi-linear exposure time interval, incorporate the latter to-be-segmented exposure time into the quasi-linear exposure time interval of the former to-be-segmented exposure time;
[0115] 505. If two adjacent to-be-segmented exposure times do not belong to the same quasi-linear exposure time interval, use the latter to-be-segmented exposure time as the starting point of a new quasi-linear exposure time interval;
[0116] 506. When the interval analysis of all to-be-segmented exposure time intervals is completed, generate a set of quasi-linear exposure intervals.
[0117] In the embodiment of this application, since the detection item is the non-circuit area, when using the sampling camera for sampling, it is necessary to adjust the optical axis center of the sampling camera so that the camera center point of the sampling camera is aligned with the in-screen circuit area. After capturing the to-be-segmented images, at this time, the terminal needs to determine the sampling area of each to-be-segmented image in the to-be-segmented image set according to the camera optical axis center, and detect the average gray value of the sampling area, where the sampling area is located in the in-screen circuit area. In the embodiment of this application, the sampling area selects the in-screen circuit area, then detects the average gray value of this sampling area, and generates a segmentation interval value for each to-be-segmented exposure time according to the reflectivity data of the in-screen circuit area and the average gray value of the sampling area. Because the in-screen circuit area is used as the background area, its reflectivity can cause differences in display, so it is necessary to use the reflectivity data, the average gray value of the sampling area, and a new calculation method to generate the segmentation interval value, and then compare and analyze the segmentation interval values of two adjacent to-be-segmented exposure times to generate a set of quasi-linear exposure intervals, so that the in-screen circuit area as the background can be better.
[0118] Specific ways of generating the segmentation interval value need to be discussed separately according to the differences in the in-screen circuit area.
[0119] Please refer to Figure 6 , an embodiment of a method for segmentation interval value provided by this application includes:
[0120] 601. Determine the reflectivity parameters corresponding to the uniform circuit region from the reflectivity data.
[0121] 602. Adjust the grayscale mean value of the sampling region according to the reflectivity parameters to generate the first grayscale mean value.
[0122] 603. Generate a segmentation interval value for each exposure time to be segmented according to the first grayscale mean value and the grayscale mean value of the sampling region.
[0123] In the embodiment of the present application, when the circuit type of the in-screen circuit region is a uniform circuit region, the reflectivity is uniform, and the terminal determines the reflectivity parameters corresponding to the uniform circuit region from the reflectivity data. The terminal adjusts the grayscale mean value of the sampling region according to the reflectivity parameters to generate the first grayscale mean value, and the formula is as follows:
[0124]
[0125] Wherein, is the grayscale mean value of the sampling region, is the first grayscale mean value.
[0126] Next, the terminal generates a segmentation interval value for each exposure time to be segmented according to the first grayscale mean value and the grayscale mean value of the sampling region The formula is as follows:
[0127]
[0128] is the segmentation interval value, is the corresponding exposure time to be segmented. By comparing the gray levels of the in-screen circuit region and the non-circuit region (conventional region) in the form of the difference of squares and then dividing by the corresponding exposure time to be segmented, this method is more suitable for this type of display screen with an in-screen circuit, improves the segmentation of the background region of this type of display screen, and can better classify the exposure time to be segmented. The subsequent analysis method is similar to steps 301-303 in the foregoing embodiment and will not be elaborated here.
[0129] Please refer to Figure 7 An embodiment of a method for generating a segmentation interval value provided by the present application includes:
[0130] 701. Determine the maximum reflectivity parameter, minimum reflectivity parameter and line ratio corresponding to the gradient circuit region from the reflectivity data.
[0131] 702. Adjust the grayscale mean value of the sampling region according to the maximum reflectivity parameter, minimum reflectivity parameter and line ratio to generate the second grayscale mean value.
[0132] 703. Generate a segmentation interval value for each exposure time to be segmented based on the second grayscale mean and the grayscale mean of the sampling area.
[0133] In this embodiment, when the circuit type in the in-screen circuit area is a uniform circuit area, such a gradient circuit is usually a dense metal line. Such metal lines have an arrangement similar to a fence, and the thickness decreases. It belongs to the circuit module for transmitting signals, and the maximum reflectivity parameter needs to be calculated. and the minimum reflectivity parameter . Then, because there are regular gaps between the lines, the line ratio of the circuit area can be obtained. . Next, obtain the grayscale mean of the non-circuit area. Then, the terminal adjusts the grayscale mean of the sampling area according to the maximum reflectivity parameter, the minimum reflectivity parameter, and the line ratio to generate the second grayscale mean . The formula is as follows:
[0134]
[0135] Subsequently, the terminal generates a segmentation interval value for each exposure time to be segmented based on the second grayscale mean and the grayscale mean of the sampling area. The specific details are similar to those in step 603 and will not be elaborated here.
[0136] Please refer to Figure 8 . This application provides an embodiment of a method for generating a set of background subtraction exposure times, including:
[0137] 801. Determine the acquisition exposure time corresponding to each display screen Pattern image in the set of display screen Pattern images of the current production process.
[0138] 802. Classify each acquisition exposure time into the corresponding class linear exposure interval.
[0139] 803. Screen the acquisition exposure times in each class linear exposure interval, determine a background subtraction exposure time from each class linear exposure interval, and generate a set of background subtraction exposure times. Each background subtraction exposure time corresponds to at least one display screen Pattern image.
[0140] In the embodiment of this application, the segmented background scheme of the De-mura process is mainly based on the set of display screen Pattern images W = {w1, w2, w3......w n}(The de-mura process generally performs image acquisition in the order from high gray scale to low gray scale. After the user sets all the captured images, the program will automatically sort them in the order of gray scale from high to low), and each display Pattern image has a corresponding exposure time t = {t1, t2, t3... t n} (Generally, t1 ≤ t2 ≤ t3... ≤ tn, and the program will ensure that this condition holds), find the display Pattern images belonging to the same class of linear exposure intervals and determine the exposure time of the background images of these images.
[0141] The specific steps of the segmented background scheme of the de-mura process are as follows:
[0142] 1. First, start from the w1 image, use the exposure time t1 corresponding to the w1 image to find the class of linear exposure region D1 where t1 is located, where D1 ∈ {[t0, t0 + N * ∆t], (t0 + N * ∆t, t0 + M * ∆t),... (t0 + X * ∆t, th]}, specifically belonging to one of these classes of linear exposure intervals. Each class of linear exposure interval generates a background image according to the exposure time point. At this time, record the exposure time point T1 of the first background image, and its corresponding initial set is {w1}.
[0143] 2. Then, judge whether the exposure time t2 of the w2 image is in the D1 region, that is, judge whether t2 ∈ D1 holds. If it holds, the Pattern image set corresponding to T1 is expanded to {w1, w2}, and so on, until all the display Pattern images belonging to the D1 class of linear exposure intervals are found, denoted as T1 -> {w1, w2... w i};
[0144] 3. Then, use the class of linear exposure interval D2 (D2 ∈ {[t0, t0 + N * ∆t], (t0 + N * ∆t, t0 + M * ∆t),... (t0 + X * ∆t, th]}) where the exposure time ti+1 of the image W i+1 . Record the exposure time point T2 of the second background image, and find all the display Pattern images with the photographing exposure time in the region D2, denoted as T2 -> {w i+1 , w i+2 ... w j};
[0145] 4. And so on until a set of exposure time sets \(T = \{T_1, T_2, \cdots, T_m\}\) (usually \(m \leq 3\)), namely the background subtraction exposure time set, is found, such that all display patterns in the \(W\) set (the display pattern screen \(W=\{w_1, w_2, w_3, \cdots, w_n\}\)) have corresponding quasi-linear exposure intervals \(D = \{D_1, D_2, \cdots, D\}\) m}(where \(D\) is a subset of the set \(\{[t_0, t_0 + N\times\Delta t], (t_0 + N\times\Delta t, t_0 + M\times\Delta t), \cdots, (t_0 + X\times\Delta t, t_h]\}\), and \(W=\{w_1, w_2, \cdots, w\}\) i \} \cup \{w i+1 , w i+ 2, \cdots, w j}\} \cup \cdots \cup \{w h , w h+1 , \cdots, w n}\).
[0146] 5. For the background subtraction exposure time set \(T = \{T_1, T_2, \cdots, T_m\}\), traverse each element \(T_x\) in \(T\), and take the minimum exposure value of the quasi-linear exposure interval \((T_a, T_b)\) corresponding to \(T_x\), where \(T_a\) and \(T_b\) are the upper and lower limits of the interval. That is, if the left endpoint of the current interval is closed, directly take the value \(T_a\) of the left endpoint; if the left endpoint is non-closed, take \(T_a+\Delta t\) as the final value of \(T_x\). Then the program will correspond each display pattern screen with \(T_x\) one by one.
[0147] Please refer to Figure 9 , an embodiment of a device for background subtraction based on a display screen provided by this application includes:
[0148] A setting unit 901, configured to place a target display screen in a dark room environment in the scenario of the display screen production process, so that the target display screen displays a preset background picture.
[0149] Optionally, the target display screen includes an in-screen circuit area, the non-in-screen circuit area is used as an effective area, the in-screen circuit area is used as a background area, and the camera center point of the sampling camera is aligned with the in-screen circuit area.
[0150] The setting unit 901 includes: in the scenario of the display screen production process, placing the target display screen in a darkroom environment, obtaining the first display screen Pattern image, where the first display screen Pattern image is the image when the non-circuit area is used as the background area; generating target gray-scale data according to the gray-scale data of the first display screen Pattern image and the reflectivity data of the in-screen circuit area; adjusting the arrangement rule according to the arrangement rule of the pixel points to be lit in the first display screen Pattern image and the reflectivity data of the in-screen circuit area; generating a second display screen Pattern image according to the adjusted arrangement rule and the target gray-scale data; obtaining the image feature of the circuit area of the target display screen, and integrating the image feature of the circuit area into the second display screen Pattern image through a feature fusion model to generate a background image; making the target display screen display the background image.
[0151] The first generating unit 902 is configured to generate a set of exposure times to be segmented according to the maximum gray-scale saturation of the sampling camera.
[0152] Optionally, the first generating unit 902 includes:
[0153] Set a target gray-scale upper limit and a target gray-scale lower limit according to the maximum gray-scale saturation of the acquisition camera.
[0154] Adjust the exposure time of the acquisition camera so that the gray-scale of the image acquired by the acquisition camera is the target gray-scale upper limit and the target gray-scale lower limit respectively, and record the corresponding exposure time upper limit and exposure time lower limit.
[0155] Obtain the exposure time interval.
[0156] Generate a set of exposure times to be segmented according to the exposure time upper limit, the exposure time lower limit and the exposure time interval.
[0157] The second generating unit 903 is configured to perform image acquisition on the target display screen according to the set of exposure times to be segmented, and generate a set of images to be segmented.
[0158] The third generating unit 904 is configured to perform class-linear interval segmentation on the set of exposure times to be segmented according to the gray-scale data in the set of images to be segmented, and generate a set of class-linear exposure intervals, where the set of class-linear exposure intervals includes at least two class-linear exposure intervals.
[0159] Optionally, the target display screen does not include an in-screen circuit area.
[0160] The third generating unit 904 includes:
[0161] Determine the sampling area of each image to be segmented in the set of images to be segmented, and determine the gray-scale mean of the sampling area.
[0162] Generate a segmentation interval value for each exposure time to be segmented according to the gray mean value of the sampling area.
[0163] Perform interval analysis on the segmentation interval values of all exposure times to be segmented in sequence;
[0164] If two adjacent exposure times to be segmented belong to the same type of linear exposure time interval, incorporate the latter exposure time to be segmented into the linear exposure time interval of the former exposure time to be segmented;
[0165] If two adjacent exposure times to be segmented do not belong to the same type of linear exposure time interval, use the latter exposure time to be segmented as the starting point of a new linear exposure time interval;
[0166] When the interval analysis of all exposure times to be segmented is completed, generate a set of linear exposure intervals.
[0167] Optionally, align the camera center point of the sampling camera with the in-screen circuit area.
[0168] The third generation unit 904 includes: determining the sampling area of each image to be segmented in the set of images to be segmented according to the camera optical axis center, and detecting the gray mean value of the sampling area, where the sampling area is located in the in-screen circuit area. Generate a segmentation interval value for each exposure time to be segmented according to the reflectivity data of the in-screen circuit area and the gray mean value of the sampling area. Perform interval analysis on the segmentation interval values of all exposure times to be segmented in sequence; if two adjacent exposure times to be segmented belong to the same type of linear exposure time interval, incorporate the latter exposure time to be segmented into the linear exposure time interval of the former exposure time to be segmented; if two adjacent exposure times to be segmented do not belong to the same type of linear exposure time interval, use the latter exposure time to be segmented as the starting point of a new linear exposure time interval; when the interval analysis of all exposure times to be segmented is completed, generate a set of linear exposure intervals.
[0169] Optionally, the target display screen includes an in-screen circuit area, the in-screen circuit area is used as the effective area, the non-in-screen circuit area is used as the background area, and the camera center point of the sampling camera is aligned with the in-screen circuit area.
[0170] The third generation unit 904 includes:
[0171] A determination module 9041, configured to determine the sampling area of each image to be segmented in the set of images to be segmented according to the camera optical axis center, and detect the gray mean value of the sampling area, where the sampling area is located in the in-screen circuit area.
[0172] A first generation module 9042, configured to generate a segmentation interval value for each exposure time to be segmented according to the reflectivity data of the in-screen circuit area and the gray mean value of the sampling area.
[0173] Optionally, the circuit type in the in-screen circuit area is a uniform circuit area.
[0174] The steps of the first generation module 9042 include:
[0175] Determine the reflectivity parameters corresponding to the uniform circuit area from the reflectivity data.
[0176] Adjust the gray-scale mean value of the sampling area according to the reflectivity parameters to generate the first gray-scale mean value.
[0177] Generate a segmentation interval value for each exposure time to be segmented according to the first gray-scale mean value and the gray-scale mean value of the sampling area.
[0178] Optionally, the circuit type in the in-screen circuit area is a gradient circuit area.
[0179] The steps of the first generation module 9042 include:
[0180] Determine the maximum reflectivity parameter, the minimum reflectivity parameter and the line ratio corresponding to the gradient circuit area from the reflectivity data.
[0181] Adjust the gray-scale mean value of the sampling area according to the maximum reflectivity parameter, the minimum reflectivity parameter and the line ratio to generate the second gray-scale mean value.
[0182] Generate a segmentation interval value for each exposure time to be segmented according to the second gray-scale mean value and the gray-scale mean value of the sampling area.
[0183] The analysis module 9043 is used to perform interval analysis on the segmentation interval values of all exposure times to be segmented in sequence;
[0184] The merging module 9044 is used to merge the latter exposure time to be segmented into the linear exposure time interval of the former exposure time to be segmented if two adjacent exposure times to be segmented belong to the same type of linear exposure time interval;
[0185] The partitioning unit 9045 is used to use the latter exposure time to be segmented as the starting point of a new linear exposure time interval if two adjacent exposure times to be segmented do not belong to the same type of linear exposure time interval;
[0186] The second generation module 9046 is used to generate a set of linear exposure intervals when the interval analysis of all exposure times to be segmented is completed.
[0187] The fourth generation unit 905 is used to generate a background subtraction exposure time set according to the acquisition exposure time set corresponding to the display Pattern picture set of the current production process and the set of linear exposure intervals.
[0188] Optionally, the fourth generation unit 905 includes:
[0189] Determine the acquisition exposure time corresponding to each display screen Pattern image in the set of display screen Pattern images of the current production process.
[0190] Classify each acquisition exposure time into the corresponding class linear exposure interval.
[0191] Filter the acquisition exposure times in each class linear exposure interval, determine a background subtraction exposure time from each class linear exposure interval, generate a set of background subtraction exposure times, and each background subtraction exposure time corresponds to at least one display screen Pattern image.
[0192] The fifth generation unit 906 is configured to use a sampling camera and perform acquisition on the target display screen according to the set of background subtraction exposure times to generate a set of background images.
[0193] The display unit 907 is configured to use the target display screen to display each display screen Pattern image.
[0194] The sixth generation unit 908 is configured to perform image acquisition on the target display screen according to the set of acquisition exposure times to generate a set of display screen acquisition images.
[0195] The subtraction unit 909 is configured to perform background subtraction processing on the images in the set of display screen acquisition images using the set of background images.
[0196] Please refer to Figure 10 , this application provides a device for background subtraction based on a display screen, including:
[0197] A processor 1001, a memory 1002, an input / output unit 1003, and a bus 1004.
[0198] The processor 1001 is connected to the memory 1002, the input / output unit 1003, and the bus 1004.
[0199] The memory 1002 stores a program, and the processor 1001 calls the program to execute the methods as described in Figure 1 , Figure 2 , Figure 3 , Figure 4 , Figure 5 , Figure 6 , Figure 7 and Figure 8 in the method.
[0200] This application provides a computer-readable storage medium, and a program is stored on the computer-readable storage medium. When the program is executed on a computer, it executes the methods as described in Figure 1 , Figure 2 , Figure 3 ,Figure 4 , Figure 5 , Figure 6 , Figure 7 and Figure 8 the methods in.
[0201] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the above-described systems, devices, and units can refer to the corresponding processes in the foregoing method embodiments, and will not be elaborated herein.
[0202] In several embodiments provided in the present application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed mutual coupling, direct coupling, or communication connection can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be in electrical, mechanical, or other forms.
[0203] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiments of the present application.
[0204] In addition, the functional units in each embodiment of the present application can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
[0205] When the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or 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 causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The foregoing storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs.
Claims
1. A method for background subtraction based on a display screen, characterized in that Including: In the scenario of the display screen production process, place the target display screen in a darkroom environment so that the target display screen displays a preset background image; Generate a set of exposure times to be segmented according to the maximum gray saturation of the sampling camera; Collect images of the target display screen according to the set of exposure times to be segmented, and generate a set of images to be segmented; Perform class-linear interval segmentation on the set of exposure times to be segmented according to the gray data in the set of images to be segmented, and generate a set of class-linear exposure intervals, where the set of class-linear exposure intervals includes at least two class-linear exposure intervals; Generate a background subtraction exposure time set according to the set of acquisition exposure times corresponding to the display screen Pattern image set of the current production process and the set of class-linear exposure intervals; Use the sampling camera and collect the target display screen according to the background subtraction exposure time set to generate a set of background images; Use the target display screen to display each display screen Pattern image; Collect images of the target display screen according to the set of acquisition exposure times to generate a set of display screen acquisition images; Perform background subtraction processing on the images in the set of display screen acquisition images using the set of background images.
2. The method according to claim 1, wherein The step of generating the set of exposure times to be segmented according to the maximum gray saturation of the sampling camera includes: Set a target gray upper limit and a target gray lower limit according to the maximum gray saturation of the acquisition camera; Adjust the exposure time of the acquisition camera so that the gray levels of the images collected by the acquisition camera are the target gray upper limit and the target gray lower limit respectively, and record the corresponding exposure time upper limit and exposure time lower limit; Obtain the exposure time interval; Generate a set of exposure times to be segmented according to the exposure time upper limit, exposure time lower limit and the exposure time interval.
3. The method according to claim 2, wherein The target display screen does not include the in-screen circuit area; The step of performing class-linear interval segmentation on the set of exposure times to be segmented according to the gray data in the set of images to be segmented, and generating a set of class-linear exposure intervals includes: Determine the sampling area of each image to be segmented in the set of images to be segmented, and determine the average gray level of the sampling area; Generate a segmentation interval value for each exposure time to be segmented according to the average gray level of the sampling area; Perform interval analysis on the segmentation interval values of all exposure times to be segmented in order; If two adjacent exposure times to be segmented belong to the same class-linear exposure time interval, then incorporate the latter exposure time to be segmented into the class-linear exposure time interval of the former exposure time to be segmented; If two adjacent exposure times to be segmented do not belong to the same class-linear exposure time interval, then use the latter exposure time to be segmented as the starting point of a new class-linear exposure time interval; When all the exposure time interval analyses to be segmented are completed, generate a set of class-linear exposure intervals.
4. The method according to claim 1, wherein The target display screen includes an in-screen circuit area, the non-in-screen circuit area is used as the effective area, the in-screen circuit area is used as the background area, and the camera optical axis center of the sampling camera is located in the in-screen circuit area; In the scenario of the display screen production process, the step of placing the target display screen in a darkroom environment so that the target display screen displays a preset background image includes: In the scenario of the display screen production process, place the target display screen in a darkroom environment, and obtain the first display screen Pattern image. The first display screen Pattern image is the image when the non-circuit area is used as the background area; Generate target gray-scale data based on the gray-scale data of the first display screen Pattern image and the reflectivity data of the in-screen circuit area; Adjust the arrangement rule according to the arrangement rule of the pixel points to be lit in the first display screen Pattern image and the reflectivity data of the in-screen circuit area; Generate the second display screen Pattern image according to the adjusted arrangement rule and the target gray-scale data; Obtain the circuit area image feature of the target display screen, and integrate the circuit area image feature into the second display screen Pattern image through the feature fusion model to generate the background image; Make the target display screen display the background image.
5. The method according to claim 4, characterized in that Align the camera center point of the sampling camera with the in-screen circuit area; The step of performing class-linear interval segmentation on the set of exposure times to be segmented according to the gray-scale data in the set of images to be segmented, and generating a set of class-linear exposure intervals includes: Determine the sampling area of each image to be segmented in the set of images to be segmented according to the camera optical axis center, and detect the gray-scale mean value of the sampling area. The sampling area is located in the in-screen circuit area; Generate a segmentation interval value for each exposure time to be segmented according to the reflectivity data of the in-screen circuit area and the gray-scale mean value of the sampling area; Perform interval analysis on the segmentation interval values of all exposure times to be segmented in sequence; If two adjacent exposure times to be segmented belong to the same class-linear exposure time interval, then incorporate the latter exposure time to be segmented into the class-linear exposure time interval of the former exposure time to be segmented; If two adjacent exposure times to be segmented do not belong to the same class-linear exposure time interval, then use the latter exposure time to be segmented as the starting point of a new class-linear exposure time interval; When all the exposure time intervals to be segmented have been analyzed, generate a set of class-linear exposure intervals.
6. The method according to claim 5, characterized in that, The circuit type of the in-screen circuit area is a uniform circuit area; The step of generating a segmentation interval value for each exposure time to be segmented according to the reflectivity data of the in-screen circuit area and the gray-scale mean value of the sampling area includes: Determine the reflectivity parameter corresponding to the uniform circuit area from the reflectivity data; Adjust the gray-scale mean value of the sampling area according to the reflectivity parameter to generate the first gray-scale mean value; Generate a segmentation interval value for each exposure time to be segmented according to the first gray-scale mean value and the gray-scale mean value of the sampling area.
7. The method according to claim 5, characterized in that, The circuit type of the in-screen circuit area is a gradient line area; The step of generating a segmentation interval value for each exposure time to be segmented according to the reflectivity data of the in-screen circuit area and the gray-scale mean value of the sampling area includes: Determine the maximum reflectivity parameter, minimum reflectivity parameter, and line ratio corresponding to the gradient circuit area from the reflectivity data; Adjust the gray mean value of the sampling area according to the maximum reflectivity parameter, the minimum reflectivity parameter, and the line ratio to generate a second gray mean value; Generate a segmentation interval value for each exposure time to be segmented according to the second gray mean value and the gray mean value of the sampling area.
8. The method according to any one of claims 1 to 7, characterized in that The step of generating a background subtraction exposure time set according to the acquisition exposure time set corresponding to the display Pattern picture set of the current production process and the linear exposure interval set includes: Determine the acquisition exposure time corresponding to each display Pattern picture in the display Pattern picture set of the current production process; Classify each acquisition exposure time into the corresponding linear exposure interval; Screen the acquisition exposure times in each linear exposure interval, determine a background subtraction exposure time from each linear exposure interval, and generate a background subtraction exposure time set, where each background subtraction exposure time corresponds to at least one display Pattern picture.
9. A device for background subtraction based on a display screen, characterized in that, Includes: A setting unit for placing the target display in a dark room environment in the scenario of the display production process, so that the target display displays a preset background picture; A first generation unit for generating a set of exposure times to be segmented according to the maximum gray saturation of the sampling camera; A second generation unit for performing image acquisition on the target display according to the set of exposure times to be segmented to generate a set of images to be segmented; A third generation unit for performing linear interval segmentation on the set of exposure times to be segmented according to the gray data in the set of images to be segmented to generate a set of linear exposure intervals, where the set of linear exposure intervals includes at least two linear exposure intervals; A fourth generation unit for generating a background subtraction exposure time set according to the acquisition exposure time set corresponding to the display Pattern picture set of the current production process and the set of linear exposure intervals; A fifth generation unit for using the sampling camera and performing acquisition on the target display according to the background subtraction exposure time set to generate a set of background images; A display unit for using the target display to display each display Pattern picture; A sixth generation unit for performing image acquisition on the target display according to the acquisition exposure time set to generate a set of display acquisition images; A subtraction unit for performing background subtraction processing on the images in the set of display acquisition images using the set of background images.
10. A computer-readable storage medium, characterized in that, A program is stored on the computer-readable storage medium, and when the program is executed on a computer, it executes the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Automatic exposure method with scene self-adaptivity
CN106454145A
Image processing method, image processing device, storage medium and electronic equipment
CN112767295A