Reference angle determination method and apparatus, device, and storage medium

By acquiring images from the top of the mobile robot, performing line segment extraction and clustering, and calculating reference angles, the high cost and high latency issues of determining reference angles for indoor mobile robots in existing technologies are solved, enabling efficient and low-cost indoor path planning and pose adjustment.

CN116434049BActive Publication Date: 2026-06-19ZHEJIANG SINEVA INTELLIGENT TECH CO LTD +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHEJIANG SINEVA INTELLIGENT TECH CO LTD
Filing Date
2021-12-31
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Existing mobile robots lack efficient and low-latency methods for determining reference angles in indoor environments, which makes path planning and pose adjustment difficult. Existing solutions rely on laser scanning or multi-frame image processing, which are costly and ineffective.

Method used

A single image is acquired through the image acquisition device on top of the mobile robot. Line segments are extracted, invalid line segments are filtered out, and clustering is performed to determine the target line segment cluster. Reference angles are calculated based on the line segment angles to provide a motion reference.

Benefits of technology

It enables reference angle calculation with low latency and low computing power requirements, improving the efficiency of path planning and pose adjustment for mobile robots, and reducing hardware costs and computing burden.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116434049B_ABST
    Figure CN116434049B_ABST
Patent Text Reader

Abstract

This invention discloses a method, apparatus, device, and storage medium for determining a reference angle. The method includes: acquiring an image to be processed using an image acquisition device located on top of a mobile robot; extracting line segments from the image to be processed and filtering out line segments that meet a first preset condition to obtain a target line segment set, wherein the line segments meeting the first preset condition include line segments representing target contour lines on indoor objects, and the angle difference between the target contour line and the perpendicular line to the working plane where the mobile robot is located is less than a preset angle threshold; clustering the line segments in the target line segment set based on the angle differences between the line segments, and determining target line segment clusters based on the clustering results; and determining a target reference angle based on the angles of the line segments in the target line segment clusters. This invention can complete the image angle calculation using only a single top-view image, achieving a significant reduction in computational latency and computational power requirements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of computer technology, and in particular to a method, apparatus, device and storage medium for determining a reference angle. Background Technology

[0002] A robot is an intelligent machine capable of semi-autonomous or fully autonomous operation. With the development of robot technology, robots are constantly evolving in various aspects such as mechanical structure, function, and appearance.

[0003] Currently, various types of robots are widely used in various fields. One type of robot, capable of autonomous movement, can be called a mobile robot. Mobile robots can be further classified according to their working environment, including robots that work in indoor environments, such as robotic vacuum cleaners used for floor cleaning. When mobile robots work indoors, their initial movement depends entirely on their orientation, posing significant challenges to subsequent path planning and edge-keeping. Most existing solutions rely on laser scanning of the entire environment or using multi-frame images for orientation correction, which requires high hardware costs or significant latency, resulting in unsatisfactory performance and requiring improvement. Summary of the Invention

[0004] The embodiments of the present invention provide a reference angle determination method, apparatus, device and storage medium, which can quickly and accurately provide a reference angle for the movement of mobile robots working indoors.

[0005] In a first aspect, embodiments of the present invention provide a method for determining a reference angle, including:

[0006] An image to be processed is acquired by an image acquisition device located on top of the mobile robot, wherein the image to be processed contains indoor environmental information above the mobile robot;

[0007] Line segments are extracted from the image to be processed to obtain an initial set of line segments;

[0008] The initial set of line segments is filtered out to obtain a target set of line segments, wherein the line segments that satisfy the first preset condition include line segments used to characterize the target contour line on an indoor object, and the angle difference between the target contour line and the perpendicular line of the working plane where the mobile robot is located is less than a preset angle threshold.

[0009] The line segments in the target line segment set are clustered based on the angle difference between line segments, and the target line segment cluster is determined based on the clustering results;

[0010] A target reference angle is determined based on the angles of the line segments in the target line segment cluster, wherein the target reference angle is used to provide a reference for the movement of the mobile robot.

[0011] Secondly, embodiments of the present invention provide a reference angle determining device, comprising:

[0012] An image acquisition module is used to acquire an image to be processed through an image acquisition device located on top of the mobile robot, wherein the image to be processed contains indoor environmental information above the mobile robot;

[0013] The line segment extraction module is used to extract line segments from the image to be processed to obtain an initial set of line segments.

[0014] The line segment filtering module is used to filter out line segments that meet the first preset condition from the initial line segment set to obtain a target line segment set. The line segments that meet the first preset condition include line segments that characterize the target contour line on an indoor object. The angle difference between the target contour line and the perpendicular line of the working plane where the mobile robot is located is less than a preset angle threshold.

[0015] The line segment clustering module is used to cluster the line segments in the target line segment set based on the angle difference between line segments, and to determine the target line segment cluster based on the clustering results;

[0016] An angle determination module is used to determine a target reference angle based on the angles of the line segments in the target line segment cluster, wherein the target reference angle is used to provide a reference for the movement of the mobile robot.

[0017] Thirdly, embodiments of the present invention provide a mobile robot, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the reference angle determination method provided in the embodiments of the present invention.

[0018] Fourthly, embodiments of the present invention provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the reference angle determination method provided in embodiments of the present invention.

[0019] The reference angle determination scheme provided in this embodiment of the invention acquires an image to be processed using an image acquisition device located on top of a mobile robot. The image to be processed contains indoor environmental information above the mobile robot. Line segments are extracted from the image to be processed to obtain an initial set of line segments. Line segments that meet a first preset condition are filtered out from the initial set of line segments to obtain a target set of line segments. The line segments that meet the first preset condition include line segments representing target contour lines on indoor objects, and the angle difference between the target contour line and the perpendicular line to the working plane where the mobile robot is located is less than a preset angle threshold. The line segments in the target set are clustered based on the angle differences between the line segments, and target line segment clusters are determined according to the clustering results. A target reference angle is determined based on the angles of the line segments in the target line segment clusters, whereby the target reference angle is used to provide a reference for the movement of the mobile robot. This embodiment of the invention can complete the image angle calculation using only a single top-view image, achieving a significant reduction in computational latency and computational power requirements. Attached Figure Description

[0020] Figure 1 A flowchart illustrating a method for determining a reference angle provided in an embodiment of the present invention;

[0021] Figure 2 A flowchart illustrating another method for determining a reference angle provided in an embodiment of the present invention;

[0022] Figures 2a-2f An example of determining the reference angle provided in an embodiment of the present invention is shown in the diagram.

[0023] Figure 3 A structural block diagram of a reference angle determining device provided in an embodiment of the present invention;

[0024] Figure 4 This is a structural block diagram of a mobile robot provided in an embodiment of the present invention. Detailed Implementation

[0025] The technical solution of the present invention will be further described below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are merely for explaining the present invention and not for limiting the present invention. Furthermore, it should be noted that, for ease of description, only the parts related to the present invention are shown in the drawings, not the entire structure.

[0026] Before discussing the exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe the steps as sequential processes, many of these steps can be performed in parallel, concurrently, or simultaneously. Furthermore, the order of the steps can be rearranged. The process can be terminated when its operation is complete, but may also have additional steps not included in the figures. The process can correspond to a method, function, procedure, subroutine, subroutine, etc.

[0027] Example 1

[0028] Figure 1 This is a flowchart illustrating a reference angle determination method provided in an embodiment of the present invention. The method can be executed by a reference angle determination device, which can be implemented by software and / or hardware, and is generally integrated into a mobile robot. The type of mobile robot is not limited; it can operate indoors, such as a robotic vacuum cleaner or other robot used for floor cleaning. Figure 1 As shown, the method includes:

[0029] S110. Acquire the image to be processed through the image acquisition device located on top of the mobile robot.

[0030] The image to be processed contains information about the indoor environment above the mobile robot.

[0031] For example, the solution of this embodiment of the invention is used to determine a target reference angle, which provides a reference for the movement of the mobile robot and can be regarded as the direction angle indicated in a visual compass. Specifically, the target reference angle can be understood as the angle between the forward direction of the mobile robot and a preset boundary of the working range, where the preset boundary can be any boundary. The working range is generally the mobile robot's movable range indoors, and can be determined, for example, based on the intersection of a wall and the ground. After obtaining the target reference angle, it is easier for the mobile robot to determine its own posture adjustment method, such as how to maintain parallelism with the preset boundary by adjusting its forward direction, thereby facilitating path planning. The forward direction of the mobile robot can be determined, for example, based on the perpendicular direction of the line connecting the two corresponding wheels.

[0032] In this embodiment of the invention, an image acquisition device such as a camera mounted on top of a mobile robot can capture images containing indoor environmental information above the robot as images to be processed. The image information above is relatively easy to acquire, and there are fewer obstructions, making it easier to obtain the most comprehensive and clear indoor environmental image. By performing relevant processing and recognition on the images to be processed, a target reference angle can be determined.

[0033] For example, this step can be performed when the mobile robot starts up or during movement in order to dynamically correct its own pose.

[0034] S120. Line segment extraction is performed on the image to be processed to obtain an initial set of line segments.

[0035] Line segments can be extracted from the image using a preset line segment extraction algorithm; the specific algorithm is not limited. Before using this algorithm, the image can be preprocessed to ensure accurate line segment extraction.

[0036] Optionally, this step may include: preprocessing the image to be processed to obtain a target image, wherein the preprocessing includes grayscale processing and / or distortion correction processing; and using a preset line segment extraction algorithm to extract line segments from the target image to obtain an initial set of line segments.

[0037] Specifically, grayscale conversion involves unifying the RGB values ​​of each pixel on a line segment to the same value. After grayscale conversion, the line segment changes from three channels to a single channel. Single-channel data processing is much simpler, saving storage memory and speeding up data processing. Distortion correction can perform radial and / or tangential distortion correction on the image containing the line segment, reducing distortion introduced by deviations in lens manufacturing precision and assembly processes, thus minimizing distortion of the original image.

[0038] S130. Filter out line segments that satisfy the first preset condition from the initial line segment set to obtain the target line segment set.

[0039] The line segment that satisfies the first preset condition includes a line segment used to characterize the target contour line on an indoor object, and the angle difference between the target contour line and the perpendicular line of the working plane where the mobile robot is located is less than a preset angle threshold.

[0040] For example, the working plane of the mobile robot is generally the ground, and the perpendicular direction of the working plane is generally vertical. Indoor floors may contain furniture or household appliances, and the image to be processed is likely to contain images of these objects. Edges of these objects that are perpendicular or approximately perpendicular to the ground (the preset angle threshold can be determined based on the actual calculation accuracy, for example, 5 degrees) can be considered as target contour lines and will be extracted as line segments, existing in the initial line segment set. However, this type of line segment is not helpful in determining the working direction of the mobile robot, is invalid, and will cause interference; therefore, it needs to be filtered out. The specific method for determining whether the first preset condition is met is not limited.

[0041] S140. Based on the angle difference between line segments, the line segments in the target line segment set are clustered, and the target line segment cluster is determined according to the clustering results.

[0042] The clustering process can be achieved by using morphological operators to cluster and merge neighboring similar classification regions, and can include hierarchical clustering, decomposition, addition, dynamic clustering, ordered sample clustering, overlapping clustering, and fuzzy clustering.

[0043] Specifically, in this embodiment of the invention, the line segments in the target line segment set can be clustered based on the angle difference between the line segments. The line segments obtained after clustering can be used as line segments with representative angles, which can be used to determine the current posture of the robot, thereby improving the accuracy of angle acquisition.

[0044] S150. Determine the target reference angle based on the angles of the line segments in the target line segment cluster.

[0045] The target reference angle is used to provide a reference for the movement of the mobile robot.

[0046] Optionally, a preset calculation method can be used to calculate the target reference angle based on the angles of the line segments in the target line segment cluster. The preset calculation method could be, for example, calculating the average, finding the maximum value, or finding the median. For instance, the target reference angle can be obtained by calculating the average angle of the line segments in the target line segment cluster.

[0047] It can be seen that the embodiments of the present invention can determine the next movement direction of the mobile robot based on the target line segment cluster, providing the robot with a reasonable movement direction while ensuring high timeliness, and the operation is simple and easy, giving the mobile robot the function of a visual compass.

[0048] Optionally, in some embodiments, after this step, the pose of the mobile robot may be adjusted according to the target reference angle so that the forward direction of the mobile robot is parallel to the preset boundary of the working area, and path planning related operations may be performed.

[0049] The reference angle determination scheme provided in this embodiment of the invention acquires an image to be processed using an image acquisition device located on top of a mobile robot. The image to be processed contains indoor environmental information above the mobile robot. Line segments are extracted from the image to be processed to obtain an initial set of line segments. Line segments that meet a first preset condition are filtered out from the initial set of line segments to obtain a target set of line segments. The line segments that meet the first preset condition include line segments representing target contour lines on indoor objects, and the angle difference between the target contour line and the perpendicular line to the working plane where the mobile robot is located is less than a preset angle threshold. The line segments in the target set are clustered based on the angle differences between the line segments, and target line segment clusters are determined according to the clustering results. A target reference angle is determined based on the angles of the line segments in the target line segment clusters, whereby the target reference angle is used to provide a reference for the movement of the mobile robot. This embodiment of the invention can complete the image angle calculation using only a single top-view image, achieving a significant reduction in computational latency and computational power requirements.

[0050] Example 2

[0051] Figure 2 This is a flowchart illustrating a reference angle determination method provided in an embodiment of the present invention. This embodiment further optimizes the above embodiments by adding an operational feature for processing the initial line segment, specifically including the following steps:

[0052] S210. Acquire the image to be processed through the image acquisition device located on top of the mobile robot.

[0053] The image to be processed contains information about the indoor environment above the mobile robot.

[0054] S220. The image to be processed is preprocessed to obtain a target image. Line segment extraction is performed on the target image using a line segment feature extraction method to obtain an initial set of line segments.

[0055] The preprocessing includes grayscale conversion and / or distortion correction.

[0056] Among them, the Line Segment Detector (LSD) method can obtain high-precision line segment detection results in a shorter time.

[0057] Specifically, the LSD line detection algorithm first calculates the gradient magnitude and direction of all points in the image. Then, it treats adjacent points with small gradient direction changes as a connected region. Next, it determines whether each region needs to be broken according to rules to form multiple regions with larger rectangles based on the rectangularity of each region. Finally, it improves and filters all generated regions, retaining those that meet the conditions, which are the final line detection results. The advantages of this algorithm are its fast detection speed, no need for parameter tuning, and the ability to improve the accuracy of line detection by using error control methods.

[0058] S230. Filter out line segments that satisfy the second preset condition from the initial line segment set to obtain the first line segment set.

[0059] The line segments that meet the second preset condition include those with a length less than a preset length threshold. This is because the image to be processed may contain objects with circular outlines, which would result in the extraction of many very short line segments, hindering subsequent calculations and thus requiring filtering.

[0060] Specifically, the preset length threshold selected in this invention is positively correlated with the resolution of the image to be processed, which increases the flexibility and accuracy of image processing and is applicable to pose determination in various scenarios.

[0061] Optionally, the step of filtering out line segments that meet the first preset condition from the first line segment set to obtain a target line segment set includes: clustering the line segments in the first line segment set based on the angle difference between line segments to obtain multiple line segment clusters; for each line segment cluster, merging the line segments within the current line segment cluster based on the distance between line segments to obtain a corresponding merged line segment cluster; determining a second line segment set based on all the merged line segment clusters; and filtering out line segments that meet the first preset condition from the second line segment set to obtain the target line segment set.

[0062] It can be seen that, in this embodiment of the invention, the line segments in the first set of line segments are clustered based on the angle difference between them. That is, line segments with similar directions are grouped into the same cluster, and the line segments within the current cluster are merged based on the distance between them, resulting in representative line segments that can be used to determine the robot's current posture, thus improving the accuracy of angle acquisition. Optionally, before performing clustering, the angles of the line segments can be normalized, such as by normalizing from 0 to 180 degrees.

[0063] For example, for each cluster of line segments, the distance between two line segments is calculated based on the midpoint of the line segment. If the distance is less than a preset threshold, the two line segments can be considered to come from the same straight line, that is, from the straight outline of the same object. The two line segments are then merged into one line segment, and the center of the line segment is updated. The distance calculation and line segment merging are performed recursively.

[0064] S240. Filter out line segments that meet the first preset condition from the first line segment set to obtain the target line segment set.

[0065] The line segment that satisfies the first preset condition includes a line segment used to characterize the target contour line on an indoor object, and the angle difference between the target contour line and the perpendicular line of the working plane where the mobile robot is located is less than a preset angle threshold.

[0066] Optionally, the line segments that satisfy the first preset condition are determined by: determining the target center region based on the center point of the image to be processed; and determining the line segments whose maximum distance from the target center region is less than a preset distance threshold as line segments that satisfy the first preset condition.

[0067] It should be noted that a line segment perpendicular to the ground, when extended infinitely, will intersect at a single point. Therefore, this line segment may pass through the central area in the diagram. Thus, when the maximum distance among all points within the central area to the extension of the line segment is less than a given threshold, that is, when the maximum distance between the line segment and the target central area is less than a preset distance threshold, the line segment can be considered an invalid line segment.

[0068] S250. Cluster the line segments in the target line segment set based on the angle difference between line segments to obtain multiple candidate line segment clusters; determine the candidate line segment clusters according to the number of line segments in each candidate line segment cluster; for each candidate line segment cluster, calculate the score corresponding to the current candidate line segment cluster based on the length of each line segment in the current candidate line segment cluster; determine the candidate line segment cluster with the highest score as the target line segment cluster.

[0069] For example, after line segment filtering and merging, the line segments in the target line segment set are clustered to obtain multiple candidate line segment clusters. When the number of line segments in a cluster is large, it is considered more representative. The cluster with the most line segments can be directly used as the target line segment cluster. Alternatively, multiple candidate line segment clusters can be determined based on the number of line segments. For example, candidate line segment clusters with a number of line segments greater than a preset line segment number threshold can be determined as candidate line segment clusters. Or, they can be sorted by the number of line segments from most to least, and the candidate line segment clusters with the highest ranking preset number can be determined as candidate line segment clusters. After obtaining the candidate line segment clusters, further filtering is performed based on the line segment length to determine the target line segment cluster.

[0070] Optionally, the step of calculating the score corresponding to the current candidate line segment cluster based on the length of each line segment in the current candidate line segment cluster includes: performing a weighted summation of the lengths of each line segment in the current candidate line segment cluster to obtain the score corresponding to the current candidate line segment cluster.

[0071] Optionally, the weight value corresponding to a line segment is positively correlated with the length of the corresponding line segment.

[0072] Specifically, in this embodiment of the invention, the weight value corresponding to the line segment can be set to be positively correlated with the length of the corresponding line segment. The longer the line segment, the more representative it is, and the better it can recommend a better movement direction for the robot in a complex and ever-changing indoor environment.

[0073] S260. Determine the target reference angle based on the angles of the line segments in the target line segment cluster.

[0074] The target reference angle is used to provide a reference for the movement of the mobile robot.

[0075] The following example uses a specific application scenario to illustrate the entire process of determining the reference angle of a mobile robot. Figures 2a-2f The diagram illustrates an example of determining the reference angle provided in this embodiment of the invention. Figures 2a-2f To understand:

[0076] Step 1: First, acquire a single-frame image using a top-view camera. If the extracted image is a color image, it needs to be converted to grayscale for processing, such as... Figure 2a ;

[0077] Step 2: Perform distortion correction processing on the image obtained in Step 1, such as... Figure 2b ;

[0078] Step 3: Extract LSD line segments from the grayscale image obtained after Step 2, such as... Figure 2c ;

[0079] Step 4: For the line segments extracted in Step 3, first filter the line segments. Obtain the set of all line segments with a length less than σ (considering the different resolutions of the input image, the threshold here is a dynamic threshold related to the image resolution), and store all line segments that meet the conditions in a subset L;

[0080] Step 5: For all line segments in set L, first normalize their angles to the range of 0 to 180 degrees. Then, cluster them according to their angles, grouping all line segments with angle differences less than θ into one class, denoted as L. θ ={v1,v2,v3,…,v n ,};

[0081] Step 6: For each subset v in Step 5, using the midpoint of a line segment as the standard, calculate the distance between two line segments. If the distance is less than a threshold τ, consider the two line segments as one, update the line segment center, and recursively calculate the distance. Figure 2d ;

[0082] Step 7: Considering the special characteristics of the top-view image and the ineffectiveness of line segments perpendicular to the horizontal ground for angle determination, the processed line segments need to be filtered again. Take the center region of the image and calculate the maximum distance between each line segment and this region. If the maximum distance is less than a given threshold, it is considered an invalid line segment. Figure 2e ;

[0083] Step 8: Re-cluster the line segments selected in Step 7 according to their angles. Calculate the score S = ∑k*Length based on the length and number of line segments in each angle group, where k is the weighting coefficient and Length is the length of the line segment. Select the group of line segments with the highest score and choose its average angle as the final image angle. Figure 2f .

[0084] The reference angle determination method provided in this embodiment of the invention acquires an image to be processed through an image acquisition device located on top of a mobile robot. Line segments are extracted from the image, and after filtering based on line segment length, clustering is performed based on angle differences. The clustered line segments are merged, and line segments perpendicular to the horizontal ground are filtered out to obtain a target line segment set. The line segments in the target line segment set are then clustered again based on the angle differences between them. The target line segment clusters are determined comprehensively based on the number of line segments within each cluster and their lengths. Finally, the target reference angle is determined based on the angles of the line segments in the target line segment clusters, providing a reference for the movement of the mobile robot. This embodiment of the invention can complete the image angle calculation using only a single top-view image, requiring less computing power and having low computational latency. It can provide real-time and effective references for the mobile robot's pose adjustment and path planning, improving the robot's working efficiency and performance.

[0085] Example 3

[0086] Figure 3 This is a structural block diagram of a reference angle determination device provided in an embodiment of the present invention. This device can be implemented by software and / or hardware, and is generally integrated into a mobile robot. It can determine the reference angle by executing a reference angle determination method. Figure 3 As shown, the device includes: an image acquisition module 310, a line segment extraction module 320, a line segment filtering module 330, a line segment clustering module 340, and an angle determination module 350.

[0087] Image acquisition module 310 is used to acquire images to be processed through an image acquisition device located on top of the mobile robot.

[0088] The image to be processed contains information about the indoor environment above the mobile robot.

[0089] The line segment extraction module 320 is used to extract line segments from the image to be processed to obtain an initial set of line segments.

[0090] The line segment filtering module 330 is used to filter out line segments that meet the first preset condition from the initial line segment set to obtain the target line segment set.

[0091] The line segment that satisfies the first preset condition includes a line segment used to characterize the target contour line on an indoor object, and the angle difference between the target contour line and the perpendicular line of the working plane where the mobile robot is located is less than a preset angle threshold.

[0092] The line segment clustering module 340 is used to cluster the line segments in the target line segment set based on the angle difference between line segments, and to determine the target line segment cluster based on the clustering results.

[0093] Angle determination module 350 is used to determine a target reference angle based on the angles of the line segments in the target line segment cluster, wherein the target reference angle is used to provide a reference for the movement of the mobile robot.

[0094] The reference angle determination device for a mobile robot provided in this embodiment of the invention acquires an image to be processed through an image acquisition device located on top of the mobile robot. The image to be processed contains indoor environmental information above the mobile robot. Line segments are extracted from the image to be processed to obtain an initial set of line segments. Line segments that meet a first preset condition are filtered out from the initial set of line segments to obtain a target set of line segments. The line segments that meet the first preset condition include line segments representing target contour lines on indoor objects, and the angle difference between the target contour line and the perpendicular line to the working plane where the mobile robot is located is less than a preset angle threshold. The line segments in the target set are clustered based on the angle differences between the line segments, and target line segment clusters are determined according to the clustering results. Target reference angles are determined based on the angles of the line segments in the target line segment clusters, and the target reference angles are used to provide a reference for the movement of the mobile robot. This embodiment of the invention can complete the image angle calculation using only a single top-view image, achieving a significant reduction in computational latency and computational power requirements.

[0095] Furthermore, the line segment filtering module 330 includes:

[0096] A line segment filtering unit is used to filter out line segments that meet the second preset condition from the initial line segment set to obtain a first line segment set.

[0097] The line segments that meet the second preset condition include line segments whose length is less than a preset length threshold, and the preset length threshold is positively correlated with the resolution of the image to be processed.

[0098] The set acquisition unit is used to filter out line segments that meet the first preset condition from the first line segment set to obtain the target line segment set.

[0099] Furthermore, the set acquisition unit also includes:

[0100] A clustering analysis component is used to cluster line segments in the first set of line segments based on the angle difference between line segments, resulting in multiple line segment clusters.

[0101] The segment cluster merging component is used to merge the segments within each segment cluster based on the distance between the segments, resulting in a merged segment cluster.

[0102] A set-determining component is used to determine a second set of segments based on all the said merged segment clusters.

[0103] The set acquisition component is used to filter out line segments that meet the first preset condition from the second line segment set to obtain the target line segment set.

[0104] Furthermore, the line segments that satisfy the first preset condition are determined in the following way: the target center region is determined based on the center point of the image to be processed; the line segments whose maximum distance from the target center region is less than a preset distance threshold are determined as the line segments that satisfy the first preset condition.

[0105] Furthermore, the line segment clustering module 340 includes:

[0106] Angle difference judgment unit is used to cluster the line segments in the target line segment set based on the angle difference between line segments to obtain multiple candidate line segment clusters.

[0107] The quantity judgment unit is used to determine the candidate segment clusters based on the number of segments in each candidate segment cluster.

[0108] The length determination unit is used to calculate the score corresponding to the current candidate line segment cluster based on the length of each line segment in the current candidate line segment cluster.

[0109] The segment cluster determination unit is used to determine the candidate segment cluster with the highest score as the target segment cluster.

[0110] Furthermore, the length determination unit includes:

[0111] The score determination component is used to perform a weighted summation of the lengths of each line segment within the current candidate line segment cluster to obtain the score corresponding to the current candidate line segment cluster.

[0112] The weight value of a line segment is positively correlated with the length of the corresponding line segment.

[0113] Furthermore, the line segment extraction module 320 includes:

[0114] An image preprocessing unit is used to preprocess the image to be processed to obtain a target image.

[0115] The preprocessing includes grayscale conversion and / or distortion correction.

[0116] The line segment extraction unit is used to extract line segments from the target image using the Line Segment Feature Extraction (LSD) method to obtain an initial set of line segments.

[0117] Example 4

[0118] This invention provides a mobile robot that can integrate the reference angle determination device provided in this invention. Figure 4 This is a structural block diagram of a mobile robot provided in an embodiment of the present invention. The mobile robot 412 may include, but is not limited to: one or more processors 416, a storage device 428, and a bus 418 connecting different system components (including the storage device 428 and the processor 416).

[0119] Bus 418 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. Examples of these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.

[0120] Mobile robot 412 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by mobile robot 412, including volatile and non-volatile media, movable and non-movable media.

[0121] Storage device 428 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 430 and / or cache memory 432. Mobile robot 412 may further include other movable / non-movable, volatile / non-volatile computer system storage media. By way of example only, storage system 434 may be used to read and write non-movable, non-volatile magnetic media (…). Figure 4 Not shown; usually referred to as a "hard drive"). Although Figure 4Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 418 via one or more data media interfaces. Storage device 428 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of the present invention.

[0122] A program 440 having a set (at least one) of program modules 442 may be stored in, for example, a storage device 428. Such program modules 442 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 442 typically perform the functions and / or methods described in the embodiments of the present invention.

[0123] The mobile robot 412 can also communicate with one or more external devices 414 (e.g., keyboard, pointing device, camera, display 424, etc.), one or more devices that enable a user to interact with the mobile robot 412, and / or any device that enables the mobile robot 412 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed via input / output (I / O) interface 422. Furthermore, the mobile robot 412 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 420. As shown, network adapter 420 communicates with other modules of the mobile robot 412 via bus 418. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with the mobile robot 412, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0124] The processor 416 executes various functional applications and data processing by running programs stored in the storage device 428, such as implementing the reference angle determination method for the mobile robot provided in the above embodiments of the present invention.

[0125] Example 5

[0126] This invention also provides a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform a reference angle determination method for a mobile robot, the method comprising:

[0127] An image to be processed is acquired by an image acquisition device located on top of the mobile robot, wherein the image to be processed contains indoor environmental information above the mobile robot;

[0128] Line segments are extracted from the image to be processed to obtain an initial set of line segments;

[0129] The initial set of line segments is filtered out to obtain a target set of line segments, wherein the line segments that satisfy the first preset condition include line segments used to characterize the target contour line on an indoor object, and the angle difference between the target contour line and the perpendicular line of the working plane where the mobile robot is located is less than a preset angle threshold.

[0130] The line segments in the target line segment set are clustered based on the angle difference between line segments, and the target line segment cluster is determined based on the clustering results;

[0131] A target reference angle is determined based on the angles of the line segments in the target line segment cluster, wherein the target reference angle is used to provide a reference for the movement of the mobile robot.

[0132] Storage medium – any type of memory device or storage device. The term “storage medium” is intended to include: mounting media, such as CD-ROM, floppy disk, or magnetic tape devices; computer system memory or random access memory, such as DRAM, DDRRAM, SRAM, EDORAM, Rambus RAM, etc.; non-volatile memory, such as flash memory, magnetic media (e.g., hard disk or optical storage); registers or other similar types of memory elements, etc. Storage medium may also include other types of memory or combinations thereof. Furthermore, storage medium may reside in a first computer system in which the program is executed, or it may reside in a different second computer system connected to the first computer system via a network (such as the Internet). The second computer system can provide program instructions to the first computer for execution. The term “storage medium” can include two or more storage media that may reside in different locations (e.g., in different computer systems connected via a network). Storage medium may store program instructions (e.g., specifically implemented as a computer program) executable by one or more processors.

[0133] Of course, the computer-executable instructions provided in the embodiments of the present invention are not limited to the reference angle determination operation as described above, but can also execute related operations in the reference angle determination method of the mobile robot provided in any embodiment of the present invention.

[0134] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. The reference angle determination device, equipment, and storage medium provided in the above embodiments can execute the reference angle determination method provided in any embodiment of the present invention, possessing the corresponding functional modules and beneficial effects of executing the method. Technical details not described in detail in the above embodiments can be found in the reference angle determination method provided in any embodiment of the present invention. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made by those skilled in the art without departing from the protection scope of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. A reference angle determination method for a mobile robot, characterized by, include: An image to be processed is acquired by an image acquisition device located on top of the mobile robot, wherein the image to be processed contains indoor environmental information above the mobile robot; Line segments are extracted from the image to be processed to obtain an initial set of line segments; The initial set of line segments is filtered out to obtain a target set of line segments, wherein the line segments that satisfy the first preset condition include line segments used to characterize the target contour line on an indoor object, and the angle difference between the target contour line and the perpendicular line of the working plane where the mobile robot is located is less than a preset angle threshold. The line segments in the target line segment set are clustered based on the angle difference between line segments, and the target line segment cluster is determined based on the clustering results; A target reference angle is determined based on the angle of the line segments in the target line segment cluster, wherein the target reference angle is used to provide a reference for the movement of the mobile robot; The step of filtering out line segments that satisfy the first preset condition from the initial line segment set to obtain the target line segment set includes: The first set of line segments is obtained by filtering out line segments that meet the second preset condition from the initial set of line segments. The line segments that meet the second preset condition include line segments whose length is less than a preset length threshold. The preset length threshold is positively correlated with the resolution of the image to be processed. Filter out line segments that meet the first preset condition from the first set of line segments to obtain the target set of line segments; The line segment that satisfies the first preset condition is determined in the following way: Determine the target center region based on the center point of the image to be processed; Line segments whose maximum distance from the target center region is less than a preset distance threshold are identified as line segments that satisfy the first preset condition.

2. The method of claim 1, wherein, The step of filtering out line segments that meet the first preset condition from the first set of line segments to obtain the target set of line segments includes: Based on the angle difference between line segments, the line segments in the first set of line segments are clustered to obtain multiple line segment clusters; For each line segment cluster, the line segments within the current line segment cluster are merged based on the distance between the line segments to obtain the corresponding merged line segment cluster; The second segment set is determined based on all the aforementioned merged segment clusters; The target line segment set is obtained by filtering out line segments that meet the first preset condition from the second line segment set.

3. The method of claim 1, wherein, The process of clustering line segments in the target line segment set based on the angle difference between line segments, and determining the target line segment cluster based on the clustering results, includes: Based on the angle difference between line segments, the line segments in the target line segment set are clustered to obtain multiple candidate line segment clusters; The candidate segment clusters are determined based on the number of segments in each candidate segment cluster. For each candidate line segment cluster, calculate the score corresponding to the current candidate line segment cluster based on the length of each line segment within the current candidate line segment cluster; The candidate segment cluster with the highest score is determined as the target segment cluster.

4. The method of claim 3, wherein, The step of calculating the score corresponding to the current candidate line segment cluster based on the length of each line segment within the current candidate line segment cluster includes: The lengths of each line segment within the current candidate line segment cluster are weighted and summed to obtain the score corresponding to the current candidate line segment cluster, wherein the weight value of the line segment is positively correlated with the length of the corresponding line segment.

5. The method according to any one of claims 1 to 4, characterized in that, The step of extracting line segments from the image to be processed to obtain an initial set of line segments includes: The image to be processed is preprocessed to obtain the target image, wherein the preprocessing includes grayscale processing and / or distortion correction processing; The Line Segment Feature Extraction (LSD) method is used to extract line segments from the target image to obtain an initial set of line segments.

6. A reference angle determining apparatus of a mobile robot, characterized by comprising: include: An image acquisition module is used to acquire an image to be processed through an image acquisition device located on top of the mobile robot, wherein the image to be processed contains indoor environmental information above the mobile robot; The line segment extraction module is used to extract line segments from the image to be processed to obtain an initial set of line segments. The line segment filtering module is used to filter out line segments that meet the first preset condition from the initial line segment set to obtain a target line segment set. The line segments that meet the first preset condition include line segments that characterize the target contour line on an indoor object. The angle difference between the target contour line and the perpendicular line of the working plane where the mobile robot is located is less than a preset angle threshold. The line segment clustering module is used to cluster the line segments in the target line segment set based on the angle difference between line segments, and to determine the target line segment cluster based on the clustering results; An angle determination module is used to determine a target reference angle based on the angles of the line segments in the target line segment cluster, wherein the target reference angle is used to provide a reference for the movement of the mobile robot; The line segment filtering module includes: A line segment filtering unit is used to filter out line segments that meet a second preset condition from the initial line segment set to obtain a first line segment set; wherein, the line segments that meet the second preset condition include line segments with a length less than a preset length threshold, and the preset length threshold is positively correlated with the resolution of the image to be processed; The set acquisition unit is used to filter out line segments that meet the first preset condition from the first line segment set to obtain the target line segment set; The line segment that satisfies the first preset condition is determined in the following way: Determine the target center region based on the center point of the image to be processed; Line segments whose maximum distance from the target center region is less than a preset distance threshold are identified as line segments that satisfy the first preset condition.

7. A mobile robot comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the reference angle determination method for the mobile robot as described in any one of claims 1-5.

8. A computer-readable storage medium having stored thereon a computer program, characterized in that, When executed by the processor, the program implements the reference angle determination method for the mobile robot as described in any one of claims 1-5.