Guide line identification method and device and computer storage medium

By extracting edge segments in the robot line patrol image and clustering based on angle and distance, the problem of insufficient guidance line recognition accuracy in complex scenarios in the prior art is solved, and a more accurate and robust guide line fit is achieved.

CN120125860APending Publication Date: 2025-06-10ZHEJIANG HUARAY TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510010927.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-03
Publication Date
2025-06-10

AI Technical Summary

Technical Problem

When dealing with complex scenarios, existing robot line patrol recognition technology faces the problems of insufficient guidance line recognition accuracy and inaccurate identification.

Method used

By obtaining the guide line image, extracting the edge line segments, clustering based on the angle difference and distance of the two edge line segments, obtaining the cluster group, and then using each cluster group to fit the corresponding guide line.

Benefits of technology

It improves the accuracy and robustness of guide line fitting, and enhances the guide line recognition ability in complex scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120125860A_ABST
    Figure CN120125860A_ABST
Patent Text Reader

Abstract

The invention provides a guide line recognition method and device and a computer storage medium. The guide line recognition method comprises the steps that a guide line image is acquired; extracting a plurality of edge line segments in the guide line image; clustering is carried out based on the angle difference value and the distance of every two edge line segments, and a plurality of clustering groups are obtained; a corresponding guide line is fitted by using each cluster group, all line segments on two sides of the guide line are clustered through angle clustering and distance clustering for subsequent line segment fitting, the accuracy and robustness of line segment combination clustering are improved, and the completeness of guide line fitting is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of robots, and in particular, to a method and device for identifying a guiding line and a computer storage medium. Background Art

[0002] In the field of mobile robots, visual line following navigation is a key technology that allows a robot to achieve autonomous navigation by recognizing lines or marks on the ground without physical guidance, which is crucial for application scenarios such as automated warehouses, manufacturing factories, and service robots.

[0003] The existing robot line following recognition mainly includes two implementation methods based on deep learning and traditional vision. The advantage of deep learning lies in its strong feature learning ability, but it usually requires a large amount of data annotation and powerful computing resources, with poor real-time performance and generalization ability. Compared with traditional vision, which can achieve real-time processing on ordinary computing platforms and has the advantages of low cost and flexible deployment, it still faces problems of insufficient accuracy in identifying guiding lines and inability to accurately identify in complex scenarios such as fork roads and multiple directions. Summary of the Invention

[0004] The present application provides a method and device for identifying a guiding line and a computer storage medium.

[0005] To solve the above technical problems, the present application proposes a method for identifying a guiding line, which includes: obtaining a guiding line image; extracting a plurality of edge line segments from the guiding line image; clustering based on the angle difference and distance between pairwise edge line segments to obtain a plurality of clustering groups; and fitting a corresponding guiding line using each clustering group.

[0006] Among them, the clustering based on the angle difference and distance between pairwise edge line segments to obtain a plurality of clustering groups includes: obtaining the angle of each edge line segment based on the horizontal and vertical change distances of the endpoints of each edge line segment; obtaining the average distance from the endpoints of one edge line segment to another edge line segment as the distance between the pairwise edge line segments; and dividing two edge line segments that simultaneously satisfy the clustering threshold for the angle difference and the distance into the same clustering group.

[0007] Among them, the fitting of a corresponding guiding line using each clustering group includes: calculating fitting line points using the endpoints of all line segments in each clustering group; calculating the fitting line slope using the variance information of the endpoints of all line segments in each clustering group; and generating a fitting guiding line for the clustering group based on the fitting line points and the fitting line slope.

[0008] Among them, the fitting of a corresponding guiding line using each clustering group includes:

[0009] Divide the clustering group into a first-side clustering group and a second-side clustering group by using the fitting guiding line; fit all line segments in the first-side clustering group to generate a first-side straight line; fit all line segments in the second-side clustering group to generate a second-side straight line; calculate clustering line segment parameters by using the first-side straight line and the second-side straight line; generate the guiding line according to the clustering line segment parameters.

[0010] Among them, the step of dividing the clustering group into a first-side clustering group and a second-side clustering group by using the fitting guiding line includes: determining fitting lane points by using the fitting guiding line; connecting the fitting lane points with the endpoints of each line segment in the clustering group to obtain a first extraction line and a second extraction line; in response to the first extraction line and the second extraction line being located in the clockwise direction of the fitting guiding line, dividing the line segments into the first-side clustering group; in response to the first extraction line and the second extraction line being located in the counterclockwise direction of the fitting guiding line, dividing the line segments into the second-side clustering group.

[0011] Among them, after fitting a corresponding guiding line for each clustering group, the guiding line recognition method further includes: obtaining the number of guiding lines fitted from the guiding line image; determining the line-tracking category of the robot according to the number of guiding lines.

[0012] Among them, the line-tracking categories include a straight-line line-tracking category, an intersection line-tracking category, and / or a fork line-tracking category; the guiding line recognition method includes: in response to the line-tracking category of the robot being the line-tracking category corresponding to at least two guiding lines, obtaining intersection information between two-by-two guiding lines, and direction information at the intersection; among them, the direction information includes the main direction closest to the traveling direction of the robot.

[0013] Among them, the step of obtaining intersection information between two-by-two guiding lines and direction information at the intersection includes: using the intersection of the main guiding line where the main direction is located and the longest guiding line other than the main guiding line as the reference intersection; removing the remaining intersections and their direction information whose distance from the reference intersection is greater than the preset line width condition.

[0014] To solve the above technical problems, the present application proposes a guiding line recognition device, which includes a memory and a processor coupled to the memory; among them, the memory is used to store program data, and the processor is used to execute the program data to implement the above guiding line recognition method.

[0015] To solve the above technical problems, the present application proposes a computer storage medium, which is used to store program data, and when the program data is executed by a computer, it is used to implement the above guiding line recognition method.

[0016] Different from the prior art, the beneficial effects of the present application are as follows: The guiding line recognition device acquires a guiding line image; extracts a plurality of edge line segments from the guiding line image; performs clustering based on the angular difference and distance between two-by-two edge line segments to obtain a plurality of clustering groups; uses each clustering group to fit the corresponding guiding line, and clusters all line segments on both sides of the guiding line through angle clustering and distance clustering for subsequent line segment fitting, increasing the accuracy and robustness of line segment merging clustering and improving the integrity of guiding line fitting. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0018] Figure 1 is a schematic flowchart of the first embodiment of the guiding line recognition method provided by the present application;

[0019] Figure 2 is a schematic diagram of a guiding line mask based on color extraction provided by the present application;

[0020] Figure 3 is a schematic diagram of straight line segment extraction provided by the present application;

[0021] Figure 4 is the Figure 1 schematic flowchart of the sub-steps of step S13 in the guiding line recognition method provided by the present application;

[0022] Figure 5 is a schematic diagram of line segment angle calculation provided by the present application;

[0023] Figure 6 is a schematic diagram of distance calculation between line segments provided by the present application;

[0024] Figure 7 is a schematic diagram of the straight line deviation of the guiding line fitting provided by the present application;

[0025] Figure 8 is a schematic flowchart of the second embodiment of the guiding line recognition method provided by the present application;

[0026] Figure 9 is a schematic diagram of clustering line segment classification provided by the present application;

[0027] Figure 10 is a schematic diagram of the effect of the finally fitted clustering line segments provided by the present application;

[0028] Figure 11It is a schematic diagram of the crossroads recognition effect provided by this application;

[0029] Figure 12 It is a schematic diagram of the recognition effect of a three-way intersection provided by this application;

[0030] Figure 13 It is a schematic diagram of the recognition effect of a four-way intersection provided by this application;

[0031] Figure 14 It is a schematic diagram of the recognition effect of a Y-shaped intersection provided by this application;

[0032] Figure 15 It is a schematic structural diagram of an embodiment of a guiding line recognition device provided by this application;

[0033] Figure 16 It is a schematic structural diagram of an embodiment of a computer storage medium provided by this application. Specific embodiments

[0034] Next, in combination with the drawings in the embodiments of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0035] Among them, the guiding line recognition method of this application is applied to a guiding line recognition device. Among them, the guiding line recognition device of this application can be a server or a system in which the server and the local terminal cooperate with each other. Correspondingly, each part included in the guiding line recognition device, such as each unit, sub-unit, module, and sub-module, can be all set in the server or can be respectively set in the server and the local terminal.

[0036] Furthermore, the above-mentioned server can be hardware or software. When the server is hardware, it can be implemented as a distributed server cluster composed of multiple servers or as a single server. When the server is software, it can be implemented as multiple software or software modules, such as software or software modules used to provide a distributed server, or can be implemented as a single software or software module, which is not specifically limited here. In some possible implementation manners, the guiding line recognition method of the embodiments of this application can be implemented by a processor calling computer-readable instructions stored in a memory.

[0037] This application proposes a guiding line recognition method. Please refer to Figure 1 , Figure 1 It is a schematic flowchart of the first embodiment of the guiding line recognition method provided by this application.

[0038] AsFigure 1 As shown in the figure, the specific steps are as follows:

[0039] Step S11: Obtain the guide line image.

[0040] In the embodiment of the present application, the guide line recognition device can be applied to a robot or a robot system for controlling a robot. The robot is provided with an image acquisition device, and the image acquisition device can be any kind of camera.

[0041] Specifically, the guide line recognition device obtains the guide line image. Among them, in a specific embodiment of the present application, the guide line image can be an image collected by the robot during line following.

[0042] Step S12: Extract several edge line segments from the guide line image to obtain several clustering groups.

[0043] Please refer to Figures 2 - 3 , Figure 2 which is a schematic diagram of the guide line mask provided by the present application based on color extraction, Figure 3 and is a schematic diagram of straight line segment extraction provided by the present application.

[0044] Specifically, in a specific embodiment of the present application, the guide line recognition device segments the mask image of the guide line according to the color, which further facilitates the subsequent extraction of edge line segments.

[0045] Since the commonly used image storage format is RGB, different color information is represented by a combination of red, green, and blue three colors, and different colors are represented by the mixing of color channels, which is not conducive to color recognition. While the HSV format represents the image color by hue, saturation, and value, and it is based on color characteristics, so HSV is more suitable for color differentiation.

[0046] Therefore, in the embodiment of the present application, the guide line recognition device transforms the original image into the HSV format, and generates a guide line mask image through the guide line color region range threshold. As Figure 2 shown, the image will be affected by the ground texture. In the present application, part of the texture information is also extracted as the effective region and filtered out through subsequent operations such as straight line extraction.

[0047] In the mask image, the edge of the guide line region is more regular than that of the noise region. The Canny edge extraction method is used to obtain the edge lines with large gradient information changes in the image, and then the Hough transform is used to identify the edge straight lines, as Figure 3 shown. After the straight line extraction, there are many miscellaneous lines in addition to the edge straight lines of the guide line, which are filtered according to the length of the extracted line segments.

[0048] In other embodiments of the present application, any image segmentation or recognition method can be used to extract the guide line, and the present application does not make specific limitations.

[0049] Step S13: Cluster based on the angular difference and distance between pairwise edge segments.

[0050] Specifically, the present application proposes a specific embodiment for clustering a number of edge segments. For details, please refer to Figure 4 , Figure 4 which is the Figure 1 flow schematic diagram of the sub-steps of step S13 in the guiding line recognition method provided by the present application.

[0051] As Figure 4 shown, the specific steps are as follows:

[0052] Step S131: Obtain the angle of the corresponding edge segment based on the horizontal and vertical change distances of the endpoints of each edge segment.

[0053] Specifically, as Figure 3 shown, the guiding line edge is composed of several line segments. In the embodiment of the present application, the line segments extracted by the guiding line recognition device are clustered according to the angular difference and distance. Multiple small line segments on both edges of one guiding line are clustered into one cluster group.

[0054] Please refer to Figures 5 - 6 , Figure 5 which is the schematic diagram of line segment angle calculation provided by the present application, Figure 6 and Figure 6

[0055]

[0056] 1 is the schematic diagram of line segment distance calculation provided by the present application. In the embodiment of the present application, the angle θ of the edge segment is calculated through the horizontal and vertical change distances of the line segment endpoints. For details, please refer to formula 1.1: 2 The angle range is constrained in (-pi / 2, pi / 2]. The distance between two line segments is calculated through the perpendicular distance from the midpoint of line segment l 2 to another line segment l 1 . Given the coordinates (x 1 , y 2 ) and (x 2 ) of the two endpoints of line segment l

[0057]

[0058] Step S132: Obtain the average distance from the endpoints of one edge segment to another edge segment as the distance between pairwise edge segments.

[0059] Substitute the two endpoints of line segment l 1 into formula 1.3 respectively, and calculate the distances d of the two endpoints to line segment l 2 ​1 , d 2 . The specific formula is as shown in 1.3:

[0060]

[0061] Among them, the line segment distance d = (d 1 + d 2 ) / 2.

[0062] Step S133: Divide two edge line segments whose angle difference and distance both meet the clustering threshold into the same clustering group.

[0063] The guide line recognition device traverses all line segments. If the angle difference between two line segments is less than the set threshold and the distance meets the requirements, the two line segments are added to the same clustering group and marked.

[0064] By the above method, the problem of easy mis - matching caused by clustering only a single edge line can be avoided, and the fitting effect of the guide line can be improved.

[0065] Step S14: Use each clustering group to fit the corresponding guide line.

[0066] Among them, in an embodiment of the present application, the guide line recognition device calculates the fitting line points using the endpoints of all line segments in each clustering group; calculates the fitting line slope using the variance information of the endpoints of all line segments in each clustering group; and generates the fitting guide line of the clustering group based on the fitting line points and the fitting line slope.

[0067] Specifically, each clustering group represents a guide line, and the endpoints of all line segments in the clustering group use the least - squares method to fit the parameters of the clustering line segments. The fitted parameters are composed of the point - slope form, and the x and y means of all endpoints are used to calculate the coordinates (X m , y m ) of the point passing through the fitting line, and the covariance and variance are used to calculate the slope k m of the fitting line.

[0068] Furthermore, set the set of x - coordinates of all endpoints as X = {x 1 , x 2 ,..., x n}, and the set of y - coordinates as Y = {y 1 , y 2 ,..., y n}, then the calculation of the point and the slope is as shown in formulas 1.4 and 1.5, where Cov represents the covariance operation and Var represents the variance operation.

[0069]

[0070]

[0071] The present application designs a method for directly clustering all line segments on the edges of each guiding line. Since the two edges of the guiding line are parallel to each other, the direction intervals between multiple guiding lines are relatively large, and the pixel width of the guiding line is known. By increasing the constraint thresholds of the angle and distance, all line segments on the two sides of the guiding line are directly clustered together for subsequent line segment fitting, which increases the accuracy and robustness of line segment merging clustering and improves the integrity of line segment fitting.

[0072] Further, when the distributions and quantities of the endpoints of the line segments extracted from the two side edges of the guiding line are basically the same, the straight line fitted by using this method is generally consistent with the direction of the guiding line. However, when there are certain differences in the distributions, there is a certain deviation between the direction of the fitted straight line and the direction of the guiding line. As Figure 7 shown, Figure 7 is a schematic diagram of the deviation of the straight line fitted to the guiding line provided by the present application. As shown in the figure, the number of the edge line segments extracted on the upper part of the image on the left side is large, and the number of the edge line segments extracted on the lower part of the image on the right side is large, resulting in the inclination of the fitted straight line. The fitted line segment is located in the middle of the straight lines extracted from the two edges of the guiding line. Therefore, in view of the above problems, the present application uses the position of the extracted line segment relative to the fitted straight line to classify and refine the line segments on the two side edges again, and obtains the straight line parameters of the final clustered line segments according to the fitted lines of the line segments on the two side edges.

[0073] Therefore, the present application proposes an embodiment, which uses the position of the extracted line segment relative to the fitted straight line to classify and refine the line segments on the two side edges again. For details, please refer to Figures 8 - 9 , Figure 8 is a schematic flowchart of the second embodiment of the guiding line recognition method provided by the present application; Figure 9 is a schematic diagram of the classification of clustered line segments provided by the present application.

[0074] As Figure 8 shown, the specific steps are as follows:

[0075] Step S21: Use the fitted guiding line to divide the clustering group into a first-side clustering group and a second-side clustering group.

[0076] Specifically, the guiding line recognition device uses the fitted guiding line to determine the intersection points with the image; connects the intersection points with the endpoints of each line segment in the clustering group to obtain a first extraction line and a second extraction line; in response to the first extraction line and the second extraction line being located in the clockwise direction of the fitted guiding line, divides the line segments into the first-side clustering group; in response to the first extraction line and the second extraction line being located in the counterclockwise direction of the fitted guiding line, divides the line segments into the second-side clustering group.

[0077] Specifically, the straight line parameters of the final clustered line segments are obtained according to the fitted lines of the line segments on the two side edges. By the principle that the cross product signs of the line segments on the same side and the fitted line segments are the same, the clustered line segments are classified into two groups, which are respectively located on both sides of the fitted line.

[0078] As shown in Figure 9 the figure Figure 9 is a schematic diagram of clustering line segment classification provided by this application. Set PQ as the fitting line, AB and CD as the extraction lines. Since both PA and PB are located in the clockwise direction of PQ, the results of PQ×PA and PQ×PB are both less than zero. PC and PD are both located in the counterclockwise direction of PQ, and the results of PQ×PC and PQ×PD are both greater than zero. Therefore, AB and CD are on both sides of the fitting line and do not belong to the same category group.

[0079] Step S22: Fit all line segments in the first-side clustering group to generate a first-side straight line.

[0080] Step S23: Fit all line segments in the second-side clustering group to generate a second-side straight line.

[0081] Step S24: Calculate the clustering line segment parameters using the first-side straight line and the second-side straight line.

[0082] The two groups of classified line segments are fitted again to obtain two straight lines. The mid-values of the line segment endpoints are obtained to acquire refined clustering line segment parameters. As Figure 10 shown in Figure 10 is a schematic diagram of the effect of the finally fitted clustering line segments provided by this application.

[0083] Step S25: Generate a guiding line according to the clustering line segment parameters.

[0084] Further, in an embodiment of this application, after fitting a corresponding guiding line for each clustering group, the guiding line recognition method further includes:

[0085] Obtain the number of guiding lines fitted from the guiding line image; determine the line-following category of the robot according to the number of guiding lines. Among them, the line-following category includes a straight line line-following category, an intersection line-following category, and a fork line-following category.

[0086] Specifically, the straight line parameters calculated by the guiding line recognition device through double line segment clustering fitting are the finally detected guiding lines, and the line-following category of the robot is determined according to the number of recognized guiding lines.

[0087] The guiding line recognition device, in response to the line-following category of the robot being the line-following category corresponding to at least two guiding lines, obtains the intersection information between the pairwise guiding lines and the direction information at the intersection.

[0088] Among them, the direction information includes the main direction closest to the traveling direction of the robot.

[0089] The straight-line parameters calculated after double-segment clustering fitting are the finally detected guiding lines, and the line-tracking category of the robot is determined based on the number of detected guiding lines. When one guiding line is detected, it is a simple straight-line line-tracking category, and the intersection coordinates of the straight line and the image are returned; when multiple guiding lines are detected, the intersection points of the guiding lines and the directional information in each direction at the intersection points are returned. There are fitting and extraction errors and false detections in the recognition of guiding lines. When calculating the intersection points of fork roads, it is easy to obtain multiple intersection points. Therefore, this patent selects the direction of the recognition line segment closest to the vehicle's traveling direction as the main direction and calculates the intersection points of the remaining line segments and the main direction.

[0090] In one embodiment of the present application, a method for obtaining the intersection information between two guiding lines and the directional information at the intersection points is proposed, which is specifically as follows: The guiding line recognition device uses the intersection point of the main guiding line where the main direction is located and the longest fitting line except the main direction as the reference intersection point; the remaining intersection points and their directional information whose distance from the reference intersection point is greater than the preset line width condition are eliminated.

[0091] Specifically, set the intersection point of the longest fitting line except the main direction and the main direction as the reference. If the Euclidean distance between the remaining intersection points and the reference intersection point is greater than γ times the line width in pixels, it is considered an abnormal intersection point, and the intersection point and the corresponding recognized line information are eliminated, thereby reducing the influence of false detections.

[0092] As Figures 11 - 14 Show the effect of recognizing fork roads. Figure 11 is a schematic diagram of the intersection recognition effect provided by the present application, Figure 12 is a schematic diagram of the three-way intersection recognition effect provided by the present application; Figure 13 is a schematic diagram of the four-way intersection recognition effect provided by the present application; Figure 14 is a schematic diagram of the Y-shaped intersection recognition effect provided by the present application.

[0093] The present application uses a double-fitting method to improve the correctness of guiding line fitting. After clustering, the line segments first fit the initial straight-line parameters by the least squares method. According to the relative positions of the clustering line segments on the fitting straight line, they are grouped and fitted again to accurately fit the edge straight lines of the guiding lines, and the parameters of the final guiding line are obtained by calculating the midline.

[0094] Furthermore, the present application determines the line-tracking category in different situations according to the number of recognized guiding lines, so that this patent can be used to recognize complex fork road situations and expand the application scenarios of robot line tracking.

[0095] To implement the guiding line recognition method in the above embodiment, the present application also provides a guiding line recognition device. For details, please refer to Figure 15 , Figure 15 is a schematic structural diagram of an embodiment of the guiding line recognition device provided by the present application.

[0096] As shown Figure 15 shown, the guiding line recognition device 600 of this embodiment includes a processor 61, a memory 62, an input / output device 63, and a bus 64.

[0097] The processor 61, the memory 62, and the input / output device 63 are respectively connected to the bus 64. A computer program is stored in the memory 62, and the processor 61 is configured to execute the computer program to implement the guiding line recognition method of the above embodiment.

[0098] In this embodiment, the processor 61 may also be referred to as a CPU (Central Processing Unit). The processor 61 may be an integrated circuit chip with signal processing capabilities. The processor 61 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The processor 61 may also be a GPU (Graphics Processing Unit), also known as a display core, a visual processor, a display chip, which is a microprocessor dedicated to image computing on computers, workstations, game consoles, and some mobile devices (such as tablet computers, smart phones, etc.). The purpose of the GPU is to convert and drive the display information required by the computer system and provide a line scan signal to the display to control the correct display of the display. It is an important component connecting the display and the computer motherboard. As an important part of the computer host, the graphics card undertakes the task of outputting and displaying graphics. The general-purpose processor may be a microprocessor or the processor 61 may also be any conventional processor, etc.

[0099] This application also provides a computer storage medium, as Figure 16 shown, the computer storage medium 700 is used to store a computer program 71. When the computer program 71 is executed by the processor, it is used to implement the method described in the guiding line recognition method embodiment of this application.

[0100] In the embodiments of the method for identifying a guiding wire in this application, when the method involved exists in the form of a software functional unit and is sold or used as an independent product, it can be stored in a device, such as a computer-readable storage medium. Based on such an understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs.

[0101] The above are only the embodiments of the present invention, and do not limit the patent scope of the present invention accordingly. Any equivalent structural or equivalent process transformation made by using the content of the specification and drawings of the present invention, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of the present invention.

Claims

1. A guide line recognition method, characterized in that: The guide line recognition method comprises: Acquire a guide line image; Extracting a plurality of edge line segments in the guide line image; Clustering is performed based on the angle difference and distance between two edge segments to obtain several clustering groups; Use each cluster group to fit the corresponding guide line.

2. The guide line recognition method according to claim 1, characterized in that: The clustering is performed based on the angle difference and distance of each pair of edge segments to obtain a number of cluster groups, including: Obtain the angle of the corresponding edge segment based on the horizontal and vertical change distances of the endpoints of each edge segment; Obtaining the average value of the distance from the endpoint of one edge segment to another edge segment as the distance between the two edge segments; Two edge line segments whose angle difference and distance both meet the clustering threshold are divided into the same cluster group.

3. The guide line recognition method according to claim 1, characterized in that: The method of fitting a corresponding guide line position using each cluster group includes: Calculating fitting line points using the endpoints of all line segments in each cluster group; Calculate the slope of the fitting line using the variance information of the endpoints of all line segments in each cluster group; Based on the fitted line points and the fitted line slope, a fitted guide line position of the cluster group is generated.

4. The guide line recognition method according to claim 3, characterized in that: The method of fitting a corresponding guide line using each cluster group includes: Dividing the cluster group into a first side cluster group and a second side cluster group by using the fitting guide line; Fitting all line segments in the first side cluster group to generate a first side straight line; Fitting all line segments in the second side clustering group to generate a second side straight line; Calculating clustering guide line segment parameters using the first side straight line and the second side straight line; The guide line is generated according to the clustering line segment parameters.

5. The guide line recognition method according to claim 4, characterized in that: The step of dividing the cluster group into a first side cluster group and a second side cluster group by using the fitting guide line comprises: Determine the fitting point using the fitting guide line; Connecting the fitting point with the endpoints of each line segment in the cluster group to obtain a first extracted line and a second extracted line; In response to the first extraction line and the second extraction line being located in a clockwise direction of the fitting guide line, dividing the line segment into the first side clustering group; In response to the first extraction line and the second extraction line being located in a counterclockwise direction of the fitting guide line, the line segment is divided into the second side clustering group.

6. The guide line recognition method according to claim 1, characterized in that: After fitting the corresponding guide line using each cluster group, the guide line identification method further includes: Obtaining the number of guide lines fitted by the guide line image; The line patrol category of the robot is determined according to the number of guide lines.

7. The guide line recognition method according to claim 6, characterized in that: The patrol line categories include straight line patrol category, intersection patrol category, and fork road patrol category; The guide line recognition method comprises: In response to the line patrol category of the robot being the line patrol category corresponding to at least two guide lines, obtaining intersection information between two guide lines and direction information at the intersection; The direction information includes a main direction closest to the moving direction of the robot.

8. The guide line recognition method according to claim 7, characterized in that: The obtaining of intersection information between two guide lines and direction information at the intersections includes: The intersection of the main guide line where the main direction is located and the longest guide line other than the main guide line is taken as the reference intersection point; The remaining intersection points and their direction information whose distances from the reference intersection point are greater than a preset line width condition are eliminated.

9. A guide line identification device, characterized in that: The guide wire identification device includes a memory and a processor coupled to the memory; The memory is used to store program data, and the processor is used to execute the program data to implement the guide line identification method as described in any one of claims 1 to 8.

10. A computer storage medium, characterized in that: The computer storage medium is used to store program data, and when the program data is executed by a computer, it is used to implement the guide line recognition method as described in any one of claims 1 to 8.