Panel image magnification determination method, panel detection method, device and equipment
By determining the candidate magnification of the panel image and selecting the template area, the problems of low detection efficiency and high labor costs caused by magnification deviation of the image acquisition equipment are solved, thereby improving the accuracy and efficiency of panel detection.
Patent Information
- Application Number
- CN202110142793.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-02-02
- Publication Date
- 2026-01-02
- Estimated Expiration
- 2041-02-02
AI Technical Summary
In existing technologies, there are discrepancies in the acquisition magnification configured for each image acquisition device, resulting in low efficiency in panel quality inspection and increased labor costs.
By obtaining candidate magnifications of the panel image, selecting template and target regions, determining the scaling attribute of the panel image, and then determining the target magnification, the panel image is adjusted to improve detection accuracy.
This avoids the problem of inaccurate automatic component detection caused by different panel image magnification, and improves panel detection efficiency.
Smart Images

Figure CN114841911B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of panel processing, and in particular to a panel image magnification determination method, a panel detection method, device and equipment. BACKGROUND
[0002] In industrial production, product quality detection is an indispensable process. Quality detection is mainly divided into three categories: defect detection, tolerance detection and component measurement. At present, quality detection of panels is generally based on panel images collected by panel image collection devices. However, there is a deviation between the collection magnifications of various image collection devices, which makes it necessary to manually detect the quality of the display panel after obtaining the panel image, thereby increasing the labor cost and affecting the efficiency of panel quality detection. SUMMARY
[0003] The technical problem to be solved by the present application is to provide a panel image magnification determination method, a panel detection method, device and equipment to overcome the deficiencies of the prior art.
[0004] To solve the above technical problems, the first aspect of the present application provides a panel image magnification determination method, which comprises:
[0005] obtaining a candidate magnification corresponding to a panel image to be detected;
[0006] selecting a template region in the panel image based on the candidate magnification, and selecting a target region in the panel image based on the template region, wherein the similarity between the target region and the template region satisfies a preset condition, and the template region is adjacent to the target region;
[0007] determining the scaling rate attribute of the panel image based on the template region and the target region, and determining the target magnification of the panel image according to the scaling rate attribute of the panel image.
[0008] The panel image magnification determination method, wherein the obtaining of the candidate magnification corresponding to the panel image to be detected comprises:
[0009] selecting a target panel region in the panel image to be detected, and obtaining the region size of the target panel region;
[0010] determining a plurality of reference region sizes based on a plurality of preset reference magnifications and the region size;
[0011] for each reference region size, selecting a first image region and a second image region in the panel image based on the reference region size, and determining the similarity between the selected first image region and the second image region;
[0012] select a target region size from the reference region sizes according to the determined all similarities;
[0013] take the reference magnification corresponding to the target region size as the candidate magnification corresponding to the panel image.
[0014] The method for determining the panel image magnification, wherein the target panel region comprises at least one periodic panel region, and when the target panel region is divided into a plurality of sub-panel regions with the periodic panel region as a reference, each of the plurality of sub-panel regions comprises a periodic panel region.
[0015] The method for determining the panel image magnification, wherein the selecting a target region size from the reference region sizes according to the determined all similarities comprises:
[0016] selecting a candidate similarity greater than a preset similarity threshold from the determined all similarities;
[0017] obtaining reference region sizes corresponding to the respective candidate similarities, and taking the smallest reference region size from the obtained all reference region sizes as the target region size.
[0018] The method for determining the panel image magnification, wherein the obtaining the candidate magnification corresponding to the panel image to be detected comprises:
[0019] determining a plurality of reference images based on a plurality of preset reference magnifications and the panel image to be detected;
[0020] selecting a target image from the plurality of reference images based on a preset template image, wherein the target image comprises a third image region having a similarity to the preset template image satisfying a preset condition;
[0021] determining the candidate magnification corresponding to the panel image according to a reference magnification corresponding to the target image and a preset magnification of the preset template image.
[0022] The method for determining the panel image magnification, wherein the preset template image comprises at least one periodic image region, and when the preset template image is divided into a plurality of sub-template images with the periodic image region as a reference, each of the plurality of sub-template images comprises a periodic image region.
[0023] The method for determining the panel image magnification, wherein a periodic image size of the periodic image region is a product of a periodic region size of a periodic panel region in the panel to be detected and the preset magnification.
[0024] The method for determining the panel image magnification, wherein the determining the scaling ratio attribute of the panel image based on the template region and the target region specifically comprises:
[0025] selecting a template positioning point in the template region and a target positioning point corresponding to the template positioning point in the target region;
[0026] obtaining a distance between the template positioning point and the target positioning point, and determining the scaling ratio attribute of the panel image based on the distance.
[0027] The method for determining the panel image magnification, wherein the template region comprises a plurality of periodic image regions; and the determining the scaling ratio attribute of the panel image based on the distance specifically comprises:
[0028] obtaining a region number of the periodic image region included in the template region, determining a candidate width of the periodic image region according to the distance and the region number;
[0029] obtaining a reference width of a periodic panel region of a panel corresponding to the panel image, wherein the periodic image region is an image corresponding to the periodic panel region;
[0030] determining a ratio of the reference width to the candidate width, and taking the ratio as the scaling ratio attribute of the panel image.
[0031] The method for determining the panel image magnification, wherein the first image region is adjacent to the second image region.
[0032] The second aspect of the embodiment provides a panel detection method, and the method comprises:
[0033] obtaining a panel image corresponding to a panel to be detected;
[0034] determining a first magnification of the panel image, and adjusting the panel image based on the first magnification and a preset template image to obtain an adjusted image, wherein the first magnification is determined based on a candidate magnification of the panel image;
[0035] determining position information of a preset positioning point in the adjusted image based on a preset template image;
[0036] determining a size detection result corresponding to the panel to be detected based on the determined position information.
[0037] The panel detection method, wherein the determination process of the first magnification specifically comprises:
[0038] The first magnification is determined based on the candidate magnification of the panel image by using the method for determining the panel image magnification.
[0039] The panel detection method, after the panel image corresponding to the panel to be detected is acquired, the method further comprises:
[0040] selecting a candidate image region in the panel image based on the preset template image, wherein the similarity between the candidate image region and the preset template meets a preset condition;
[0041] determining the rotation parameter corresponding to the panel image based on the candidate image region;
[0042] rotating the panel image based on the rotation parameter, and taking the rotated panel image as the panel image.
[0043] The panel detection method, wherein the determining the rotation parameter corresponding to the panel image based on the candidate image region specifically comprises:
[0044] dividing the panel image into a plurality of image regions based on the candidate image region;
[0045] acquiring target pixel points corresponding to each image region in the plurality of image regions, and determining the rotation parameter corresponding to the panel image based on the target pixel points.
[0046] The panel detection method, wherein the determining the adjustment parameter corresponding to the panel image based on the candidate image region specifically comprises:
[0047] identifying a linear region in the candidate image region;
[0048] acquiring an included angle between the linear region and a preset direction, and determining the rotation parameter corresponding to the panel image based on the included angle.
[0049] The panel detection method, wherein the adjusting the panel image based on the first magnification and the preset template image to obtain an adjusted image specifically comprises:
[0050] acquiring a second magnification of the preset template image;
[0051] determining an adjustment magnification based on the first magnification and the second magnification;
[0052] adjusting the panel image based on the adjustment magnification to obtain an adjusted image, wherein the magnification of the adjusted image is equal to the second magnification.
[0053] The panel detection method, wherein the preset template image comprises a component, and the preset positioning point is located on the component.
[0054] The panel detection method, wherein the determining the position information of the preset positioning point in the adjusted image based on the preset template image specifically comprises:
[0055] selecting feature information corresponding to the preset positioning point in the preset template image, wherein the feature information is used to reflect the position information of the preset positioning point;
[0056] selecting a candidate region in the adjusted image based on the feature information, and selecting a candidate positioning point corresponding to the preset positioning point in the candidate region;
[0057] taking the position information of the candidate positioning point as the position information of the preset positioning point in the adjusted image.
[0058] The panel detection method, wherein the determining the position information of the preset positioning point in the adjusted image based on the preset template image specifically comprises:
[0059] previously determining a recognition model based on the preset template image;
[0060] inputting the adjusted image into the recognition model, and outputting the position information of the preset positioning point in the adjusted image by the recognition model.
[0061] The panel detection method, wherein the preset positioning point comprises a plurality of preset positioning points; and the determining the size detection result corresponding to the panel to be detected based on the determined position information specifically comprises:
[0062] determining distances between the preset positioning points based on the position information corresponding to each of the preset positioning points to obtain a plurality of predicted distances;
[0063] when there is a predicted distance that does not meet a preset distance condition in the plurality of predicted distances, the component size detection result corresponding to the panel to be detected is unqualified, wherein the preset distance condition is that a difference between the predicted distance and a preset distance threshold corresponding to the predicted distance meets a preset requirement;
[0064] when each of the plurality of predicted distances meets the preset distance condition, the component size detection result corresponding to the panel to be detected is qualified.
[0065] The panel detection method, wherein after the determining the size detection result corresponding to the panel to be detected based on the determined position information, the method further comprises:
[0066] selecting a plurality of candidate panel images in the adjusted image according to the direction from the bottom to the top of the panel to be detected based on the preset template image;
[0067] taking the candidate panel image at the bottom as a reference panel image, and taking each candidate panel image other than the reference panel image as a reference panel image;
[0068] respectively determining an offset distance of each reference panel image relative to the reference panel image, wherein the offset distance corresponds to an offset direction perpendicular to a direction from the bottom to the top of the panel to be detected;
[0069] determining an offset defect detection result corresponding to the panel to be detected based on the offset distance.
[0070] The panel detection method, wherein the component detection result comprises a defect detection result; after determining the size detection result corresponding to the panel to be detected based on the determined position information, the method further comprises:
[0071] obtaining a defect region corresponding to the adjusted image, and obtaining a first number of pixel points included in the defect region;
[0072] determining a region size of a panel defect region corresponding to the defect region based on the first number of points and a magnification of the adjusted image;
[0073] determining a second number of pixel units included in the region size;
[0074] determining a defect detection result corresponding to the panel to be detected according to the second number.
[0075] The panel detection method, wherein the obtaining of the defect region corresponding to the adjusted image specifically comprises:
[0076] determining a principal component matrix corresponding to the adjusted image, wherein the principal component matrix is determined based on a plurality of reference images, and a similarity of each reference image in the plurality of reference images to the adjusted image satisfies a preset condition;
[0077] determining a predicted image corresponding to the adjusted image based on the principal component matrix and the adjusted image;
[0078] identifying a defect region in the adjusted image based on the predicted image and the adjusted image.
[0079] The panel detection method, wherein the determination of the predicted image corresponding to the adjusted image based on the principal component matrix and the adjusted image specifically comprises:
[0080] converting the adjusted image into an image vector, wherein a vector dimension of the image vector is equal to a third number of pixel points included in the adjusted image;
[0081] When the adjustment image does not include a preset panel region of the panel to be detected, a predicted image corresponding to the adjustment image is determined based on a vector product of the image vector and the principal component matrix, wherein the preset panel region includes a panel edge of the panel to be detected and / or a character region in the panel to be detected.
[0082] The panel detection method, wherein the determining of the predicted image corresponding to the adjustment image based on the principal component matrix and the adjustment image specifically comprises:
[0083] The adjustment image is converted into an image vector, wherein a vector dimension of the image vector is equal to a fourth number of pixel points included in the adjustment image.
[0084] When the adjustment image does not include a preset panel region of the panel to be detected, each candidate pixel position included in an image region corresponding to the preset panel region is obtained, wherein the preset panel region includes a panel edge of the panel to be detected and / or a character region in the panel to be detected.
[0085] Each candidate element item corresponding to each candidate pixel position in the image vector is obtained, and each selected candidate element item is set as a preset value to obtain a reference image vector.
[0086] The predicted image corresponding to the adjustment image is determined based on the reference image vector, the principal component matrix, and a preset standard image vector.
[0087] The panel detection method, wherein the determining of the defect region in the adjustment image based on the adjustment image and the predicted image specifically comprises:
[0088] The adjustment image is matched with the predicted image to determine a mismatch region of the adjustment image and the predicted image.
[0089] The obtained mismatch region is taken as the defect region in the adjustment image.
[0090] The panel detection method, wherein the obtaining of the defect region corresponding to the adjustment image specifically comprises:
[0091] The adjustment image is input into a trained defect detection model, and the defect detection model is used to determine the defect region corresponding to the adjustment image.
[0092] A third aspect of an embodiment of the present application provides a computer readable storage medium, which stores one or more programs, and the one or more programs can be executed by one or more processors to implement steps in the panel image magnification determination method according to any one of the above.
[0093] The fourth aspect of the embodiment of the present application provides a terminal device, comprising a processor, a memory and a communication bus; the memory stores a computer readable program which can be executed by the processor;
[0094] The communication bus realizes the connection communication between the processor and the memory;
[0095] The processor realizes the steps in the panel image magnification determination method according to any one of the above when executing the computer readable program.
[0096] Advantages: compared with the prior art, the present application provides a panel image magnification determination method, a panel detection method, device and equipment, the method comprises the following steps: obtaining a candidate magnification corresponding to a panel image to be detected; selecting a template region in the panel image based on the candidate magnification, and selecting a target region in the panel image based on the template region; determining the scaling rate attribute of the panel image based on the template region and the target region, and determining the target magnification of the panel image according to the scaling rate attribute of the panel image. After obtaining the candidate magnification of the panel image, the target magnification of the panel image is determined based on the template region and the target region selected in the panel image according to the candidate magnification. Thus, the corresponding component standard of each panel image can be determined according to its target magnification, so that the problem that the automatic detection of the components in the panel is inaccurate and needs manual detection due to the different magnifications of the panel images can be avoided, and the detection efficiency of the panel can be improved. BRIEF DESCRIPTION OF DRAWINGS
[0097] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. 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.
[0098] Figure 1 The flow chart of the panel image magnification determination method provided by the present application.
[0099] Figure 2 The example diagram of the panel image in the panel image magnification determination method provided by the present application.
[0100] Figure 3 The schematic diagram of the periodic image region provided by the present application.
[0101] Figure 4 The schematic diagram of the preset template image provided by the present application.
[0102] Figure 5 The flow chart of the panel detection method provided by the present application.
[0103] Figure 6 A flowchart of a process for obtaining a panel image magnification is provided.
[0104] Figure 7 An illustration of a linear region in a candidate panel image in a panel detection method provided by the present application.
[0105] Figure 8 An illustration of a linear region in a candidate panel image in a panel detection method provided by the present application.
[0106] Figure 9 An illustration of a process of selecting a sub-image in a candidate panel image in a panel detection method provided by the present application.
[0107] Figure 10 An illustration of a process of selecting a sub-image in a candidate panel image in a panel detection method provided by the present application.
[0108] Figure 11 An illustration of a process of selecting a sub-image in a candidate panel image in a panel detection method provided by the present application.
[0109] Figure 12 An illustration of a sub-image in a panel detection method provided by the present application.
[0110] Figure 13 An illustration of a target image region in a panel detection method provided by the present application.
[0111] Figure 14 An illustration of an image block in a panel detection method provided by the present application.
[0112] Figure 15 A flowchart of a process of principal component matrix determination in a panel detection method provided by the present application.
[0113] Figure 16 A flowchart of a process of predicted image determination in a panel detection method provided by the present application.
[0114] Figure 17 A structural schematic diagram of a terminal device provided by the present application. DETAILED DESCRIPTION
[0115] The present application provides a panel image magnification determination method, a panel detection method, a device and equipment. In order to make the purpose, technical scheme and effect of the present application more clear and explicit, the present application is further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application.
[0116] It is to be understood that the singular forms "a," "an," and "the" include plural referents unless the context clearly dictates otherwise. It is further understood that the terms "comprise" (or comprise), "comprises" (or comprises) and "comprising" (or comprising) when used in this specification, specify the presence of stated features, integers, steps, operations, elements, or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, or groups thereof. It is further understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements can be present. In addition, the use of "connection" or "coupling" herein also includes wireless connection or wireless coupling. As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items.
[0117] It is to be understood that the terms so used are intended to encompass the general meaning of such terms as well as the meaning specifically defined herein, unless otherwise defined in specification. It is further understood by the person of ordinary skill in the art that all the terms used herein, including technical terms and scientific terms, have the same meaning as the general understanding of the person of ordinary skill in the art to which the present application belongs, unless otherwise defined. It should also be understood that terms such as those defined in a general dictionary should be understood to have a meaning consistent with that in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined as such herein.
[0118] In addition, it should be understood that the sequence and size of each step in the embodiments do not mean the order of execution, and the execution order of each process is determined by its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0119] The inventors have found that component measurement mainly detects the size of each component in the product, the distance between components, etc. For example, for products such as televisions / mobile phones containing LED panels, it is necessary to detect whether there are abnormal conditions such as the size of the circuit component exceeding the predetermined range, the presence of defects, excessive defects, or the offset of different layers of circuits. When performing component measurement on a product, it is common to perform component measurement based on product images captured by a high magnification camera on an industrial vision-based automatic quality detection device. However, there are differences in camera parameters (e.g., illumination, true magnification, lens foreign matter, etc.) on different detection devices, and the camera can take pictures of the location of the defect during movement, so that the camera shooting parameters at different times on the same detection device also change. This makes the corresponding shooting magnification of each product in the same product different, so that after the detection device takes pictures, manual measurement of the components is still required, which is time-consuming and laborious.
[0120] To solve the above problems, in the embodiment of the present application, a candidate magnification corresponding to a panel image to be detected is acquired; a template region is selected in the panel image based on the candidate magnification, and a target region is selected in the panel image based on the template region; a scaling rate attribute of the panel image is determined based on the template region and the target region, and a target magnification of the panel image is determined according to the scaling rate attribute of the panel image. After the candidate magnification of the panel image is acquired, the target magnification of the panel image is determined based on the template region and the target region selected in the panel image based on the candidate magnification. Thus, for each panel image, the corresponding component standard can be determined according to the target magnification thereof, so that the problem that the automatic detection of components in the panel is inaccurate and needs to be manually detected due to different magnifications of the panel image can be avoided, and thus the detection efficiency of the panel can be improved.
[0121] The application will be further described below with reference to the drawings and the embodiments.
[0122] The embodiment provides a panel image magnification determination method, as shown in Figure 1 The method comprises the following steps of:
[0123] S10, acquiring a candidate magnification corresponding to a panel image to be detected.
[0124] Specifically, the panel image can be a panel image collected in real time or at a preset interval by an image collection device (such as a camera or a camera, etc.) pre-set on a production line of a production panel during the production of the panel; or a panel image acquired from a local storage space of an electronic device running a panel defect detection model generation method; or a panel image received by sending an image acquisition request to an image storage server and receiving a panel image returned by the server based on the image acquisition request; of course, the panel image can also be acquired by other ways, and the specific acquisition method is not limited herein. The panel corresponding to the panel image to be detected can be a TFT-LCD panel, an LCD panel, an integrated circuit panel or a chip panel, etc., and the panel to be detected can include a circuit region and a non-circuit region, etc.
[0125] The panel image comprises a plurality of periodic image regions, and the similarity of the image content included in each periodic image region in the plurality of periodic image regions satisfies a preset condition. The plurality of periodic image regions can be arranged along a horizontal direction, can be arranged along a vertical direction, can be partially arranged along a horizontal direction, and can be partially arranged along a vertical direction, etc. In one implementation manner, as shown in Figure 2As shown, the panel image corresponds to a to-be-detected panel including a plurality of periodic panel regions (e.g., pixel units, etc.), which are arranged in an array in the to-be-detected panel, and each periodic panel region corresponds to a periodic image region in the panel image, in other words, a periodic image region in the panel image corresponds to an image region of a periodic panel region in the to-be-detected panel.
[0126] The candidate magnification is a magnification configured for a photographing device used to capture the panel image. It can be understood that the candidate magnification can reflect the size of a pixel on the to-be-detected panel in the panel image. In one implementation of the embodiment, the to-be-detected panel corresponding to the panel image can be an LED panel (e.g., for a smart TV, a smart phone, etc.), and the magnification range of the camera of the quality detection machine for the to-be-detected panel is 0.2-10 μm per 1 pixel, for example, 0.25 μm per 1 pixel, 0.5 μm per 1 pixel, 1 μm per 1 pixel, etc.
[0127] The to-be-detected panel includes periodic panel regions that are periodically repeated, so that the candidate magnification can be determined by determining the periodic panel regions in the panel image, for example, the to-be-detected panel includes a plurality of periodically repeated pixel units (e.g., LED pixels), the area size of each periodic panel region is [W, H], and the candidate magnification is M, then the size [PW, PH] of the pixel unit on the panel image should be within the range of [W / M±ε, H / M±ε], where ε is the size difference caused by the magnification change; the periodic image region corresponding to the periodic panel region is arranged repeatedly in the horizontal direction on the panel image every W / M±ε, and is arranged repeatedly in the vertical direction every H / M±ε. Based on this, two adjacent image regions in the horizontal direction or the vertical direction of the panel image can be selected for matching, if the similarity of the matching is greater than a preset similarity threshold, then the magnification of the periodic panel region is determined based on the image region; or, a preset template image with a known magnification is set, and an image region with the greatest similarity to the preset template image is selected in the panel image, if the similarity of the image region to the preset template image is greater than a preset similarity threshold, then the magnification of the periodic panel region P is determined based on the image region and the preset template image.
[0128] In one implementation of the embodiment, the candidate magnification corresponding to the panel image to be detected specifically includes:
[0129] A10, a target panel region is selected in the to-be-detected panel corresponding to the panel image, and the area size of the target panel region is obtained;
[0130] A20, a plurality of reference area sizes are determined based on a plurality of preset reference magnifications and area sizes;
[0131] A30. For each reference region size, a first image region and a second image region are selected in the panel image based on the reference region size, and the similarity between the selected first image region and the second image region is determined, wherein the first image region and the second image region are adjacent.
[0132] A40. Select the target region size from several reference region sizes based on all similarities;
[0133] A50. Use the reference magnification corresponding to the target area size as the candidate magnification corresponding to the panel image.
[0134] Specifically, the target panel area includes at least one periodic panel area, and when the target panel area is divided into several sub-panel areas based on the periodic panel area, each sub-panel area includes a periodic panel area. It is understood that the target panel area includes several periodic panel areas, and the components included in each periodic panel area and the positional relationships between the components are the same. For example, a periodic panel area is a pixel unit in the panel.
[0135] The area size of the target panel region reflects the area size of the target panel region within the panel. For example, if the target panel region is the area occupied by a single pixel unit, the area size is the actual size of that pixel unit [W, H], where W is the width of the pixel unit in the horizontal direction and H is the height of the pixel unit in the vertical direction. Alternatively, if the target panel region includes multiple pixel units arranged horizontally, the area size of the target panel region is [nW, H], where n is the number of pixel units included in the target panel region. Or, if the target panel region includes multiple pixel units arranged vertically, the area size of the target panel region is [W, nH], where n is the number of pixel units included in the target panel region. Or, if the target panel region includes multiple pixel units arranged in an array, the area size of the target panel region is [aW, bH], where a is the number of pixel units in the row direction (i.e., the horizontal direction) and b is the number of pixel units in the column direction (i.e., the vertical direction).
[0136] In the step A20, the plurality of reference magnifications can be preset, for example, the plurality of reference magnifications include 1 pixel magnification of 0.25 μm, 0.5 μm and 1 μm, etc. The plurality of reference magnifications can also be determined according to the magnification configured by the shooting device used for shooting the panel image, and the determination process can be obtaining a plurality of first magnifications configured by the shooting device used for configuring the panel image to obtain a first magnification set; performing deduplication processing on the first magnification set to obtain the plurality of reference magnifications; or obtaining a plurality of first magnifications configured by the shooting device used for configuring the panel image, obtaining the repetition number of each first magnification in the first magnification set, and selecting the first magnification with a repetition number greater than a preset number threshold to obtain the plurality of reference magnifications. Of course, in actual application, the plurality of reference magnifications can also be set in other ways, for example, setting the plurality of reference magnifications according to the shooting requirements corresponding to the panel, etc., which will not be described one by one here.
[0137] The plurality of reference region sizes correspond one-to-one to the plurality of reference magnifications, and each reference region size is determined based on the corresponding reference magnification and the region size, wherein the width of the reference region size is equal to the product of the width of the region size and the reference magnification, and the height of the reference region size is equal to the product of the height of the region size and the reference magnification. It can be understood that the reference region size is equivalent to the image size of the reference panel image obtained by shooting the panel region of the region size with the shooting device configured with the reference magnification.
[0138] Further, in the step A30, the first image region and the second image region are both included in the panel image, and the region size of the first image region is equal to the reference region size, and the region size of the second image region is equal to the reference region size. It can be understood that the first image region and the second image region are both image regions with a region size of the reference region size in the panel image, and the first image region and the second image region are adjacent, wherein adjacent means that the first image region and the second image region are arranged side by side. For example, the first image region and the second image region are arranged side by side along the horizontal direction, or the first image region and the second image region are arranged side by side along the vertical direction, etc.
[0139] Further, in the step A40, the target region size is included in the plurality of reference region sizes, and the similarity of the first image region and the second image region corresponding to the target region size is greater than a preset similarity threshold, wherein the preset similarity threshold can be preset, and is used to measure the similarity of the first image region and the second image region. When the similarity is greater than the preset similarity threshold, it means that the similarity of the first image region and the second image region is high, and vice versa, when the similarity is less than or equal to the preset similarity threshold, it means that the similarity of the first image region and the second image region is low.
[0140] Based on this, in one implementation form of the embodiment, the selecting the target region size from the plurality of reference region sizes according to the determined all similarities specifically comprises:
[0141] selecting a candidate similarity greater than a preset similarity threshold from the determined all similarities;
[0142] obtaining a reference region size corresponding to each candidate similarity, and taking the minimum reference region size among the obtained all reference region sizes as the target region size.
[0143] Specifically, the number of the determined similarities is determined, and the determined similarities correspond to the plurality of reference region sizes one by one. For example, the plurality of reference region sizes include a reference region size A and a reference region size B, and the determined similarities include a similarity a and a similarity b. The reference region size A corresponds to the similarity a, and the reference region size B corresponds to the similarity b. The candidate similarity is a similarity greater than a preset similarity threshold among the determined all similarities. In other words, for the first image region and the second image region corresponding to the candidate similarity, when the first image region and the second image region coincide, the coverage of the object carried by the first image region to the object corresponding to the first image region in the second image region reaches a preset requirement, for example, the preset requirement can be 99%, 99.5%, etc.
[0144] In addition, after obtaining the candidate similarity greater than the preset similarity threshold, a reference region size corresponding to each candidate similarity is obtained, and each reference region size is compared to determine the minimum reference region size among the obtained all reference region sizes, and the minimum reference region size is taken as the target region size. It can be understood that the target region size is the minimum among the plurality of reference region sizes corresponding to the plurality of candidate similarities. For example, the plurality of reference region sizes corresponding to the plurality of candidate similarities include a reference region size A, a reference region size B, and a reference region size C, wherein the reference region size A is the minimum reference region size among the reference region size A, the reference region size B, and the reference region size C. Therefore, the reference region size A is the target region size.
[0145] Further, in step A50, the reference magnification corresponding to the target region size is one of the plurality of reference magnifications, and is a magnification for enlarging the region size to the target region size. After obtaining the reference magnification corresponding to the target region size, the reference magnification is taken as a candidate magnification corresponding to the panel image to obtain the candidate magnification of the panel image.
[0146] In one implementation form of the embodiment, the obtaining the candidate magnification corresponding to the panel image to be detected specifically comprises:
[0147] B10, determining a plurality of reference images based on a plurality of preset reference magnifications and the panel image to be detected.
[0148] B20, selecting a target image from the plurality of reference images based on a preset template image, wherein the target image has a third image region that has a similarity to the preset template image satisfying a preset condition;
[0149] B30, determining a candidate magnification corresponding to the panel image according to a reference magnification corresponding to the target image and a preset magnification of the preset template image.
[0150] Specifically, the reference image corresponds to a plurality of reference magnifications one-to-one, and each reference image is obtained by scaling the panel image by the corresponding reference magnification, wherein the determination manner of the plurality of reference magnifications is the same as the determination manner of the plurality of reference magnifications described above, and the specific description can be referred to the description of the plurality of reference magnifications, which will not be repeated here.
[0151] The preset template image can be preset, and the preset template image includes at least one periodic image region, and when the preset template image is divided into a plurality of sub-template images based on the periodic image region, each of the plurality of sub-template images includes a periodic image region. Wherein, the periodic image region corresponds to a periodic panel region in the panel to be detected, in other words, the panel to be detected includes a plurality of periodic panel regions, and the components (for example, the periodic panel region is a pixel unit in the panel) in each of the plurality of periodic panel regions and the positional relationship between the components are the same; the image content contained in the periodic image region is an image of a periodic panel region in the panel to be detected. For example, the periodic image region is an image as shown in Figure 3 The preset template image is an image as shown in Figure 4 Of course, in actual application, the periodic image region contains an image content which is a pixel unit in the panel to be detected.
[0152] The target image is included in a plurality of reference images, and there is a third image region in the target image, and a similarity between the third image region and the preset template image satisfies a preset condition. It can be understood that for each of the plurality of reference images, a third image region can be selected in the reference image, wherein the third image region is the image region with the largest similarity to the preset template image in the reference image; and the similarity between the third image region corresponding to the target image and the preset template image is the largest among the similarities between the third image regions in the reference images and the preset template image. For example, the plurality of reference images include reference image A, reference image B, and reference image C, there is a third image region a in reference image A, there is a third image region b in reference image B, and there is a third image region c in reference image C. The similarity between the third image region c and the preset template model is the largest among the similarities between the third image region a and the preset template model A1, the similarity between the third image region b and the preset template model B1, and the similarity between the third image region c and the preset template model C1, that is, C1>B1, and C1>A1.
[0153] The magnification of the target image is equal to the preset magnification of the preset template image, and the target image is obtained by scaling the panel image by the corresponding reference magnification, so that after obtaining the target image, the preset magnification of the preset template image can be used as the magnification of the target image, and after obtaining the scaling magnification of the panel image to the target image, the candidate magnification of the panel image can be determined, wherein the candidate magnification of the panel image can be equal to the product of the preset magnification and the corresponding reference magnification of the target image. In addition, the periodical image size of the periodical image region in the preset template image is the product of the periodical region size of the periodical panel region in the panel to be detected and the preset magnification. For example, the preset magnification of the preset template image is magnification A, the corresponding reference magnification of the target image is magnification B, the corresponding candidate magnification of the panel image is X, assuming that the width of a pixel unit is W, the width of a pixel unit on the panel image is W / X, the width of a pixel unit in the preset template image is W / A, and the width of a pixel unit in the target image is (W / X) / B. According to the equality of the magnification of the target image and the magnification of the preset template image, (W / X) / B=W / A, it can be obtained that X=A*B.
[0154] S20, selecting a template region in the panel image based on the candidate magnification, and selecting a target region in the panel image based on the template region.
[0155] Specifically, the template region is contained in the panel image, and a region size of the template region is equal to a region size of the target panel region after the target panel region is magnified by the candidate magnification. It can be understood that the region size of the template region can be equal to an image size of a target panel image obtained by photographing the target panel region by a photographing device configured with the candidate magnification. The target region is contained in the panel image, and a similarity between the target region and the template region satisfies a preset condition, where the preset condition can be that the similarity between the target region and the template region is greater than a preset similarity threshold, for example, 99% or the like. In one specific implementation, the template region is adjacent to the target region, where the adjacent means that the target region and the template region are arranged side by side, and there is no reference region between the target region and the template region, the reference region having a similarity to the template region satisfying the preset condition. For example, the target region and the template region are arranged side by side in a horizontal direction, or the target region and the target region are arranged side by side in a vertical direction, or the like.
[0156] S30, determining a scaling rate attribute of the panel image based on the template region and the target region, and determining a target magnification of the panel image according to the scaling rate attribute of the panel image.
[0157] Specifically, the scaling rate attribute is a scaling magnification of the panel image relative to a panel to be detected, and it can be understood that one pixel in the panel to be detected is scaled to one pixel in the panel image by the scaling rate attribute. For example, if the scaling rate attribute is 1 pixel is 0.25 μm, then the pixel size of one pixel in the panel to be detected in the panel image is 0.25 μm. The target magnification is a scaling magnification of an acquisition device configured for acquiring the panel image, where the acquisition device is used to acquire the panel image, and the target magnification of the panel image is equal to the scaling rate of the panel image. Thus, after the scaling rate attribute of the panel image is obtained, the scaling rate attribute can be used as the target magnification of the panel image.
[0158] In one implementation of the embodiment, the determining of the scaling rate attribute of the panel image based on the template region and the target region specifically includes:
[0159] selecting a template positioning point in the template region and selecting a target positioning point corresponding to the template positioning point in the target region;
[0160] obtaining a distance between the template positioning point and the target positioning point, and determining the scaling rate attribute of the panel image based on the distance.
[0161] Specifically, the template positioning point is any pixel point in the template region, for example, the template positioning point is the upper left corner, the upper left corner and the center point of the template region, etc. The target positioning point is a pixel point in the target region corresponding to the template positioning point, wherein corresponding means that the relative position of the target positioning point in the target region is the same as the relative position of the template positioning point in the template region. For example, the template positioning point is the upper left corner of the template region, and the target positioning point is the upper left corner of the target region, or the template positioning point is the center point of the template region, and the target positioning point is the center point of the target region, etc.
[0162] In one implementation of the embodiment, the determining the scaling ratio attribute of the panel image based on the distance specifically comprises:
[0163] Obtaining the number of regions of the periodic image region included in the template region, and determining a candidate width of the periodic image region according to the distance and the number of regions;
[0164] Obtaining a reference width of a periodic panel region of a panel corresponding to the panel image;
[0165] Determining the ratio of the reference width to the candidate width, and taking the ratio as the scaling ratio attribute of the panel image.
[0166] Specifically, the candidate width is the width of the periodic image region, the reference width is the width of the periodic panel region in the panel to be detected, and the periodic image region is an image region corresponding to the periodic panel region, in other words, the image content of the periodic image region is the periodic panel region. The periodic panel region forms a panel image region after scaling based on the scaling ratio attribute, and the candidate width of the periodic image region in the panel image region is equal to the reference width of the periodic panel region / scale ratio attribute, so that the scale ratio attribute is equal to the reference width / candidate width.
[0167] In one implementation form of the embodiment, in order to provide accuracy of the scaling ratio attribute, when determining the target region, the template region can be taken as a sliding window, and the template region is slid along a preset direction to obtain a plurality of target regions in the preset direction, each of the plurality of target regions satisfies a preset condition in terms of pixel degree of the template region, and the plurality of target regions are arranged side by side along the preset direction. After obtaining the plurality of target regions, a candidate distance between target positioning points in two adjacent target regions is obtained, for each candidate distance, a first scaling ratio attribute corresponding to the candidate distance is determined, an average value of the first scaling ratio attributes is calculated, and the calculated average value is taken as the scaling ratio attribute. Of course, in actual application, the template region can include a periodic image region (for example, including one pixel unit), and then after obtaining the candidate distance between the target positioning points in the two adjacent target regions, an average value of all the candidate distances can be directly calculated, and the calculated average value is taken as the scaling ratio attribute. In addition, when there is a candidate region between the template region and the target region, and the similarity of the candidate region to the template region satisfies a preset condition, when the distance is used to determine the scaling ratio attribute of the panel image, the scaling ratio attribute can be determined according to the distance and the number of candidate regions.
[0168] In summary, the embodiment provides a panel image magnification determination method, which includes obtaining a candidate magnification corresponding to a panel image to be detected; selecting a template region in the panel image based on the candidate magnification, and selecting a target region in the panel image based on the template region; determining a scaling ratio attribute of the panel image based on the template region and the target region, and determining a target magnification of the panel image according to the scaling ratio attribute of the panel image. After obtaining the candidate magnification of the panel image, the embodiment determines the target magnification of the panel image based on the template region and the target region selected in the panel image based on the candidate magnification. Thus, for each panel image, the corresponding component standard can be determined according to the target magnification, so that the problem of inaccurate automatic detection of components in the panel due to different magnifications of the panel image and the need for manual detection can be avoided, and the detection efficiency of the panel can be improved.
[0169] Based on the panel image magnification determination method described above, the embodiment provides a panel detection method, as shown in Figure 5 and Figure 6 The method includes:
[0170] H10, obtaining a panel image corresponding to a panel to be detected.
[0171] Specifically, the panel image can be a panel image collected by an image collection device (such as a camera or a camera, etc.) pre-set on a production line of a production panel in real time or at a preset interval during the production of the panel; or a panel image obtained from a local storage space of an electronic device running a generation method of a panel defect detection model; or a panel image returned by a server based on an image acquisition request sent by the electronic device to an image storage server; of course, the panel image can also be obtained by other ways, and the specific acquisition method is not limited here. Wherein, the panel image corresponding to the panel to be detected can be a TFT-LCD panel, an LCD panel, an integrated circuit panel or a chip panel, etc., and the panel to be detected can include a circuit area and a non-circuit area, etc.
[0172] As shown in Figure 6 The panel image includes a plurality of periodic image regions, and the similarity of the image content included in each periodic image region in the plurality of periodic image regions satisfies a preset condition. Wherein, the plurality of periodic image regions can be arranged along the horizontal direction, can be arranged along the vertical direction, can be partially arranged along the horizontal direction, and can be partially arranged along the vertical direction, etc. In one implementation, the panel to be detected corresponding to the panel image includes a plurality of periodic panel regions (such as pixel units, etc.), and the plurality of periodic panel regions are arranged in an array in the panel to be detected. Each periodic panel region corresponds to an image region in the panel image, in other words, the periodic image region in the panel image corresponds to an image region of a periodic panel region in the panel to be detected.
[0173] In one implementation of the present embodiment, after obtaining the panel image corresponding to the panel to be detected, the method further includes:
[0174] selecting a candidate image region in the panel image based on the preset template image, wherein the similarity between the candidate image region and the preset template satisfies a preset condition;
[0175] determining the rotation parameter corresponding to the panel image based on the candidate image region;
[0176] rotating the panel image based on the rotation parameter, and taking the rotated panel image as the panel image.
[0177] Specifically, the rotation parameter is used to rotate image content in the panel image, so that the image content in the candidate image region in the rotated panel image is aligned with the image content in the preset template image. This is because there is a difference in magnification between different shooting cameras, so that the size of the components in the panel image obtained by shooting has a certain range of floating, and the shooting camera and the panel to be detected have a certain inclination, so that the panel region in the panel image obtained by shooting has a certain inclination, and by adjusting the panel image, the periodic component structure of the panel image can be aligned with the periodic component structure in the preset template image, which can improve the accuracy of the size detection result in the candidate panel image.
[0178] In one implementation form of the embodiment, the determining the rotation parameter corresponding to the panel image based on the candidate image region specifically comprises:
[0179] dividing the panel image into a plurality of image regions based on the candidate image region;
[0180] obtaining target pixel points corresponding to each image region of the plurality of image regions, and determining the rotation parameter corresponding to the panel image based on the target pixel points.
[0181] Specifically, the similarity of each image region of the plurality of image regions to the candidate image region satisfies a preset condition. It can be understood that the periodic and repetitive component structure included in each image region is the same as the periodic and repetitive component structure included in the candidate image region, and the number of periodic and repetitive component structures included in each image region is the same as the number of periodic and repetitive component structures included in the candidate image region. In the image region set composed of the plurality of image regions and the candidate image region, the arrangement directions of any two image regions are the same, for example, both in the horizontal direction or both in the vertical direction, etc.
[0182] The target pixel points corresponding to each image region can be determined based on candidate pixel points in the candidate image region, and the pixel positions of the candidate pixel points in the candidate image region correspond to the pixel positions of the target pixel points in the image region. For example, the candidate pixel points are at the top left corner of the candidate image region, and the target pixel points are at the top left corner of the corresponding image region. Of course, in actual application, the candidate pixel points can be the center point, the top right corner of the candidate image region, a vertex of the component structure in the candidate image region, etc.
[0183] After obtaining the target pixel points corresponding to the image regions, a line connecting the target pixel points is determined, a slope of the line in a coordinate system in which the panel image is located is determined, and an inclination angle of the panel image is determined based on the slope, and a rotation parameter of the panel image is determined based on the inclination angle. For example, if the slope of the line in the coordinate system in which the panel image is located is 1 / 2, the inclination angle is 30 degrees, and the rotation parameter of the panel image is 30 degrees.
[0184] In one implementation of the embodiment, the determining the adjustment parameter corresponding to the panel image based on the candidate image region specifically includes:
[0185] identifying a linear region in the candidate image region;
[0186] obtaining an included angle between the linear region and a preset direction, and determining the rotation parameter corresponding to the panel image based on the included angle.
[0187] Specifically, the linear region refers to an image region in which a component extending along a horizontal direction or a vertical direction is located. There are data lines and / or bus structures extending along the horizontal direction or the vertical direction in the panel to be detected, so that the candidate image region includes an image region corresponding to the data lines and / or bus structures extending along the horizontal direction or the vertical direction. Thus, after obtaining the candidate image region, edge information of the candidate image region can be extracted (for example, using Sobel / Canny, etc.), and then a linear region in the candidate image region can be determined based on the edge information (using Hough Transform or Line segment detector (LSD), etc.), so as to obtain the linear region, for example, the straight line region B in Figure 8 In addition, in actual applications, the component structure included in the candidate image region can also include a linear region, so that the linear region can also be an image region corresponding to a linear part of the component structure, for example, as shown in Figure 7 The linear region is the straight line region A in Figure 7
[0188] After obtaining the linear region, an included angle between the linear region and a preset direction is obtained, and a rotation parameter corresponding to the panel image is determined based on the included angle. For example, if the linear region extends along the vertical direction, the preset direction is the vertical direction, and if the linear region extends along the horizontal direction, the preset direction is the horizontal direction. After obtaining the included angle, the rotation parameter corresponding to the panel image is determined according to the included angle, and after rotating the candidate image region by the rotation parameter, the included angle between the linear region in the candidate image region and the preset direction is zero degrees.
[0189] H20, determine a first magnification of the panel image, and adjust the panel image based on the first magnification and a preset template image to obtain an adjusted image.
[0190] Specifically, the first magnification is a scaling magnification of the panel image, wherein the first magnification can be determined by using the above-mentioned method for determining the magnification of the panel image, which will not be repeated here, and can be specifically parameterized as described above. The adjusted image can be obtained by scaling the panel image, and the magnification corresponding to the adjusted image is the same as the magnification corresponding to the preset template image. The preset template image is pre-set, the preset template image includes a plurality of periodic image regions, and when the preset template image is divided into a plurality of sub-template images with a preset periodic image region as a unit, each sub-template image corresponds to one periodic image region. In one implementation of the embodiment, as shown in Figure 6 the preset template image includes one periodic image region, and the image content of the preset template image is the same as that of the periodic image region, for example, the preset template image includes one pixel unit, etc.
[0191] In one implementation of the embodiment, the adjusting the panel image based on the first magnification and the preset template image to obtain an adjusted image specifically includes:
[0192] obtaining a second magnification of the preset template image;
[0193] determining an adjustment magnification based on the first magnification and the second magnification;
[0194] adjusting the panel image based on the adjustment magnification to obtain an adjusted image, wherein the magnification of the adjusted image is equal to the second magnification.
[0195] Specifically, the second magnification of the preset template image can be pre-stored or obtained by using the above-mentioned method for obtaining the magnification of the panel image. The adjustment magnification is used to adjust the panel image, so that the magnification of the adjusted image obtained by the adjustment is equal to the second magnification, wherein the adjustment magnification can be equal to the ratio of the second magnification to the first magnification, for example, the second magnification of the preset template image is magnification A, the first magnification corresponding to the panel image is magnification B, the adjustment magnification is X, assuming that the width of a pixel unit is W, the width of a pixel unit on the panel image is W / B, the width of a pixel unit in the preset template image is W / A, and the width of a pixel unit in the adjusted image is (W / B) / X, then from the fact that the magnification of the target image is equal to the magnification of the preset template image, it can be indicated that (W / B) / X=W / A, and thus it can be obtained that X=A / B.
[0196] H30, determine position information of the preset positioning point in the adjusted image based on the preset template image.
[0197] Specifically, the preset template image includes at least one component, which is a component in a panel region corresponding to the preset template image, for example, a capacitor, a partial data line, a transistor, etc. The preset positioning point is located on the component, so as to determine the size of the component through the preset positioning point. There is a reference image region in the panel image, and the similarity between the reference image region and the preset template image meets a preset condition, for example, the preset template image is an image corresponding to a pixel unit, and the panel image includes a plurality of images corresponding to the pixel unit.
[0198] Based on this, the position information refers to the position information of a reference pixel point in the panel image, wherein the reference pixel point is a pixel point in the panel image corresponding to the preset positioning point. The determination process of the reference pixel point can be: for the preset template image, a reference image region corresponding to the preset template image can be selected in the panel image, and correspondingly, for the preset positioning point in the preset template image, there is a reference pixel point in the reference image region, and the reference pixel point corresponds to the preset positioning point, wherein the correspondence refers to that the relative position of the preset positioning point in the preset template image is the same as the relative position of the reference pixel point in the reference image region, for example, the relative position of the preset positioning point in the preset template image is (100, 100), and then the relative position of the reference pixel point in the reference image is (100, 100).
[0199] In one implementation manner of the embodiment, the determination of the position information of the preset positioning point in the adjusted image based on the preset template image specifically includes:
[0200] selecting feature information corresponding to the preset positioning point in the preset template image;
[0201] selecting a candidate region in the adjusted image based on the feature information, and selecting a candidate positioning point corresponding to the preset positioning point in the candidate region;
[0202] taking the position information of the candidate positioning point as the position information of the preset positioning point in the adjusted image.
[0203] Specifically, the feature information is used to reflect the position information of the preset positioning point, and the feature information can be an image region including the preset positioning point, or the position information of a plurality of feature points corresponding to the preset positioning point, and the distance between each feature point in the plurality of feature points and the preset positioning point is less than a preset distance threshold, for example, the plurality of feature points are pixel points in a 3*3 neighborhood of the preset positioning point, etc.
[0204] The candidate region is included in the adjusted image, and a candidate feature information exists within the candidate region. This candidate feature information matches the feature information, and the position of the candidate feature information in the candidate image corresponds to the position of the feature information in the adjusted image. Furthermore, the candidate feature information can overlap with the feature information. For example, when the feature information is an image region, the candidate feature information is also an image region; when the feature information consists of several feature points, the candidate feature information is the position information of those feature points. After obtaining the candidate feature information, image region A is selected in the preset template image based on the feature information, and image region B is selected in the adjusted image based on the candidate feature information. Then, based on the position information of the preset positioning point in image region A, a reference pixel in image region B is determined, and the position information of this reference pixel in the adjusted image is used as the position information of the preset positioning point in the adjusted image.
[0205] In one implementation of this embodiment, determining the position information of the preset positioning point in the adjusted image based on the preset template image specifically includes:
[0206] A recognition model is determined in advance based on the preset template image;
[0207] The adjusted image is input into the recognition model, and the recognition model outputs the position information of the preset positioning point in the adjusted image.
[0208] Specifically, the recognition model is pre-established and used to identify the position information of a preset positioning point. It can be understood that after the adjusted image is input into the recognition model, the recognition model will output the position information of the preset positioning point in the adjusted image, so as to obtain the position information of the preset positioning point in the adjusted image.
[0209] H40. Based on the determined position information, determine the size detection result corresponding to the panel to be detected.
[0210] Specifically, such as Figure 6 As shown, determining the size detection result corresponding to the panel to be inspected refers to measuring the components in the panel to be inspected. The size detection result is the measurement result obtained from measuring the components in the panel to be inspected. The size detection result includes the measured dimensions of the components in the panel to be inspected, such as the measured dimensions of capacitors, transistors, and data line widths. Furthermore, after obtaining the size detection result, it can be determined whether the dimensions of the components in the panel to be inspected meet the requirements, thereby determining whether the panel to be inspected is a qualified product.
[0211] In one implementation form of the embodiment, the preset positioning points include a plurality of preset positioning points; and the determining the size detection result corresponding to the panel to be detected based on the determined position information specifically includes:
[0212] determining distances between the preset positioning points based on the position information corresponding to each of the preset positioning points to obtain a plurality of predicted distances;
[0213] when there is a predicted distance in the plurality of predicted distances that does not satisfy the preset distance condition, the component size detection result corresponding to the panel to be detected is unqualified, wherein the preset distance condition is that a difference between the predicted distance and a preset distance threshold corresponding to the predicted distance satisfies a preset requirement;
[0214] when each of the plurality of predicted distances satisfies the preset distance condition, the component size detection result corresponding to the panel to be detected is qualified.
[0215] Specifically, each of the plurality of preset positioning points can be a vertex of a component structure, for example, a vertex of a transistor, etc. Each of the plurality of predicted distances is a distance between two preset positioning points, and each of the plurality of predicted distances corresponds to a preset distance condition, which is that a difference between the predicted distance and a preset distance threshold corresponding to the predicted distance satisfies a preset requirement. The preset distance threshold is preset and is used as an evaluation basis for determining whether the two preset positioning points satisfy the requirement. When the difference between the predicted distance and the preset distance threshold satisfies the preset requirement, it indicates that the positional relationship of the two preset positioning points satisfies the preset requirement. By analogy, when each of the plurality of predicted distances satisfies the preset distance condition, it indicates that the component size detection result of the component structure in the panel to be detected is qualified. Conversely, when there is a predicted distance in the plurality of predicted distances that does not satisfy the preset distance condition, it indicates that the component size detection result of the component structure in the panel to be detected is unqualified.
[0216] In one implementation form of the embodiment, when measuring the components in the panel to be detected, it is necessary to take the bottom layer components as a reference to determine whether the components of other layers are offset. Based on this, after the determining the size detection result corresponding to the panel to be detected based on the determined position information, the method further includes:
[0217] selecting a plurality of candidate panel images in the adjusted image in a direction from bottom to top of the panel to be detected based on a preset template image;
[0218] taking the candidate panel image located at the bottom as a reference panel image, and taking each of the candidate panel images other than the reference panel image as a reference panel image;
[0219] determine offset distances of each reference panel image relative to the reference panel image, wherein the offset distances correspond to offset directions perpendicular to a direction from the bottom to the top of the panel to be detected;
[0220] determine the offset defect detection result of the panel to be detected based on the offset distances.
[0221] Specifically, each of the plurality of candidate panel images is matched with the preset template image, and the plurality of candidate panel images can be obtained by sliding the preset template image in the direction from the bottom to the top in the adjusted image. After obtaining the plurality of candidate panel images, the candidate panel image located at the bottom is taken as the reference panel image, and each candidate panel image other than the reference panel image is taken as a reference panel image to determine the offset distance of the reference panel image relative to the reference panel image, wherein the offset distance corresponds to an offset direction perpendicular to a direction from the bottom to the top of the panel to be detected. In determining the offset distance, a center line of the reference panel image extending in the direction from the bottom to the top can be selected, for each reference panel image, a pixel point farthest from the center line in the reference panel image is selected, and the shortest distance from the pixel point to the center line is determined; the shortest distance from the pixel point corresponding to the pixel point in the reference image to the center line is obtained, and the offset distance is determined according to the two shortest distances obtained; or the pixel point farthest from the center line of the reference panel image can be selected, and the distance between the pixel point and the center line of the reference panel image is taken as the offset distance. Of course, in actual application, other ways of determining the offset distance can also be used, which will not be described here.
[0222] After obtaining the offset distance corresponding to each reference image, each offset distance is compared with an offset distance threshold value, when each offset distance in the plurality of offset distances is less than the offset distance threshold value, it indicates that the offset defect detection result of the panel to be detected is qualified; otherwise, when there is an offset distance greater than or equal to the offset distance threshold value in the plurality of offset distances, it indicates that the offset defect detection result of the panel to be detected is unqualified.
[0223] In one implementation manner of the embodiment, when the components in the panel to be detected are measured, the area size of the defect area in the panel to be detected needs to be measured, and the area size of the defect area can be used to measure the defect area in the panel image. Thus, as shown in Figure 6 the method further includes a defect area measurement process, wherein the defect area measurement process specifically includes:
[0224] obtain a defect area corresponding to the adjusted image, and obtain a first number of pixel points included in the defect area;
[0225] determine a region size of a panel defect region corresponding to the defect region based on the first number and a magnification of the adjusted image;
[0226] determine a second number of pixel units included in the region size;
[0227] determine a defect detection result corresponding to the panel to be detected based on the second number.
[0228] Specifically, the first number is a number of pixel points occupied by the defect region in the adjusted image, and the panel defect region is a region in the panel to be detected corresponding to the defect region. It can be understood that the defect region is an image region obtained by capturing the panel defect region by the shooting device configured with the magnification. Thus, after obtaining the first number corresponding to the defect region, a fourth number of pixel points in a horizontal direction of the defect region and a fifth number of pixel points in a vertical direction of the defect region can be determined. According to the fourth number and the magnification, a width of the panel defect region in the horizontal direction can be determined, and according to the fifth number and the magnification, a height of the panel defect region in the vertical direction can be determined. According to the height and the width, the region size of the panel defect region can be determined, so that the region size can be used to judge the defect detection result of the panel to be detected. Then, based on the magnification of the adjusted image, the region size of the panel defect region can be determined, wherein the width of the panel defect region is equal to a second number of pixel units included in the panel defect region, so that the defect detection result corresponding to the panel to be detected can be determined. The width of the panel defect region in the horizontal direction is equal to a product of the fourth number and the magnification, and the height of the panel defect region in the vertical direction is equal to a product of the fifth number and the magnification.
[0229] Further, after obtaining the second number, it can be judged whether the second number is greater than a preset number threshold. If the second number is greater than the preset number threshold, it indicates that the defect detection result of the panel to be detected is unqualified. Otherwise, if the second number is less than or equal to the preset number threshold, it indicates that the defect detection result of the panel to be detected is qualified.
[0230] In one implementation manner of the embodiment, the obtaining of the defect region corresponding to the adjusted image specifically includes:
[0231] determining a principal component matrix corresponding to the adjusted image;
[0232] determining a predicted image corresponding to the adjusted image based on the principal component matrix and the adjusted image;
[0233] identifying the defect region in the adjusted image based on the predicted image and the adjusted image.
[0234] Specifically, the principal component matrix is determined based on a plurality of reference images, each of the plurality of reference images has a similarity to the adjusted image satisfying a preset condition, the principal component matrix is determined based on the plurality of reference images to represent the adjusted image, and when the adjusted image carries a defect region, the defect region in the adjusted image can be repaired.
[0235] In one implementation of the embodiment, the principal component matrix is included in a principal component matrix set, and the determining the principal component matrix corresponding to the panel image specifically includes:
[0236] obtaining a reference image corresponding to the panel image;
[0237] selecting a principal component matrix corresponding to the reference image from the principal component matrix set, and taking the selected principal component matrix as the principal component matrix corresponding to the panel image.
[0238] Specifically, the principal component matrix set includes a plurality of principal component matrices, each of the plurality of principal component matrices corresponds to a reference image, the principal component matrix is determined based on a plurality of reference images, and the principal component matrix is used to restore an image having a similarity to the reference image satisfying a preset condition. Thus, when determining the principal component matrix corresponding to the panel image, the reference image corresponding to the adjusted image is selected from the principal component matrix set, the similarity between the reference image and the adjusted image satisfies the preset condition, and after obtaining the reference image, the principal component matrix corresponding to the reference image is selected, and the selected principal component matrix is taken as the principal component matrix corresponding to the adjusted image. In this way, the principal component matrix can be used to determine the predicted panel image corresponding to the panel image.
[0239] In one implementation of the embodiment, before the determining the principal component matrix corresponding to the adjusted image, the method includes:
[0240] dividing the adjusted image into a plurality of sub-images based on a preset template image;
[0241] for each of the plurality of sub-images, dividing the sub-image into a plurality of image blocks, and taking each of the divided image blocks as an adjusted image.
[0242] Specifically, the preset template image can be preset, and the preset template image comprises at least one periodic image region, and when the preset template image is divided into a plurality of sub-template images based on the periodic image region, each of the plurality of sub-template images comprises a periodic image region. Wherein, the periodic image region corresponds to one periodic region in the panel to be detected, in other words, the panel to be detected comprises a plurality of periodic regions, and the components in each of the plurality of periodic regions and the positional relationship between the components are the same; the image content contained in the periodic image region is one periodic region in the panel image to be detected. For example, the periodic image region is an image as shown in Figure 3 , and the preset template image is an image as shown in Figure 4 . Of course, in actual application, the periodic image region contains an image content which is one pixel unit in the panel image to be detected.
[0243] Each of the plurality of sub-images is contained in the candidate panel image, and the similarity between each of the plurality of sub-images and the preset template image satisfies a preset condition. Wherein, the preset condition can be preset, and is used to measure the similarity between the sub-image and the preset template image. In one implementation, the preset condition can be that the similarity between the image content of the sub-image and the image content of the preset template image reaches a preset threshold, and the image size of the sub-image is the same as the image size of the preset template image, so that when the sub-image and the preset template image are overlapped, the coverage of the object carried by the sub-image to the object corresponding to the sub-image in the preset template image reaches a preset requirement. Wherein, the preset threshold can be 99%, and the preset requirement can be 99.5% and the like.
[0244] In one implementation of the embodiment, as shown in Figure 9 , when the candidate panel image is divided into a plurality of sub-images based on the preset template image, a sliding window method can be used to divide the candidate panel image into a plurality of sub-images, wherein, when the sliding window method is used to divide the candidate panel image into a plurality of sub-images, the candidate panel image is used as a base image, and the preset template image is used as a target image, the target image is slid on the base image to match the base image and the target image, and an image region with a similarity to the target image satisfying a preset condition is selected as a sub-image.
[0245] In one implementation of the embodiment, in order to reduce the calculation amount in the matching process of the candidate panel image and the preset template image, before the sliding window method is used for division, as shown in Figure 10As shown, the component edge information in the preset template image and the component edge information in the candidate panel image can be acquired (for example, by using a gradient modulus or Canny algorithm or the like), and after the component edge information in the preset template image and the component edge information in the candidate panel image are acquired, a component edge binary image corresponding to the candidate panel image can be used as a base image, and a component edge binary image corresponding to the preset template image can be used as a target pattern, the target pattern can be slid on the base image to match the base image with the target pattern, and an image region with a similarity to the target pattern satisfying a preset condition can be selected as a sub-image, where the similarity can be an absolute difference sum of the edge information binary image of the sub-image and the target pattern.
[0246] In one implementation form of the embodiment, as shown in Figure 11 Since the components in the panel to be detected have a certain distribution rule in the horizontal direction and the vertical direction, the candidate panel image is accumulated and summed in the horizontal direction and the vertical direction to obtain a candidate projection vector in the horizontal direction and a candidate projection vector in the vertical direction, the preset template image is accumulated and summed in the horizontal direction and the vertical direction to obtain a target projection vector in the horizontal direction and a target projection vector in the vertical direction, and finally the candidate projection vector and the target projection vector are matched in the horizontal direction and the vertical direction respectively to obtain a matching position in the horizontal direction and a matching position in the vertical direction, and each sub-image is determined based on the matching position.
[0247] The image block is contained in one of the sub-images, and the image block can be part of an image region in a target image region in the sub-image. For example, as shown in Figure 12 the sub-image is an image as shown in Figure 13 the target image region is an image as shown in Figure 14 the image block can be an image as shown in In addition, in actual applications, after the candidate panel image corresponding to the panel to be detected is acquired, in order to determine all defect regions corresponding to the candidate panel image, after the sub-images are acquired, each of the sub-images can be divided into a plurality of image blocks, each image block can be used as a panel image, and each panel image can be subjected to subsequent steps to obtain a panel defect corresponding to each panel image, and finally all panel regions acquired can be used as the panel defect corresponding to the candidate panel image. In the embodiment, in order to facilitate understanding, an example of determining a defect region corresponding to an image block is described.
[0248] In one implementation form of the embodiment, the selecting an image block from the plurality of sub-images and taking the selected image block as the panel image can specifically be selecting a target sub-image from the plurality of sub-images, and dividing the target sub-image into a plurality of image blocks according to a preset division manner, and finally selecting an image block from the plurality of divided image blocks as the panel image. The preset division manner can be pre-set, for example, the sub-image is equally divided into a plurality of image blocks (for example, equally divided into 3 image blocks, etc.) according to the image size, or the sub-image is divided into a plurality of sub-units based on the target image region, and then the sub-units are equally divided into a plurality of image blocks, etc. In actual application, not all defects in a pixel unit of the panel to be detected will affect the screen quality, so only part of the region needs to be detected for defects. Therefore, a plurality of regions of interest can be pre-selected in the pixel unit, then the image regions corresponding to each of the regions of interest are selected in the sub-image, and the selected image regions are taken as a plurality of image blocks. In actual application, the image width of the image block can be equal to the width of the periodic image region, and the height can be 40-100 pixels, so that the size of the image block is too small to recover the defect region, and at the same time, the size of the image block is too large to increase the calculation complexity of the principal component analysis. Generally, the block size between 40-100 pixels can achieve a balance between performance and complexity.
[0249] For example, the sub-image is as shown in FIG. 3, the width of the sub-image is one width of the pixel unit, the equal division ratio is 3, and the sub-image is equally divided into three image blocks along the height direction, wherein the uppermost image block corresponds to the pattern texture of the horizontal running circuit, and the lower two image blocks correspond to the pattern texture of the vertical running circuit. Figure 13
[0250] In one implementation form of the embodiment, as shown in FIG. 4, the determination process of the principal component matrix set includes: Figure 15
[0251] Obtaining a plurality of training panel images;
[0252] Determining a plurality of training image block sets based on the plurality of training panel images;
[0253] Determining the principal component matrix corresponding to each of the training image block sets based on the principal component analysis manner, to obtain the principal component matrix set.
[0254] Specifically, each of the plurality of training panel images does not carry a defect region, there can be training panel image A and training panel image B in the plurality of training panel images, the brightness of the training panel image A is different from the brightness of the training panel image B, there can also be training panel image C and training panel image D, the brightness of the training panel image C is different from the color of the training panel image D, so that the determination of the principal component matrix based on the training panel image can be used for panel images of different brightness and different color.
[0255] Each of the plurality of training image block sets includes a plurality of training image blocks, and the similarity of any two training image blocks in the plurality of training image blocks satisfies a preset condition. For example, the training image block set includes training image block A and training image block B, and the similarity of the training image block A and the training image block B satisfies the preset condition. In one implementation manner of the embodiment, the determination of the plurality of training image block sets based on the plurality of training panel images specifically includes:
[0256] Selecting a plurality of sub-training images in each training panel image based on a preset template image;
[0257] For each sub-training image in the plurality of sub-training images, a plurality of training image blocks are selected in the sub-training image to obtain the plurality of training image blocks;
[0258] The plurality of training image blocks are divided into a plurality of training image block sets according to the similarity.
[0259] Specifically, the similarity of each sub-training image in the plurality of sub-training images to the preset template image satisfies a preset condition. Wherein, the sub-training image has at least one periodically repeated component structure in the horizontal direction or the vertical direction, the preset template image has at least one periodically repeated component structure (such as a pixel unit, etc.) in the horizontal direction or the vertical direction, and the periodically repeated component structure in the preset template image is the same as the periodically repeated component structure in the sub-training image, the number of periodically repeated component structures included in the sub-training image is the same as the number of periodically repeated component structures included in the preset template image, and the arrangement direction of the periodically repeated component structure in the sub-training image is the same as the arrangement direction of the periodically repeated component structure in the preset template image, for example, both are arranged along the horizontal direction, both are arranged along the vertical direction, etc., so that the similarity of the image content corresponding to the candidate image region to the image content corresponding to the preset template image satisfies the preset condition. In addition, the selection manner of selecting a plurality of training image blocks in the sub-training image is the same as the manner of selecting an image block in the plurality of sub-training images, which will not be described one by one here.
[0260] Further, after obtaining the training image blocks, the similarity between each pair of the training image blocks is calculated, and the training image blocks whose similarity satisfies the preset condition are placed in a training image block set, so that the similarity between any two training image blocks in the training image block set satisfies the preset condition. In an implementation, the process of dividing the training image blocks into the training image block sets according to the similarity can be as follows: the obtained training image blocks are taken as an image block set, a first image block is selected from the image block set, the similarity between the remaining image blocks in the image block set and the first image block is calculated respectively, and all second image blocks whose similarity satisfies the preset condition are selected, and the set composed of the first image block and the selected second image blocks is taken as a training image block set; however, the step of selecting a first image block from the image block set is continuously performed until there is no training image block in the image block set, so as to obtain the training image block sets. Of course, in actual application, other ways can also be used to determine the training image block sets, for example, the way of clustering analysis.
[0261] In an implementation of the embodiment, the preset template image can be determined based on the training images. Accordingly, before the step of selecting the sub-training images from the training panel images based on the preset template image, the method further includes:
[0262] selecting a target panel image from the training panel images;
[0263] selecting a target sub-image from the target panel image, and taking the target sub-image as the preset template image.
[0264] Specifically, the target panel image can be any image in the training panel images, or can be an image including at least one periodic structure component in the target panel image, for example, an image including at least one pixel unit, etc. After obtaining the target panel image, the target panel image can be rotated, so that the component extending along the preset direction in the panel image in the target panel image is located in an image region in the rotated target panel image, and the angle between the image region and the preset direction is zero, where the preset direction can be the vertical direction or the horizontal direction, etc.
[0265] After the target panel image after rotation is obtained, a target sub-image is selected in the target panel image. The target sub-image can include one periodic structure component or multiple periodic structure components. In this embodiment, the target sub-image can include multiple periodic structure components, so that the matching error is reduced when the candidate panel image is matched by using the preset template image or the training panel image is matched by using the preset template image. For example, when the preset template image includes one pixel unit, the matching accuracy can reach 1 pixel, and when the preset template image includes four adjacent pixel units, the matching accuracy can reach 0.25 pixel accuracy.
[0266] In an implementation manner of this embodiment, since each training panel image can be obtained by using different cameras, the tilt angles of the panel regions in the training panel images obtained by using different cameras can be different, and the magnifications of the cameras can be different, and the scaling ratios of the training panel images obtained by using different cameras can be different. Therefore, after a plurality of training panel images are obtained, each training panel image can be adjusted based on the preset template image to obtain an adjusted training panel image. Correspondingly, before the plurality of sub-training images are selected in each training panel image based on the preset template image, the method further includes: for each training panel image, taking the training panel image as a to-be-adjusted image; adjusting the to-be-adjusted image based on the preset template image to obtain an adjusted image; and taking the adjusted image as a training panel image, wherein the adjusted image has at least one training image region, and the coincidence degree between the training image region and the preset template image meets a preset condition. The adjustment process of the training panel image is the same as the adjustment process of the candidate panel image, and details are not repeated here.
[0267] In an implementation manner of this embodiment, the determining of the predicted image corresponding to the adjusted image based on the principal component matrix and the adjusted image specifically includes:
[0268] Converting the adjusted image into an image vector, wherein the vector dimension of the image vector is equal to the third number of pixel points included in the adjusted image.
[0269] When the adjusted image does not include a preset panel region of the to-be-detected panel, the predicted image corresponding to the adjusted image is determined based on the vector product of the image vector and the principal component matrix, wherein the preset panel region includes a panel edge of the to-be-detected panel and / or a character region in the to-be-detected panel.
[0270] Specifically, the predicted image is an image obtained by repairing the adjusted image based on the principal component matrix, the predicted image includes image content of the adjusted image, and a defect area in the adjusted image is recovered by the principal component matrix, so that the defect area is not carried in the predicted image.
[0271] In one implementation form of the embodiment, the determining the predicted image corresponding to the adjusted image based on the principal component matrix and the adjusted image specifically comprises:
[0272] converting the adjusted image into an image vector;
[0273] when the adjusted image does not include a preset panel area of the panel to be detected, determining the predicted image corresponding to the adjusted image based on a vector product of the image vector and the principal component matrix.
[0274] Specifically, the image vector is a vector representation of the adjusted image, and a vector dimension of the image vector is equal to a number of pixel points included in the panel image. The conversion process of the image vector is the same as the conversion process of the reference vector, which will not be described here again, and can be specifically referred to the conversion process of the reference vector.
[0275] The preset panel area includes a panel edge of the panel to be detected and / or a character area in the panel to be detected, and it can be understood that a panel area corresponding to the adjusted image does not include the panel edge of the panel to be detected and / or the character area in the panel to be detected. At this time, all pixel points in the adjusted image can be used to reconstruct the panel image, and the predicted image is obtained by the vector product of the image vector and the principal component matrix.
[0276] In one implementation form of the embodiment, the determining the predicted image corresponding to the adjusted image based on the principal component matrix and the adjusted image specifically comprises:
[0277] converting the adjusted image into an image vector, wherein a vector dimension of the image vector is equal to a fourth number of pixel points included in the adjusted image;
[0278] when the adjusted image does not include a preset panel area of the panel to be detected, obtaining each candidate pixel position included in an image area corresponding to the preset panel area, wherein the preset panel area includes a panel edge of the panel to be detected and / or a character area in the panel to be detected;
[0279] obtaining each candidate element item corresponding to each candidate pixel position in the image vector, and setting each selected candidate element item to a preset value to obtain a reference image vector;
[0280] determining the predicted image corresponding to the adjusted image based on the reference image vector, the principal component matrix and a preset standard image vector.
[0281] Specifically, when the adjusted image does not include the preset panel region of the panel to be detected, it indicates that part of the pixels in the adjusted image cannot be used to restore the panel image, so the pixel values of the part of the pixels can be set to preset values (for example, 0, etc.), and the part of the pixels does not work in the principal component analysis. Thus, when the adjusted image does not include the preset panel region of the panel to be detected, the image region corresponding to the preset panel region is selected to include each candidate pixel position of each pixel, and the pixel values of each candidate pixel position selected are set to preset values to obtain a reference image vector.
[0282] After the reference image vector is obtained, a preset standard image vector corresponding to the principal component analysis is obtained, wherein the preset standard image vector is obtained by averaging each reference vector corresponding to each training image block in a plurality of training image blocks. After the preset standard image vector is obtained, the panel image is projected into a K-dimensional feature space by a principal component matrix and the preset standard image vector to obtain a feature matrix, and a predicted image can be obtained by inverse transformation of the feature matrix, wherein K is the number of target feature vectors included in the principal component matrix.
[0283] In one implementation manner of the embodiment, the defects in the adjusted image are determined based on the adjusted image and the predicted image specifically as follows:
[0284] The adjusted image is matched with the predicted image to determine the unmatched region of the adjusted image and the predicted image;
[0285] The obtained unmatched region is taken as the defect region in the adjusted image.
[0286] Specifically, as shown in Figure 16 the predicted image is an image obtained by repairing the adjusted image by the principal component matrix, the predicted image includes the image content of the adjusted image, and the defect region in the adjusted image is repaired by the principal component analysis, so that the predicted image does not carry the defect. Based on this, as shown in Figure 16 after the predicted image is obtained, the predicted image can be matched with the panel image, the image region in the predicted image that is unmatched with the panel image is selected, and the selected image region is taken as the defect region in the adjusted image to realize the defect segmentation of the adjusted image. Correspondingly, the defects in the adjusted image are determined based on the adjusted image and the predicted image specifically as follows:
[0287] The adjusted image is matched with the predicted image to determine the unmatched region of the adjusted image and the predicted image;
[0288] The obtained unmatched region is taken as the defect region in the adjusted image.
[0289] Specifically, matching the adjusted image with the predicted image refers to matching the image content of the adjusted image with the image content of the predicted image. This matching specifically involves matching pixels in the adjusted image with pixels to be matched in the predicted image, where the pixel position in the panel image is the same as the pixel position of the pixel to be matched in the predicted image. For any pixel in a mismatched area, the pixel value of the corresponding pixel to be matched in the predicted image is different from that pixel.
[0290] In one implementation of this embodiment, obtaining the defect region corresponding to the adjusted image specifically includes:
[0291] The adjusted image is input into a trained defect detection model, which then determines the defect region corresponding to the adjusted image.
[0292] Specifically, the defect detection model is trained to identify defect regions in a panel image. When an adjusted image is input into the defect detection model, the output of the model can be the defect region. In other words, the input of the defect detection model is the adjusted image, and the output is the defect region.
[0293] Based on the above method for determining panel image magnification, this embodiment provides a computer-readable storage medium storing one or more programs that can be executed by one or more processors to implement the steps in the panel image magnification determination method as described in the above embodiment.
[0294] Based on the above method for determining panel image magnification, this application also provides a terminal device, such as... Figure 17 As shown, it includes at least one processor 20; a display screen 21; and a memory 22, and may also include a communications interface 23 and a bus 24. The processor 20, display screen 21, memory 22, and communications interface 23 can communicate with each other via the bus 24. The display screen 21 is configured to display a preset user guide interface in the initial setup mode. The communications interface 23 can transmit information. The processor 20 can invoke logical instructions in the memory 22 to execute the methods described in the above embodiments.
[0295] Furthermore, the logical instructions in the aforementioned memory 22 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium.
[0296] The memory 22, as a computer readable storage medium, can be configured to store software programs, computer executable programs, such as program instructions or modules corresponding to the method in the embodiments of the present disclosure. The processor 20 executes the functions of the application and data processing by running the software programs, instructions or modules stored in the memory 22, that is, implements the method in the above embodiments.
[0297] The memory 22 can include a program storage area and a data storage area, wherein the program storage area can store an operating system and at least one application required by a function; the data storage area can store data created according to the use of the terminal device, etc. In addition, the memory 22 can include a high-speed random access memory, and can also include a non-volatile memory. For example, a variety of media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc., can also be a transitory storage medium.
[0298] In addition, the specific process of the above-mentioned storage medium and the plurality of instruction processors in the mobile terminal loading and executing has been described in detail in the above method, and will not be repeated here.
[0299] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method of determining panel image magnification, characterized by, The method comprises: obtaining a candidate magnification corresponding to a panel image to be detected; The obtaining a candidate magnification corresponding to a panel image to be detected specifically comprises: selecting a target panel region in the panel image to be detected, and obtaining the area size of the target panel region; determining a plurality of reference area sizes based on a plurality of preset reference magnifications and the area size; for each reference area size, selecting a first image region and a second image region in the panel image based on the reference area size, and determining the similarity of the selected first image region and the second image region, wherein the first image region and the second image region are adjacent; selecting a target area size from the plurality of reference area sizes according to all the determined similarities; selecting a template region in the panel image based on the candidate magnification, and selecting a target region in the panel image based on the template region, wherein the similarity of the target region and the template region meets a preset condition; determining the scaling ratio attribute of the panel image based on the template region and the target region, and determining the target magnification of the panel image according to the scaling ratio attribute of the panel image. The target panel region comprises at least one periodic panel region, and when the target panel region is divided into a plurality of sub-panel regions based on the periodic panel region, each of the plurality of sub-panel regions comprises a periodic panel region.
2. The method of claim 1, wherein the panel image magnification is determined based on the panel image size and the panel size. The selecting a target area size from the plurality of reference area sizes according to all the determined similarities specifically comprises:
3. The method of claim 1, wherein the panel image magnification is determined based on a ratio of a size of the panel image to a size of a reference image. selecting a candidate similarity greater than a preset similarity threshold from all the determined similarities; obtaining the reference area size corresponding to each candidate similarity, and taking the minimum reference area size among all the obtained reference area sizes as the target area size. The determining the scaling ratio attribute of the panel image based on the template region and the target region specifically comprises:
4. The method of claim 1, wherein the panel image magnification is determined based on a ratio of a size of the panel image to a size of a reference image. selecting a template positioning point in the template region, and selecting a target positioning point corresponding to the template positioning point in the target region; obtaining the distance between the template positioning point and the target positioning point, and determining the scaling ratio attribute of the panel image based on the distance. The template region comprises a plurality of periodic image regions; the determining the scaling ratio attribute of the panel image based on the distance specifically comprises:
5. The method for determining the panel image magnification according to claim 4, characterized in that, obtaining the number of periodic image regions included in the template region, determining a candidate width of the periodic image region according to the distance and the number of regions; obtaining the reference width of the periodic panel region of the panel corresponding to the panel image, wherein the periodic image region is the image corresponding to the periodic panel region; determining the ratio of the reference width to the candidate width, and taking the ratio as the scaling ratio attribute of the panel image. The template region and the target region are adjacent.
6. The method of determining panel magnification according to any one of claims 1-5, wherein, The method comprises:
7. A panel detection method characterized by, obtaining a panel image corresponding to a panel to be detected; obtaining a candidate magnification corresponding to a panel image to be detected; The acquisition of the candidate magnification corresponding to the panel image to be detected specifically includes: Select a target panel region in the panel to be detected corresponding to the panel image, and obtain the region size of the target panel region; Based on several preset reference magnifications and the area size, several reference area sizes are determined; For each reference region size, a first image region and a second image region are selected in the panel image based on the reference region size, and the similarity between the selected first image region and the second image region is determined, wherein the first image region and the second image region are adjacent. Select the target region size from several reference region sizes based on all determined similarities; Use the reference magnification corresponding to the size of the target region as the candidate magnification for the panel image; A first magnification of the panel image is determined, and the panel image is adjusted based on the first magnification and a preset template image to obtain an adjusted image, wherein the first magnification is determined based on candidate magnifications of the panel image; The position information of the preset positioning point in the adjusted image is determined based on the preset template image; Based on the determined location information, the size detection result corresponding to the panel to be detected is determined.
8. The method of claim 7, wherein the panel detection method is characterized by, After obtaining the panel image corresponding to the panel to be detected, the method further includes: Based on the preset template image, a candidate image region is selected in the panel image, wherein the similarity between the candidate image region and the preset template satisfies a preset condition; The rotation parameters corresponding to the panel image are determined based on the candidate image regions. The panel image is rotated based on the rotation parameters, and the rotated panel image is used as the panel image.
9. The method of defect detection of panel images according to claim 8, characterized in that, The step of determining the rotation parameters corresponding to the panel image based on the candidate image region specifically includes: The panel image is divided into several image regions based on the candidate image regions; Obtain the target pixel points corresponding to each image region in several image regions, and determine the rotation parameters corresponding to the panel image based on the target pixel points.
10. The method of defect detection of panel images according to claim 8, wherein, The step of determining the adjustment parameters corresponding to the panel image based on the candidate image region specifically includes: Identify linear regions within the candidate image regions; Obtain the angle between the linear region and the preset direction, and determine the rotation parameters corresponding to the panel image based on the angle.
11. The method of claim 7, wherein the panel detection method is characterized by, The adjustment of the panel image based on the first magnification and the preset template image to obtain the adjusted image specifically includes: Get the second magnification of the preset template image; Based on the first multiplier and the second multiplier, determine the adjustment multiplier; The panel image is adjusted based on the adjustment magnification to obtain an adjusted image, wherein the magnification of the adjusted image is equal to a second magnification.
12. The panel detection method of claim 7, wherein, The preset template image includes components, and the preset positioning point is located on the components.
13. The panel detection method of claim 12, wherein, The step of determining the position information of the preset positioning point in the adjusted image based on the preset template image specifically includes: Feature information corresponding to a preset positioning point is selected from the preset template image, wherein the feature information is used to reflect the position information of the preset positioning point; select a candidate region in the adjusted image based on the feature information, and select a candidate positioning point corresponding to the preset positioning point in the candidate region; use the position information of the candidate positioning point as the position information of the preset positioning point in the adjusted image.
14. The panel detection method of claim 12, wherein, The determination of the position information of the preset positioning point in the adjusted image based on the preset template image specifically includes: pre-determine an identification model based on the preset template image; input the adjusted image into the identification model, and output the position information of the preset positioning point in the adjusted image through the identification model.
15. The panel detection method of claim 7, wherein, The preset positioning point includes a plurality of preset positioning points; and the determination of the size detection result corresponding to the to-be-detected panel based on the determined position information specifically includes: determine distances between the preset positioning points based on the position information corresponding to each of the preset positioning points to obtain a plurality of predicted distances; when there is a predicted distance that does not meet a preset distance condition in the plurality of predicted distances, the component size detection result corresponding to the to-be-detected panel is unqualified, wherein the preset distance condition is that a difference between a predicted distance and a preset distance threshold corresponding to the predicted distance meets a preset requirement; when each of the plurality of predicted distances meets the preset distance condition, the component size detection result corresponding to the to-be-detected panel is qualified.
16. The panel detection method of claim 7, wherein, After the determination of the size detection result corresponding to the to-be-detected panel based on the determined position information, the method further includes: select a plurality of candidate panel images in the adjusted image in the direction from the bottom to the top of the to-be-detected panel based on the preset template image; use the candidate panel image located at the bottom as a reference panel image, and use each candidate panel image other than the reference panel image as a reference panel image; determine an offset distance of each reference panel image relative to the reference panel image, wherein an offset direction corresponding to the offset distance is perpendicular to the direction from the bottom to the top of the to-be-detected panel; determine an offset defect detection result corresponding to the to-be-detected panel based on the offset distance.
17. The panel detection method of claim 7, wherein, The size detection result includes a defect detection result; after the determination of the size detection result corresponding to the to-be-detected panel based on the determined position information, the method further includes: obtain a defect region corresponding to the adjusted image, and obtain a first number of pixel points included in the defect region; determine a region size of a panel defect region corresponding to the defect region based on the first number and a magnification of the adjusted image; determine a second number of pixel units included in the region size; determine a defect detection result corresponding to the to-be-detected panel according to the second number.
18. The panel detection method of claim 17, wherein, The obtaining of the defect region corresponding to the adjusted image specifically includes: determine a principal component matrix corresponding to the adjusted image, wherein the principal component matrix is determined based on a plurality of reference images, and a similarity between each reference image in the plurality of reference images and the adjusted image meets a preset condition; determine a predicted image corresponding to the adjusted image based on the principal component matrix and the adjusted image; identify a defect region in the adjusted image based on the predicted image and the adjusted image.
19. The panel defect detection method of claim 18, wherein, The determining the predicted image corresponding to the adjusted image based on the principal component matrix and the adjusted image specifically comprises: converting the adjusted image into an image vector, wherein a vector dimension of the image vector is equal to a third number of pixel points included in the adjusted image; when the adjusted image does not include a preset panel region of the panel to be detected, determining the predicted image corresponding to the adjusted image based on a vector product of the image vector and the principal component matrix, wherein the preset panel region includes a panel edge of the panel to be detected and / or a character region in the panel to be detected.
20. The panel detection method of claim 18, wherein, The determining the predicted image corresponding to the adjusted image based on the principal component matrix and the adjusted image specifically comprises: converting the adjusted image into an image vector, wherein a vector dimension of the image vector is equal to a fourth number of pixel points included in the adjusted image; when the adjusted image does not include a preset panel region of the panel to be detected, obtaining each candidate pixel position included in an image region corresponding to the preset panel region, wherein the preset panel region includes a panel edge of the panel to be detected and / or a character region in the panel to be detected; obtaining each candidate element item corresponding to each candidate pixel position in the image vector, and setting each selected candidate element item to a preset value to obtain a reference image vector; determining the predicted image corresponding to the adjusted image based on the reference image vector, the principal component matrix and a preset standard image vector.
21. The panel defect detection method of claim 18, wherein, The determining the defect region in the adjusted image based on the adjusted image and the predicted image specifically comprises: matching the adjusted image with the predicted image to determine an unmatched region of the adjusted image and the predicted image; taking the obtained unmatched region as the defect region in the adjusted image.
22. The panel defect detection method of claim 17, wherein, The obtaining the defect region corresponding to the adjusted image specifically comprises: inputting the adjusted image into a trained defect detection model, and determining the defect region corresponding to the adjusted image by the defect detection model.
23. A computer-readable storage medium, characterized in that, The computer readable storage medium stores one or more programs, which can be executed by one or more processors to implement the steps in the panel image magnification determination method of any one of claims 1-6, and / or to implement the steps in the panel image magnification determination method of any one of claims 7-22.
24. A terminal device, comprising: comprises: a processor, a memory and a communication bus; the memory stores a computer readable program executable by the processor; the communication bus realizes the connection communication between the processor and the memory; the processor implements the steps in the panel image magnification determination method of any one of claims 1-6 and / or the steps in the panel image magnification determination method of any one of claims 7-22 when executing the computer readable program.
Citation Information
Patent Citations
Image processing system, image forming apparatus, image processing method and program recording medium
CN101008983A
Virtual image magnification testing method and device and virtual display equipment
CN109729347A
Super-resolution ratio evaluation method based on reference image
CN110415242A