Positioning method, system and device for display screen foreign matter layered detection
The camera uses correlation calculation and template matching technology to quickly locate the reference position in the layered detection of foreign objects on the display screen, solving the problem of low positioning efficiency in the existing technology, achieving more efficient layered detection of foreign objects, and adapting to the needs of high-speed production lines. .
Patent Information
- Application Number
- CN202411183579.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-27
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2044-08-27
AI Technical Summary
In the detection of foreign matter delamination on the display screen, the existing technology has low efficiency in locating the reference position and cannot meet the needs of high-speed production lines. Moreover, it relies on manual adjustment or the time-consuming automatic positioning method, which has problems of subjectivity and high cost.
Collect images through the camera at the initial position, create a template, perform correlation calculations, adjust the camera position until the correlation check score reaches the preset value, determine the reference position, and use the PHash perceptual hashing method, SSIM structural similarity method or histogram Distance measurement method is used for positioning analysis to shorten positioning time.
It significantly reduces the number of axis movements and the number of photos taken, improves the positioning efficiency of foreign object layer detection on the display screen, can meet production needs even when the hardware conditions do not support flying shooting, and improves the positioning cycle efficiency.
Smart Images

Figure CN118691618A
Abstract
Description
Technical Field
[0001] The present application relates to the field of display technology, and in particular to a positioning method, system and device for detecting delamination of foreign matter on a display screen. Background Art
[0002] Display modules are usually composed of several layers. For example, OLED display modules generally include CG layer (cover glass), OCA layer (optical adhesive), POL layer (polarizer), PANEL layer (pixel layer), SF layer (support film), and TU layer (composite tape) from top to bottom. During the assembly and bonding process of these different hierarchical structures, foreign objects will inevitably be sandwiched in them, causing interlayer foreign object defects. This interlayer foreign object defect will reduce the display quality of display products to varying degrees, affecting the user's visual perception and usage experience. Therefore, it is necessary to detect interlayer foreign object defects during the display module production process.
[0003] In the prior art, the layered detection of foreign body defects requires first confirming a reference position for taking pictures, such as the pixel layer position. When confirming the reference position, the traditional method is to locate the pixel layer by manually adjusting the focus position of the microscope lens, but this method has the disadvantages of high detection cost, strong subjectivity, and high requirements for the experience and skills of the detection technicians. In addition, there are some methods for automatically locating the reference position, such as collecting a set of pictures within a certain set height range, and performing clarity analysis on each image to achieve the positioning of the pixel layer. However, this method requires controlling the camera to take multiple images at different heights, and it takes a long time to determine the reference position, resulting in low overall efficiency of display screen foreign body layered detection, and it cannot meet the beat requirements of high-speed production lines. Summary of the invention
[0004] The present application provides a positioning method, system and device for display screen foreign body delamination detection, which are used to quickly locate the reference position of the camera for taking pictures during display screen foreign body delamination detection, thereby improving the efficiency of display screen foreign body delamination detection.
[0005] The first aspect of the present application provides a positioning method for detecting delamination of foreign matter on a display screen, comprising: Light up the display screen to be tested and control the camera to the initial position just above the foreign body defect; Capturing an image of the display screen to be tested by the camera to obtain an initial image; Creating a template on the initial image according to a preset template creation area to obtain at least two template images; determining a target image among the at least two template images; Performing correlation calculation based on the target image, a preset template search area, and a reference image of a base layer to obtain a correlation verification score; Determining whether the correlation verification score is greater than or equal to a preset verification score; If the correlation check score is less than the preset check score, performing correlation positioning analysis according to the target image, the template search area and the calibration image set; Calculating the movement distance of the camera relative to the current position according to the result of the correlation positioning analysis; The camera movement is controlled according to the moving distance, and the steps of image acquisition, template creation and correlation calculation are performed again until the calculated correlation verification score is greater than or equal to the preset verification score, then the current position of the camera is determined as the reference position, and the reference position is used for image acquisition for foreign body defect layered detection.
[0006] Optionally, performing correlation calculation based on the target image, the template search area and the calibration image set to obtain a correlation score set; determining an index image in the calibration image set based on a maximum value in the set of correlation scores; The calculating the moving distance of the camera relative to the current position according to the result of the correlation positioning analysis includes: The moving distance of the camera relative to the current position is calculated according to the index image.
[0007] Optionally, the calibration image set includes a coarse search calibration image set and a fine search calibration image set, and the correlation calculation is performed based on the target image, the template search area, and the calibration image set to obtain a correlation score set, including: Based on the target image and the template search area, performing correlation calculation on all images in the rough search calibration image set to obtain a rough search result; Determine an index interval according to the rough search result; Based on the target image and the template search area, correlation calculation is performed on the images in the index interval of the refined search calibration image set to obtain a correlation score set.
[0008] Optionally, after determining whether the correlation check score is greater than or equal to a preset check score, the positioning method further includes: If the correlation check score is less than the preset check score, determining whether the correlation check score is greater than the correlation check score calculated last time; If yes, performing correlation positioning analysis according to the target image, the template search area and the calibration image set, and calculating the movement distance of the camera relative to the current position according to the result of the correlation positioning analysis; If not, the movement distance of the camera relative to the current position is determined according to negative twice the movement distance calculated last time.
[0009] Optionally, determining the target image from the at least two template images includes: Calculating grayscale means of the at least two template images, screening the at least two template images according to the grayscale means and a preset threshold, and excluding template images whose grayscale means are less than the preset threshold; The target image is determined among the remaining template images.
[0010] Optionally, determining the target image from the remaining template images includes: Determining the number of remaining template images, and judging whether the number is less than a preset number; If yes, re-collecting the initial image; If not, the target image is determined according to the median of the grayscale means of the remaining template images.
[0011] Optionally, the correlation calculation and the correlation positioning analysis adopt any one of a PHash perceptual hashing method, a SSIM structural similarity method, a histogram distance measurement method, and an Ncc normalized cross-correlation calculation method.
[0012] The second aspect of the present application provides a positioning system for detecting delamination of foreign matter on a display screen, comprising: A first control unit is used to light up the display screen to be tested and control the camera to reach an initial position directly above the foreign body defect; An acquisition unit, used for acquiring an image of the display screen to be tested through the camera to obtain an initial image; A creating unit, configured to create a template on the initial image according to a preset template creation area to obtain at least two template images; a determination unit, configured to determine a target image from among the at least two template images; A first correlation analysis unit, configured to perform correlation calculation based on the target image, a preset template search area, and a reference image of a reference layer to obtain a correlation verification score; A first judging unit, configured to judge whether the correlation check score is greater than or equal to a preset check score; A second correlation analysis unit, if the correlation verification score is less than the preset verification score, performs correlation positioning analysis according to the target image, the template search area and the calibration image set; a distance calculation unit, configured to calculate a moving distance of the camera relative to a current position according to a result of the correlation positioning analysis; A second control unit is used to control the movement of the camera according to the moving distance, and to execute the steps of image acquisition, template creation and correlation calculation again, until the calculated correlation verification score is greater than or equal to the preset verification score, then determine the current position of the camera as the reference position, and the reference position is used for image acquisition for foreign body defect layered detection.
[0013] Optionally, the second correlation analysis unit is specifically used to: Performing correlation calculation based on the target image, the template search area, and the calibration image set to obtain a correlation score set; determining an index image in the calibration image set based on a maximum value in the set of correlation scores; The distance calculation unit is specifically used for: The moving distance of the camera relative to the current position is calculated according to the index image.
[0014] Optionally, the calibration image set includes a coarse search calibration image set and a fine search calibration image set, and the second correlation analysis unit is further used to: Based on the target image and the template search area, performing correlation calculation on all images in the rough search calibration image set to obtain a rough search result; Determine an index interval according to the rough search result; Based on the target image and the template search area, correlation calculation is performed on the images in the index interval of the refined search calibration image set to obtain a correlation score set.
[0015] Optionally, the system further includes a second judgment unit, configured to: If the correlation check score is less than the preset check score, determining whether the correlation check score is greater than the correlation check score calculated last time; If yes, performing correlation positioning analysis according to the target image, the template search area and the calibration image set, and calculating the movement distance of the camera relative to the current position according to the result of the correlation positioning analysis; If not, the movement distance of the camera relative to the current position is determined according to negative twice the movement distance calculated last time.
[0016] Optionally, the determining unit is specifically configured to: Calculating grayscale means of the at least two template images, screening the at least two template images according to the grayscale means and a preset threshold, and excluding template images whose grayscale means are less than the preset threshold; The target image is determined among the remaining template images.
[0017] Optionally, the determining unit is further configured to: Determining the number of remaining template images, and judging whether the number is less than a preset number; If yes, re-collecting the initial image; If not, the target image is determined according to the median of the grayscale means of the remaining template images.
[0018] Optionally, the correlation calculation and the correlation positioning analysis adopt any one of a PHash perceptual hashing method, a SSIM structural similarity method, a histogram distance measurement method, and an Ncc normalized cross-correlation calculation method.
[0019] The third aspect of the present application provides a positioning device for detecting delamination of foreign matter on a display screen, the device comprising: Processor, memory, input-output unit, and bus; The processor is connected to the memory, the input and output unit, and the bus; The memory stores a program, and the processor calls the program to execute the first aspect and any optional method in the first aspect.
[0020] A fourth aspect of the present application provides a computer-readable storage medium, on which a program is stored. When the program is executed on a computer, the program executes the first aspect and any optional method in the first aspect.
[0021] It can be seen from the above technical solutions that this application has the following advantages: First, light up the display screen to be tested, and move the camera to the initial position for image acquisition to obtain the initial image. Create at least two template images on the initial image according to the preset template creation area, and determine the target image from them. Then, perform correlation calculation based on the target image, the preset template search area and the reference image of the reference layer to obtain a correlation verification score. If the correlation verification score is lower than the preset value, perform correlation positioning analysis through the target image, the template search area and the calibration image set, calculate the movement distance of the camera, and control the camera to move and perform image acquisition and correlation calculation again. This cycle is repeated until the correlation verification score reaches the preset value, and the current position of the camera is determined to be the reference position. The reference position can fix the camera at the optimal shooting distance, and the camera performs image acquisition at the reference position to obtain a reference layer image. Through the reference layer image, the defect position can be accurately determined and a defect segmentation image can be generated, thereby realizing the delamination detection of foreign matter on the display screen.
[0022] The present application uses correlation analysis to quickly locate the reference position, which can significantly reduce the number of axis movements and the number of photos taken, shorten the positioning time of the reference position of the camera taking pictures in the detection of foreign body delamination on the display screen, thereby improving the positioning efficiency for the detection of foreign body delamination on the display screen, and further, even when the hardware conditions do not support flying shooting, the positioning cycle efficiency can be greatly improved to meet production needs. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solution in the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0024] Figure 1 A schematic flow chart of an embodiment of a positioning method for detecting delamination of foreign matter on a display screen provided by the present application; Figure 2 A schematic flow chart of another embodiment of a positioning method for detecting delamination of foreign matter on a display screen provided by the present application; Figure 3 A schematic diagram of the structure of an embodiment of a positioning system for detecting delamination of foreign matter on a display screen provided by the present application; Figure 4 A schematic diagram of another embodiment of the positioning system for detecting delamination of foreign matter on a display screen provided by the present application; Figure 5 A schematic diagram of the physical structure of a positioning device for detecting delamination of foreign matter on a display screen provided in the present application. DETAILED DESCRIPTION
[0025] The present application provides a positioning method, system and device for display screen foreign body delamination detection, which are used to quickly locate the reference position of the camera for taking pictures during display screen foreign body delamination detection, thereby improving the efficiency of display screen foreign body delamination detection.
[0026] It should be noted that the method provided in this application can be applied to a terminal or a server. For example, the terminal can be a smart phone or a computer, a tablet computer, a smart TV, a smart watch, a portable computer terminal, or a fixed terminal such as a desktop computer. For the convenience of explanation, this application uses the system as an example for the execution subject.
[0027] See also Figure 1 , Figure 1 An embodiment of a positioning method for detecting delamination of foreign matter on a display screen provided by the present application includes: 101. Light up the display screen to be tested, and control the camera to reach the initial position just above the foreign body defect; During the production inspection stage of OLED display modules, a reference position, usually the pixel layer position, must be determined first when performing foreign body layer inspection. This reference position is the reference point for foreign body defect layer inspection, providing a stable and consistent starting point for image acquisition and analysis during foreign body defect layer inspection.
[0028] In this embodiment, after the display screen product to be tested is placed in place, the display screen to be tested is crimped to light up, and the system controls the movement of the mobile platform to make the camera reach directly above the defect, so that the center of the camera's field of view is aligned with the coordinates of the foreign body defect, and controls the z-axis to move to the teaching position z0 to reach the initial position in this application. It should be noted that this process mainly adjusts the vertical distance between the camera and the display screen to be tested. The teaching position z0 can be determined through multiple tests in the early stage to maximize the accuracy and efficiency of positioning. The camera can specifically use a small field of view layered camera, which has high resolution and focusing capabilities, and can perform high-resolution imaging of each tiny field of view area.
[0029] In addition, the system also needs to load the calibration image set for correlation positioning in advance. The calibration image set is a group of images used to calibrate and adjust the camera position. The calibration image set contains several pre-captured calibration images with known features and reference positions. By comparing and calculating with the image currently captured by the camera, the camera's movement direction and distance can be determined.
[0030] The acquisition process of the calibration image set is as follows: light up the screen to display a normal layer detection screen, set the initial position Zs of the z-axis, the stroke L, and the physical spacing distance space of the image when taking the image. The stroke L and the physical spacing distance space can be determined according to the actual screen thickness and positioning accuracy, such as taking the stroke L=4mm and the spacing space=0.01mm, which are not limited here; then control the z-axis to drive the camera to move downward from the initial position Zs, and collect an image at each spacing distance space until the z-axis movement reaches the set stroke L. In this way, during the z-axis movement, the camera will take a large number of images, recorded as { In | n=1, 2, 3, ... , 399, 400}, to form a calibration image set.
[0031] 102. Capture an image of the display screen to be tested by using a camera to obtain an initial image; When the camera reaches the initial position, the system controls the camera to collect images of the display screen to be tested. The initial image collected at this time is recorded as I. The initial image I will serve as the basis for the subsequent camera reference position positioning analysis. Before image acquisition, it should be ensured that the camera has been accurately calibrated. During the image acquisition process, the camera exposure time should be kept the same as the exposure time of the calibration image set when the image is taken to ensure the consistency of image acquisition conditions and improve the accuracy of subsequent positioning analysis.
[0032] Specifically, the initial image includes an initial image of the object layer and a reference image of the reference layer. The object layer may be part of the film layer or all of the film layers in the display panel. The film layers may be determined as the object layers according to the locations where foreign matter often appears by statistically analyzing the historical judgment results, so as to narrow the judgment range. When obtaining the initial image of each object layer, one initial image may be obtained for one object layer, or multiple initial images may be obtained for one object layer, which is not limited here. The reference layer may be a film layer or a structural layer in the display panel that has a rich microstructure and is convenient for focusing. For example, the pixel layer in the OLED panel may be used as the reference layer.
[0033] 103. Creating a template on the initial image according to a preset template creation area to obtain at least two template images; The system obtains the preset template creation area R c The purpose of the template creation area is to define a range in the image, and the image features within the range will be used to generate the template image. The size and shape of the template creation area can be adjusted according to the actual application requirements. The template creation area should contain enough feature information for subsequent accurate positioning.
[0034] Specifically, the system creates region R according to the template c , a template matching algorithm is used to select several sub-regions on the initial image I for template creation, and image capture is performed in these selected regions to generate multiple sub-images, which are the template images in this embodiment. It should be noted that the number of template images can be determined according to actual needs to improve the reliability and accuracy of positioning.
[0035] 104. Determine a target image from at least two template images; Considering that there may be interference factors in the created template area, such as the template area is located at the defective position of the display screen or the edge non-display area, which makes the obtained template image unusable, it is necessary to analyze and screen the template image, determine the most suitable target image in the template image, and perform subsequent positioning analysis based on the target image, so as to improve the positioning accuracy and stability. In this embodiment, the system can determine the target image based on factors such as the feature clarity, feature integrity, and position accuracy of the template image, which are not limited here.
[0036] 105. Perform correlation calculation based on the target image, the preset template search area, and the reference image of the base layer to obtain a correlation verification score; The system obtains a preset template search area, which defines the specific range for correlation analysis in the reference image, so as to avoid global search on the entire reference image. Applying the template search area helps reduce the amount of calculation, improve the processing speed and save the system's computing resources. And when setting the template search area in advance, the display screen structure can be considered to ensure that the correlation analysis can focus on the area most likely to contain the specific features of the reference layer. Here, the system needs to obtain the reference image of the reference layer in the initial image, such as obtaining the reference image of the pixel layer. The reference image of this reference layer provides a defect-free standard sample of the reference layer for guiding the judgment of the camera moving to the reference position.
[0037] Specifically based on the target image, the template search area and the reference image of the reference layer, the system performs correlation calculation, that is, calculates the similarity between the target image and the reference image within the template search area of the reference image. This correlation calculation can specifically adopt methods such as the PHash perceptual hashing method, the SSIM structural similarity method, the histogram distance metric method or the Ncc normalized cross-correlation calculation method, etc. The specific method is not limited here. According to the result of the correlation calculation, the system can determine the specific correlation verification score, which reflects the matching degree of the target image with the reference image of the reference layer within the template search area. Through the quantitative correlation verification score, the matching degree between the target image and the reference image can be accurately evaluated. When the correlation score between the target image and the reference image is high enough, it indicates that the features captured by the camera are similar to those of the reference layer, and further indicates that the camera has reached the reference position for taking pictures of foreign object defect stratification detection.
[0038] 106. Determine whether the correlation verification score is greater than or equal to the preset verification score; The system pre-sets a correlation verification threshold Verify_th, that is, the preset verification score, and then compares the calculated correlation verification score Verify_s1 with the preset verification score Verify_th to judge whether the camera has moved to the reference position.
[0039] If the correlation verification score is less than the preset verification score, that is, Verify_s1 < Verify_th, it means that the current position of the camera has not reached the reference position. At this time, steps 107 to 109 need to be executed to further adjust the camera position.
[0040] If the correlation verification score is greater than or equal to the preset verification score, that is, Verify_s1 ≥ Verify_th, it means that the current position of the camera has reached the reference position. At this time, directly execute step 110.
[0041] 107. Perform correlation positioning analysis according to the target image, the template search area and the calibration image set; 108. Calculate the moving distance of the camera relative to the current position according to the result of the correlation positioning analysis; If the calculated correlation verification score is less than the preset verification score, it indicates that the current camera position has not reached the reference position and needs to be adjusted. At this time, the system uses the calibrated image set to guide the movement of the camera.
[0042] Specifically, the system first needs to perform a correlation positioning analysis on the calibrated image set based on the reference image of the reference layer to determine the correlation between the reference image and each image in the calibrated image set, and determine a calibrated image A with the highest matching degree between the reference image and the calibrated image set based on the result of the correlation positioning analysis. It should be noted that this calibrated image A can be determined synchronously when creating the calibrated image set, and the system synchronously loads the index number of this calibrated image A in the calibrated image set when loading the calibrated image set. That is, in actual applications, the system does not need to perform the step of determining the calibrated image A.
[0043] Then perform a correlation positioning analysis based on the target image, the template search area, and the calibrated image set to determine the correlation between the target image and each image in the calibrated image set within the template search area. Determine a calibrated image B with the highest matching degree between the target image and the calibrated image set based on the result of the correlation positioning analysis. According to the order of the calibrated image A and the calibrated image B in the calibrated image set, and combined with the physical interval distance space during calibrated image acquisition, the moving distance Move_Dist of the camera relative to the current position can be calculated.
[0044] 109. Control the movement of the camera according to the moving distance; The system controls the camera to move based on the calculated moving distance Move_Dist on the basis of the current position on the z-axis. After moving到位, it then executes the steps of image acquisition, template creation, and correlation calculation again, that is, repeatedly executes steps 102 to 105 to obtain the correlation verification score Verify_s2.
[0045] The system determines again whether the correlation verification score Verify_s2 is greater than or equal to the preset verification score Verify_th. If Verify_s2 < Verify_th, it indicates that the camera still has not reached the reference position, and the system then repeatedly executes steps 102 to 105. And so on, until the correlation verification score calculated by the system is greater than or equal to the preset verification score, indicating that the current position of the camera is the reference position, and it is determined that the reference position positioning is successful.
[0046] 110. If the correlation verification score is greater than or equal to the preset verification score, then determine the current position of the camera as the reference position, and the reference position is used for image acquisition for foreign object defect layer detection.
[0047] If the correlation verification score Verify_s1 / Verify_s2 calculated by the system is greater than or equal to the preset verification score Verify_th, it is determined that the camera has reached the reference position Z1, and the layered detection of foreign body defects can continue. The purpose of determining the reference position is to determine the optimal acquisition distance between the camera and the display screen to be inspected. The reference position specifically includes the target distance between the camera and the panel, as well as the horizontal orientation and angle of the camera for image acquisition. With the reference position as the center, the camera moves forward for acquisition, or moves backward for acquisition. The camera is controlled to perform image acquisition in combination with the preset acquisition interval and reference position to generate a sequence of images of foreign body defects, thereby realizing layered detection of foreign body defects.
[0048] Specifically, the system controls the Z-axis movement according to the preset interval distance, and triggers the camera to capture an image every time it moves to a position, thereby obtaining a set of sequential images of the foreign body defect at different focusing levels of the display screen. The sequential images include a reference layer image and at least two interval-captured images, and the reference layer image is the image captured by the camera at the reference position. For example, the interval distance s=80um is set, and 1 image is captured at an interval s from the reference position Z1 downward, recorded as I-1, and 1 image is captured at the reference position Z1, recorded as I0 (reference layer), and 10 images are sequentially captured at every interval s from the reference position Z1 upward, recorded as I1, I2, I3, ..., respectively, to form a sequence image of the foreign body defect.
[0049] In this embodiment, the display screen to be tested is firstly lit, and the camera is moved to the initial position for image acquisition to obtain an initial image. At least two template images are created on the initial image according to the preset template creation area, and the target image is determined therefrom. Then, a correlation calculation is performed based on the target image, the preset template search area and the reference image of the reference layer to obtain a correlation verification score. If the correlation verification score is lower than the preset value, a correlation positioning analysis is performed through the target image, the template search area and the calibration image set, the movement distance of the camera is calculated, and the image acquisition and correlation calculation are performed again after the camera is controlled to move. This cycle is repeated until the correlation verification score reaches the preset value, and the current position of the camera is determined to be the reference position. The reference position can fix the camera at the optimal shooting distance, and the camera performs image acquisition at the reference position to obtain a reference layer image. The reference layer image can accurately determine the defect position and generate a defect segmentation image, thereby realizing the delamination detection of foreign matter on the display screen.
[0050] The present application uses correlation analysis to quickly locate the reference position, which can significantly reduce the number of axis movements and the number of photos taken, shorten the positioning time of the reference position of the camera taking pictures in the detection of foreign body delamination on the display screen, thereby improving the positioning efficiency for the detection of foreign body delamination on the display screen, and further, even when the hardware conditions do not support flying shooting, the positioning cycle efficiency can be greatly improved to meet production needs.
[0051] The following is a detailed description of the positioning method for display screen foreign body delamination detection provided by this application. Figure 2 , Figure 2 Another embodiment of the positioning method for detecting delamination of foreign matter on a display screen provided by the present application includes: 201. Light up the display screen to be tested, and control the camera to reach the initial position just above the foreign body defect; 202. Capture an image of the display screen to be tested by using a camera to obtain an initial image; 203. Create a template on the initial image according to a preset template creation area to obtain at least two template images; In this embodiment, steps 201 to 203 are similar to steps 101 to 103 in the aforementioned embodiment, and are not described again here.
[0052] 204. Calculate grayscale mean values of at least two template images, screen the at least two template images according to the grayscale mean value and a preset threshold, and exclude template images whose grayscale mean value is less than the preset threshold value; In this embodiment, considering that the defective area and the edge non-display area appear as small grayscale values on the image, the target image can be screened by calculating the grayscale mean of the template image. The grayscale mean reflects the overall brightness level of the image, and the defective area and the edge non-display area will appear relatively dark. Therefore, by calculating the grayscale mean of the template image, the template images created in these areas can be effectively identified and excluded, thereby quickly excluding unusable template images.
[0053] Specifically, the system performs grayscale value analysis on each template image created in step 203 and calculates the grayscale mean g mean ; Then by setting a preset threshold g of the grayscale mean th , filter the template image, if g mean <g th , it means that the template image is unqualified and needs to be excluded.
[0054] 205. Determine a target image from the remaining template images; The system only retains template images with grayscale means greater than the preset threshold, and determines the most suitable target image from the remaining template images. Specifically, the system can sort the grayscale means of the remaining template images, find the middle value after sorting, that is, the median of the grayscale means, and determine the template image corresponding to the median as the target image, thereby avoiding the influence of extreme values, ensuring that the selected target image is more representative in the subsequent correlation analysis, and enhancing the stability of the positioning process.
[0055] In some specific embodiments, the system should also determine the number of remaining template images to avoid subsequent positioning analysis based on unqualified images. Specifically, the system performs the following steps: A1. Determine the number of remaining template images, and determine whether the number is less than a preset number; A2. If yes, re-collect the initial image; A3. If not, determine the target image according to the median of the grayscale means of the remaining template images.
[0056] In this embodiment, the system should count the number of remaining template images r. If r is less than a preset number (which can be set to 1), it means that the number of template images after screening is insufficient, indicating that not enough qualified template images have been created in the initial image. At this time, it is necessary to exit the process abnormally, that is, it is necessary to re-collect the initial image. When r is greater than or equal to the preset number, it means that the number of remaining template images after screening is sufficient. At this time, the system will determine the target image based on the median of the grayscale mean of the remaining template images, so that the determined target image is more stable and more representative.
[0057] 206. Perform correlation calculation based on the target image, the preset template search area, and the reference image of the base layer to obtain a correlation verification score; 207. Determine whether the correlation verification score is greater than or equal to a preset verification score; In this embodiment, steps 206 to 207 are similar to steps 105 to 106 of the aforementioned embodiment and are not described again here.
[0058] 208. Perform correlation calculation based on the target image, the template search area, and the calibration image set to obtain a correlation score set; In practical applications, the system only needs to perform correlation positioning analysis based on the target image, template search area and calibration image set to obtain a set of correlation scores, and then determine the calibration image with the highest matching degree between the target image and the calibration image set based on the set of correlation scores.
[0059] In some specific embodiments, in order to improve the efficiency of correlation calculation, the calibration image set can be divided into a rough search calibration image set I CS And fine search calibration image set I JS , and then divided into two parts: rough search and fine search to perform the correlation calculation task. The system specifically performs the following steps: C1. Based on the target image and the template search area, perform correlation calculation on all images in the rough search calibration image set to obtain the rough search result; The system first analyzes the target image T s Preprocess the target image T to match the format and size of the calibration image set.s After that, the system will process the pre-processed target image. Ts and template search area R s For the rough search calibration image set I CS Calculate the correlation of all images in the image to obtain a set of correlation scores [fc1, fc2, ..., fcs-1, fcs], and take the index of the maximum value in this set of scores as the rough search result, recorded as Idx c .
[0060] The rough search calibration image set I CS The system only calculates the correlation of a part of the images in the original calibration image set, rather than the entire calibration image set, in the rough search stage, thereby significantly reducing the amount of calculation.
[0061] C2. Determine the index interval based on the rough search results; The system determines the index interval for fine search based on the rough search results. The index interval includes the start and end ranges of the index, which are Idx Start ,Idx End ,in:
[0062] In the above formula, step1 represents the number of extraction intervals when making the rough search calibration image set, and n represents the number of images in the calibration image set.
[0063] By determining a relatively close index interval through the rough search results, the number of images that need to be processed in the subsequent fine search stage can be reduced, ensuring that the fine search stage can be carried out in a relatively small but accurate range, further reducing the amount of calculation and improving accuracy.
[0064] C3. Based on the target image and the template search area, the images in the index interval of the refined search calibration image set are subjected to correlation calculation to obtain a set of correlation scores.
[0065] After determining the index interval, the system uses the target image T s and template search area R s For the fine search calibration image set I JS In the index interval [Idx Start , Idx End ] to obtain a set of correlation scores [fj1,fj2, ... , fjs-1, fjs]. Compared with the correlation score set obtained by directly calculating the entire calibration image set, the two-step processing method of coarse search and fine search can significantly shorten the time required to calculate the correlation score set.
[0066] 209. Determine an index image in the calibration image set based on a maximum value in the correlation score set; The system determines the index image in the calibration image set according to the maximum value in the correlation score set. The index image is the image in the calibration image set with the highest correlation score with the target image. The system records the index number of the index image as Idx s .
[0067] Combined with the index number n of the reference layer image in the calibration image set recorded when the calibration image set was created p , and the physical spacing space of the calibration map, the system can calculate the distance that the reference layer position needs to move relative to the current position as Move_Dist = (n p -Idx s )*space.
[0068] 210. Calculate the movement distance of the camera relative to the current position according to the index image; Combined with the index number n of the reference layer image in the calibration image set recorded when the calibration image set was created p , and the physical spacing space of the calibration map, the system can calculate the distance that the reference layer position needs to move relative to the current position as Move_Dist = (n p -Idx s )*space.
[0069] 211. Control the camera movement according to the moving distance; 212. If the correlation verification score is greater than or equal to the preset verification score, determine the current position of the camera as the reference position.
[0070] In this embodiment, steps 211 to 212 are similar to steps 109 to 110 in the aforementioned embodiment, and are not described again here.
[0071] In this embodiment, the correlation calculation method preferably adopts the Ncc normalized cross-correlation calculation method. The Ncc method can process image areas containing complex features and details, and normalizes the image area when calculating the correlation, that is, subtracts the mean and divides by the standard deviation, so that the NCC is robust to changes in brightness and contrast, and can maintain a high matching accuracy under different lighting conditions or contrast changes, reducing the impact caused by image noise or local brightness changes, making the correlation calculation more stable and reliable, thereby improving the positioning accuracy of the reference position.
[0072] In some specific embodiments, after repeatedly executing step 207, it can be determined whether the camera is moving in the correct direction by judging whether the correlation verification score calculated this time is greater than the correlation verification score calculated last time. Specifically, the system executes the following steps: B1. Judge whether the correlation verification score is greater than the correlation verification score calculated last time; When it is determined that the correlation verification score Verify_s2 is less than the preset verification score Verify_th, it indicates that the camera has not reached the reference position yet. At this time, the system needs to further judge whether the correlation verification score Verify_s2 is greater than the correlation verification score Verify_s1 calculated last time.
[0073] B2. If so, perform correlation positioning analysis based on the target image, the template search area, and the calibrated image set, and calculate the moving distance of the camera relative to the current position according to the result of the correlation positioning analysis; If Verify_s2 < Verify_th and Verify_s2 > Verify_s1, it means that the current position of the camera is getting closer and closer to the reference position on the previous basis, but there is still a small distance. At this time, repeat steps 208 to 211 to adjust the position of the camera again to make it closer to the reference position.
[0074] B3. If not, determine the moving distance of the camera relative to the current position according to the negative twice of the moving distance calculated last time.
[0075] If Verify_s2 < Verify_th and Verify_s2 < Verify_s1, it means that the moving direction of the camera last time was incorrect. This is because there is a certain symmetry above and below the reference position, which will cause the camera to move farther and farther away from the actual reference layer. At this time, it is necessary to update the moving distance Move_Dist to twice the moving distance calculated last time and in the opposite direction, and then execute step 211.
[0076] In this embodiment, first light up the display screen to be tested, and move the camera to the initial position for image acquisition to obtain the initial image. Create at least two template images on the initial image according to the preset template creation area, and determine the target image based on the gray mean value to exclude the interference of the defective position and the non-display area at the edge. Then, perform correlation calculation based on the target image, the preset template search area, and the reference image of the reference layer to obtain the correlation verification score. If the correlation verification score is lower than the preset value, perform correlation positioning analysis through the target image, the template search area, and the calibrated image set.
[0077] In the correlation positioning analysis, it is divided into two steps: rough search and fine search. First, the index interval is determined based on the rough search, and then the fine search calculation is performed based on the index interval, which significantly reduces the amount of calculation, so that the index image can be quickly determined in the calibration image set, and the errors caused by accidental factors of some calibration images can be effectively avoided, thereby improving the stability and robustness of the overall positioning algorithm. The moving distance of the camera can be calculated according to the index image, and the image acquisition and correlation calculation are performed again after the camera moves. This cycle is repeated until the correlation verification score reaches the preset value, and the current position of the camera is determined as the reference position. The reference position can fix the camera at the optimal shooting distance. The camera acquires images at the reference position to obtain a reference layer image. Through the reference layer image, the defect position can be accurately determined and a defect segmentation image can be generated, thereby realizing the delamination detection of foreign matter on the display screen.
[0078] The present application uses correlation analysis to quickly locate the reference position, which can significantly reduce the number of axis movements and the number of photos taken, shorten the positioning time of the reference position of the camera taking pictures in the detection of foreign body delamination on the display screen, thereby improving the positioning efficiency for the detection of foreign body delamination on the display screen, and further, even when the hardware conditions do not support flying shooting, the positioning cycle efficiency can be greatly improved to meet production needs.
[0079] See also Figure 3 , Figure 3 An embodiment of a positioning system for detecting delamination of foreign matter on a display screen provided by the present application includes: The first control unit 301 is used to light up the display screen to be tested and control the camera to reach the initial position just above the foreign body defect; The acquisition unit 302 is used to acquire an image of the display screen to be tested through a camera to obtain an initial image; A creating unit 303, configured to create a template on the initial image according to a preset template creation area to obtain at least two template images; A determination unit 304, configured to determine a target image from at least two template images; A first correlation analysis unit 305 is used to perform correlation calculation based on the target image, the preset template search area and the reference image of the base layer to obtain a correlation verification score; A first judging unit 306, configured to judge whether the correlation check score is greater than or equal to a preset check score; The second correlation analysis unit 307 performs correlation positioning analysis according to the target image, the template search area and the calibration image set if the correlation verification score is less than the preset verification score; A distance calculation unit 308 calculates the movement distance of the camera relative to the current position according to the result of the correlation positioning analysis; The second control unit 309 is used to control the movement of the camera according to the moving distance, and to execute the steps of image acquisition, template creation and correlation calculation again until the calculated correlation verification score is greater than or equal to the preset verification score, then determine the current position of the camera as the reference position, and the reference position is used for image acquisition for foreign body defect layered detection.
[0080] In this embodiment, the functions of each unit are the same as those described above. Figure 1 The steps in the method embodiment shown correspond to each other and will not be repeated here.
[0081] The following is a detailed description of the system provided by this application. Figure 4 , Figure 4 Another embodiment of the positioning system for detecting delamination of foreign matter on a display screen provided by the present application includes: The first control unit 401 is used to light up the display screen to be tested and control the camera to reach the initial position just above the foreign body defect; The acquisition unit 402 is used to acquire an image of the display screen to be tested through a camera to obtain an initial image; A creating unit 403, configured to create a template on the initial image according to a preset template creation area to obtain at least two template images; A determination unit 404, configured to determine a target image from at least two template images; A first correlation analysis unit 405 is used to perform correlation calculation based on the target image, the preset template search area and the reference image of the reference layer to obtain a correlation verification score; A first judging unit 406, configured to judge whether the correlation check score is greater than or equal to a preset check score; The second correlation analysis unit 407 performs correlation positioning analysis according to the target image, the template search area and the calibration image set if the correlation verification score is less than the preset verification score; A distance calculation unit 408 calculates the movement distance of the camera relative to the current position according to the result of the correlation positioning analysis; The second control unit 409 is used to control the movement of the camera according to the moving distance, and to execute the steps of image acquisition, template creation and correlation calculation again until the calculated correlation verification score is greater than or equal to the preset verification score, then determine the current position of the camera as the reference position, and the reference position is used for image acquisition for foreign body defect layered detection.
[0082] Optionally, the second correlation analysis unit 407 is specifically used for: Perform correlation calculation based on the target image, the template search area, and the calibration image set to obtain a set of correlation scores; determining an index image in the calibration image set based on a maximum value in the set of correlation scores; The distance calculation unit 408 is specifically used for: Calculate the camera's movement distance relative to the current position based on the index image.
[0083] Optionally, the calibration image set includes a coarse search calibration image set and a fine search calibration image set, and the second correlation analysis unit 407 is further configured to: Based on the target image and the template search area, the correlation of all images in the rough search calibration image set is calculated to obtain the rough search result; Determine the index range based on the rough search results; Based on the target image and the template search area, the correlation calculation is performed on the images in the index interval of the refined search calibration image set to obtain a set of correlation scores.
[0084] Optionally, the system further includes a second judgment unit 410, configured to: If the correlation check score is less than the preset check score, determine whether the correlation check score is greater than the correlation check score calculated last time; If yes, then a correlation positioning analysis is performed based on the target image, the template search area, and the calibration image set, and the movement distance of the camera relative to the current position is calculated based on the result of the correlation positioning analysis; If not, the movement distance of the camera relative to the current position is determined based on the negative twice of the movement distance calculated last time.
[0085] Optionally, the determining unit 404 is specifically configured to: Calculating grayscale means of at least two template images, screening the at least two template images according to the grayscale means and a preset threshold, and excluding template images whose grayscale means are less than the preset threshold; The target image is determined among the remaining template images.
[0086] Optionally, the determining unit 404 is further configured to: Determine the number of remaining template images, and determine whether the number is less than a preset number; If yes, the initial image is collected again; If not, the target image is determined according to the median of the grayscale means of the remaining template images.
[0087] Optionally, the correlation calculation and correlation location analysis adopt any one of the PHash perceptual hashing method, the SSIM structural similarity method, the histogram distance measurement method and the Ncc normalized cross-correlation calculation method.
[0088] In this embodiment, the functions of each unit are the same as those described above. Figure 2The steps in the method embodiment shown correspond to each other and will not be repeated here.
[0089] This application also provides, see Figure 5 , Figure 5 An embodiment of a positioning device for detecting delamination of foreign matter on a display screen provided by the present application includes: Processor 501, memory 502, input and output unit 503, bus 504; The processor 501 is connected to the memory 502, the input and output unit 503 and the bus 504; The memory 502 stores a program, and the processor 501 calls the program to execute any of the above positioning methods for detecting delamination of foreign matter on a display screen.
[0090] The present application also relates to a computer-readable storage medium, on which a program is stored. When the program is run on a computer, the computer executes any of the above positioning methods for detecting delamination of foreign matter on a display screen.
[0091] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0092] In the 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 only schematic. For example, the division of units is only a logical function division. 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 mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0093] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0094] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0095] If 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, 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, including a number of instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, read-only memory), random access memory (RAM, random access memory), disk or optical disk, etc. Various media that can store program codes.
Claims
1. A positioning method for detecting delamination of foreign matter on a display screen, characterized in that: The positioning method comprises: Light up the display screen to be tested and control the camera to the initial position just above the foreign body defect; Capturing an image of the display screen to be tested by the camera to obtain an initial image; Creating a template on the initial image according to a preset template creation area to obtain at least two template images; determining a target image among the at least two template images; Performing correlation calculation based on the target image, a preset template search area, and a reference image of a base layer to obtain a correlation verification score; Determining whether the correlation verification score is greater than or equal to a preset verification score; If the correlation check score is less than the preset check score, performing correlation positioning analysis according to the target image, the template search area and the calibration image set; Calculating the movement distance of the camera relative to the current position according to the result of the correlation positioning analysis; The camera movement is controlled according to the moving distance, and the steps of image acquisition, template creation and correlation calculation are performed again until the calculated correlation verification score is greater than or equal to the preset verification score, then the current position of the camera is determined as the reference position, and the reference position is used for image acquisition for foreign body defect layered detection.
2. The positioning method according to claim 1, characterized in that: The performing correlation positioning analysis according to the target image, the template search area and the calibration image set includes: Performing correlation calculation based on the target image, the template search area, and the calibration image set to obtain a correlation score set; determining an index image in the calibration image set based on a maximum value in the set of correlation scores; The calculating the moving distance of the camera relative to the current position according to the result of the correlation positioning analysis includes: The moving distance of the camera relative to the current position is calculated according to the index image.
3. The positioning method according to claim 2, characterized in that: The calibration image set includes a coarse search calibration image set and a fine search calibration image set, and the correlation calculation is performed based on the target image, the template search area and the calibration image set to obtain a correlation score set, including: Based on the target image and the template search area, performing correlation calculation on all images in the rough search calibration image set to obtain a rough search result; Determine an index interval according to the rough search result; Based on the target image and the template search area, correlation calculation is performed on the images in the index interval of the refined search calibration image set to obtain a correlation score set.
4. The positioning method according to any one of claims 1 to 3, characterized in that: After determining whether the correlation check score is greater than or equal to a preset check score, the positioning method further includes: If the correlation check score is less than the preset check score, determining whether the correlation check score is greater than the correlation check score calculated last time; If yes, performing correlation positioning analysis according to the target image, the template search area and the calibration image set, and calculating the movement distance of the camera relative to the current position according to the result of the correlation positioning analysis; If not, the movement distance of the camera relative to the current position is determined according to negative twice the movement distance calculated last time.
5. The positioning method according to any one of claims 1 to 3, characterized in that: The step of determining a target image from the at least two template images comprises: Calculating grayscale means of the at least two template images, screening the at least two template images according to the grayscale means and a preset threshold, and excluding template images whose grayscale means are less than the preset threshold; The target image is determined among the remaining template images.
6. The positioning method according to claim 5, characterized in that: The step of determining the target image from the remaining template images comprises: Determining the number of remaining template images, and judging whether the number is less than a preset number; If yes, re-collecting the initial image; If not, the target image is determined according to the median of the grayscale means of the remaining template images.
7. The positioning method according to any one of claims 1 to 3, characterized in that: The correlation calculation and the correlation positioning analysis adopt any one of the PHash perceptual hashing method, the SSIM structural similarity method, the histogram distance measurement method and the Ncc normalized mutual correlation calculation method.
8. A positioning system for detecting delamination of foreign matter on a display screen, characterized in that: The positioning system comprises: A first control unit is used to light up the display screen to be tested and control the camera to reach an initial position directly above the foreign body defect; An acquisition unit, used for acquiring an image of the display screen to be tested through the camera to obtain an initial image; A creating unit, configured to create a template on the initial image according to a preset template creation area to obtain at least two template images; a determination unit, configured to determine a target image from among the at least two template images; A first correlation analysis unit, configured to perform correlation calculation based on the target image, a preset template search area, and a reference image of a reference layer to obtain a correlation verification score; A first judging unit, configured to judge whether the correlation check score is greater than or equal to a preset check score; A second correlation analysis unit, if the correlation verification score is less than the preset verification score, performs correlation positioning analysis according to the target image, the template search area and the calibration image set; A distance calculation unit, used for calculating the movement distance of the camera relative to the current position according to the result of the correlation positioning analysis; A second control unit is used to control the movement of the camera according to the moving distance, and to execute the steps of image acquisition, template creation and correlation calculation again, until the calculated correlation verification score is greater than or equal to the preset verification score, then determine the current position of the camera as the reference position, and the reference position is used for image acquisition for foreign body defect layered detection.
9. A positioning device for detecting delamination of foreign matter on a display screen, characterized in that: The positioning device comprises: Processor, memory, input-output unit, and bus; The processor is connected to the memory, the input and output unit, and the bus; The memory stores a program, and the processor calls the program to execute the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a program stored thereon, wherein the program, when executed on a computer, performs the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Rapid high-precision defect detection method based on visual image
CN112381827A
Display screen defect positioning method, device, terminal equipment and system
CN113538431A
Display screen foreign matter detection method and device, electronic equipment and storage medium
CN116912475A
Detection device, display device, display panel and foreign matter position detection method
CN116994506A
Display screen foreign matter layering detection device and method, electronic equipment and medium
CN117214174A
Cited By
Screen pixel layer shooting height reference position positioning method and related device
CN118898645A
A method and related device for positioning the height reference position of screen pixel layer shooting
CN118898645B
