A method, system, electronic device, and storage medium for detecting foreign objects

By capturing images through a camera module that combines multiple cameras and multiple light sources, extracting defect features and performing correction and intersection operations, the problem of accuracy in foreign body detection during the OLED display screen bonding process is solved, achieving high-precision foreign body positioning and loss reduction.

CN120375103BActive Publication Date: 2025-10-14SHENZHEN SEICHITECH TECHN CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510865133.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-26
Publication Date
2025-10-14
Estimated Expiration
2045-06-26

AI Technical Summary

Technical Problem

During the manufacturing process of OLED displays, foreign matter can easily cause poor bonding between the CG cover and the OLED display. Existing detection technology cannot accurately distinguish between surface foreign matter and sub-film foreign matter, resulting in product scrapping.

Method used

A camera module with multiple cameras and multiple light sources is used to collect multiple target detection images. The location and type of foreign matter are determined by extracting defect imaging features, correcting image areas, performing intersection operations and ratio calculations, and combining them with preset threshold comparisons.

Benefits of technology

It achieves high-precision detection and positioning of foreign objects, reduces the loss of OLED screens, and improves production efficiency and product yield.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120375103B_ABST
    Figure CN120375103B_ABST
Patent Text Reader

Abstract

The application discloses a method, a system, an electronic device and a storage medium for detecting foreign matters, and is used for reducing the loss of an OLED screen. The method for detecting foreign matters comprises the following steps: acquiring a plurality of target detection images collected by a camera module; extracting a plurality of defect imaging features from the plurality of target detection images respectively; analyzing the plurality of defect imaging features to obtain an analysis result; correcting effective display areas of the plurality of target detection images respectively to obtain a plurality of corrected images; performing intersection operation on a defect area of a second corrected image and a defect area of a third corrected image to obtain an operation result; calculating a ratio of an area of the operation result to an area of the defect area of the third corrected image and a ratio of the area of the operation result to an area of the defect area of the second corrected image to obtain two ratio results; comparing the two ratio results with a preset threshold value respectively to obtain two comparison results; and confirming a position of the foreign matter according to the analysis result and the two comparison results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of image processing detection technology, and in particular to a method, system, electronic device, and storage medium for detecting foreign matter. Background Art

[0002] In the manufacturing of OLED displays, the complex and challenging manufacturing process leads to high screen costs. Therefore, minimizing OLED screen losses throughout the entire mobile phone screen manufacturing process is crucial. During the bonding process between the CG cover and the OLED display, OCA adhesive is typically used due to its colorless, transparent, and strong adhesive properties. However, poor bonding during the bonding process between the CG and OCA adhesives is common due to factors such as dust accumulation and poor incoming material quality, resulting in scrapped products.

[0003] In the existing technology, polarized light detection technology, laser scanning technology and image processing methods are commonly used to detect foreign matter. However, lamination foreign matter is usually black, and some surface foreign matter and foreign matter under the CG film also have characteristics similar to lamination foreign matter, which interferes with the detection of which specific lamination layer the foreign matter appears. Summary of the Invention

[0004] The present application discloses a method, system, electronic device and storage medium for detecting foreign matter, which are used to reduce the loss of OLED screens.

[0005] The first aspect of the present application discloses a method for detecting foreign matter, comprising:

[0006] Acquire multiple target detection images captured by a camera module, where the camera module is a combination of multiple cameras and multiple light sources, and the multiple target detection images include a first detection image, a second detection image, a third detection image, and a fourth detection image;

[0007] extracting corresponding multiple defect imaging features from the multiple target detection images respectively;

[0008] Analyzing the plurality of defect imaging features to obtain analysis results;

[0009] Correcting the effective display areas of the plurality of target detection images respectively to obtain a plurality of corrected images, the plurality of corrected images including a first corrected image, a second corrected image, a third corrected image, and a fourth corrected image;

[0010] performing an intersection operation on the defect area of ​​the second corrected image and the defect area of ​​the third corrected image to obtain an operation result;

[0011] calculating a ratio of an area of the operation result to an area of the defect region of the third corrected image and a ratio of the area of the operation result to an area of the defect region of the second corrected image to obtain two ratio results;

[0012] comparing the two ratio results with a preset threshold respectively to obtain two comparison results;

[0013] confirming the position of the foreign matter according to the analysis result and the two comparison results.

[0014] Optionally, the plurality of defect imaging features include a first defect imaging feature, a second defect imaging feature, a third defect imaging feature and a fourth defect imaging feature, the first defect imaging feature corresponds to the first detection image, the second defect imaging feature corresponds to the second detection image, the third defect imaging feature corresponds to the third detection image, and the fourth defect imaging feature corresponds to the fourth detection image, and the analysis of the plurality of defect imaging features includes:

[0015] when the first defect imaging feature and the fourth defect imaging feature are analyzed to be white and the second defect imaging feature and the third defect imaging feature are analyzed to be black, the analysis result indicates that the foreign matter is a sub-film foreign matter;

[0016] when the second defect imaging feature and the third defect imaging feature are analyzed to be black and the first defect imaging feature or the fourth defect imaging feature is analyzed to be black, the analysis result indicates that the foreign matter is a surface foreign matter.

[0017] Optionally, before the effective display area of each of the plurality of target detection images is corrected to obtain a plurality of corrected images, the method further includes:

[0018] mapping the third detection image and the fourth detection image into the second detection image through a preset transformation matrix;

[0019] extracting a second effective display area of the second detection image according to a gray gradient method;

[0020] according to the second effective display area, respectively cutting out a first effective display area, a third effective display area and a fourth effective display area corresponding to the first detection image, the third detection image and the fourth detection image respectively.

[0021] Optionally, the effective display area of the plurality of target detection images comprises a first effective display area, a second effective display area, a third effective display area and a fourth effective display area, the effective display area of the plurality of target detection images is corrected respectively to obtain a plurality of corrected images, and the plurality of corrected images comprise a first corrected image, a second corrected image, a third corrected image and a fourth corrected image.

[0022] An external rectangle is obtained according to the contour of the second effective display area.

[0023] A perspective transformation matrix is calculated according to the physical size and the four corner coordinates, length and width of the external rectangle.

[0024] The first effective display area, the second effective display area, the third effective display area and the fourth effective display area are corrected respectively according to the perspective transformation matrix to obtain corresponding first corrected image, second corrected image, third corrected image and fourth corrected image.

[0025] Optionally, after the intersection operation of the defect area of the second corrected image and the defect area of the third corrected image is performed to obtain an operation result, the method further comprises:

[0026] When the CG cover plate is covered with a protective film, the effective display area of the plurality of target detection images is convolved and filtered to obtain a plurality of corresponding filtering results.

[0027] The gray scale feature values of the plurality of target detection images are extracted.

[0028] The gray scale feature values of the plurality of filtering results are extracted.

[0029] Optionally, after the gray scale feature values of the plurality of filtering results are extracted, the method further comprises:

[0030] The gray scale feature values of the operation result are extracted.

[0031] The position of the foreign matter is determined according to the gray scale feature values of the plurality of target detection images, the gray scale feature values of the plurality of filtering results and the gray scale feature values of the operation result.

[0032] Optionally, the camera module comprises an upper camera, a lower camera, an upper light source and a lower light source, the plurality of target detection images collected by the camera module are obtained, and the plurality of target detection images comprise a first detection image, a second detection image, a third detection image and a fourth detection image.

[0033] The first detection image collected by the upper camera and the upper light source is obtained.

[0034] acquire a second detection image captured by the upper camera and the lower light source combination;

[0035] acquire a third detection image captured by the lower camera and the upper light source combination;

[0036] acquire a fourth detection image captured by the lower camera and the lower light source combination.

[0037] The second aspect of the application discloses a system for detecting foreign matter, comprising:

[0038] an acquisition unit configured to acquire a plurality of target detection images captured by a camera module, the camera module being a combination of a plurality of cameras and a plurality of light sources, and the plurality of target detection images including a first detection image, a second detection image, a third detection image, and a fourth detection image;

[0039] a defect imaging feature unit configured to extract a plurality of corresponding defect imaging features from the plurality of target detection images, respectively;

[0040] an analysis unit configured to analyze the plurality of defect imaging features to obtain an analysis result;

[0041] a correction unit configured to correct effective display areas of the plurality of target detection images to obtain a plurality of corrected images, the plurality of corrected images including a first corrected image, a second corrected image, a third corrected image, and a fourth corrected image;

[0042] an intersection operation unit configured to perform an intersection operation on a defect area of the second corrected image and a defect area of the third corrected image to obtain an operation result;

[0043] a ratio unit configured to calculate a ratio of an area of the operation result to an area of the defect area of the third corrected image and a ratio of the area of the operation result to an area of the defect area of the second corrected image to obtain two ratio results;

[0044] a comparison unit configured to compare the two ratio results with a preset threshold value to obtain two comparison results, respectively;

[0045] a first confirmation unit configured to confirm a position of the foreign matter according to the analysis result and the two comparison results.

[0046] The third aspect of the application provides an electronic device, comprising:

[0047] a processor, a memory, an input / output unit, and a bus;

[0048] the processor is connected to the memory, the input / output unit, and the bus;

[0049] The memory stores a program, and the processor invokes the program to execute the method for detecting foreign matter as in the first aspect and any optional aspect of the first aspect.

[0050] The fourth aspect of the present application provides a computer readable storage medium, which stores a program, and the program executes the method for detecting foreign matter as in the first aspect and any optional aspect of the first aspect when executed on a computer.

[0051] From the above technical solutions, the embodiments of the present application have the following advantages:

[0052] The present application provides a method for detecting foreign matter, acquiring a plurality of target detection images collected by a camera module, the camera module being a combination of multiple cameras and multiple light sources, the plurality of target detection images including a first detection image, a second detection image, a third detection image and a fourth detection image; extracting a plurality of corresponding defect imaging features from the plurality of target detection images respectively; analyzing the plurality of defect imaging features to obtain an analysis result; correcting the effective display area of the plurality of target detection images respectively to obtain a plurality of corrected images, the plurality of corrected images including a first corrected image, a second corrected image, a third corrected image and a fourth corrected image; performing intersection operation on the defect area of the second corrected image and the defect area of the third corrected image to obtain an operation result; calculating the ratio of the area of the operation result to the area of the defect area of the third corrected image, and the ratio of the area of the operation result to the area of the defect area of the second corrected image to obtain two ratio results; comparing the two ratio results with a preset threshold respectively to obtain two comparison results; and confirming the position of the foreign matter according to the analysis result and the two comparison results. The method of the present application collects a plurality of target detection images through multiple cameras and multiple light sources, uses the principle of optical imaging characteristics and feature difference under multiple light sources to preliminarily analyze the defect imaging features, then geometrically corrects the effective display area of each image to ensure that each image is strictly aligned for subsequent intersection operation; then calculates the area ratio of the intersection operation result to the defect area on two of the corrected images, compares the ratio with the threshold, and combines the preliminary analysis to determine the level of the defect (foreign matter), thereby realizing high-precision detection and positioning of the adhering foreign matter and the surface foreign matter. BRIEF DESCRIPTION OF DRAWINGS

[0053] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0054] Figure 1 An embodiment of the method for detecting foreign matter of the present application is shown in the figure.

[0055] Figure 2 schematic diagram of another embodiment of the method for detecting foreign matter of the present application;

[0056] Figure 3 schematic diagram of another embodiment of the method for detecting foreign matter of the present application;

[0057] Figure 4 schematic diagram of one embodiment of the system for detecting foreign matter of the present application;

[0058] Figure 5 schematic diagram of another embodiment of the electronic device of the present application;

[0059] Figure 6 schematic diagram of the target detection image of the under-film foreign matter taken by the upper camera and the lower light source combination or the under-film foreign matter taken by the lower camera and the upper light source combination;

[0060] Figure 7 schematic diagram of the target detection image of the under-film foreign matter taken by the upper camera and the upper light source combination or the under-film foreign matter taken by the lower camera and the lower light source combination;

[0061] Figure 8 schematic diagram of the target detection image of the surface foreign matter taken by the upper camera and the upper light source combination or the surface foreign matter taken by the lower camera and the lower light source combination;

[0062] Figure 9 schematic diagram of the original image without rectification;

[0063] Figure 10 schematic diagram of the image obtained after rectification of the target detection image; Figure 9

[0064] schematic diagram of the effective display area of the target detection image without convolution filtering; Figure 11

[0065] schematic diagram of the image obtained after convolution filtering of the target detection image; Figure 12 Figure 11

[0066] Figure 13 schematic diagram of the operation result of the intersection operation when the foreign matter is the under-film foreign matter;

[0067] Figure 14 schematic diagram of the operation result of the intersection operation when the foreign matter is the surface foreign matter. DETAILED DESCRIPTION

[0068] ​​In the following description, specific details such as specific system structures and techniques are provided for purposes of illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may 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 obscuring the description of the present application with unnecessary detail.

[0069] It should be understood that when used in the present application specification, the term "comprising" indicates the presence of 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 collections.

[0070] It should also be understood that the term “and / or” used in the present specification refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0071] As used in this specification, the term "if" can be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting" depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]" depending on the context.

[0072] In addition, in the description of the present application, the terms "first", "second", "third", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0073] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present application. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.

[0074] OLED display screen is high in cost due to complex manufacturing process and great process difficulty, and loss of OLED screen needs to be reduced as much as possible in the whole manufacturing process of mobile phone screen. In the bonding process of CG cover plate and OLED display screen, the two are bonded together by using the characteristics of OCA glue, such as colorless and transparent, strong adhesion. However, in the bonding process of CG and OCA, poor bonding may be caused by dust, poor incoming material condition and other reasons, resulting in the final product being scrapped. If the foreign matter generated in the bonding of CG and OCA can be checked before bonding with OLED, the loss caused by foreign matter in bonding can be maximized.

[0075] Based on this, the application discloses a method and system for detecting foreign matter, an electronic device and a storage medium, which are used to reduce the loss of OLED screen.

[0076] The technical solutions in the application will be described clearly and completely in combination with the drawings in the embodiments of the application. Obviously, the described embodiments are only part of the embodiments of the application, rather than all the embodiments. Based on the embodiments in the application, all other embodiments obtained by those skilled in the art without creative labor fall within the protection scope of the application.

[0077] The method of the application can be applied to a server, a device, a terminal or other devices with logical processing capability, and the application is not limited in this regard. For the convenience of description, the following will be described by taking the execution subject as a terminal as an example.

[0078] Please refer to Figure 1 An embodiment of the method for detecting foreign matter provided by the application comprises the following steps.

[0079] 101. Obtain a plurality of target detection images collected by a camera module, the camera module being a combination of a plurality of cameras and a plurality of light sources, and the plurality of target detection images comprising a first detection image, a second detection image, a third detection image and a fourth detection image;

[0080] In the embodiment, it is to be noted that the camera module includes an upper camera, a lower camera, an upper light source and a lower light source. When detecting foreign matters of a target detection object (the target detection object is composed of a CG cover plate, OCA glue and a heavy film of an OLED display screen in sequence), the camera above the CG cover plate is the upper camera, and the light source between the upper camera and the CG cover plate is referred to as the upper light source. Similarly, the camera below the heavy film is the lower camera, and the light source between the lower camera and the heavy film is referred to as the lower light source. The upper light source and the lower light source are coaxial light sources, and the optical paths thereof are perpendicular to the target detection object. The upper camera and the lower camera are preliminarily subjected to basic position calibration, so as to preliminarily reduce the positional deviation between the captured images. Then, four target detection images are captured by the camera module, which are respectively: a first detection image captured by the upper camera and the upper light source; a second detection image captured by the upper camera and the lower light source; a third detection image captured by the lower camera and the upper light source; and a fourth detection image captured by the lower camera and the lower light source. The position of the detection object is kept fixed during the capturing process, so as to ensure the comparability between different images.

[0081] 102. Extracting a plurality of defect imaging features corresponding to the plurality of target detection images respectively;

[0082] In the embodiment, each target detection image can be subjected to grayscale processing, so as to convert the color image into a grayscale image and simplify the subsequent feature extraction process. Then, the grayscale value distribution and texture information of the pixels in the image are analyzed for different images. For the region where foreign matters may exist, the grayscale value, contrast, edge profile and the like are extracted as defect imaging features. For example, if the grayscale value of a region in the image is obviously different from the surrounding region and the edge is clear, these features can be recorded as defect imaging features.

[0083] 103. Analyzing the plurality of defect imaging features to obtain an analysis result;

[0084] In the embodiment, the plurality of defect imaging features includes a first defect imaging feature, a second defect imaging feature, a third defect imaging feature and a fourth defect imaging feature. The first defect imaging feature corresponds to the first detection image, the second defect imaging feature corresponds to the second detection image, the third defect imaging feature corresponds to the third detection image, and the fourth defect imaging feature corresponds to the fourth detection image.

[0085] It should be noted that the use of upper and lower cameras and light sources for shooting is based on the principle of optical imaging, specifically the transmission and reflection of light. For example, if a foreign object is between the CG cover and the heavy film (called a sub-film foreign object), that is, mixed in the OCA adhesive medium, when the camera and light source are on the same side, then the light will be transmitted from the position without foreign objects and reflected back almost vertically at the position with foreign objects. The final image will show that the defective area (foreign object) is brighter than other parts, that is, the defect imaging feature is white. Please refer to Figure 7 , Figure 7 Schematic diagram of target detection image of foreign matter under the film captured by the upper camera and upper light source combination or the lower camera and lower light source combination, Figure 7 The defect imaging feature shown is white; when the camera and the light source are on different sides, light enters the camera from the position without foreign matter, and the light can hardly enter the camera at the position with foreign matter. The final image shows that the defective part is darker than other parts, that is, the defect imaging feature is black. Please refer to Figure 6 , Figure 6 Schematic diagram of target detection image of foreign matter under the film by combining upper camera and lower light source or combining lower camera and upper light source. Figure 6 The defect imaging feature shown is black. If the foreign matter is on the CG cover or under the heavy film (called surface foreign matter), when the camera and the light source are on the same side, the light is transmitted from the position without foreign matter, and the light is scattered in the defective area due to the rough surface of the foreign matter. The final image is that the defective area is darker than other parts, that is, the defect imaging feature is black. Please refer to Figure 8 , Figure 8 Schematic diagram of target detection images of surface foreign objects captured by a combination of an upper camera and an upper light source or a combination of a lower camera and a lower light source. Figure 8 The defect imaging feature shown is black. When the camera and the light source are on different sides, light enters the camera from a position without foreign matter, and light can hardly enter the camera at a position with foreign matter. The final image shows that the defective area is darker than other parts, that is, the defect imaging feature is black.

[0086] In summary, the above rules can be summarized as follows: when the first defect imaging feature and the fourth defect imaging feature are analyzed to be white, and the second defect imaging feature and the third defect imaging feature are black, the analysis result characterizes that the foreign body is a submembrane foreign body; when the second defect imaging feature and the third defect imaging feature are analyzed to be black, and the first defect imaging feature or the fourth defect imaging feature is black, the analysis result characterizes that the foreign body is a surface foreign body.

[0087] 104. Correcting effective display areas of the plurality of target detection images respectively to obtain a plurality of corrected images, the plurality of corrected images including a first corrected image, a second corrected image, a third corrected image, and a fourth corrected image;

[0088] In this embodiment, an image segmentation algorithm, such as threshold segmentation or region growing, is used to identify areas in the image that contain the detection object and are valuable for foreign body detection. Irrelevant background portions are removed to determine the effective display area. The cut-out effective display area is a rectangle that essentially encloses the defect. Perspective distortion is inevitable in the cut-out effective display area. For images with perspective distortion, a perspective transformation algorithm is used. Multiple feature points, such as corner points or specific markers of the detection object, are selected from the image to calculate a perspective transformation matrix. This matrix is ​​used to transform the effective display area, correcting the image to a standard viewing angle. This makes the object's shape and size more accurate, facilitating subsequent precise analysis. The effective display area of ​​the first target detection image is corrected to obtain a first corrected image. The effective display area of ​​the second target detection image is corrected to obtain a second corrected image. The effective display area of ​​the third target detection image is corrected to obtain a third corrected image. The effective display area of ​​the fourth target detection image is corrected to obtain a fourth corrected image.

[0089] 105. Perform an intersection operation on the defect area of ​​the second corrected image and the defect area of ​​the third corrected image to obtain an operation result;

[0090] In this embodiment, although step 103 can initially determine the location of the foreign object, some foreign objects are tightly attached to the CG cover plate or the heavy film surface. In this case, the captured image is similar to that of a foreign object under the film, making it difficult to distinguish. Therefore, further quantitative judgment is required. As can be seen from the description of steps 101 and 104, the second corrected image corresponds to the second target detection image captured by the upper camera and lower light source, and the third corrected image corresponds to the third target detection image captured by the lower camera and upper light source. In each case, the camera and light source are located on different sides. This orientation is selected because the transmitted light clearly reveals all foreign objects on the target object, and the outline of the defect is also clear, facilitating subsequent defect feature analysis. When the camera and light source are on the same side, if the foreign object is on the CG cover plate and both are below the heavy film, the foreign object imaging effect is poor due to the screen barrier. When the foreign object is below the heavy film and both are above the CG cover plate, the foreign object imaging effect is also poor due to the screen barrier. Therefore, this embodiment selects the second corrected image and the third corrected image for quantitative detection.

[0091] The surface foreign matter has a significant position difference in the second corrected image and the third corrected image, mainly because the surface foreign matter has a working distance closer to one of the cameras than the other, and the thickness of the CG cover plate is relatively small (0.5 mm), while the depth of field of the camera is greater than 1 mm, and the focal length f does not change substantially relative to the surface foreign matter and the attached foreign matter. Therefore, according to the formula: 1 / f = 1 / w + 1 / u (f is the focal length, w is the working distance of the camera, and u is the image distance), when the working distances of the two cameras are different, the imaging of the target defect in the two cameras will have a position deviation. If the intersection of the second corrected image and the third corrected image is taken, and whether the defect regions in the two images completely or substantially overlap is observed, the position deviation of the defect region can be preliminarily observed. Figure 13 , Figure 13 is a schematic diagram of the operation result of the intersection operation when the foreign matter is a subsurface foreign matter; and Figure 14 , Figure 14 is a schematic diagram of the operation result of the intersection operation when the foreign matter is a surface foreign matter.

[0092] 106. Calculate the ratio of the area of the operation result to the area of the defect region of the third corrected image, and the ratio of the area of the operation result to the area of the defect region of the second corrected image, to obtain two ratio results;

[0093] In this embodiment, after step 105 takes the intersection of the defect regions of the two images, sometimes the position deviation cannot be accurately judged whether the foreign matter is a surface foreign matter by the naked eye alone, so numerical calculation is needed, and the detection process is quantified through numerical comparison to more accurately judge. The first value needed to be obtained is the area S of the defect region of the operation result of the intersection operation of step 105, the area S1 of the defect region of the second corrected image, and the area S2 of the defect region of the third corrected image. The areas of the intersection region, the defect region of the second corrected image, and the defect region of the third corrected image can be calculated by counting the number of pixels in the region using image analysis software or algorithm. For irregular regions, the pixel filling method or the grid-based area estimation method can be used to ensure the accuracy of the area calculation. Then the area of the intersection region is divided by the area of the defect region of the second corrected image and the area of the defect region of the third corrected image respectively to obtain two ratio results, which are used for subsequent comparison and analysis with the preset threshold.

[0094] 107. Compare the two ratio results with the preset threshold respectively to obtain two comparison results;

[0095] In the embodiment, a reasonable preset threshold is determined according to the experimental results obtained from a large number of production experiments in advance. The threshold should be able to accurately distinguish foreign matters in different positions, while considering the errors and uncertainties in the detection process to ensure the robustness of the threshold. In the embodiment, the preset threshold can be set to 75%, that is, if the comparison result is that both ratio results are greater than 75%, it indicates that the intersection of the defect regions of the two images meets the "completely or basically coincides" standard, and it can be determined that the foreign matter is a subsurface foreign matter; if the comparison result is that at least one of the two ratio results is less than 75%, it indicates that the intersection of the defect regions of the two images does not meet the "completely or basically coincides" standard, and it can be determined that the foreign matter is a surface foreign matter.

[0096] 108、According to the analysis result and the two comparison results, the position of the foreign matter is confirmed.

[0097] In the embodiment, the analysis result obtained in step 103 (whether the foreign matter is a subsurface foreign matter or a surface foreign matter) is combined with the two comparison results obtained in step 107. If the analysis result is a subsurface foreign matter, and both comparison results meet the ratio range corresponding to the subsurface foreign matter, it is confirmed that the foreign matter is located under the film; if the analysis result is a surface foreign matter, and the comparison result also meets the characteristics of the surface foreign matter, it is confirmed that the foreign matter is a surface foreign matter, thereby accurately determining the position of the foreign matter.

[0098] In the embodiment, firstly, a plurality of target detection images collected by a camera module are acquired, the camera module is a combination of a plurality of cameras and a plurality of light sources, the plurality of target detection images include a first detection image, a second detection image, a third detection image and a fourth detection image; a plurality of corresponding defect imaging features are extracted from the plurality of target detection images respectively; the plurality of defect imaging features are analyzed to obtain an analysis result; effective display regions of the plurality of target detection images are corrected respectively to obtain a plurality of corrected images, the plurality of corrected images include a first corrected image, a second corrected image, a third corrected image and a fourth corrected image; intersection operation is performed on a defect region of the second corrected image and a defect region of the third corrected image to obtain an operation result; a ratio of an area of the operation result to an area of the defect region of the third corrected image and a ratio of the area of the operation result to an area of the defect region of the second corrected image are calculated to obtain two ratio results; the two ratio results are compared with a preset threshold value respectively to obtain two comparison results; and a position of a foreign matter is confirmed according to the analysis result and the two comparison results. The method of the application collects a plurality of target detection images by a plurality of cameras and a plurality of light sources, uses the principle of optical imaging characteristics and feature difference under a plurality of light sources to preliminarily analyze defect imaging features, then geometrically corrects effective display regions of each image, ensures that each image is strictly aligned, so as to perform subsequent intersection operation; then, the area ratio of the intersection operation result to the defect region on two of the corrected images is calculated, the ratio is compared with the threshold value, and the previous preliminary analysis is combined to determine a defect (foreign matter) level, thereby realizing high-precision detection and positioning of adhering foreign matters and surface foreign matters.

[0099] Please refer to Figure 2 Before step 104 is performed, effective display regions of the plurality of target detection images should be acquired first, and then the effective display regions are corrected, which can include, but is not limited to, the following:

[0100] 201, mapping the third detection image and the fourth detection image into the second detection image through a preset transformation matrix;

[0101] In this embodiment, a preset transformation matrix is ​​obtained by calibrating the camera module and studying the imaging law of the detection object. This preset transformation matrix is ​​usually calculated based on the intrinsic parameters, extrinsic parameters of the camera and the relative position relationship between the detection object and the camera. For example, the Zhang Zhengyou calibration method can be used to obtain the intrinsic parameters and distortion parameters of the camera, and the relative rotation and translation relationship between the cameras can be determined in combination with the mechanical structure, and then the preset transformation matrix for image mapping can be calculated. Specifically, for the third detection image, each pixel in the image is traversed, and the coordinates of each pixel are transformed and calculated according to the preset transformation matrix. Assuming that the original pixel coordinates are (x, y), the new coordinates (x', y') are obtained after the action of the transformation matrix M. In the same way, all pixels in the fourth detection image are subjected to coordinate transformation. The pixels of the transformed third detection image and the fourth detection image are placed on the corresponding positions of the second detection image according to the new coordinates. During the placement process, if the new coordinates exceed the range of the second detection image, corresponding boundary processing is performed, such as truncation or filling.

[0102] 202. Extracting a second effective display area of ​​the second detection image according to a grayscale gradient method;

[0103] In this embodiment, if the second detection image is a color image, it is first converted to a grayscale image. The conversion method can use a weighted average method, where the red, green, and blue channels of the color image are weighted and summed according to certain weights to obtain a grayscale image. For the grayscaled second detection image, the grayscale gradient is calculated for each pixel in the image. The grayscale gradient represents the speed and direction of grayscale value changes in the image. Then, a suitable gradient amplitude threshold T is set, and all pixels in the image are traversed, and pixels with gradient amplitudes greater than the threshold T are marked. These marked pixels are often located at the edges of objects in the image or in areas with large grayscale value changes, which are related to the boundaries of the detection object and the areas where foreign objects are located. Connected domain analysis is performed on the marked pixels, and the interconnected pixels are grouped into regions. From these regions, regions that meet the characteristics of the detection object are screened out. The collection of these regions is the second effective display area. For example, if the detection object is a rectangular screen, the selected regions should have rectangular-like shape characteristics and be within a reasonable size.

[0104] 203. According to the second effective display area, intercept the first effective display area, the third effective display area, and the fourth effective display area corresponding to the first detection image, the third detection image, and the fourth detection image, respectively;

[0105] In the embodiment, since the third detection image and the fourth detection image have been mapped into the second detection image in step 201, there is a certain correspondence between them. By recording the transformation information of the pixel points in the mapping process, the corresponding pixel point positions of each pixel point in the second effective display area in the first detection image, the third detection image and the fourth detection image can be determined. Then, according to the boundary of the second effective display area, the third effective display area and the fourth effective display area corresponding to the third detection image and the fourth detection image are intercepted respectively. For the first detection image, since it belongs to the image photographed by the same camera as the second detection image, the corresponding boundary coordinate range in the first detection image can be found according to the boundary coordinates of the second effective display area directly.

[0106] 204、obtaining an external rectangle according to the contour of the second effective display area;

[0107] In the embodiment, not only the four straight lines around the effective display area can be fitted to form a closed rectangle, i.e. the external rectangle, but also the edge extraction algorithm such as the Canny edge detection algorithm can be used to perform edge extraction on the second effective display area. The Canny edge detection algorithm can accurately extract the edge contour of the object in the image through the steps of Gaussian filtering to smooth the image, calculating the gradient amplitude and direction, non-maximum suppression, double-threshold detection and connecting edges. After the Canny algorithm processing, the edge contour of the second effective display area is obtained, which is composed of a series of pixel points. Then the extracted edge contour is processed using the minimum external rectangle algorithm. The target of the algorithm is to find a minimum rectangle that can completely contain the edge contour points. The algorithm based on the rotating jigsaw can be used to constantly rotate a virtual rectangle frame to make it closely fit the edge contour points, and finally the minimum external rectangle is obtained. The four corner coordinates of the external rectangle and the length and width of the rectangle are calculated. The four corner coordinates and the length and width information will be used for subsequent calculation of the perspective transformation matrix.

[0108] 205、calculating the perspective transformation matrix according to the physical size and the four corner coordinates and the length and width of the external rectangle;

[0109] In this embodiment, the actual physical size of the detection object is known, for example, the actual length of the target detection object is L and the width is W. At the same time, the coordinates of the four corner points of the circumscribed rectangle of the outline of the second effective display area as well as the length l and width w can be obtained from step 204. The actual physical size represented by each pixel in the image is calculated through the proportional relationship. Then, according to the principle of perspective transformation, a perspective transformation matrix M1 is found so that the points in the image can correspond to the actual physical size after transformation. The perspective transformation matrix M1 is solved using the known coordinates of the corner points of the circumscribed rectangle and the corresponding actual physical coordinates using methods such as the least squares method. In the solution process, it is necessary to construct multiple equations, substitute the corner point coordinates into the perspective transformation formula to form a system of equations, and then solve the system of equations to obtain the values ​​of each element of the perspective transformation matrix M1.

[0110] 206. Correct the first effective display area, the second effective display area, the third effective display area, and the fourth effective display area according to the perspective transformation matrix to obtain corresponding first corrected images, second corrected images, third corrected images, and fourth corrected images, respectively.

[0111] In this embodiment, for each pixel point in the first effective display area, its coordinates are transformed according to the perspective transformation matrix M1 calculated in step 205. The coordinates of the pixel points are expanded to homogeneous coordinates, and then multiplied with the perspective transformation matrix M1 to obtain the transformed homogeneous coordinates. The homogeneous coordinates are then converted into ordinary coordinates, and this new coordinate is the corrected pixel point position. According to the above method, the coordinates of all pixel points in the first effective display area are transformed. The transformed pixel points are placed on a new image canvas according to the new coordinate position to form a first corrected image. During the placement process, if the new coordinates are not integers, an interpolation algorithm, such as a bilinear interpolation algorithm, is used to calculate the pixel value of the position based on the values ​​of the surrounding pixels. In the same way, the second effective display area, the third effective display area and the fourth effective display area are processed to obtain the second corrected image, the third corrected image and the fourth corrected image, respectively. These corrected images eliminate the distortion caused by factors such as camera viewing angle and object placement, making the shape and size of the objects in the image more accurate, which facilitates the subsequent accurate analysis and detection of foreign matter in the image. Reference Figure 9 and Figure 10 , Figure 9 is a schematic diagram of the original image without correction. Figure 10 For Figure 9 Schematic diagram of the image obtained after correction.

[0112] Please refer to Figure 3In practice, in the process of bonding the CG cover plate and the OCA glue for the OLED display screen, a protective film is often bonded on the CG cover plate, and foreign matter will inevitably exist between the CG cover plate and the protective film and on the protective film. The steps of detecting the foreign matter at the two places can specifically include, but are not limited to, the following:

[0113] 301. When the CG cover plate is covered with a protective film, the effective display area of each target detection image is respectively subjected to convolution filtering to obtain a plurality of corresponding filtering results;

[0114] In this embodiment, a suitable convolution kernel is selected according to the detection requirements and the image characteristics. Taking a 3x3 convolution kernel as an example, for the effective display area of each target detection image, the center of the convolution kernel is aligned with the first pixel in the top left corner of the image. The elements of the convolution kernel are multiplied by the corresponding image pixel values, and the products are added to obtain the pixel value at the position after convolution. Then the convolution kernel moves one pixel to the right at a certain step (such as a step of 1), and the above operation is repeated until the end of the row. Then the convolution kernel moves down one row, and the next row of pixels is processed, until the convolution operation of the entire effective display area is completed, thereby obtaining the corresponding filtering result image. For reference Figure 11 and Figure 12 , Figure 11 is a schematic diagram of the effective display area of a target detection image without convolution filtering, Figure 12 is a schematic diagram of an image obtained after convolution filtering on Figure 11 .

[0115] 302. Extracting the gray scale feature values of the plurality of target detection images;

[0116] In this embodiment, if the target detection image is a color image, it needs to be converted into a gray scale image first. The weighted average method can be used to sum the red, green and blue channel pixel values in the color image according to certain weights to obtain the corresponding gray scale value. Then the average gray scale value, the maximum gray scale value and the minimum gray scale value of the image are calculated.

[0117] 303. Extracting the gray scale feature values of the plurality of filtering results;

[0118] In this embodiment, similar to step 302, the average gray scale value, the maximum gray scale value and the minimum gray scale value of the filtered image are calculated. Since the filtering changes the pixel value distribution of the image, these gray scale feature values will reflect the characteristics of the image after filtering, such as the gray scale change after edge enhancement or noise suppression, which is helpful for further analyzing the features of the foreign matter in the image after filtering.

[0119] 304. Extracting the gray scale feature values of the operation results;

[0120] In the embodiment, the operation result is the result obtained after the intersection operation of step 105 in the case that the CG cover is covered with the protective film, similar to step 302, the average gray value, the maximum gray value and the minimum gray value of the operation result are calculated.

[0121] 305. Determine the position of the foreign matter according to the gray feature values of the multiple target detection images, the gray feature values of the multiple filtering results and the gray feature values of the operation result.

[0122] In the embodiment, according to the description of the embodiments shown in Figure 1 and Figure 2 After it is determined that the foreign matter is neither the foreign matter between the CG cover and the heavy film, nor the foreign matter under the heavy film, it is considered whether the foreign matter is on the protective film or between the protective film and the CG cover. According to a large amount of experimental data and actual detection experience, a new judgment rule is established. For example, if the average gray value of the target detection image is low, the gray change at the edge of the filtered image is obvious (the gray standard deviation is large), and the gray feature of a certain region in the operation result image matches the foreign matter feature (such as the average gray value being within a certain range), it can be preliminarily judged that the region may contain a foreign matter. Combined with the imaging characteristics of foreign matters at different positions in the optical imaging principle, if the gray feature combination of the foreign matter under the film is met (such as the gray of the foreign matter region being bright in some images and dark in other images), it is determined that the foreign matter is between the protective film and the CG cover; if the gray feature combination of the surface foreign matter is met (such as the gray of the foreign matter region being dark in multiple images), it is determined that the foreign matter is on the protective film. By comprehensively analyzing these gray feature values from different sources, the position of the foreign matter is accurately determined.

[0123] The above embodiments describe the method for detecting foreign matters provided in the application. The following describes a method for detecting foreign matters, a system, an electronic device and a storage medium provided in the application:

[0124] Please refer to Figure 4 , the application provides an embodiment of a system for detecting foreign matters, which comprises:

[0125] The acquisition unit 401 is configured to acquire multiple target detection images collected by a camera module, the camera module being a combination of multiple cameras and multiple light sources, and the multiple target detection images comprising a first detection image, a second detection image, a third detection image and a fourth detection image.

[0126] The defect imaging feature unit 402 is configured to extract multiple corresponding defect imaging features from the multiple target detection images.

[0127] The analysis unit 403 is configured to analyze the multiple defect imaging features to obtain an analysis result.

[0128] The correction unit 404 is configured to correct the effective display regions of the plurality of target detection images respectively to obtain a plurality of corrected images, wherein the plurality of corrected images include a first corrected image, a second corrected image, a third corrected image and a fourth corrected image;

[0129] The intersection operation unit 405 is configured to perform intersection operation on the defect region of the second corrected image and the defect region of the third corrected image to obtain an operation result;

[0130] The ratio unit 406 is configured to calculate a ratio of an area of the operation result to an area of the defect region of the third corrected image, and a ratio of the area of the operation result to an area of the defect region of the second corrected image to obtain two ratio results;

[0131] The comparison unit 407 is configured to compare the two ratio results with a preset threshold respectively to obtain two comparison results;

[0132] The first confirmation unit 408 is configured to confirm the position of the foreign matter according to the analysis result and the two comparison results.

[0133] Optionally, the plurality of defect imaging features include a first defect imaging feature, a second defect imaging feature, a third defect imaging feature and a fourth defect imaging feature, the first defect imaging feature corresponds to the first detection image, the second defect imaging feature corresponds to the second detection image, the third defect imaging feature corresponds to the third detection image, and the fourth defect imaging feature corresponds to the fourth detection image, and the analysis unit 403 is specifically configured to:

[0134] When the first defect imaging feature and the fourth defect imaging feature are analyzed as white, and the second defect imaging feature and the third defect imaging feature are analyzed as black, the analysis result represents that the foreign matter is a subsurface foreign matter;

[0135] When the second defect imaging feature and the third defect imaging feature are analyzed as black, and the first defect imaging feature or the fourth defect imaging feature is analyzed as black, the analysis result represents that the foreign matter is a surface foreign matter.

[0136] Optionally, before the correction unit 404, the method further includes:

[0137] The mapping unit 409 is configured to map the third detection image and the fourth detection image into the second detection image through a preset transformation matrix;

[0138] The extraction unit 410 is configured to extract a second effective display region of the second detection image according to a gray gradient method;

[0139] The interception unit 411 is configured to intercept a first effective display region, a third effective display region and a fourth effective display region corresponding to the first detection image, the third detection image and the fourth detection image respectively according to the second effective display region.

[0140] Optionally, the effective display area of the plurality of target detection images comprises a first effective display area, a second effective display area, a third effective display area and a fourth effective display area, and the correction unit 404 is specifically configured to:

[0141] obtain an external rectangle according to the contour of the second effective display area;

[0142] calculate a perspective transformation matrix according to the physical size and the four corner coordinates and the length and width of the external rectangle;

[0143] correct the first effective display area, the second effective display area, the third effective display area and the fourth effective display area respectively according to the perspective transformation matrix, and obtain corresponding first corrected image, second corrected image, third corrected image and fourth corrected image respectively.

[0144] Optionally, after the intersection operation unit 405, further comprising:

[0145] the filtering unit 412 is configured to perform convolution filtering on the effective display area of the plurality of target detection images respectively when the CG cover is covered with a protective film, and obtain a plurality of corresponding filtering results;

[0146] the first gray value unit 413 is configured to extract the gray value of the plurality of target detection images;

[0147] the second gray value unit 414 is configured to extract the gray value of the plurality of filtering results.

[0148] Optionally, after the second gray value unit 414, further comprising:

[0149] the third gray value unit 415 is configured to extract the gray value of the operation result;

[0150] the second confirmation unit 416 is configured to confirm the position of the foreign matter according to the gray value of the plurality of target detection images, the gray value of the plurality of filtering results and the gray value of the operation result.

[0151] Optionally, the camera module comprises an upper camera, a lower camera, an upper light source and a lower light source, and the acquisition unit 401 is specifically configured to:

[0152] acquire the first detection image collected by the upper camera and the upper light source in combination;

[0153] acquire the second detection image collected by the upper camera and the lower light source in combination;

[0154] acquire the third detection image collected by the lower camera and the upper light source in combination;

[0155] acquire the fourth detection image collected by the lower camera and the lower light source in combination.

[0156] Please refer to Figure 5 The application provides an electronic device, comprising:

[0157] The processor 501, the memory 502, the input output unit 503 and the bus 504.

[0158] The processor 501 is connected with the memory 502, the input output unit 503 and the bus 504.

[0159] The memory 502 stores a program, and the processor 501 calls the program to execute the method for detecting foreign matters in Figure 1 、 Figure 2 and Figure 3 .

[0160] The application provides a computer readable storage medium, and the computer readable storage medium stores a program, and the program executes the method for detecting foreign matters in Figure 1 、 Figure 2 and Figure 3 when executed on a computer.

[0161] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system, device and unit described above can refer to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0162] In several embodiments provided in the application, it should be understood that the disclosed system, device and method can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interface, device or unit, and can be electrical, mechanical or other forms.

[0163] The units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed on a plurality of network units. According to actual needs, part or all of the units can be selected to achieve the purpose of the embodiment scheme.

[0164] In addition, each function unit in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software function unit.

[0165] When the integrated unit is realized in the form of a software function 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 solutions of the present application, essentially or in the form of a contribution to the prior art, or all or part of the technical solutions 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 can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, read-only memory), a random access memory (RAM, random access memory), a magnetic disk or an optical disk, and various media that can store program codes.

Claims

1. A method for detecting foreign matter, characterized in that: include: Acquire multiple target detection images captured by a camera module, wherein the camera module includes an upper camera, a lower camera, an upper light source, and a lower light source, and the multiple target detection images include a first detection image, a second detection image, a third detection image, and a fourth detection image; The acquiring of the plurality of target detection images acquired by the camera module includes: acquiring a first detection image acquired by the upper camera and the upper light source combination; acquiring a second detection image acquired by the upper camera and the lower light source combination; acquiring a third detection image acquired by the lower camera and the upper light source combination; acquiring a fourth detection image acquired by the lower camera and the lower light source combination; extracting corresponding multiple defect imaging features from the multiple target detection images respectively; Analyzing the plurality of defect imaging features to obtain analysis results; Correcting the effective display areas of the plurality of target detection images respectively to obtain a plurality of corrected images, the plurality of corrected images including a first corrected image, a second corrected image, a third corrected image, and a fourth corrected image; performing an intersection operation on the defect area of ​​the second corrected image and the defect area of ​​the third corrected image to obtain an operation result; calculating a ratio of an area of ​​the calculation result to an area of ​​the defective region of the third corrected image, and a ratio of an area of ​​the calculation result to an area of ​​the defective region of the second corrected image, to obtain two ratio results; Comparing the two ratio results with preset thresholds respectively to obtain two comparison results; The position of the foreign matter is confirmed based on the analysis result and the two comparison results.

2. The method according to claim 1, characterized in that The multiple defect imaging features include a first defect imaging feature, a second defect imaging feature, a third defect imaging feature, and a fourth defect imaging feature, the first defect imaging feature corresponds to the first detection image, the second defect imaging feature corresponds to the second detection image, the third defect imaging feature corresponds to the third detection image, and the fourth defect imaging feature corresponds to the fourth detection image, and analyzing the multiple defect imaging features to obtain an analysis result includes: When the analysis shows that the first defect imaging feature and the fourth defect imaging feature are white, and the second defect imaging feature and the third defect imaging feature are black, the analysis result indicates that the foreign matter is a submembrane foreign matter; When it is analyzed that the second defect imaging feature and the third defect imaging feature are black, and the first defect imaging feature or the fourth defect imaging feature is black, the analysis result indicates that the foreign matter is a surface foreign matter.

3. The method according to claim 1, characterized in that Before respectively correcting the effective display areas of the plurality of target detection images to obtain a plurality of corrected images, the method further includes: Mapping the third detection image and the fourth detection image to the second detection image through a preset transformation matrix; extracting a second effective display area of ​​the second detection image according to a grayscale gradient method; According to the second effective display area, the first effective display area, the third effective display area and the fourth effective display area corresponding to the first detection image, the third detection image and the fourth detection image are respectively intercepted.

4. The method according to claim 3, characterized in that The effective display areas of the multiple target detection images include a first effective display area, a second effective display area, a third effective display area, and a fourth effective display area. The correcting the effective display areas of the multiple target detection images to obtain multiple corrected images, the multiple corrected images including the first corrected image, the second corrected image, the third corrected image, and the fourth corrected image, includes: Obtaining a circumscribed rectangle according to the outline of the second effective display area; Calculate the perspective transformation matrix based on the physical size and the coordinates, length and width of the four corners of the circumscribed rectangle; According to the perspective transformation matrix, the first effective display area, the second effective display area, the third effective display area and the fourth effective display area are corrected respectively to obtain corresponding first corrected images, second corrected images, third corrected images and fourth corrected images respectively.

5. The method according to claim 1, wherein After performing the intersection operation on the defect area of ​​the second corrected image and the defect area of ​​the third corrected image to obtain the operation result, the method further includes: When the CG cover is covered with a protective film, convolution filtering is performed on the effective display areas of the multiple target detection images to obtain corresponding multiple filtering results; Extracting grayscale feature values ​​of the multiple target detection images; Extracting grayscale feature values ​​of the plurality of filtering results.

6. The method according to claim 5, characterized in that After extracting the grayscale feature values ​​of the plurality of filtering results, the method further includes: Extracting a grayscale feature value of the operation result; The position of the foreign matter is confirmed according to the grayscale feature values ​​of the multiple target detection images, the grayscale feature values ​​of the multiple filtering results, and the grayscale feature value of the operation result.

7. A system for detecting foreign matter, characterized in that: include: an acquisition unit, configured to acquire a plurality of target detection images captured by a camera module, wherein the camera module includes an upper camera, a lower camera, an upper light source, and a lower light source, and the plurality of target detection images include a first detection image, a second detection image, a third detection image, and a fourth detection image; The acquisition unit is specifically used to: acquire a first detection image captured by the upper camera and the upper light source combination; acquire a second detection image captured by the upper camera and the lower light source combination; acquire a third detection image captured by the lower camera and the upper light source combination; acquire a fourth detection image captured by the lower camera and the lower light source combination; a defect imaging feature unit, configured to extract corresponding multiple defect imaging features from the multiple target detection images respectively; an analyzing unit, configured to analyze the plurality of defect imaging features and obtain an analysis result; a correction unit, configured to correct the effective display areas of the plurality of target detection images respectively to obtain a plurality of corrected images, the plurality of corrected images comprising a first corrected image, a second corrected image, a third corrected image, and a fourth corrected image; an intersection operation unit, configured to perform an intersection operation on the defective area of ​​the second corrected image and the defective area of ​​the third corrected image to obtain an operation result; a ratio unit, configured to calculate a ratio of an area of ​​the calculation result to an area of ​​the defective region of the third corrected image, and a ratio of an area of ​​the calculation result to an area of ​​the defective region of the second corrected image, to obtain two ratio results; a comparing unit, configured to compare the two ratio results with a preset threshold value respectively to obtain two comparison results; The first confirmation unit is configured to confirm the position of the foreign matter according to the analysis result and the two comparison results.

8. An electronic device, characterized in that: include: processor, memory, input and output units, and buses; 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 for detecting foreign matter according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a program, and when the program is executed on a computer, the method for detecting foreign matter according to any one of claims 1 to 6 is executed.

Citation Information

Patent Citations

  • Panel detection method and device, electronic equipment and storage medium

    CN114359176A

  • Bubble defect area detection method and device, terminal equipment and storage medium

    CN118485625A