An image segmentation method and device based on optical detection

By pre-setting a reference segmentation region and extracting sub-detection regions for corner detection in optical inspection, the problems of large recognition errors and low detection efficiency in electronic paper production are solved, achieving faster and more accurate image segmentation and improving detection efficiency and quality.

CN116523937BActive Publication Date: 2026-04-14YIWU QINGYUE OPTOELECTRONICS TECHNOLOGY INSTITUTE CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
YIWU QINGYUE OPTOELECTRONICS TECHNOLOGY INSTITUTE CO LTD
Filing Date
2023-05-05
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Existing optical inspection methods suffer from large recognition errors and low inspection efficiency during electronic paper production. In particular, errors such as misalignment, offset, and rotation are prone to occur during image acquisition, affecting the inspection results.

Method used

By using a pre-defined reference segmentation region, a sub-detection region is extracted from each region. Corner detection is then performed using the sub-detection region to determine the target corners, thereby dividing the target segmentation region, reducing the difficulty of camera hardware control, and improving detection efficiency.

Benefits of technology

It achieves faster and more accurate image segmentation, reduces recognition errors, and improves the testing efficiency and quality of electronic paper production.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116523937B_ABST
    Figure CN116523937B_ABST
Patent Text Reader

Abstract

The application discloses an image segmentation method and device based on optical detection. The method comprises the following steps: acquiring a reference segmentation region of a target image; intercepting at least one sub-detection region in the reference segmentation region according to the boundary of the reference segmentation region, wherein the sub-detection region covers at least an intersection position of adjacent boundaries of the target detection region; performing corner point detection in the sub-detection region, and determining a target corner point according to the relative position of the intersection position of the adjacent boundaries in the reference detection region; and dividing a target segmentation region according to the target corner point. The technical scheme provided by the application improves the test efficiency and reduces the recognition error.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of target detection technology, and in particular to an image segmentation method and apparatus based on optical detection. Background Technology

[0002] Electronic paper possesses unique advantages in display devices, including low power consumption and environmental friendliness, and its application in the consumer market continues to expand. Therefore, improving the production efficiency and quality of electronic paper has become a key concern in the electronic paper manufacturing process. Electronic paper modules utilize TFT (Thin Film Transistor) backplanes, which can be inspected electrically or optically. Optical inspection offers the advantage of directly observing defect types and locations, providing feedback to the manufacturing process for improvement.

[0003] Optical inspection methods require the application of numerous machine vision algorithms, especially spatial filtering, to the inspection area. TFT bare boards exhibit different feature regions at both the macroscopic and microscopic levels, with significant differences in patterns within each region, affecting the spatial frequency domain distribution. Therefore, it is necessary to segment regions with different features and perform algorithmic analysis on each region. Current technologies rely on manual segmentation, which suffers from recognition errors and low detection efficiency. Furthermore, image acquisition requires precise camera positioning and shooting accuracy, as the acquired images are prone to misalignment, offset, and rotation errors, impacting detection results. Therefore, image correction is also necessary. Summary of the Invention

[0004] This invention provides an image segmentation method and apparatus based on optical detection, which improves testing efficiency and reduces recognition errors.

[0005] In a first aspect, embodiments of the present invention provide an image segmentation method based on optical detection, comprising:

[0006] Obtain a reference segmentation region of the target image; the reference segmentation region at least covers the target detection region;

[0007] At least one sub-detection region is extracted within the reference segmentation region based on the boundary of the reference segmentation region, wherein the sub-detection region covers at least one intersection position of the adjacent boundary of the target detection region;

[0008] Corner detection is performed within the sub-detection area, and the target corner is determined based on the relative position of the intersection of the adjacent boundaries within the reference detection area.

[0009] The target segmentation region is divided based on the target corner points.

[0010] Optionally, corner detection is performed within the sub-detection area, and the target corner is determined based on the relative position of the intersection of the adjacent boundaries within the reference detection area, including:

[0011] A grayscale image is obtained by performing a closing operation on the sub-detection region, and corner detection is performed based on the grayscale image;

[0012] Determine the relative position of the intersection of the adjacent boundaries within the reference detection area;

[0013] Based on the relative position, the target corner point is selected in the sub-detection region.

[0014] Optionally, a closing operation is performed on the sub-detection region to obtain a grayscale image, and corner detection is performed based on the grayscale image, including:

[0015] The Hessian matrix is ​​obtained by using the Sober operator based on the grayscale image, and the corner image is obtained by applying a Gaussian filter to the three terms of the Hessian matrix.

[0016] Optionally, after dividing the target segmentation region based on the target corner points, the method further includes:

[0017] Defect detection is performed on the target segmented region.

[0018] Optionally, before obtaining the reference segmentation region of the target image, the following steps are included:

[0019] The target image is acquired, and rotation correction is performed on the target image using template matching.

[0020] Secondly, embodiments of the present invention provide an image segmentation apparatus based on optical detection, comprising:

[0021] An acquisition unit is used to acquire a reference segmentation region of the target image; the reference segmentation region at least covers the target detection region;

[0022] The interception unit is configured to intercept at least one sub-detection region within the reference segmentation region according to the boundary of the reference segmentation region, wherein the sub-detection region at least covers the intersection position of an adjacent boundary of the target detection region;

[0023] A determining unit is used to perform corner detection within the sub-detection area and determine the target corner based on the relative position of the intersection of the adjacent boundaries within the reference detection area.

[0024] A segmentation unit is used to divide the target segmentation region based on the target corner point.

[0025] Optionally, the determining unit includes:

[0026] A detection subunit is used to perform a closing operation on the sub-detection region to obtain a grayscale image, and to perform corner detection based on the grayscale image;

[0027] A sub-unit is defined to determine the relative position of the intersection of the adjacent boundaries within the reference detection area;

[0028] A filtering subunit is used to filter the target corner points in the sub-detection area based on the relative position.

[0029] Optionally, the detection subunit includes a computing unit;

[0030] The computing unit is used to calculate the Hessian matrix based on the grayscale image using the Sober operator, and to apply a Gaussian filter to the three terms in the Hessian matrix to obtain the corner image.

[0031] Optionally, the image segmentation device based on optical detection further includes:

[0032] The defect detection unit is used to perform defect detection on the target segmented region.

[0033] Optionally, the image segmentation device based on optical detection further includes:

[0034] A preprocessing unit is used to acquire the target image and perform rotation correction on the target image using template matching.

[0035] The technical solution provided by this invention uses a pre-defined reference segmentation region. Within each reference segmentation region, a sub-detection region is extracted. This sub-detection region roughly covers the intersection of adjacent boundaries of the target detection region. By narrowing the detection range using these sub-detection regions, image processing is performed within this smaller area to obtain corner points. Based on the relative positions of the intersections of adjacent boundaries within the reference segmentation region, target corner points are determined from among the detected corner points. This allows for faster acquisition of the boundary information of the target detection region, thus obtaining the target segmented region. Determining the target segmented region using corner points eliminates the need for manual matching, reducing the control complexity of the camera hardware, improving testing efficiency, and reducing recognition errors. Attached Figure Description

[0036] Figure 1 This is a flowchart illustrating an image segmentation method based on optical detection according to an embodiment of the present invention;

[0037] Figure 2 This invention provides a schematic diagram illustrating the positional relationship between a display area reference segmentation region and a sub-detection region in an embodiment of the present invention.

[0038] Figure 3 This is a schematic diagram of a corner detection distribution provided in this embodiment;

[0039] Figure 4 This is a flowchart illustrating another image segmentation method based on optical detection according to an embodiment of the present invention;

[0040] Figure 5 This is a flowchart illustrating another image segmentation method based on optical detection according to an embodiment of the present invention;

[0041] Figure 6 This is a schematic diagram of an image segmentation device based on optical detection according to an embodiment of the present invention. Detailed Implementation

[0042] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0043] Defects in TFT backplanes can be detected through electrical or optical inspection. Optical inspection offers the advantage of directly observing the defect type and location, providing feedback to the manufacturing process for improvement. During optical inspection, different areas of the same TFT backplane exhibit different spatial frequencies; therefore, proper segmentation is necessary to maximize inspection quality and efficiency.

[0044] Optical inspection methods require spatial filtering of the inspection area. However, TFT bare boards have different characteristic regions on a macroscopic scale, and the spatial frequencies of each region differ significantly. It is difficult to quantitatively filter out different spatial frequencies uniformly, thus requiring the segmentation of regions with different characteristics. In existing technologies, manual segmentation and inspection suffer from recognition errors and low inspection efficiency. Another approach is to control a camera to photograph the characteristic region, but this requires high precision in camera position control and is prone to errors, affecting the inspection results.

[0045] In view of this, Figure 1 This is a flowchart illustrating an image segmentation method based on optical detection according to an embodiment of the present invention. This embodiment is applicable to image region segmentation. The method can be executed by an image segmentation device based on optical detection, which can be implemented in hardware and / or software. The method specifically includes the following steps:

[0046] S110. Obtain a reference segmentation region of the target image; the reference segmentation region shall at least cover the target detection region;

[0047] Specifically, the target image is the image to be detected, such as an image of the thin-film transistor backplane detection area or a display module image. The reference segmentation region is a roughly segmented image region of the target image. The boundary of the reference segmentation region roughly surrounds the boundary of the target detection region, and the spatial frequencies and features within the target detection region are roughly the same. For example, the thin-film transistor backplane image can be roughly divided into several coarsely located regions, such as the display area, left lead area, left connection area, right lead area, right connection area, control chip area, left control chip lead area, and right control chip lead area, which are the reference segmentation regions. Therefore, a reference segmentation region is pre-defined for the detection target, and the corresponding reference segmentation region is determined according to the specific type of the target image.

[0048] S120. At least one sub-detection region is extracted within the reference segmentation region according to the boundary of the reference segmentation region, wherein the sub-detection region covers at least the intersection position of the adjacent boundary of the target detection region;

[0049] Specifically, the reference segmentation region surrounds the target detection region of the target image; therefore, the intersection points formed by the adjacent boundaries of the target detection region are also within the reference segmentation region. By extracting at least one sub-detection region from the reference segmentation region, the sub-detection region roughly covers the intersection points of the adjacent boundaries of the target detection region. In other words, by using sub-detection regions to narrow the detection range, image processing is performed within these smaller sub-detection regions, thereby allowing for faster and more accurate acquisition of the boundary information of the target detection region. For example, Figure 2 This invention provides a schematic diagram illustrating the positional relationship between the display area reference segmentation region and the sub-detection region, as shown in the embodiment of the invention. Figure 2 The reference segmentation region 110 roughly surrounds the display area 120, and the boundary of the display area 120 falls within the reference segmentation region 110. A sub-detection region 130 is extracted within the reference segmentation region 110, wherein the sub-detection region 130 roughly covers the intersection points of adjacent boundaries of the display area 120. The sub-detection region 130 may cover only one first intersection point A of adjacent boundaries, or it may simultaneously cover one or more of the second intersection point B, the third intersection point C, and the fourth intersection point D. Preferably, to obtain more accurate intersection point positions, the number of covered intersection points can be reduced, thereby reducing the data detection range and shortening the detection time.

[0050] S130. Perform corner detection within the sub-detection area and determine the target corner based on the relative position of the intersection of adjacent boundaries within the reference detection area.

[0051] Specifically, closed transport is performed on the image of the sub-detection region. After appropriate erosion, the image is dilated by the same factor to eliminate noise and uneven brightness in the acquired image. This allows for corner detection in the sub-detection region. Corners are points with drastic brightness changes in a 2D image or points with maximum curvature on the image edge curve. These points, while preserving important image features, effectively reduce the amount of data, resulting in high information content and significantly improving computational speed. This facilitates reliable image matching and enables real-time processing. Corner detection plays a crucial role in computer vision fields such as 3D scene reconstruction, motion estimation, target tracking, target recognition, and image registration and matching. Using a fixed TFT backplane, typically rectangular, for corner detection offers advantages such as speed, accuracy, and robustness.

[0052] Among the detected corner points, it is necessary to further determine the target corner point, which can represent the intersection point of adjacent boundaries of the target detection area. Therefore, the target corner point is determined based on the relative position of the intersection position of adjacent boundaries within the reference detection area. That is, the position of the extracted sub-detection area corresponds to the intersection position of the covered adjacent boundaries at a corner of the reference detection area. For example, using... Figure 2 The neutron detection region roughly covers the first intersection point A. The relative position of the first intersection point A in the reference detection region is the upper left corner. Therefore, the corner point located at the upper left corner in the corresponding sub-detection region corresponds to the first intersection point A. Similarly, the target corner point is determined in the corresponding relative position in the sub-detection region by using the relative positions of the second intersection point B, the third intersection point C, and the fourth intersection point D in the reference segmentation region.

[0053] S140. Divide the target segmentation region according to the target corner point.

[0054] Specifically, the target corner points within a reference segmentation region are connected sequentially to obtain the target segmentation region. The spatial frequencies of the features contained in each target segmentation region are similar, which facilitates subsequent defect detection.

[0055] The technical solution provided by this invention uses a pre-defined reference segmentation region. Within each reference segmentation region, a sub-detection region is extracted. This sub-detection region roughly covers the intersection of adjacent boundaries of the target detection region. By narrowing the detection range using these sub-detection regions, image processing is performed within this smaller area to obtain corner points. Based on the relative positions of the intersections of adjacent boundaries within the reference segmentation region, target corner points are determined from among the detected corner points. This allows for faster acquisition of the boundary information of the target detection region, thus obtaining the target segmented region. Determining the target segmented region using corner points eliminates the need for manual matching, reducing the control complexity of the camera hardware, improving testing efficiency, and reducing recognition errors.

[0056] Based on the above embodiments, optionally, corner detection is performed within the sub-detection area, and the target corner is determined based on the relative position of the intersection of adjacent boundaries within the reference detection area, including:

[0057] A grayscale image is obtained by performing a closing operation on the sub-detection region, and corner detection is performed based on the grayscale image;

[0058] Determine the relative position of the intersection of adjacent boundaries within the reference detection area;

[0059] Target corner points are selected in the sub-detection area based on their relative positions.

[0060] Specifically, the image of the sub-detection region is binarized. A closing operation (dilation followed by erosion) is then performed on the binarized image to eliminate noise and uneven brightness signals in the sub-detection region. The image after the closing operation is a grayscale image containing only 0 and 255 colors. Corner detection is performed based on this grayscale image. Optionally, the Hessian matrix is ​​calculated using the Sober operator based on the grayscale image. A Gaussian filter is then applied to the three terms of the Hessian matrix to obtain the corner image. Specifically, the Hessian matrix is ​​calculated using the Sober operator. Apply a Gaussian filter to the three terms of the Hessian matrix and calculate the response value R = detH - k(traceH)^2, where detH is the determinant of the matrix and traceH is the trace of the matrix. For example, k ranges from 0.04 to 0.06. Finally, local maximum suppression is performed on the corner image. Figure 3 This is a schematic diagram of a corner detection distribution provided in this embodiment. See [link / reference] Figure 3 The target corner point is determined based on the relative position of the intersection of adjacent boundaries within the reference detection area. For example, if the sub-detection area roughly covers the first intersection point A, and the relative position of the first intersection point A in the reference detection area is the upper left corner, then the corresponding corner point in the upper left corner of the sub-detection area corresponds to the first intersection point A. Similarly, if the sub-detection area roughly covers the second intersection point B, and the relative position of the second intersection point B in the reference detection area is the lower left corner, then the corresponding corner point in the lower left corner of the sub-detection area; if the sub-detection area roughly covers the third intersection point C, and the relative position of the third intersection point C in the reference detection area is the lower right corner, then the corresponding corner point in the lower right corner of the sub-detection area; if the sub-detection area roughly covers the fourth intersection point D, and the relative position of the fourth intersection point D in the reference detection area is the upper right corner, then the corresponding corner point in the upper right corner of the sub-detection area.

[0061] Figure 4 This is a flowchart illustrating another image segmentation method based on optical detection according to an embodiment of the present invention. See [link / reference]. Figure 4 ,include:

[0062] S210. Obtain a reference segmentation region of the target image; the reference segmentation region shall at least cover the target detection region;

[0063] S220. At least one sub-detection region is extracted within the reference segmentation region according to the boundary of the reference segmentation region, wherein the sub-detection region covers at least the intersection position of the adjacent boundary of the target detection region;

[0064] S230. Perform corner detection within the sub-detection area and determine the target corner based on the relative position of the intersection of adjacent boundaries within the reference detection area.

[0065] S240. Divide the target segmentation region according to the target corner point.

[0066] S250, Perform defect detection on the target segmented region.

[0067] Specifically, the spatial frequencies of the features contained in the image of each target segmentation region are similar. The target segmentation regions are filtered using their respective spatial frequencies to eliminate background and non-defect textures. The remaining portion of each target segmentation region represents defects. After converting the image of the target segmentation region to the frequency domain, the frequencies to be removed are directly related to the spatial size of the features, which can be expressed as: f = N / d;

[0068] Where N is the width or height of the target segmentation region image, depending on the direction of frequency calculation, and d is the spatial dimension of the feature to be filtered out in the corresponding calculation direction. After calculating f, the frequency is removed from the frequency domain image after Fourier transform, and then an inverse Fourier transform is performed to obtain the image of the target segmentation region after removing the background and non-defect textures. The processed image of the target segmentation region is input into the back-end image detection algorithm for corresponding defect detection. The optical defect detection method is existing technology and will not be described in detail here.

[0069] Figure 5 This is a flowchart illustrating another image segmentation method based on optical detection according to an embodiment of the present invention. See [link / reference]. Figure 5 ,include:

[0070] S310. Obtain the target image and perform rotation correction on the target image using template matching.

[0071] Specifically, template matching is used to identify the crosshair region in the target image. The center of the crosshair is the reference point. The target image can be rotated for correction by using the relative position of the centers of the left and right crosshairs, so that the position of each target image is the same, which plays a preliminary calibration role. This makes the division of the reference segmentation region more accurate and improves the consistency of detection between different batches.

[0072] S320. Obtain a reference segmentation region of the target image; the reference segmentation region shall at least cover the target detection region;

[0073] S330. At least one sub-detection region is extracted within the reference segmentation region according to the boundary of the reference segmentation region, wherein the sub-detection region covers at least the intersection position of the adjacent boundary of the target detection region;

[0074] S340. Perform corner detection within the sub-detection area and determine the target corner based on the relative position of the intersection of adjacent boundaries within the reference detection area.

[0075] S350. Divide the target segmentation region according to the target corner point.

[0076] S360, Defect detection is performed on the target segmented region.

[0077] Figure 6 This is a schematic diagram of an image segmentation device based on optical detection according to an embodiment of the present invention. See also... Figure 6 ,include:

[0078] The acquisition unit 610 is used to acquire a reference segmentation region of the target image; the reference segmentation region at least covers the target detection region;

[0079] The cropping unit 620 is used to crop at least one sub-detection region within the reference segmentation region according to the boundary of the reference segmentation region, wherein the sub-detection region at least covers the intersection position of the adjacent boundaries of a target detection region;

[0080] The determining unit 630 is used to perform corner detection within the sub-detection area and determine the target corner based on the relative position of the intersection of adjacent boundaries within the reference detection area;

[0081] The dividing unit 640 is used to divide the target segmentation region based on the target corner point.

[0082] Specifically, the acquisition unit 610 pre-defines a reference segmentation region for the detection target, thereby determining the corresponding reference segmentation region according to the specific type of the target image. The cropping unit 620 crops at least one sub-detection region on the reference segmentation region. The sub-detection region is the intersection point of adjacent boundaries that roughly covers the target detection region. That is, by using the sub-detection region to narrow the detection range, image processing is performed within a small sub-detection region, thereby obtaining the boundary information of the target detection region more quickly and accurately. The determination unit 620 performs closed transport on the image of the sub-detection region, performs appropriate erosion on the image, and then dilates the image with the same factor to eliminate noise and uneven brightness noise present in the acquired image, thereby performing corner detection on the sub-detection region. Here, corner points are points with drastic changes in brightness in the two-dimensional image or points with maximum curvature on the image edge curve. Among the detected corner points, target corner points need to be further determined. Target corner points can represent the intersection points of adjacent boundaries of the target detection region. Therefore, the target corner point is determined based on the relative position of the intersection of adjacent boundaries within the reference detection area. In other words, the position of the extracted sub-detection area corresponds to the intersection of the covered adjacent boundaries at a corner of the reference detection area. For example, using... Figure 3 The neutron detection region roughly covers the first intersection point A. The first intersection point A is located at the upper left corner of the reference detection region. Therefore, the corner point located at the upper left corner of the corresponding sub-detection region corresponds to the first intersection point A. Similarly, the target corner point is determined at its corresponding relative position in the sub-detection region based on the relative positions of the second intersection point B, the third intersection point C, and the fourth intersection point D within the reference segmentation region. The segmentation unit 640 sequentially connects the target corner points within a reference segmentation region to obtain the target segmentation region. The spatial frequencies of the features contained within each target segmentation region are similar, facilitating subsequent defect detection.

[0083] Optionally, the determining unit includes: a detection subunit, used to perform a closing operation on the sub-detection region to obtain a grayscale image, and to perform corner detection based on the grayscale image;

[0084] Determine the sub-unit, which is used to determine the relative position of the intersection of adjacent boundaries within the reference detection area;

[0085] The filtering sub-unit is used to filter target corner points in the sub-detection area based on their relative position.

[0086] Specifically, the detection subunit performs binarization on the image of the sub-detection region. Then, it performs a closing operation (dilation followed by erosion) on the binarized image to eliminate noise and uneven brightness signals in the sub-detection region. The image after the closing operation is a grayscale image containing only 0 and 255 colors. Corner detection is performed based on this grayscale image. Optionally, the detection subunit includes a computation unit. The computation unit uses the Sober operator to calculate the Hessian matrix based on the grayscale image, and applies a Gaussian filter to three terms of the Hessian matrix to calculate the corner image.

[0087] The computational unit uses the Sober operator to calculate the Hessian matrix. Apply a Gaussian filter to the three terms of the Hessian matrix and calculate the response value R = detH - k(traceH)^2, where detH is the determinant of the matrix and traceH is the trace of the matrix. For example, k ranges from 0.04 to 0.06. Finally, local maximum suppression is performed on the corner image. Figure 4 This is a schematic diagram of a corner detection distribution provided in this embodiment. See [link / reference] Figure 4 The target corner point of a sub-unit is determined based on the relative position of the intersection of adjacent boundaries within the reference detection area. For example, if the sub-detection area roughly covers the first intersection point A, and the relative position of the first intersection point A in the reference detection area is the upper left corner, then the target corner point in the upper left corner of the corresponding sub-detection area is the first intersection point A. Similarly, if the sub-detection area roughly covers the second intersection point B, and the relative position of the second intersection point B in the reference detection area is the lower left corner, then the target corner point in the corresponding sub-detection area is the lower left corner; if the sub-detection area roughly covers the third intersection point C, and the relative position of the third intersection point C in the reference detection area is the lower right corner, then the target corner point in the corresponding sub-detection area is the lower right corner; if the sub-detection area roughly covers the fourth intersection point D, and the relative position of the fourth intersection point D in the reference detection area is the upper right corner, then the target corner point in the corresponding sub-detection area is the upper right corner.

[0088] Optionally, the image segmentation apparatus based on optical detection further includes:

[0089] The defect detection unit is used to detect defects in the target segmented region.

[0090] Specifically, the spatial frequencies of the features contained in the image of each target segmentation region are similar. The defect detection unit filters the target segmentation regions according to their respective spatial frequencies to eliminate background and non-defect textures. The remaining part of each target segmentation region represents the defect. After the defect detection unit converts the image of the target segmentation region to the frequency domain, the frequency to be removed is directly related to the spatial size of the feature, which can be expressed as: f = N / d;

[0091] Where N is the width or height of the target segmentation region image, depending on the direction of frequency calculation, and d is the spatial dimension of the feature to be filtered out in the corresponding calculation direction. After calculating f, the frequency is removed from the frequency domain image after Fourier transform, and then an inverse Fourier transform is performed to obtain the target segmentation region image after removing the background and non-defect textures. The processed target segmentation region image is input into the backend image detection algorithm for corresponding defect detection. The defect detection method is existing technology and will not be described in detail here.

[0092] Optionally, the image segmentation apparatus based on optical detection further includes:

[0093] The preprocessing unit is used to acquire the target image and perform rotation correction on the target image using template matching.

[0094] Specifically, the preprocessing unit uses template matching to identify the crosshair region in the target image. The center of the crosshair is the reference point. The target image can be rotated for correction by using the relative position of the left and right crosshair centers, so that the position of each target image is the same, which plays a preliminary calibration role. This makes the division of the reference segmentation region more accurate and improves the consistency of detection between different batches.

[0095] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. An image segmentation method based on optical detection, characterized in that, include: Obtain the reference segmentation region of the target image; The reference segmentation region is an image region roughly segmented from the target image, and the boundary of the reference segmentation region roughly surrounds the boundary of the target detection region with similar spatial frequency. At least one sub-detection region is extracted within the reference segmentation region based on the boundary of the reference segmentation region, wherein the sub-detection region covers at least one intersection position of the adjacent boundary of the target detection region; Corner detection is performed within the sub-detection area, and the target corner is determined based on the relative position of the intersection of the adjacent boundaries within the reference segmentation area. Based on the target corner points, a target segmentation region corresponding to the target detection region is defined; Corner detection is performed within the sub-detection area, and the target corner is determined based on the relative position of the intersection of the adjacent boundaries within the reference segmentation area, including: A grayscale image is obtained by performing a closing operation on the sub-detection region, and corner detection is performed based on the grayscale image; Determine the relative position of the intersection of the adjacent boundaries within the reference segmentation region; Based on the relative position, the target corner point located in the corresponding corner region is selected in the sub-detection region.

2. The image segmentation method based on optical detection according to claim 1, characterized in that, Performing a closing operation on the sub-detection region to obtain a grayscale image, and performing corner detection based on the grayscale image includes: The Hessian matrix is ​​obtained by using the Sober operator based on the grayscale image, and the corner image is obtained by applying a Gaussian filter to the three terms of the Hessian matrix.

3. The image segmentation method based on optical detection according to claim 1, characterized in that, After dividing the target segmentation region based on the target corner points, the process further includes: Defect detection is performed on the target segmented region.

4. The image segmentation method based on optical detection according to claim 1, characterized in that, Before obtaining the reference segmentation region of the target image, the following is included: The target image is acquired, and rotation correction is performed on the target image using template matching.

5. An image segmentation device based on optical detection, characterized in that, include: The acquisition unit is used to acquire the reference segmentation region of the target image; The reference segmentation region is an image region roughly segmented from the target image, and the boundary of the reference segmentation region roughly surrounds the boundary of the target detection region with similar spatial frequency. The interception unit is configured to intercept at least one sub-detection region within the reference segmentation region according to the boundary of the reference segmentation region, wherein the sub-detection region at least covers the intersection position of an adjacent boundary of the target detection region; A determining unit is used to perform corner detection within the sub-detection area and determine the target corner based on the relative position of the intersection of the adjacent boundaries within the reference segmentation area. A segmentation unit is used to segment a target region corresponding to the target detection region based on the target corner points; The determining unit includes: A detection subunit is used to perform a closing operation on the sub-detection region to obtain a grayscale image, and to perform corner detection based on the grayscale image; A sub-unit is determined to determine the relative position of the intersection of the adjacent boundaries within the reference segmentation region; A filtering subunit is used to filter out the target corner point located in the corresponding corner region in the sub-detection region according to the relative position.

6. The image segmentation apparatus based on optical detection according to claim 5, characterized in that, The detection subunit includes a computing unit; The computing unit is used to calculate the Hessian matrix based on the grayscale image using the Sober operator, and to apply a Gaussian filter to the three terms in the Hessian matrix to obtain the corner image.

7. The image segmentation apparatus based on optical detection according to claim 5, characterized in that, Also includes: The defect detection unit is used to perform defect detection on the target segmented region.

8. The image segmentation apparatus based on optical detection according to claim 5, characterized in that, Also includes: A preprocessing unit is used to acquire the target image and perform rotation correction on the target image using template matching.

Citation Information

Patent Citations

  • Object edge recognition method and system, and computer readable storage medium

    CN112132163A

  • Product surface defect detection and classification method and device and storage medium

    CN115601355A