A linear feature recognition method and system in complex environment based on wireframe model

By employing a wireframe-based approach, including image distortion correction, filtering, grayscale transformation, and linear fitting, the accuracy and stability issues of linear feature recognition in complex environments are addressed, achieving efficient linear feature recognition.

CN114155169BActive Publication Date: 2024-11-22XIAN UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111516898.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-13
Publication Date
2024-11-22
Estimated Expiration
2041-12-13

AI Technical Summary

Technical Problem

In complex environments, existing technologies struggle to achieve rapid, stable, and accurate recognition of linear features, as external factors have a significant impact on image features.

Method used

The method employs a wireframe model-based approach, which includes steps such as image distortion correction, Gaussian filtering, grayscale transformation, contour detection, wireframe model establishment and screening, and linear fitting, to eliminate the influence of external factors and improve recognition accuracy.

Benefits of technology

It achieves anti-interference and accuracy of linear feature recognition under high dust, low illumination and complex backgrounds, and improves recognition efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114155169B_ABST
    Figure CN114155169B_ABST
Patent Text Reader

Abstract

The present invention relates to a linear feature recognition method and system in a complex environment based on a wireframe model, the method comprising: real-time acquisition of image information to obtain an original image; distortion correction of the original image; Gaussian filtering of the distortion-corrected original image; grayscale transformation of the Gaussian-filtered image to obtain a binary image; contour detection of the binary image to obtain the coordinates of each contour point; establishment of a wireframe model based on the wireframe model to filter the coordinates of the contour points; linear fitting of the filtered coordinates of the contour points. The above method in the present invention can eliminate the influence of external factors on image features and realize fast, stable and accurate recognition of linear features.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of machine vision and intelligent perception, and in particular to a linear feature recognition method and system in a complex environment based on a wireframe model. Background Art

[0002] Machine vision is known as the "smart eye" of intelligent manufacturing and intelligent perception, opening up a new "visual" world for intelligent manufacturing and intelligent perception. Feature recognition, as an important concept in machine vision and image processing, identifies the most basic attributes or features of an image. Its core is how to find the target shape in the image.

[0003] As an important form of image features, linear features present different levels in different occasions. The technology and process of dividing images into regions with linear characteristics and extracting linear targets of interest is an important part of image processing and computer vision, an important way to understand images, and a necessary link in research fields and applications such as image tracking, matching, and positioning.

[0004] Therefore, in complex environments such as machine vision positioning, lane line detection, matching tracking, and intelligent perception, it is crucial to eliminate the influence of external factors on image features and achieve fast, stable, and accurate recognition of linear features. Summary of the invention

[0005] The purpose of the present invention is to provide a linear feature recognition method and system in a complex environment based on a wireframe model, which can eliminate the influence of external factors on image features and realize fast, stable and accurate recognition of linear features.

[0006] To achieve the above object, the present invention provides the following solutions:

[0007] A linear feature recognition method in a complex environment based on a wireframe model, the method comprising:

[0008] Collect image information in real time to obtain original images;

[0009] Performing distortion correction on the original image;

[0010] Performing Gaussian filtering on the original image after distortion correction;

[0011] Performing grayscale transformation on the Gaussian filtered image to obtain a binary image;

[0012] Performing contour detection on the binary image to obtain the coordinates of each contour point;

[0013] Create wireframe models;

[0014] Based on the wireframe model, the coordinates of the contour points are screened;

[0015] The coordinates of the filtered contour points are linearly fitted.

[0016] Optionally, the real-time acquisition of image information to obtain the original image specifically involves using a wide-angle camera to acquire image information in real time.

[0017] Optionally, performing distortion correction on the original image specifically includes the following steps:

[0018] Construct an empty image;

[0019] Taking the empty image as the dedistorted image g(x,y);

[0020] For each point coordinate of the original image m[uv 1] T , left multiply the internal parameter matrix K -1 Get the normalized coordinate m n [x n y n 1] T ;

[0021] Distorted normalized coordinates using the distortion model Then multiply the internal parameter matrix K on the left to get the corresponding distortion coordinates Interpolation method for distorted coordinates Get the pixel value and assign it to the pixel value of the empty image to get the corrected image.

[0022] Optionally, the Gaussian filtering is performed on the original image after the distortion correction by using the following formula:

[0023]

[0024] Where k(x,y) is the image after Gaussian filtering, g(x,y) is the rectified image, and H(r,s) is the response of the two-dimensional zero-mean Gaussian filter.

[0025] Optionally, grayscale transformation is performed on the Gaussian filtered image to obtain a binary image using the following formula:

[0026]

[0027] Among them, v(x,y) is a binary image, k(x,y) is the image after Gaussian filtering, threshold is the binarization threshold, and A is the image grayscale.

[0028] Optionally, the filtering of the coordinates of the contour points based on the wireframe model specifically includes the following steps:

[0029] Draw the minimum circumscribed rectangle of the contour through the coordinates of each outer point of the contour;

[0030] The minimum bounding rectangle area is screened and the area rectangles are aggregated.

[0031] Optionally, drawing the minimum circumscribed rectangle of the contour through the coordinates of each outer point of the contour specifically includes:

[0032] Find the coordinates of the four vertices of each contour;

[0033] Connecting the coordinates of the four vertices gives the minimum circumscribed rectangle of the contour;

[0034] Calculate the length a, width b and aspect ratio a / b of each minimum circumscribed rectangle;

[0035] Add the left vertex and the right vertex of the four vertices of the minimum circumscribed rectangle to obtain the average points p1(x1, y1) and p2(x2, y2);

[0036] Calculate the angle of the minimum circumscribed rectangle through p1(x1,y1) and p2(x2,y2):

[0037]

[0038] Optionally, screening the minimum bounding rectangle area and aggregating the area rectangles specifically includes:

[0039] Set the minimum circumscribed rectangle aspect ratio a / b and angle difference d as the screening conditions;

[0040] The circumscribed rectangular contour area that meets the screening conditions is retained, and classified based on the angle c / classification number f;

[0041] All the circumscribed rectangular contour areas in each category are spliced ​​and aggregated, that is, a large circumscribed rectangle is used to contain all the small circumscribed rectangles, and all the contour coordinate points (x, y) of this category are continuous, so that the circumscribed rectangles are connected into a large rectangular area.

[0042] Optionally, the linear fitting of the coordinates of the filtered contour points is specifically performed using the following formula:

[0043] y=kx+b

[0044]

[0045] Among them, x i ,y i is the coordinate value of the i-th pixel, and n is the total number of pixels.

[0046] The present invention further provides a linear feature recognition system in a complex environment based on a wireframe model, the system comprising:

[0047] An image acquisition module is used to acquire image information in real time and obtain the original image;

[0048] A distortion correction module, used for performing distortion correction on the original image;

[0049] A Gaussian filtering module, used for performing Gaussian filtering on the original image after distortion correction;

[0050] A grayscale transformation module, used for performing grayscale transformation on the image after Gaussian filtering to obtain a binary image;

[0051] A contour detection module, used to perform contour detection on the binary image to obtain the coordinates of each contour point;

[0052] A wireframe model building module, used to build a wireframe model;

[0053] A screening module, used for screening the coordinates of the contour points based on the wireframe model;

[0054] Linear fitting module, used to perform linear fitting on the coordinates of the filtered contour points

[0055] According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects:

[0056] The present invention provides a linear feature recognition method with strong anti-interference ability. By establishing a wireframe model for image features in high dust, low illumination, and complex background environments, the effects of stray light filtering, regional connectivity, and feature enhancement are achieved, the anti-interference, high efficiency, and accuracy of linear feature recognition are improved, and the problem of linear feature extraction in complex environments in different occasions is solved. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0058] Figure 1 This is a flow chart of a linear feature recognition method in a complex environment based on a wireframe model according to an embodiment of the present invention;

[0059] Figure 2 This is a schematic diagram of an original image according to an embodiment of the present invention;

[0060] Figure 3 This is a schematic diagram of an embodiment of the present invention after distortion correction;

[0061] Figure 4This is a schematic diagram of an embodiment of the present invention after Gaussian filtering;

[0062] Figure 5 It is a schematic diagram of an embodiment of the present invention after binarization;

[0063] Figure 6 A schematic diagram of a circumscribed rectangle according to an embodiment of the present invention;

[0064] Figure 7 It is a schematic diagram of a wireframe model of an embodiment of the present invention;

[0065] Figure 8 This is a schematic diagram of straight line fitting according to an embodiment of the present invention;

[0066] Fig. 9 The present invention is a schematic diagram of the structure of a linear feature recognition system in a complex environment based on a wireframe model according to an embodiment of the present invention. DETAILED DESCRIPTION

[0067] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0068] The purpose of the present invention is to provide a linear feature recognition method and system in a complex environment based on a wireframe model, which can eliminate the influence of external factors on image features and realize fast, stable and accurate recognition of linear features.

[0069] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0070] Figure 1 FIG. 1 is a flow chart of a linear feature recognition method in a complex environment based on a wireframe model according to an embodiment of the present invention. Figure 1 As shown, the method includes:

[0071] S101: Collect image information in real time to obtain an original image.

[0072] Specifically, the original image f(x,y) is obtained through a wide-angle camera, and the camera perspective is defined as CV-perspective. The original image is as follows Figure 2 shown.

[0073] S102: Perform distortion correction on the original image.

[0074] That is, find the pixel value relationship of the corresponding point pair, assign the pixel value of the distorted position to the original position to obtain the corrected image g(x,y). The specific steps are as follows:

[0075] Construct an empty image as the dedistorted image g(x,y), for each point coordinate m[uv 1] of the original image T , left multiply the internal parameter matrix K -1 Get the normalized coordinate m n [x n y n 1] T , using the distorted normalized coordinates of the distortion model Then multiply the internal parameter matrix K on the left to get the corresponding distortion coordinates Interpolation method for distorted coordinates Get the pixel value, assign it to the pixel value, and you get the corrected image. The specific image is as follows Figure 3 shown.

[0076] S103: Performing Gaussian filtering on the original image after distortion correction.

[0077] Gaussian filtering is performed on the distortion-corrected image to eliminate Gaussian noise and achieve noise reduction effect.

[0078] Assume that the response of a two-dimensional zero-mean Gaussian filter is H(r,s), and Gaussian filtering is performed on the rectified image g(x,y) to obtain the filtered output image k(x,y). The specific image is as follows Figure 4 As shown:

[0079]

[0080] S104: performing grayscale transformation on the Gaussian filtered image to obtain a binary image.

[0081] Perform grayscale transformation on the Gaussian filter output image k(x,y) and output a binary image v(x,y), where threshold represents the binarization threshold, ranging from 0 to 255:

[0082]

[0083] S105: Perform contour detection on the binary image to obtain the coordinates of each contour point.

[0084] Detect all contours in the binary image v(x,y) and record the coordinates (x,y) of each contour point.

[0085] S106: Create a wireframe model.

[0086] S107: Based on the wireframe model, the coordinates of the contour points are screened.

[0087] In order to achieve accurate linear feature fitting based on contour information, the contour needs to be processed. Therefore, a wireframe model is established. The specific steps are as follows:

[0088] ① Draw the minimum circumscribed rectangle of the contour through the coordinates of each outer point of the contour

[0089] Find the coordinates of the four vertices of each contour;

[0090] Connecting the coordinates of the four vertices gives the minimum circumscribed rectangle of the contour;

[0091] Calculate the length (a), width (b) and aspect ratio (a / b) of each minimum enclosing rectangle;

[0092] Add the left and right vertices of the four vertices of the minimum circumscribed rectangle and take the average points p1(x1,y1) and p2(x2,y2);

[0093] Calculate the angle of the minimum circumscribed rectangle through p1(x1,y1) and p2(x2,y2):

[0094]

[0095] ② Circumscribed rectangle area screening and area rectangle aggregation

[0096] Set the minimum circumscribed rectangle aspect ratio (a / b) and angle difference (d) as the screening conditions;

[0097] The circumscribed rectangular contour areas that meet the screening conditions are retained and classified based on the angle (c) / number of classifications (f);

[0098] All the circumscribed rectangular contour areas in each category are spliced ​​and aggregated, that is, a large circumscribed rectangle is used to contain all the small circumscribed rectangles, and all the contour coordinate points (x, y) of this category are continuous, so that the circumscribed rectangles are connected into a large rectangular area.

[0099] S108: The coordinates (x n ,y n ) for linear fitting.

[0100] ① Assume the equation of the fitted line is: y = kx + b

[0101] ②Calculate the square deviation:

[0102]

[0103] ③ Calculate partial derivatives of k and b respectively;

[0104] Depend on have to:

[0105]

[0106] From the above formula, we can get:

[0107]

[0108] Simplify the above formula by cross-multiplying it:

[0109]

[0110] From the above formula, we can get:

[0111]

[0112] ④ The coefficients k and b in step ① can be obtained from step ③, so the fitting straight line can be obtained.

[0113] Fig. 9 FIG. 1 is a schematic diagram of a linear feature recognition system in a complex environment based on a wireframe model according to an embodiment of the present invention. Fig. 9 As shown, the system comprises:

[0114] The image acquisition module 201 is used to acquire image information in real time and obtain the original image;

[0115] A distortion correction module 202, used for performing distortion correction on the original image;

[0116] A Gaussian filtering module 203, configured to perform Gaussian filtering on the original image after distortion correction;

[0117] A grayscale transformation module 204 is used to perform grayscale transformation on the Gaussian filtered image to obtain a binary image;

[0118] The contour detection module 205 is used to perform contour detection on the binary image to obtain the coordinates of each contour point;

[0119] A wireframe model building module 206, used to build a wireframe model;

[0120] A screening module 207, configured to screen the coordinates of the contour points based on the wireframe model;

[0121] The linear fitting module 208 is used to perform linear fitting on the coordinates of the filtered contour points.

[0122] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0123] The principles and implementation methods of the present invention are described in this article using specific examples. The description of the above embodiments is only used to help understand the method and core idea of ​​the present invention. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. A linear feature recognition method in a complex environment based on a wireframe model, characterized in that: The method comprises: Collect image information in real time to obtain the original image; Performing distortion correction on the original image; Performing Gaussian filtering on the original image after distortion correction; Performing grayscale transformation on the Gaussian filtered image to obtain a binary image; Performing contour detection on the binary image to obtain the coordinates of each contour point; Create wireframe models; Based on the wireframe model, the coordinates of the contour points are screened; Perform linear fitting on the coordinates of the filtered contour points; The filtering of the coordinates of the contour points based on the wireframe model specifically comprises the following steps: Draw the minimum circumscribed rectangle of the contour through the coordinates of each outer point of the contour; Screening the minimum circumscribed rectangular area and performing regional rectangle aggregation; The method of drawing the minimum circumscribed rectangle of the contour through the coordinates of each outer point of the contour specifically includes: Find the coordinates of the four vertices of each contour; Connecting the coordinates of the four vertices gives the minimum circumscribed rectangle of the contour; Calculate the length a, width b and aspect ratio a / b of each minimum circumscribed rectangle; Add the left vertex and the right vertex of the four vertices of the minimum circumscribed rectangle to obtain the average points p1(x1, y1) and p2(x2, y2); Calculate the angle of the minimum circumscribed rectangle through p1(x1,y1) and p2(x2,y2): Screening the minimum bounding rectangle area and aggregating the area rectangles specifically include: Set the minimum circumscribed rectangle aspect ratio a / b and angle difference d as the screening conditions; The circumscribed rectangular contour area that meets the screening conditions is retained, and classified based on the angle c / classification number f; All the circumscribed rectangular contour areas in each category are spliced ​​and aggregated, that is, a large circumscribed rectangle is used to contain all the small circumscribed rectangles, and all the contour coordinate points (x, y) of this category are continuous, so that the circumscribed rectangles are connected into a large rectangular area.

2. The linear feature recognition method in a complex environment based on a wireframe model according to claim 1, characterized in that: The real-time acquisition of image information to obtain the original image specifically involves using a wide-angle camera to acquire image information in real time.

3. The linear feature recognition method in a complex environment based on a wireframe model according to claim 1, characterized in that: The distortion correction of the original image specifically comprises the following steps: Construct an empty image; Taking the empty image as the dedistorted image g(x,y); For each point coordinate of the original image m[uv 1] T , left multiply the internal parameter matrix K -1 Get the normalized coordinate m n [x n y n 1] T ; Distorted normalized coordinates using the distortion model Then multiply the internal parameter matrix K on the left to get the corresponding distortion coordinates Interpolation method for distorted coordinates Get the pixel value and assign it to the pixel value of the empty image to get the corrected image.

4. The linear feature recognition method in a complex environment based on a wireframe model according to claim 1, characterized in that: The following formula is specifically used to perform Gaussian filtering on the original image after distortion correction: Where k(x,y) is the image after Gaussian filtering, g(x,y) is the rectified image, and H(r,s) is the response of the two-dimensional zero-mean Gaussian filter.

5. The linear feature recognition method in a complex environment based on a wireframe model according to claim 1, characterized in that: The grayscale transformation of the Gaussian filtered image is performed to obtain a binary image using the following formula: Among them, v(x,y) is a binary image, k(x,y) is the image after Gaussian filtering, threshold is the binarization threshold, and A is the image grayscale.

6. The linear feature recognition method in a complex environment based on a wireframe model according to claim 1, characterized in that: The linear fitting of the coordinates of the filtered contour points is specifically performed using the following formula: y=kx+b Among them, x i ,y i is the coordinate value of the i-th pixel, and n is the total number of pixels.

7. A linear feature recognition system in a complex environment based on a wireframe model, characterized in that: The system comprises: An image acquisition module is used to acquire image information in real time and obtain the original image; A distortion correction module, used for performing distortion correction on the original image; A Gaussian filtering module, used for performing Gaussian filtering on the original image after distortion correction; A grayscale transformation module, used for performing grayscale transformation on the image after Gaussian filtering to obtain a binary image; A contour detection module, used to perform contour detection on the binary image to obtain the coordinates of each contour point; A wireframe model building module, used to build a wireframe model; A screening module, used for screening the coordinates of the contour points based on the wireframe model; The linear fitting module is used to perform linear fitting on the coordinates of the filtered contour points; The filtering of the coordinates of the contour points based on the wireframe model specifically comprises the following steps: Draw the minimum circumscribed rectangle of the contour through the coordinates of each outer point of the contour; Screening the minimum circumscribed rectangular area and performing regional rectangle aggregation; The method of drawing the minimum circumscribed rectangle of the contour through the coordinates of each outer point of the contour specifically includes: Find the coordinates of the four vertices of each contour; Connecting the coordinates of the four vertices gives the minimum circumscribed rectangle of the contour; Calculate the length a, width b and aspect ratio a / b of each minimum circumscribed rectangle; Add the left vertex and the right vertex of the four vertices of the minimum circumscribed rectangle to obtain the average points p1(x1, y1) and p2(x2, y2); Calculate the angle of the minimum circumscribed rectangle through p1(x1,y1) and p2(x2,y2): Screening the minimum bounding rectangle area and aggregating the area rectangles specifically include: Set the minimum circumscribed rectangle aspect ratio a / b and angle difference d as the screening conditions; The circumscribed rectangular contour area that meets the screening conditions is retained, and classified based on the angle c / classification number f; All the circumscribed rectangular contour areas in each category are spliced ​​and aggregated, that is, a large circumscribed rectangle is used to contain all the small circumscribed rectangles, and all the contour coordinate points (x, y) of this category are continuous, so that the circumscribed rectangles are connected into a large rectangular area.