Method, device and electronic equipment for locating object edge line

By determining the reference line and preset error range in the image, the area where the target edge line is located is narrowed, the problems of low efficiency and low accuracy in panel detection are solved, fast and accurate edge line positioning is achieved, and defect detection efficiency is improved.

CN116071304BActive Publication Date: 2025-08-19SUZHOU MEGAROBO TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211643829.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-20
Publication Date
2025-08-19
Estimated Expiration
2042-12-20

AI Technical Summary

Technical Problem

In the prior art, when detecting panel defects, especially the detection efficiency of the four edge areas on the upper and lower sides of the display panel, is low and the accuracy is not high, especially when the CF is smaller than the TFT, the step surface is not easily recognizable.

Method used

By obtaining an image of the object target edge line, the reference line is determined, and the area where the target edge line is located is reduced according to the position of the reference line, the predetermined offset and the preset error range, the target edge line is determined using image characteristics and grayscale values.

Benefits of technology

The target edge line is quickly and accurately positioned, and the efficiency and accuracy of panel detection are improved, especially in the presence of step surfaces.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116071304B_ABST
    Figure CN116071304B_ABST
Patent Text Reader

Abstract

Embodiments of the present invention provide a method for locating an object edge line, an object edge line locating device, an electronic device, and a storage medium. The method includes: acquiring an image containing a target edge line of an object; determining a baseline based on the features of the object in the image; determining the region where the target edge line is located based on the position of the baseline in the image, a predetermined offset, and a preset error range, wherein the distance between the baseline and the center line of the region where the target edge line is located is the predetermined offset, and the width of the region where the target edge line is located is twice the preset error range; and determining the target edge line based on the region where the target edge line is located. In this solution, by narrowing the target edge line positioning region, the target edge line can be determined within a small range. This allows the target edge line to be quickly and accurately located, and when applied to panel inspection, it facilitates improving the efficiency of defect detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing, and in particular to a method for locating an edge line of an object, a device for locating an edge line of an object, an electronic device, and a storage medium. Background Art

[0002] Image processing is widely used. For example, in the field of panel defect detection, the preparation of display panels requires multiple processes. When executing these processes, defects may be left on the panel due to some reasons (such as equipment errors or the equipment not meeting certain parameter requirements during operation, etc.), so corresponding defect detection is required. Taking the LCD liquid crystal display panel as an example, after the display panel formed by bonding the color film substrate CF and the array substrate TFT is cut or ground, it is necessary to perform defect detection on the edge areas of the four sides of the upper and lower surfaces of the display panel (hereinafter referred to as edge inspection), such as detecting whether there are defects such as cracks, shells, broken pieces and burrs in each edge area. Prepare for the next process and eliminate display panels with defects or large defects.

[0003] The border inspection operation can be completed by the corresponding border inspection equipment. Generally, the border inspection equipment includes an optical processing system, which includes an image acquisition module and a processing module. The image acquisition module is used to capture the image of the edge area of the display panel and send the image to the processing module; the processing module is used to identify defects based on the received image.

[0004] In order to detect whether there are defects in the edge areas of the four sides of the upper and lower surfaces of the display panel, the traditional edge inspection method first needs to determine the edge lines corresponding to the four sides of the upper and lower surfaces respectively. The usual method is to capture images above or below the panel, and then locate the edge lines throughout the entire image. This method is inefficient and the accuracy cannot be guaranteed, especially for edges where CF is smaller than TFT, that is, in the edge area where CF and TFT do not overlap but form a step surface. Since the step surface is not as recognizable and easy to locate as ordinary edge lines, the problem of low efficiency is particularly obvious. Summary of the Invention

[0005] The present invention is proposed in consideration of the above-mentioned problems. According to one aspect of the present invention, a method for locating an edge line of an object is provided, comprising: acquiring an image containing a target edge line of an object; determining a baseline based on the features of the object in the image; determining the region where the target edge line is located based on the position of the baseline in the image, a predetermined offset, and a preset error range, wherein the distance between the baseline and the center line of the region where the target edge line is located is the predetermined offset, the width of the region where the target edge line is located is twice the preset error range, the width direction of the region where the target edge line is located is perpendicular to the baseline, and the center line of the region where the target edge line is located is parallel to the baseline; determining the target edge line based on the region where the target edge line is located.

[0006] Exemplarily, the area where the target edge line is located is determined based on the position of the baseline in the image, the predetermined offset, and the preset error range, including: taking the position of the baseline in the image as a reference, offsetting the baseline toward the target edge line by the predetermined offset to obtain a theoretical target edge line; offsetting the theoretical target edge line toward both sides of the theoretical target edge line by the preset error range to determine the area where the target edge line is located.

[0007] Exemplarily, determining a baseline based on features of an object in the image includes: determining positions of a first mark and a second mark of the object in the image, the first mark and the second mark being predetermined marks for providing a reference for a target position in the image; and connecting the first mark and the second mark to obtain the baseline.

[0008] Exemplarily, the object includes a first substrate and a second substrate smaller in size than the first substrate, a step surface is formed between the first substrate and the second substrate, and the target edge line is a straight line on which the step surface is located; determining the baseline according to the characteristics of the object in the image includes: determining the outermost edge line in the image corresponding to the target edge line, and using the outermost edge line as the baseline, wherein the outermost edge line is the outermost edge line of the first substrate.

[0009] Exemplarily, the method further includes: pre-acquiring a distance between the target edge line and the reference line on the object; and determining the predetermined offset according to the distance.

[0010] Exemplarily, determining the target edge line based on the area where the target edge line is located includes: determining the target edge line based on multiple target pixel points, wherein each target pixel point is determined based on a grayscale value on a detection line, and the detection line is a virtual straight line within the area where the target edge line is located and perpendicular to the center line of the area where the target edge line is located.

[0011] Exemplarily, in the case where the corresponding target pixel point cannot be determined based on the grayscale value on the detection line, the following steps are performed: reselect a detection line near the detection line where the target pixel point cannot be determined, and determine the corresponding target pixel point based on the grayscale value on the detection line.

[0012] Exemplarily, determining the target edge line based on multiple target pixel points includes one of the following steps: connecting the multiple target pixel points to obtain the target edge line; performing straight line fitting on the multiple target pixel points to obtain the target edge line.

[0013] Exemplarily, determining the target edge line based on the area where the target edge line is located includes: preprocessing the image in the area where the target edge line is located to obtain a first enhanced image, wherein the first enhanced image contains the color difference between each target pixel point and the surrounding pixels in the area where the target edge line is located; superimposing the color difference between each target pixel point of the image in the area where the target edge line is located and the corresponding target pixel point in the first enhanced image to obtain a second enhanced image; segmenting the target pixel points in the second enhanced image according to a preset color threshold, wherein the preset color threshold is used to distinguish the color of the target edge line from the non-target edge line; and determining the target edge line based on the segmentation result.

[0014] Exemplarily, the preprocessing of the image in the area where the target edge line is located to obtain a first enhanced image includes: filtering the target pixel points in the image in the area where the target edge line is located to obtain filtering results for each target pixel point; and for each target pixel point in the image in the area where the target edge line is located, determining the color difference between the color of the target pixel point and the filtering result of the target pixel point.

[0015] Exemplarily, after determining the color difference between the color of the target pixel and the filtering result of the target pixel, the method further includes: expanding the color difference between the color of each target pixel and the filtering result of the corresponding target pixel.

[0016] Exemplarily, the expanding the color difference between the color of each target pixel and the filtering result of the corresponding target pixel includes: expanding the color difference corresponding to each target pixel while retaining the direction of the difference.

[0017] Exemplarily, superimposing the color difference between each target pixel point of the image in the area where the target edge line is located and the corresponding target pixel point in the first enhanced image includes: adding the color value of each target pixel point of the image in the area where the target edge line is located and the color difference between the corresponding target pixel point in the first enhanced image.

[0018] According to the second aspect of the present invention, there is also provided an object edge line positioning device, comprising: an image acquisition module for acquiring an image containing a target edge line of an object; a baseline determination module for determining a baseline based on features of the object in the image; a target area determination module for determining an area where the target edge line is located based on the position of the baseline in the image, a predetermined offset, and a preset error range, wherein the distance between the baseline and the center line of the area where the target edge line is located is the predetermined offset, the width of the area where the target edge line is located is twice the preset error range, the width direction of the area where the target edge line is located is perpendicular to the baseline, and the center line of the area where the target edge line is located is parallel to the baseline; the target edge line determination module is for determining the target edge line based on the area where the target edge line is located.

[0019] According to a third aspect of the present invention, there is also provided an electronic device comprising a processor and a memory, wherein the memory stores computer program instructions, which are used by the processor to execute the above-mentioned object edge line locating method when the computer program instructions are executed.

[0020] According to a fourth aspect of the present invention, a storage medium is further provided, on which program instructions are stored. The program instructions are used to execute the above-mentioned object edge line locating method when running.

[0021] In the above technical solution, the area where the target edge line is located is first determined, and then the target edge line is determined within the area where the target edge line is located. This edge line positioning method pre-narrows the positioning area, so that the target edge line can be determined within a small range. This can quickly and accurately locate the target edge line. When applied to the field of panel inspection, it is convenient to improve the efficiency of defect detection.

[0022] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are specifically listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 FIG2 shows a schematic flow chart of a method for locating an edge line of an object according to an embodiment of the present invention;

[0024] Figure 2 A schematic diagram showing an area where a target edge line is located according to an embodiment of the present invention is shown;

[0025] Figure 3 A schematic diagram showing a portion of an image acquired in a method for locating an edge line of an object according to an embodiment of the present invention;

[0026] Figure 4 A schematic block diagram of a device for locating an edge line of an article according to an embodiment of the present invention is shown; and

[0027] Figure 5 A schematic block diagram of an electronic device according to an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0028] In order to make the purpose, technical solutions and advantages of the present invention more apparent, exemplary embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments of the present invention, and it should be understood that the present invention is not limited to the exemplary embodiments described herein. Based on the embodiments of the present invention described in the present invention, all other embodiments obtained by those skilled in the art without creative work should fall within the scope of protection of the present invention.

[0029] In order to clearly describe the present invention, the following description will continue with the panel as an example.

[0030] As described above, in the prior art, to detect defects in the edge areas of the four edges of each of the upper and lower surfaces of a display panel, it is first necessary to determine the edge lines corresponding to the four edges of each of the upper and lower surfaces. The typical approach is to capture an image from the top or bottom of the panel and then locate the edge lines throughout the image. This approach is inefficient and lacks accuracy. To address this issue, the present invention provides an object edge line location method to address the low efficiency and lack of accuracy of the prior art object edge line location methods.

[0031] According to one embodiment of the present invention, a method for locating an object's edge is provided. This method can be used, for example, for panel defect detection, particularly in panel edge inspection equipment. For ease of description, the present invention uses a panel as an example for detailed description. That is, in this embodiment, the object is a panel. Figure 1 FIG. 1 is a schematic flow chart of an article edge line positioning method 100 according to an embodiment of the present invention. Figure 1 As shown, the method 100 for locating an item edge line may include the following steps:

[0032] Step S110: Acquire an image containing the edge line of the object target.

[0033] For example, in one embodiment, an object can be photographed by a line scan camera. Specifically, for a panel, for example, one of the surfaces of the panel can be photographed by a line scan camera. It can be understood that if it is necessary to locate the edge line (i.e., the target edge line) of one of the edges of the upper surface of the panel (hereinafter referred to as the detection edge for ease of description), the image is captured near the detection edge by the line scan camera, and the edge line is ensured to be located within the image. For example, in another embodiment, the corresponding image can also be acquired by an area array camera. In this case, the area array camera needs to be used for stitching and edge fitting after shooting, thereby obtaining an image containing the target edge line of the object. Of course, images containing the target edge line of the object can also be acquired by other visual mechanisms, which are not listed here one by one.

[0034] Step S120 determines a baseline based on the features of the object in the image. The baseline can be any straight line whose position in the image can be determined. Its primary purpose is to establish a reference position, thereby facilitating the determination of the target edge region. For example, it can be two feature marks in the image (typically at either end of the image), such as a "cross" mark. Alternatively, it can be an easily determined edge in the image, such as the outermost edge. This section will be discussed in detail below.

[0035] Step S130, determining the area where the target edge line is located based on the position of the baseline in the image, the predetermined offset, and the preset error range, wherein the distance between the baseline and the center line of the area where the target edge line is located is the predetermined offset, the width of the area where the target edge line is located is twice the preset error range, the width direction of the area where the target edge line is located is perpendicular to the baseline, and the center line of the area where the target edge line is located is parallel to the baseline.

[0036] In step S130, the main task is to determine the area where the target edge line is located. Taking the panel as an example, it can be understood that the area where the target edge line is located to be determined here does not focus on the width of the area parallel to the target edge line. This embodiment focuses on the width of the area where the target edge line is located perpendicular to the target edge line and the relationship between the area and the baseline.

[0037] Specifically, the width of the target edge line region perpendicular to the target edge line can be determined by a preset error range, specifically twice the preset error range. For example, if the preset error range is a pixels, then the width of the target edge line region is 2a pixels. The center line of the target edge line region perpendicular to the target edge line can be understood as the theoretical target edge line. However, due to actual process errors or other factors, in order to ensure accuracy, the preset error range is expanded on both sides of the theoretical target edge line. For example, the expansion can be 3-5 pixels. Of course, the expansion can also be done in units of length rather than pixels. The present invention does not limit the units of the preset error range.

[0038] In this embodiment, the distance between the centerline of the target edge region and the baseline is a predetermined offset. Once the baseline is determined, the centerline of the target edge region can be determined. Combined with the width of the target edge region, the target edge region can be determined. The predetermined offset can be set based on the panel's factory parameters. The predetermined offset is described in detail below.

[0039] Step S140: Determine the target edge line according to the region where the target edge line is located. In step 130, the region where the target edge line is located can be determined, which is equivalent to first narrowing the region where the target edge line is located, so that the target edge line can be quickly determined in a small range.

[0040] In this technical solution, the area where the target edge line is located is first determined, and then the target edge line is determined within the area where the target edge line is located. This edge line positioning method pre-narrows the positioning area, so that the target edge line can be determined within a small range. This can quickly and accurately locate the target edge line. When applied to the field of panel inspection, it is convenient to improve the efficiency of defect detection.

[0041] Exemplarily, step S130 determines the area where the target edge line is located based on the position of the baseline in the image, the predetermined offset, and the preset error range, including: using the position of the baseline in the image as a reference, offsetting the baseline toward the target edge line by a predetermined offset to obtain a theoretical target edge line; offsetting the theoretical target edge line toward both sides of the theoretical target edge line by a preset error range to determine the area where the target edge line is located.

[0042] Take the edge line of the positioning panel as an example, Figure 2As shown, the relationship between the position of the baseline on the panel, the predetermined offset and the preset error range is shown, wherein the baseline is represented by AB, the predetermined offset is represented by d, the preset error range is represented by a, and the area between the straight line CD and the straight line EF is the area CDEF where the target edge line is located.

[0043] In one embodiment, with the position of the baseline AB in the image as a reference, the baseline AB is offset by a predetermined offset d toward the target edge line (for example, the +x direction shown in the figure), so that the baseline AB moves to the position A'B' shown in the figure, that is, the straight line A'B' is the theoretical target edge line; the theoretical target edge line A'B' is offset by a preset error range a on both sides of the theoretical target edge line A'B', so that the area CDEF where the target edge line is located can be obtained.

[0044] In another embodiment, the target edge line area CDEF can also be obtained by the following method. Specifically, the baseline AB can be first offset by a preset error range a on both sides of the baseline AB to obtain a target detection frame (non-closed frame). Then, with the center line AB of the target detection frame as a reference, the target detection frame is offset by a predetermined offset d in the direction of the target edge line (for example, the +x direction shown in the figure). Of course, the target edge line area CDEF can also be obtained by other methods, which are all part of the concept of the present invention and therefore also fall within the scope of protection of the present invention.

[0045] Exemplarily, determining a baseline based on features of an object in an image includes: determining positions of a first marker and a second marker of the object in the image, the first marker and the second marker being predetermined marks for providing a reference for a target position in the image; and connecting the first marker and the second marker to obtain a baseline.

[0046] like Figure 3 As shown, an image of a panel containing a target edge line is obtained by a line scan camera. The diagram shows the two ends of an image taken at one time, wherein the middle part has been omitted due to the large image size. The "cross" image shown in the figure can be used as a feature (mark) on the panel of an embodiment. The feature (mark) is a mark on the TFT substrate that is pre-used to mark the position direction. A feature (mark) is a mark that is usually determined in a calibration template before image detection. Based on the calibration, the corresponding feature (mark) position on the panel to be detected can be determined. For example, the coordinates of the feature (mark) in the image can be used as a reference to obtain the coordinates of the target position.

[0047] For example, an article includes a first substrate and a second substrate smaller than the first substrate, with a step surface formed between the first substrate and the second substrate. When performing defect detection or other applications, it is sometimes necessary to determine the position of the step surface of the article in the image. Taking the panel as an example, when the CF is smaller than the TFT, that is, when the CF and TFT form a step surface, the traditional edge line positioning method has the problem of low efficiency and low precision, because the step surface is not as recognizable and convenient for positioning as ordinary edge lines. To this end, the step surface can be positioned in the manner described above in the present invention. Of course, the straight line where the step surface is located (in this embodiment, it is actually the CF edge line) can also be positioned using the method provided below.

[0048] Exemplarily, the target edge line is a straight line where the step surface is located, and the reference line is determined according to the characteristics of the object in the image, including: determining the outermost edge line in the image corresponding to the target edge line, and using the outermost edge line as the reference line, wherein the outermost edge line is the outermost edge line of the first substrate.

[0049] In one embodiment, the CF of the panel is smaller than the TFT. The step surface serves as the CF edge line, and the outermost edge line of the step surface serves as the TFT edge line. In other words, the TFT edge line can be determined first. The TFT edge line can be determined using the aforementioned method of determining a baseline using a feature (mark) and then determining the TFT edge line, or other existing methods for determining TFT edges can be used, such as straight-line fitting. In this embodiment, the TFT edge line serves as the determined baseline. As described above, the region where the step surface is located can be determined based on the TFT edge line, and then the straight line where the step surface is located can be determined within that region.

[0050] Illustratively, the object edge line positioning method provided by the present invention further includes: pre-acquiring the distance between the target edge line and the reference line on the object; and determining a predetermined offset according to the distance.

[0051] In one embodiment, the reference line can be determined by two features (marks) in the image, and then the predetermined offset is determined based on the line connecting the two features (marks). In this embodiment, the spacing between the target edge line on the object and the reference line requires the coordinates of the two features (marks) in the image to be obtained in advance, and the theoretical width difference of CF and TFT needs to be obtained at the same time (for example, the x direction in the figure is the width direction). Then, the predetermined offset is calculated based on the coordinates of the two features (marks) in the image, the theoretical width difference of CF and TFT. In another embodiment, the reference line is the outermost edge line outside the step surface. For a panel, assuming that the edge to be detected is the first edge of the upper surface of the panel, this edge corresponds to the TFT edge, and the step surface corresponding to this edge is the CF edge, then the TFT edge line is the outermost edge line corresponding to the step surface, so the TFT edge line is the reference line. In this embodiment, the spacing between the target edge line and the reference line is the predetermined offset, that is, the theoretical width difference of CF and TFT is the predetermined offset.

[0052] Exemplarily, determining the target edge line based on the area where the target edge line is located includes: determining the target edge line based on multiple target pixel points, wherein each target pixel point is determined based on a grayscale value on a detection line, and the detection line is a virtual straight line in the area where the target edge line is located and perpendicular to the center line of the area where the target edge line is located.

[0053] Specifically, determining the target edge line based on multiple target pixel points includes the following steps: a pixel point selection step, selecting multiple pixel points on each detection line in the area where the target edge line is located; a target pixel point determination step, for the multiple pixel points selected on each detection line, judging whether the grayscale value difference between two adjacent pixel points meets the grayscale value requirement, and selecting one of the pixel points that meets the grayscale value requirement as the target pixel point, wherein the grayscale value requirement is that the grayscale value difference between two adjacent pixel points is greater than a preset grayscale threshold; it can be understood that in the area where the target edge line is located, the grayscale value is different on each detection line due to the different degree of reflection of its corresponding position. Specifically, the grayscale value at the step surface will be relatively Smaller, so that the grayscale value of the pixel on each detection line will first become smaller and then become larger, so the pixel point close to the step surface, that is, the target pixel point, can be determined according to the grayscale value and the preset grayscale threshold. Specifically, the grayscale values of several pixel points selected on a detection line are 50, 40, 10, 40, and 50, respectively. When the preset grayscale threshold is set to 20, since the change between the second pixel point (grayscale value of 40) and the third pixel point (grayscale value of 10) and the third pixel point (grayscale value of 10) and the fourth pixel point (grayscale value of 40) are both 30, which is greater than the preset grayscale threshold of 20, one of the second, third or fourth pixel points can be selected as the pixel point close to the step surface, that is, the target pixel point.

[0054] For example, if the corresponding target pixel cannot be determined based on the grayscale value on a test line, the following steps are performed: another test line is selected near the test line where the target pixel cannot be determined, and the corresponding target pixel is determined based on the grayscale value on this test line until the target pixel can be determined. In other words, when there is a defect in the image corresponding to the selected test line, the corresponding grayscale change is likely not in accordance with the above-mentioned grayscale value change pattern (first decreasing and then increasing), so the target pixel cannot be found on the corresponding test line. In this case, another test line can be selected near the test line and the target pixel can be determined again in the same manner.

[0055] Illustratively, determining a target edge line based on multiple target pixel points includes one of the following steps: connecting the multiple target pixel points to obtain the target edge line; or performing straight line fitting on the multiple target pixel points to obtain the target edge line. In one embodiment, the target edge line can be determined by connecting the multiple target pixel points; in another embodiment, a straight line can be fitted through the multiple target pixel points using a straight line fitting method, which can also determine the target edge line.

[0056] Exemplarily, step S140 determines the target edge line based on the area where the target edge line is located, including: step S141, preprocessing the image in the area where the target edge line is located to obtain a first enhanced image, wherein the first enhanced image includes the color difference between each target pixel point and the surrounding pixels in the area where the target edge line is located; step S142, superimposing each target pixel point of the image in the area where the target edge line is located with the color difference of the corresponding target pixel point in the first enhanced image to obtain a second enhanced image; step S143, segmenting the target pixel points in the second enhanced image according to a preset color threshold, wherein the preset color threshold is used to distinguish the color of the target edge line from the non-target edge line; step S144, determining the target edge line according to the segmentation result.

[0057] In this embodiment, the target edge line is mainly determined within a specific range, thereby improving efficiency. Specifically, in step 141, the image in the area where the target edge line determined in step S130 is located is preprocessed to obtain a first enhanced image, which includes the color difference between each target pixel and the surrounding pixels in the area where the target edge line is located; for example, for the pixel in the first row and first column of the first enhanced image, the color value (e.g., grayscale value) of the pixel can reflect the color difference (e.g., grayscale difference) between the corresponding pixel at the corresponding position in the area where the target edge line is located and the surrounding pixels. When the color difference is a grayscale difference, the first enhanced image can be considered to be a difference grayscale image, and the grayscale value of the pixel in the difference grayscale image is the difference between the grayscale value of the corresponding pixel at the corresponding position in the area where the target edge line is located and the grayscale values of the surrounding pixels.

[0058] In step S142, the color difference between each target pixel point of the image in the area where the target edge line is located and the corresponding target pixel point in the first enhanced image is superimposed to obtain a second enhanced image. That is to say, in the second enhanced image, since the color difference between the target pixel point in the original image (that is, the image in the area where the target edge line is located) and the corresponding target pixel point in the first enhanced image are superimposed, the color difference between the pixels can be highlighted while taking into account the original color attributes of the pixels.

[0059] Schematically, the color difference between each target pixel point of the image in the area where the target edge line is located and the corresponding target pixel point in the first enhanced image is superimposed, including adding the color value of each target pixel point of the image in the area where the target edge line is located and the color difference between the corresponding target pixel point in the first enhanced image.

[0060] In step 143, the target pixel points in the second enhanced image are segmented using a preset color threshold. Specifically, for example, a preset color value can be set based on an empirical value, and the target pixels smaller than the preset color threshold are used as the pixels ultimately used to determine the target edge line. That is, the pixels determined in this process are the segmentation results.

[0061] In this embodiment, after obtaining the first enhanced image, corresponding pixels in the image are superimposed on the original image. Therefore, even in the case of complex image colors, the target edge line can be located quickly and effectively.

[0062] Exemplarily, step S141 preprocesses the image in the area where the target edge line is located to obtain a first enhanced image, including: filtering the target pixel points of the image in the area where the target edge line is located to obtain the filtering results of each target pixel point; for each target pixel point in the image in the area where the target edge line is located, determining the color difference between the color of the target pixel point and the filtering result of the target pixel point.

[0063] The target pixel points of the image in the area where the target edge line is located are filtered. The filtering process here can adopt mean filtering, specifically, the grayscale value of each pixel point of the image is averaged with respect to the grayscale value of the pixels around it; of course, other filtering methods can also be adopted, such as median filtering, weighted value filtering, etc. After the image in the area where the target edge line is located is filtered, a filtered grayscale image can be obtained. Then, the color value (such as grayscale value) of each target pixel point in the image in the area where the target edge line is located is subtracted from the color value of the pixel point at the corresponding position in the filtered grayscale image, thereby obtaining a difference grayscale image. In this way, the corresponding pixel point can be separated from the pixel points around it, thereby making the bright position brighter and the dark position darker, which is conducive to quickly and accurately locating the target edge line.

[0064] For example, after determining the color difference between the target pixel and the filtered result of the target pixel, the method further includes: expanding the color difference between the color of each target pixel and the filtered result of the corresponding target pixel. This can further increase the difference between the corresponding pixel and its surrounding pixels, thereby making bright locations brighter and dark locations darker, which is conducive to quickly and accurately locating the target edge line.

[0065] Exemplarily, expanding the color difference between the color of each target pixel and the filtering result of the corresponding target pixel includes: expanding the color difference corresponding to each target pixel while retaining the direction of the difference. In one implementation, each pixel in the difference grayscale image can be multiplied by a positive coefficient greater than 1 to perform same-direction enhancement to obtain the enhanced grayscale image. Retaining the difference direction or same-direction enhancement here means that this expansion method is to enhance while maintaining the positive and negative signs of the color value (grayscale value). For example, the coefficient can be 3 or 5, etc. In another embodiment, each pixel in the difference grayscale image can be enhanced in the same direction by a cardinality exponential multiple (for example, the color value of each pixel is cubed).

[0066] According to the second aspect of the present invention, a method for detecting defects in an object is also provided, comprising: an object edge determination step, determining the position of a target edge line of the object according to the above-mentioned object edge line positioning method; and a defect detection step, performing defect detection according to the position of the target edge line.

[0067] According to a third aspect of the present invention, a device for locating an edge line of an article is also provided. Figure 4 FIG. 2 shows a schematic block diagram of an article edge line positioning device 200 according to an embodiment of the present invention. Figure 4 As shown, the apparatus 200 includes an image acquisition module 210 , a baseline determination module 220 , a target region determination module 230 , and a target edge line determination module 240 .

[0068] An image acquisition module, used to acquire an image containing an edge line of an object target;

[0069] A baseline determination module, configured to determine a baseline based on features of an object in an image;

[0070] a target region determination module, configured to determine the region where the target edge line is located based on the position of the reference line in the image, a predetermined offset, and a preset error range, wherein the distance between the reference line and the center line of the region where the target edge line is located is the predetermined offset, the width of the region where the target edge line is located is twice the preset error range, the width direction of the region where the target edge line is located is perpendicular to the reference line, and the center line of the region where the target edge line is located is parallel to the reference line;

[0071] The target edge line determination module is used to determine the target edge line according to the area where the target edge line is located.

[0072] According to the fourth aspect of the present invention, the present invention also provides an object edge detection device, including: an object edge determination module, used to determine the position of the target edge line of the object according to the above-mentioned object edge line positioning method; a defect detection module, used to perform defect detection according to the target edge line position.

[0073] According to a fifth aspect of the present invention, the present invention further provides an electronic device. Figure 5 FIG. 1 shows a schematic block diagram of an electronic device 300 according to an embodiment of the present invention. Figure 5 As shown, the electronic device 300 includes a processor 310 and a memory 320. The memory 320 stores computer program instructions, which are used to execute the above-mentioned object edge line positioning method when the processor 310 runs.

[0074] According to a sixth aspect of the present invention, a storage medium is also provided. The storage medium stores program instructions, which, when executed, are used to execute the above-described method for locating an object edge line. The storage medium may, for example, include a tablet computer storage component, a computer hard drive, a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a portable compact disc read-only memory (CD-ROM), a USB memory, or any combination of the above. The computer-readable storage medium may be any combination of one or more computer-readable storage media.

[0075] A person skilled in the art can understand the specific implementation scheme of the above-mentioned object edge line locating device, electronic device and storage medium by reading the above-mentioned description of the object edge line locating method. For the sake of brevity, it will not be repeated here.

[0076] Although example embodiments have been described herein with reference to the accompanying drawings, it should be understood that the above example embodiments are merely illustrative and are not intended to limit the scope of the present invention. Various changes and modifications may be made therein by those skilled in the art without departing from the scope and spirit of the present invention. All such changes and modifications are intended to be included within the scope of the present invention as claimed in the appended claims.

[0077] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.

[0078] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of units is merely a logical function division. In actual implementation, other division methods may be used. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not performed.

[0079] In the description provided herein, numerous specific details are described. However, it is understood that embodiments of the present invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques are not shown in detail so as not to obscure the understanding of this description.

[0080] Similarly, it should be understood that in order to streamline the present invention and aid in understanding one or more of the various inventive aspects, in the description of exemplary embodiments of the present invention, the various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this approach to the present invention should not be interpreted as reflecting the intention that the claimed invention requires more features than those explicitly recited in each claim. More precisely, as reflected in the corresponding claims, the inventive point is that the corresponding technical problem can be solved with fewer features than all the features of a single disclosed embodiment. Therefore, the claims following a specific embodiment are hereby expressly incorporated into the specific embodiment, with each claim itself serving as a separate embodiment of the present invention.

[0081] It will be understood by those skilled in the art that, except where mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all processes or units of any method or apparatus disclosed herein may be combined in any combination. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) may be replaced by an alternative feature providing the same, equivalent, or similar purpose.

[0082] Furthermore, those skilled in the art will appreciate that although some embodiments herein include certain features included in other embodiments but not other features, combinations of features from different embodiments are intended to be within the scope of the present invention and to form different embodiments. For example, in the claims, any of the claimed embodiments may be used in any combination.

[0083] The various component embodiments of the present invention can be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or digital signal processor (DSP) can be used in practice to implement some or all of the functions of some modules in the panel detection device according to an embodiment of the present invention. The present invention can also be implemented as a device program (e.g., a computer program and a computer program product) for executing part or all of the methods described herein. Such a program for implementing the present invention can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.

[0084] It should be noted that the above embodiments illustrate rather than limit the invention, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between brackets should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising several different elements and by means of appropriately programmed computers. In a unit claim enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third etc. does not indicate any order. These words may be interpreted as names.

[0085] The above are merely specific embodiments or descriptions of specific embodiments of the present invention, and the scope of protection of the present invention is not limited thereto. Any modifications or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present invention should be included in the scope of protection of the present invention. The scope of protection of the present invention should be based on the scope of protection of the claims.

Claims

1. A method for locating an object edge line, characterized in that: include: Acquire an image containing the edge line of the object target; determining a baseline based on features of the object in the image; Determining the region where the target edge line is located based on the position of the baseline in the image, a predetermined offset, and a preset error range, wherein the distance between the baseline and the center line of the region where the target edge line is located is the predetermined offset, the width of the region where the target edge line is located is twice the preset error range, the width direction of the region where the target edge line is located is perpendicular to the baseline, and the center line of the region where the target edge line is located is parallel to the baseline; determining the target edge line according to the area where the target edge line is located; Determining the baseline according to the features of the object in the image includes one of the following steps: Step A: determining the positions of a first mark and a second mark of the object in the image, where the first mark and the second mark are predetermined marks used to provide a reference for the target position in the image; connecting the first mark and the second mark to obtain the baseline; Step B: Determine an outermost edge line in the image that corresponds to the target edge line, and use the outermost edge line as the reference line, wherein the outermost edge line is the outermost edge line of a first substrate, the article includes the first substrate and a second substrate that is smaller than the first substrate, a step surface is formed between the first substrate and the second substrate, and the target edge line is a straight line on which the step surface is located.

2. The method for locating an edge line of an object according to claim 1, characterized in that: Determining the region where the target edge line is located according to the position of the reference line in the image, a predetermined offset, and a preset error range includes: Taking the position of the reference line in the image as a reference, offsetting the reference line in a direction toward the target edge line by the predetermined offset amount to obtain a theoretical target edge line; The theoretical target edge line is shifted toward both sides of the theoretical target edge line by the preset error range to determine the area where the target edge line is located.

3. The method for locating an edge line of an object according to claim 1, wherein: The method further comprises: Pre-acquiring the distance between the target edge line and the reference line on the object; The predetermined offset is determined according to the distance.

4. The method for locating an edge line of an object according to claim 1, wherein: The determining the target edge line according to the area where the target edge line is located includes: The target edge line is determined based on multiple target pixel points, wherein each target pixel point is determined based on a grayscale value on a detection line, and the detection line is a virtual straight line perpendicular to the center line of the area where the target edge line is located.

5. The method for locating an edge line of an object according to claim 4, characterized in that: If the corresponding target pixel cannot be determined based on the grayscale value on the detection line, perform the following steps: A detection line is selected again near the detection line where the target pixel point cannot be determined, and the corresponding target pixel point is determined on the detection line according to the grayscale value.

6. The method for locating an edge line of an object according to claim 4, characterized in that: Determining the target edge line according to the plurality of target pixel points comprises one of the following steps: Connecting the plurality of target pixel points to obtain the target edge line; The plurality of target pixel points are linearly fitted to obtain the target edge line.

7. The method for locating an edge line of an object according to claim 1, wherein: The determining the target edge line according to the area where the target edge line is located includes: Preprocessing the image in the area where the target edge line is located to obtain a first enhanced image, wherein the first enhanced image includes the color difference between each target pixel and surrounding pixels in the area where the target edge line is located; Superimposing the color difference between each target pixel point in the image in the area where the target edge line is located and the corresponding target pixel point in the first enhanced image to obtain a second enhanced image; Segmenting the target pixel points in the second enhanced image according to a preset color threshold, wherein the preset color threshold is used to distinguish the colors of the target edge line and the non-target edge line; The target edge line is determined according to the segmentation result.

8. The method for locating the edge line of an article according to claim 7, characterized in that: The preprocessing of the image in the area where the target edge line is located to obtain a first enhanced image includes: Performing filtering on the target pixel points of the image in the area where the target edge line is located to obtain filtering results for each target pixel point; For each target pixel point in the image in the area where the target edge line is located, a color difference between the color of the target pixel point and the filtering result of the target pixel point is determined.

9. The method for locating the edge line of an object according to claim 8, characterized in that: After determining the color difference between the color of the target pixel and the filtering result of the target pixel, the method further includes: The color difference between the color of each target pixel and the filtering result of the corresponding target pixel is enlarged.

10. The method for locating the edge line of an object according to claim 9, characterized in that: The step of enlarging the color difference between the color of each target pixel and the filtering result of the corresponding target pixel comprises: While preserving the difference direction, the color difference corresponding to each target pixel is enlarged.

11. The method for locating the edge line of an article according to claim 7, characterized in that: The step of superimposing the color difference between each target pixel point in the image in the area where the target edge line is located and the corresponding target pixel point in the first enhanced image comprises: Add the color value of each target pixel point in the image in the area where the target edge line is located and the color difference of the corresponding target pixel point in the first enhanced image.

12. An article edge line positioning device, characterized in that: include: An image acquisition module, used to acquire an image containing an edge line of an object target; A baseline determination module, configured to determine a baseline based on features of an object in the image; a target region determining module, configured to determine a region where the target edge line is located based on a position of the reference line in the image, a predetermined offset, and a preset error range, wherein a distance between the reference line and a center line of the region where the target edge line is located is the predetermined offset, a width of the region where the target edge line is located is twice the preset error range, a width direction of the region where the target edge line is located is perpendicular to the reference line, and a center line of the region where the target edge line is located is parallel to the reference line; a target edge line determining module, configured to determine the target edge line according to the region where the target edge line is located; The baseline determination module is configured to determine the baseline by performing one of the following steps: Step A: determining the positions of a first mark and a second mark of the object in the image, where the first mark and the second mark are predetermined marks used to provide a reference for the target position in the image; connecting the first mark and the second mark to obtain the baseline; Step B: Determine an outermost edge line in the image that corresponds to the target edge line, and use the outermost edge line as the reference line, wherein the outermost edge line is the outermost edge line of a first substrate, the article includes the first substrate and a second substrate that is smaller than the first substrate, a step surface is formed between the first substrate and the second substrate, and the target edge line is a straight line on which the step surface is located.

13. An electronic device comprising a processor and a memory, characterized in that: The memory stores computer program instructions, which are used by the processor to execute the object edge line locating method according to any one of claims 1 to 11 when the processor is running the computer program instructions.

14. A storage medium storing program instructions, wherein the program instructions are used to execute the object edge line locating method according to any one of claims 1 to 11 when running.

Citation Information

Patent Citations

  • Liquid level detection method and device, storage medium and electronic equipment

    CN113947611A