Detection and identification method for spatial ellipse features
By extracting and clustering image edge contours, combined with multi-scale Retinex algorithm and filtering technology, it solves the difficulty of ellipse detection in complex lighting environments in space tasks, and achieves accurate recognition and calculation speed of elliptical features in various lighting environments. promote.
Patent Information
- Application Number
- CN202410753132.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-12
- Publication Date
- 2024-09-17
AI Technical Summary
In space tasks, due to the lack of features of the target during close rendezvous, it is difficult to detect ellipses in visual measurements, especially under complex lighting conditions. The existing Hough transform algorithm has slow calculation speed and high image quality requirements, making it difficult to detect ellipses under various lighting conditions. Accurate identification in the environment.
This paper proposes a detection and recognition method for spatial elliptical features. It acquires color images, extracts edge contours, clusters elliptical arc segments, and uses the multi-scale Retinex algorithm for image enhancement, median filtering and maximum inter-class difference algorithm for threshold segmentation, combined with The Sobel operator and non-maximum suppression detect edges, and finally the elliptical arc segments are fitted to achieve recognition.
It achieves accurate identification of elliptical features in complex lighting environments, reduces noise interference, improves calculation speed, and is suitable for short-distance rendezvous tasks in space.
Smart Images

Figure CN118657802A
Abstract
Description
Technical Field
[0001] The invention belongs to the field of space target recognition, and in particular relates to a detection and recognition method for space ellipse features. Background Art
[0002] In space missions, we often encounter the problem of close-range rendezvous pose measurement. Since the use of visual cameras in the close-range rendezvous stage can obtain more detailed feature information on the target surface, the estimation of the target's relative position and pose information is more accurate, and the cost and power consumption of visual cameras are lower, the use of visual measurement at close range has become the mainstream method in recent years. The key technologies of visual measurement are image registration and 3D reconstruction technology, which are often limited by the characteristics of the target. If the target lacks features, stereo matching will become difficult, affecting the measurement of distance information.
[0003] The satellite-rocket docking ring and the apogee engine are ideal identification features for close-range rendezvous of spacecraft. The ellipse detection algorithm based on Hough transform detects objects with specific shapes through a voting algorithm. The Hough transform uses the transformation between two coordinate systems to map curves or straight lines with the same shape in one space to a point in another coordinate space to form a peak, thereby converting the problem of detecting arbitrary shapes into a statistical peak problem. The ellipse detection algorithm based on Hough transform is widely used in industry, but it requires a five-dimensional accumulator to estimate the ellipse parameters, which has high time and space complexity and slow calculation speed. In addition, ellipse detection has high requirements on the quality of the image itself. Under complex lighting conditions in space, the imaged image will lose details or some key structural features due to overexposure or darkness, which will bring great difficulties to the recognition of the target. Summary of the invention
[0004] The purpose of the present invention is to overcome the shortcomings of the prior art and propose a method for detecting and identifying spatial ellipse features. The present invention can realize accurate identification of ellipse features under various lighting environments, can be applied to space close-range rendezvous tasks under complex lighting environments, and has high application value.
[0005] The present invention proposes a method for detecting and identifying spatial ellipse features, comprising:
[0006] Acquire a color image of the target to be detected, and extract the edge contour of the image;
[0007] Selecting edge contours that meet preset elliptical arc segment characteristic conditions from edge contours of the image as elliptical arc segments to be clustered, and clustering all elliptical arc segments to be clustered to obtain an elliptical arc segment set corresponding to each category;
[0008] Ellipse fitting is performed on the ellipse arc segment set corresponding to each category to achieve detection and recognition of the ellipse in the color image of the target to be detected.
[0009] In a specific embodiment of the present invention, extracting the edge contour of the image includes:
[0010] 1) Perform image enhancement on the color image of the target to be detected to obtain an enhanced image;
[0011] Wherein, the enhanced image is a reflected image of the color image of the target to be detected;
[0012] The calculation expression of the pixel value of the reflected image pixel corresponding to any pixel point (x, y) in the i-th color channel of the color image of the target to be detected is as follows:
[0013]
[0014] Where x is the horizontal coordinate of the pixel, and y is the vertical coordinate of the pixel; S i (x, y) is the pixel value of the pixel point (x, y) in the i-th color channel, C i (x,y) is the color restoration factor of the pixel (x,y) in the i-th color channel, β is the gain constant, α controls the strength of the nonlinearity, S is the number of channels, N is the total number of scales, ω j is the weight corresponding to the jth scale, * indicates convolution operation; G j (x,y) is the Gaussian surround function of the pixel (x,y) at the jth scale, σ j is the scale parameter of the jth scale;
[0015] Solve to obtain the R corresponding to all pixels in the color image of the target to be detected i (x, y), the reflection image R corresponding to the color image of the target to be detected is obtained. I , R I The image output on any color channel is recorded as Among them, the intensity channel I i is the i-th intensity channel;
[0016] 2) performing image filtering on the enhanced image to obtain a filtered image;
[0017] 3) Perform threshold segmentation on the filtered image to obtain a segmented image;
[0018] 4) Perform edge detection on the segmented image to extract edge contours.
[0019] In a specific embodiment of the present invention, the image filtering performed on the enhanced image adopts a median filtering method.
[0020] In a specific embodiment of the present invention, the threshold segmentation of the filtered image adopts the maximum inter-class difference algorithm, including:
[0021] The overall average grayscale of the filtered image is μ=μ0w0+μ1w1, where w0 is the ratio of the number of pixels belonging to the foreground in the filtered image to the entire image, μ0 is the average grayscale of the pixels belonging to the foreground, w1 is the ratio of the number of pixels belonging to the background in the filtered image to the entire image, and μ1 is the average grayscale of the pixels belonging to the background;
[0022] Calculate the inter-class variance σ = w0(μ0-μ) 2 +w1(μ1-μ) 2 =w0w1(μ0-μ1) 2 ;
[0023] The segmentation threshold of the foreground and background that maximizes the inter-class variance is taken as the optimal threshold, and then the filtered image is segmented using the binary method to obtain the segmented image; the pixel value of any pixel point (x, y) in the segmented image Among them, f(x,y) is the pixel value of any pixel point (x,y) in the filtered image.
[0024] In a specific embodiment of the present invention, the step of performing edge detection on the segmented image includes:
[0025] 4-1) Use the Sobel operator to calculate the horizontal gradient G of the segmented image x =S x *P and vertical gradient G y =S y *P;
[0026] Among them, S x , S y are Sobel operators in the horizontal and vertical directions respectively, and P represents the segmented image;
[0027] Calculate the gradient magnitude of the segmented image and direction θ = tan -1 (G y / G x );
[0028] 4-2) Using the result of step 4-1), non-maximum suppression is performed on the segmented image to obtain a corresponding binary image;
[0029] If the gradient amplitude of any pixel in the segmented image is greater than the gradient amplitude of one adjacent pixel in each of the positive and negative gradient directions, the pixel is retained as an edge pixel, otherwise the grayscale value of the pixel is set to 0.
[0030] 4-3) Performing double threshold hysteresis processing on the binary image after non-maximum suppression, wherein the high and low thresholds are determined by using the image gradient difference histogram and the intra-class variance minimization characteristics;
[0031] If the gradient value of any edge pixel in the binary image is greater than the high threshold, the pixel is marked as a strong edge pixel and the pixel value of the pixel is set to 255;
[0032] If the gradient of any edge pixel in the binary image is less than the low threshold, the pixel value of the pixel is set to 0;
[0033] If the gradient of any edge pixel in the binary image is greater than or equal to the low threshold and less than or equal to the high threshold, the pixel is marked as a weak edge pixel; all weak edge pixels are traversed, where if there is at least one strong edge pixel in the neighborhood of any weak edge pixel, the weak edge pixel is updated to a strong edge pixel, and the pixel value of the weak edge pixel is updated to 255; otherwise, the pixel value of the weak edge pixel is not updated;
[0034] After all pixels of the binary image are processed, an image containing only edge contours is generated, and the edge contour extraction is completed.
[0035] In a specific embodiment of the present invention, the method further comprises:
[0036] The preset elliptical arc segment characteristic conditions include: length condition, angle condition, and convexity condition;
[0037] The length condition is: if the number of pixel points with a pixel value of 255 contained in any edge contour is greater than or equal to a set number threshold, then the edge contour meets the length condition;
[0038] The angle condition is: if the angle deviation between contour segments in any edge contour is less than a set angle threshold α, then the edge contour satisfies the angle condition;
[0039] The convexity condition is: if any edge contour changes along the same direction, then the edge contour satisfies the convexity condition;
[0040] If any edge contour satisfies the length condition, the angle condition, and the convexity condition at the same time, then the edge contour is an elliptical arc segment to be clustered.
[0041] In a specific embodiment of the present invention, performing ellipse fitting on the ellipse arc segment set corresponding to each category includes:
[0042] For each set of elliptical arc segments, solve the synchronous equations Where λ is the Lagrange multiplier, and vector a = [A, B, C, D, E, F] T , vector a=[A,B,C,D,E,F] T , A, B, C, D, E, F is the general equation of the conic section of the ellipse Ax 2 +2Bxy+Cy 2 +2Dx+2Ey+F=0 parameters; constant constraint matrix QQ is the set {p1,p2,…,p n} scatter matrix; p i Indicates the pixel point with the i-th pixel value of 255 in the ellipse arc segment set, p i The coordinates are marked as (x i ,y i ), i = 1, 2, ..., n, n represents the total number of pixels in the ellipse arc segment set; Q = D T D, where
[0043] According to A, B, C, D, E, and F, the parameter expression of the ellipse corresponding to the elliptical arc segment set is as follows:
[0044]
[0045] where x c and c They respectively represent the horizontal and vertical coordinates of the center of the ellipse corresponding to the set of elliptical arc segments; a and b respectively represent the semi-major axis and semi-minor axis of the ellipse corresponding to the set of elliptical arc segments, and θ is the angle between the semi-major axis and the positive direction of the x-axis of the coordinate system.
[0046] Features and beneficial effects of the present invention:
[0047] To address the problem of distortion of imaging information in complex spatial lighting environments, such as dim light and local overexposure, which leads to the appearance of a large number of edge points with small gradient values but occupying a large proportion in the image, thus interfering with normal detection results, the present invention adaptively enhances the image using a multi-scale Retinex algorithm with color restoration, thereby achieving accurate recognition of circular features such as target satellite-rocket docking rings under different lighting environments.
[0048] The present invention uses median filtering to effectively remove different types of noise without blurring edge details of the image.
[0049] The present invention can be applied to close-range space rendezvous. By identifying circular features such as satellite-rocket docking rings and engine nozzles, the distance between spacecraft can be estimated to serve the close-range space rendezvous. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 It is an overall flow chart of a method for detecting and identifying spatial ellipse features according to an embodiment of the present invention. DETAILED DESCRIPTION
[0051] The present invention proposes a method for detecting and identifying spatial ellipse features, which is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0052] This embodiment provides a method for detecting and identifying spatial ellipse features, including:
[0053] Acquire a color image of the target to be detected, and extract the edge contour of the image;
[0054] Selecting edge contours that meet preset elliptical arc segment characteristic conditions from edge contours of the image as elliptical arc segments to be clustered, and clustering all elliptical arc segments to be clustered to obtain an elliptical arc segment set corresponding to each category;
[0055] Ellipse fitting is performed on the ellipse arc segment set corresponding to each category to achieve detection and recognition of the ellipse in the color image of the target to be detected.
[0056] In a specific embodiment of the present invention, the overall process of the method for detecting and identifying a spatial ellipse feature is as follows: Figure 1 As shown, the following steps are included:
[0057] 1) Obtain a color image of the target to be detected and preprocess the image to extract the edge contour of the image. The specific steps are as follows:
[0058] 1-1) Obtain a color image of the target to be detected.
[0059] In this embodiment, a color image of the target image to be detected within the visible light range is captured by means including but not limited to a monocular camera, a binocular camera, etc., and there are no special requirements for the resolution and format of the image.
[0060] 1-2) Performing image enhancement on the image obtained in step 1-1) to obtain an enhanced image.
[0061] In this embodiment, the reflected image of the image obtained in step 1-1) is calculated using a multi-scale Retinex algorithm with color preservation, which is the image enhancement result.
[0062] The pixel value R of the reflected image pixel corresponding to any pixel point (x, y) in the i-th color channel of the image obtained in step 1-1) is i The calculation expression of (x,y) is as follows:
[0063]
[0064] Where x is the horizontal coordinate of the pixel, and y is the vertical coordinate of the pixel; S i (x, y) is the pixel value of the pixel point (x, y) in the i-th color channel, C i (x,y) is the color restoration factor of the pixel (x,y) in the i-th color channel, β is the gain constant, α controls the strength of nonlinearity, S is the number of channels, in a specific embodiment of the present invention, β = 46, α = 125, S = 3. N is the total number of scales, in a specific embodiment of the present invention, N = 3. ω j is the weight corresponding to the jth scale, In a specific embodiment of the present invention * indicates convolution operation. G j (x,y) is the Gaussian surround function of the pixel (x,y) at the jth scale, σ j is the scale parameter of the j-th scale. In a specific embodiment of the present invention, the scale parameters of the three scales are [σ1, σ2, σ3] = [12, 80, 250].
[0065] Solve to obtain the R corresponding to all pixels in the color image of the target to be detected i (x, y), the reflected image corresponding to the color image of the target to be detected is obtained, that is, the enhanced image is recorded as R I , R I The image output on any color channel is recorded as Among them, the intensity channel I i is the i-th intensity channel.
[0066] 1-3) performing image filtering on the enhanced image obtained in step 1-2) to obtain a filtered image.
[0067] In this embodiment, the enhanced image obtained in step 1-2) is subjected to median filtering to obtain a filtered image.
[0068] 1-4) Performing threshold segmentation on the filtered image obtained in step 1-3) to obtain a segmented image.
[0069] In this embodiment, a maximum inter-class difference algorithm is used to perform threshold segmentation on the filtered image to obtain a segmented image.
[0070] Specifically, the overall average grayscale of the filtered image is μ=μ0w0+μ1w1, where w0 is the ratio of the number of pixels belonging to the foreground in the filtered image to the entire image, μ0 is the average grayscale of the pixels belonging to the foreground, w1 is the ratio of the number of pixels belonging to the background in the filtered image to the entire image, and μ1 is the average grayscale of the pixels belonging to the background. Calculate the inter-class variance σ=w0(μ0-μ) 2 +w1(μ1-μ) 2 =w0w1(μ0-μ1) 2 .
[0071] The segmentation threshold of the foreground and background that maximizes the inter-class variance is taken as the optimal threshold, and then the filtered image is segmented using the binary method to obtain the segmented image; the pixel value of any pixel point (x, y) in the segmented image Among them, f(x,y) is the pixel value of any pixel point (x,y) in the filtered image.
[0072] 1-5) Perform edge detection on the segmented image obtained in step 1-4) to extract edge contours.
[0073] In this embodiment, the adaptive Canny edge detection algorithm is used to perform edge detection on the segmented image; the specific steps are as follows:
[0074] 1-5-1) Use the Sobel operator to calculate the horizontal gradient G of the segmented image x =S x *P and vertical gradient G y =S y *P. Among them, S x , S y are Sobel operators in the horizontal direction and the vertical direction respectively. In a specific embodiment of the present invention, P represents the segmented image.
[0075] Calculate the gradient magnitude of the segmented image and direction θ = tan -1 (G y / G x ).
[0076] 1-5-2) Use the result of step 1-5-1) to perform non-maximum suppression on the segmented image to obtain the corresponding binary image.
[0077] In this embodiment, the gradient amplitude of each pixel in the image is compared with the gradient amplitudes of two pixels in its positive and negative gradient directions. If the gradient amplitude of the pixel is respectively greater than the gradient amplitudes of the two pixels before and after it, the pixel is retained as an edge pixel. Otherwise, the grayscale value of the pixel is set to 0.
[0078] 1-5-3) Double threshold hysteresis processing is performed on the binary image after non-maximum suppression, in which the high and low thresholds are determined by using the image gradient difference histogram and the intra-class variance minimization characteristics.
[0079] If the gradient value of any edge pixel in the binary image is greater than the high threshold, the pixel is marked as a strong edge pixel and the pixel value of the pixel is set to 255;
[0080] If the gradient of any edge pixel in the binary image is less than the low threshold, it will be suppressed and the pixel value of the pixel will be set to 0;
[0081] If the gradient of any edge pixel in the binary image is greater than or equal to the low threshold and less than or equal to the high threshold, the pixel is marked as a weak edge pixel. Traverse all weak edge pixels, where if there is at least one strong edge pixel in the 8-neighborhood pixel of any weak edge pixel, the weak edge pixel is updated to a strong edge pixel, and the pixel value of the weak edge pixel is updated to 255; otherwise, the pixel value of the weak edge pixel is not updated.
[0082] After processing all the pixels of the binary image, an image containing only edge contours is generated, and the preprocessing is completed.
[0083] 2) Using a detection method based on arc segment features, select elliptical arc segments that meet the conditions from the edge contour obtained in step 1) and perform clustering, and perform ellipse fitting based on the clustering results to achieve detection and recognition of the ellipse in the color image of the target to be detected; the specific steps are as follows:
[0084] 2-1) From the image containing only edge contours obtained in step 1), edge contours that meet preset elliptical arc segment feature conditions are screened out as elliptical arc segments to be clustered, and then all elliptical arc segments to be clustered are clustered to obtain an elliptical arc segment set corresponding to each category.
[0085] In the embodiment of the present invention, the preset elliptical arc segment characteristic conditions include: length condition, angle condition, and convexity condition.
[0086] The length condition is: if the number of pixel points with a pixel value of 255 contained in any edge contour is greater than or equal to a set number threshold, then the edge contour meets the length condition. In a specific embodiment of the present invention, the number threshold is 5.
[0087] The angle condition is: if the angle deviation between contour segments in any edge contour is less than a set angle threshold α, then the edge contour satisfies the angle condition. In a specific embodiment of the present invention, α=90°.
[0088] The convexity condition is: if any edge contour changes in the same direction (clockwise or counterclockwise), then the edge contour satisfies the convexity condition.
[0089] If any edge contour satisfies the length condition, the angle condition, and the convexity condition at the same time, then the edge contour is an elliptical arc segment to be clustered.
[0090] In the embodiment of the present invention, all elliptical arc segments to be clustered are clustered to obtain multiple groups of elliptical arc segment sets. This embodiment has no special requirements on the number of clusters.
[0091] 2-2) Perform ellipse fitting on each set of ellipse arc segments obtained by clustering in step 2-1).
[0092] In this embodiment, for each set of elliptical arc segments, the synchronous equations are solved Among them, λ is the introduced Lagrange multiplier, vector a=[A,B,C,D,E,F] T , A, B, C, D, E, F is the general equation of the conic section of the ellipse Ax 2 +2Bxy+Cy 2 +2Dx+2Ey+F=0 parameters. Constant constraint matrix Q is the set {p1,p2,…,p n}, p i Indicates the pixel point with the i-th pixel value of 255 in the ellipse arc segment set, p i The coordinates are marked as (x i ,y i ), i = 1, 2, ..., n, n represents the total number of pixels in the ellipse arc segment set; Q = D T D, where
[0093] According to A, B, C, D, E, and F, the five parameter expressions of the ellipse corresponding to the elliptical arc segment set are as follows:
[0094]
[0095] Among them, x c and c They represent the horizontal and vertical coordinates of the center of the ellipse corresponding to the ellipse arc segment set. a and b represent the semi-major axis and semi-minor axis of the ellipse corresponding to the ellipse arc segment set, respectively. θ is the angle between the semi-major axis and the positive direction of the x-axis of the coordinate system.
[0096] In this embodiment, the relative position and posture relationship between the camera and the estimated ellipse can be estimated through the five parameters of the ellipse and then applied to the space rendezvous and docking.
Claims
1. A method for detecting and identifying spatial ellipse features, characterized in that: include: Acquire a color image of the target to be detected, and extract the edge contour of the image; Selecting edge contours that meet preset elliptical arc segment characteristic conditions from edge contours of the image as elliptical arc segments to be clustered, and clustering all elliptical arc segments to be clustered to obtain an elliptical arc segment set corresponding to each category; Ellipse fitting is performed on the ellipse arc segment set corresponding to each category to achieve detection and recognition of the ellipse in the color image of the target to be detected.
2. The method according to claim 1, characterized in that The step of extracting the edge contour of the image comprises: 1) Perform image enhancement on the color image of the target to be detected to obtain an enhanced image; Wherein, the enhanced image is a reflected image of the color image of the target to be detected; The calculation expression of the pixel value of the reflected image pixel corresponding to any pixel point (x, y) in the i-th color channel of the color image of the target to be detected is as follows: Where x is the horizontal coordinate of the pixel, and y is the vertical coordinate of the pixel; S i (x, y) is the pixel value of the pixel point (x, y) in the i-th color channel, C i (x,y) is the color restoration factor of the pixel (x,y) in the i-th color channel, β is the gain constant, α controls the strength of the nonlinearity, S is the number of channels, N is the total number of scales, ω j is the weight corresponding to the jth scale, * indicates convolution operation; G j (x,y) is the Gaussian surround function of the pixel (x,y) at the jth scale, σ j is the scale parameter of the jth scale; Solve to obtain the R corresponding to all pixels in the color image of the target to be detected i (x, y), the reflection image R corresponding to the color image of the target to be detected is obtained. I , R I The image output on any color channel is recorded as Among them, the intensity channel I i is the i-th intensity channel; 2) performing image filtering on the enhanced image to obtain a filtered image; 3) Perform threshold segmentation on the filtered image to obtain a segmented image; 4) Perform edge detection on the segmented image to extract edge contours.
3. The method according to claim 2, characterized in that The image filtering performed on the enhanced image adopts a median filtering method.
4. The method according to claim 2, characterized in that: The threshold segmentation of the filtered image adopts the maximum inter-class difference algorithm, including: The overall average grayscale of the filtered image is μ=μ0w0+μ1w1, where w0 is the ratio of the number of pixels belonging to the foreground in the filtered image to the entire image, μ0 is the average grayscale of the pixels belonging to the foreground, w1 is the ratio of the number of pixels belonging to the background in the filtered image to the entire image, and μ1 is the average grayscale of the pixels belonging to the background; Calculate the inter-class variance σ = w0(μ0-μ) 2 +w1(μ1-μ) 2 =w0w1(μ0-μ1) 2 ; The segmentation threshold of the foreground and background that maximizes the inter-class variance is taken as the optimal threshold, and then the filtered image is segmented using the binary method to obtain the segmented image; the pixel value of any pixel point (x, y) in the segmented image Among them, f(x,y) is the pixel value of any pixel point (x,y) in the filtered image.
5. The method according to claim 2, characterized in that: The performing edge detection on the segmented image comprises: 4-1) Use the Sobel operator to calculate the horizontal gradient G of the segmented image x =S x *P and vertical gradient G y =S y *P; Among them, S x , S y are the Sobel operators in the horizontal and vertical directions respectively, and P represents the segmented image; Calculate the gradient magnitude of the segmented image and direction θ = tan -1 (G y / G x ); 4-2) Using the result of step 4-1), non-maximum suppression is performed on the segmented image to obtain a corresponding binary image; If the gradient amplitude of any pixel in the segmented image is greater than the gradient amplitude of one adjacent pixel in each of the positive and negative gradient directions, the pixel is retained as an edge pixel, otherwise the grayscale value of the pixel is set to 0. 4-3) Performing double threshold hysteresis processing on the binary image after non-maximum suppression, wherein the high and low thresholds are determined by using the image gradient difference histogram and the intra-class variance minimization characteristics; If the gradient value of any edge pixel in the binary image is greater than the high threshold, the pixel is marked as a strong edge pixel and the pixel value of the pixel is set to 255; If the gradient of any edge pixel in the binary image is less than the low threshold, the pixel value of the pixel is set to 0; If the gradient of any edge pixel in the binary image is greater than or equal to the low threshold and less than or equal to the high threshold, the pixel is marked as a weak edge pixel; all weak edge pixels are traversed, where if there is at least one strong edge pixel in the neighborhood of any weak edge pixel, the weak edge pixel is updated to a strong edge pixel, and the pixel value of the weak edge pixel is updated to 255; otherwise, the pixel value of the weak edge pixel is not updated; After all pixels of the binary image are processed, an image containing only edge contours is generated, and the edge contour extraction is completed.
6. The method according to claim 5, characterized in that The method further comprises: The preset elliptical arc segment characteristic conditions include: length condition, angle condition, and convexity condition; The length condition is: if the number of pixel points with a pixel value of 255 contained in any edge contour is greater than or equal to a set number threshold, then the edge contour meets the length condition; The angle condition is: if the angle deviation between contour segments in any edge contour is less than a set angle threshold α, then the edge contour satisfies the angle condition; The convexity condition is: if any edge contour changes along the same direction, then the edge contour satisfies the convexity condition; If any edge contour satisfies the length condition, the angle condition, and the convexity condition at the same time, then the edge contour is an elliptical arc segment to be clustered.
7. The method according to claim 6, characterized in that The performing ellipse fitting on the ellipse arc segment set corresponding to each category respectively includes: For each set of elliptical arc segments, solve the synchronous equations Where λ is the Lagrange multiplier, and vector a = [A, B, C, D, E, F] T , vector a=[A,B,C,D,E,F] T , A, B, C, D, E, F is the general equation of the conic section of the ellipse Ax 2 +2Bxy+Cy 2 +2Dx+2Ey+F=0 parameters; constant constraint matrix Q is the set {p1,p2,,p n } scatter matrix; p i Indicates the pixel point with the i-th pixel value of 255 in the ellipse arc segment set, p i The coordinates are marked as (x i ,y i ), i = 1, 2, ..., n, n represents the total number of pixels in the ellipse arc segment set; Q = D T D, where According to A, B, C, D, E, and F, the parameter expression of the ellipse corresponding to the elliptical arc segment set is as follows: where x c and c They respectively represent the horizontal and vertical coordinates of the center of the ellipse corresponding to the set of elliptical arc segments; a and b respectively represent the semi-major axis and semi-minor axis of the ellipse corresponding to the set of elliptical arc segments, and θ is the angle between the semi-major axis and the positive direction of the x-axis of the coordinate system.
Citation Information
Patent Citations
Edge detection method of Canny operator based on high and low thresholds
CN114399522A
Edge detection method using arbitrary angle
WO2019041590A1
