Autonomous mobile device, correction method and computer storage medium
The ground image is acquired through the camera of the autonomous mobile device, the line segments are extracted and the correction angle is determined, which solves the problem of being unable to detect the angle of the wall in the existing technology and improves the mapping accuracy of the device.
Patent Information
- Application Number
- CN202011613427.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-30
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2040-12-30
AI Technical Summary
Existing autonomous mobile devices cannot detect the angle with the wall, resulting in large map errors.
By obtaining the ground image captured by the camera of the autonomous mobile device, multiple line segments are extracted, the correction angle is determined based on the line segments of the floor tile or floor boundary, and the angle correction is performed so that the traveling direction of the device and the camera optical axis are parallel to the floor tile or floor boundary.
It realizes the detection and correction of the angle between the autonomous mobile device and the floor tile or floor boundary, improving the accuracy of mapping.
Smart Images

Figure CN112859836B
Abstract
Description
Technical Field
[0001] The present application relates to the field of autonomous mobile equipment, and in particular to an autonomous mobile equipment, a calibration method and a computer storage medium. Background Art
[0002] An autonomous mobile device is a device that can move automatically. An autonomous mobile device can realize functions such as mapping, navigation, and positioning. For example, an autonomous mobile device is a robot. Robots usually build maps with the front as the coordinate system. When the robot is located indoors, the robot needs to create a map when it is perpendicular or parallel to the wall. However, existing robots cannot detect the angle between the robot and the wall, resulting in large map errors. Summary of the invention
[0003] The present application provides an autonomous mobile device, a calibration method and a computer storage medium to solve the problem that the angle between a robot and a wall cannot be detected in the prior art.
[0004] In order to solve the above technical problems, the present application provides a correction method for an autonomous mobile device, which includes: acquiring a ground image taken by a camera of the autonomous mobile device; extracting multiple line segments from the ground image; determining a correction angle of the autonomous mobile device based on the line segments corresponding to the boundaries of floor tiles or floors among the multiple line segments; and performing angle correction on the autonomous mobile device based on the correction angle.
[0005] The step of determining the correction angle of the autonomous mobile device based on the line segments corresponding to the boundaries of the tiles or the floor among the plurality of line segments comprises:
[0006] Calculate the endpoint coordinates of each line segment in the world coordinate system;
[0007] Obtaining the angle and length of each of the line segments based on the endpoint coordinates;
[0008] Determining the line segment corresponding to the boundary of the floor tile or floor by means of histogram statistics;
[0009] The correction angle is determined based on the angle of the line segment corresponding to the tile or floor boundary.
[0010] The step of determining the line segment corresponding to the boundary of the floor tile or floor by means of histogram statistics comprises:
[0011] Based on the angles of the plurality of line segments, assigning the plurality of line segments to different angle intervals;
[0012] Counting the total length of the line segments within the same angle interval;
[0013] The line segment within the angle interval with the largest total length is selected as the line segment corresponding to the boundary of the floor tile or the floor.
[0014] Wherein, before the step of determining the correction angle based on the angle of the line segment corresponding to the boundary of the floor tile or floor, the method further comprises:
[0015] Determining whether the maximum total length is greater than or equal to a preset length threshold;
[0016] In response to the maximum total length being greater than or equal to the length threshold, the step of determining the correction angle based on the angle of the line segment corresponding to the tile or floor boundary is performed.
[0017] Wherein, before the step of determining the correction angle based on the angle of the line segment corresponding to the boundary of the floor tile or floor, the method further comprises:
[0018] In response to the maximum total length being less than the length threshold, the autonomous mobile device is controlled to rotate by a preset angle, and the process returns to the step of acquiring the ground image captured by the camera of the autonomous mobile device.
[0019] The step of determining the correction angle based on the angle of the line segment corresponding to the boundary of the floor tile or floor comprises:
[0020] Sort the angles of the line segments within the angle interval with the largest total length;
[0021] Selecting a middle angle from the sorted angles as the correction angle; or
[0022] The step of determining the correction angle based on the angle of the line segment corresponding to the tile or floor boundary comprises:
[0023] Calculate the average value of the angles of the line segments within the angle interval with the largest total length;
[0024] The average value is taken as the correction angle.
[0025] Wherein, the step of performing angle correction on the autonomous mobile device based on the correction angle comprises:
[0026] The autonomous mobile device is controlled to rotate based on the correction angle so that the moving direction of the autonomous mobile device and / or the optical axis direction of the camera are parallel to the floor tile or bottom plate boundary.
[0027] The camera is a front camera of the autonomous mobile device, and the moving direction of the autonomous mobile device is arranged in the same direction as the optical axis direction of the camera.
[0028] Wherein, the method further comprises:
[0029] The autonomous mobile device after controlling the angle correction is used for mapping.
[0030] In order to solve the above technical problems, the present application provides an autonomous mobile device, which includes a processor and a memory; a computer program is stored in the memory, and the processor is used to execute the computer program to implement the steps of the above correction method.
[0031] In order to solve the above technical problem, the present application provides a computer storage medium, in which a computer program is stored, and the above correction method is implemented when the computer program is executed.
[0032] The beneficial effects of the present application are as follows: the present application obtains the ground image taken by the camera of the autonomous mobile device; extracts multiple line segments from the ground image; determines the correction angle of the autonomous mobile device based on the line segments corresponding to the boundaries of the tiles or floor among the multiple line segments; and performs angle correction on the autonomous mobile device based on the correction angle. In this way, the autonomous mobile device of the present application obtains the correction angle through the line segments corresponding to the boundaries of the tiles or floor, so as to detect the angle between the autonomous mobile device and the boundaries of the tiles or floor; and performs angle correction on the autonomous mobile device based on the correction angle, and the corrected autonomous mobile device performs mapping, thereby improving the accuracy of mapping by the autonomous mobile device. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0034] Figure 1 It is a flowchart of an embodiment of the calibration method of the autonomous mobile device of the present application;
[0035] Figure 2 yes Figure 1 A flow chart of a specific embodiment of step S13;
[0036] Figure 3 yes Figure 2 A flow chart of a specific embodiment of step S23;
[0037] Figure 4 yes Figure 2 A flow chart of a specific embodiment of step S24;
[0038] Figure 5 yes Figure 2A flowchart of another specific embodiment of step S24;
[0039] Figure 6 yes Figure 1 A schematic diagram of another specific embodiment of step S13;
[0040] Figure 7 This is a schematic diagram of the structure of an embodiment of an autonomous mobile device of the present application;
[0041] Figure 8 It is a structural diagram of an embodiment of the computer storage medium of the present application. DETAILED DESCRIPTION
[0042] In order to enable those skilled in the art to better understand the technical solution of the present invention, the following is a further detailed description of an audio data processing method, device and computer storage medium provided by the present application in conjunction with the accompanying drawings and specific implementation methods.
[0043] The executor of the calibration method of the autonomous mobile device of the present application is the autonomous mobile device, which may be a sweeping robot (or sweeping machine), a service robot, or a shopping guide robot, etc. In other embodiments, the executor of the calibration method of the autonomous mobile device may also be other devices, such as a server, a control device, etc.
[0044] Autonomous mobile devices work indoors (such as living rooms, rooms or corridors) and need to build maps based on the indoor environment; existing autonomous mobile devices cannot perform angle correction, resulting in large errors in map building. The correction method of the present application can perform angle correction on autonomous mobile devices based on the correction angle, thereby improving the accuracy of autonomous mobile device map building.
[0045] See also Figure 1 As shown, Figure 1 The figure is a flow chart of an embodiment of the calibration method of the autonomous mobile device of the present application. The calibration method of the autonomous mobile device of the present embodiment includes the following steps.
[0046] S11: Acquire a ground image captured by a camera of the autonomous mobile device.
[0047] The autonomous mobile device is provided with a camera, which may be a front camera, for capturing images in front of the autonomous mobile device. The camera of the autonomous mobile device may also be used to identify obstacles and conduct real-time monitoring, and may realize obstacle avoidance and remote monitoring functions. The camera of the autonomous mobile device is controlled to capture ground images, and the ground images captured by the camera are obtained.
[0048] In a specific application scenario, the autonomous mobile device may be a sweeping robot, which is provided with a front camera. The sweeping robot takes pictures of the ground through the camera to obtain the ground image taken by the camera. In addition, due to the flexibility of the sweeping robot, the camera of the sweeping robot can remotely monitor every corner of the house; the sweeping robot can also identify obstacles through the camera to achieve obstacle avoidance function.
[0049] In other embodiments, the camera of the autonomous mobile device may also be a rear-facing camera.
[0050] S12: Extract multiple line segments from the ground image.
[0051] Among them, the room is usually provided with a floor or floor tiles, the laying direction of the floor or floor tiles is consistent with the direction of the wall, and the shape of the floor or floor tiles can be square or rectangular. When the room is provided with a floor, a line segment is formed between two adjacent floors or between the floor and the wall. When the room is provided with floor tiles, a line segment is formed between two adjacent floor tiles or between the floor and the wall. Therefore, the ground image captured by the camera of the autonomous mobile device has multiple line segments, and then the autonomous mobile device extracts multiple line segments from the ground image.
[0052] For example, the autonomous mobile device can detect all line segments in the ground image through the Hough algorithm, where the Hough algorithm is a Hough transform algorithm, which is used to detect straight lines from black and white images in image processing, that is, the autonomous mobile device uses the Hough algorithm to extract straight lines from the obtained ground image to obtain multiple line segments, so as to extract multiple line segments from the ground image.
[0053] S13: Determine a correction angle of the autonomous mobile device based on a line segment corresponding to a boundary of a floor tile or a floor among the plurality of line segments.
[0054] The plurality of line segments may include line segments corresponding to the boundary of the floor tile or floor and line segments corresponding to the boundary of the wall. Therefore, the autonomous mobile device obtains the line segments corresponding to the boundary of the floor tile or floor from the plurality of line segments, and determines the correction angle of the mobile device based on the line segments corresponding to the boundary of the floor tile or floor. Since the boundary of the floor tile or floor is arranged perpendicularly or parallel to the wall, the correction angle may be the angle between the autonomous mobile device and the boundary of the floor tile or floor, that is, to detect the angle between the autonomous mobile device and the boundary of the floor tile or floor.
[0055] S14: Performing angle correction on the autonomous mobile device based on the correction angle.
[0056] After the autonomous mobile device determines the correction angle, the autonomous mobile device performs angle correction on the autonomous mobile device based on the correction angle. Specifically, the autonomous mobile device controls the autonomous mobile device to rotate based on the correction angle so that the moving direction of the autonomous mobile device and / or the optical axis direction of the camera are parallel to the boundary of the floor tile or floor, that is, the moving direction of the autonomous mobile device and / or the optical axis direction of the camera after correction are parallel to the boundary of the floor tile or floor. Among them, the camera of the autonomous mobile device is a front camera, and the moving direction of the autonomous mobile device can be set in the same direction as the optical axis direction of the camera.
[0057] For example, the autonomous mobile device determines a correction angle of the autonomous mobile device based on a line segment corresponding to a boundary of a floor tile or a floor, and controls the autonomous mobile device to rotate in a preset rotation direction based on the correction angle, so that the corrected direction of the autonomous mobile device and / or the optical axis direction of the camera are perpendicular or parallel to the wall.
[0058] S15: Control the angle-corrected autonomous mobile device to build a map.
[0059] After the corrected moving direction of the autonomous mobile device and / or the optical axis direction of the camera is perpendicular or parallel to the wall, the autonomous mobile device controls the angle-corrected autonomous mobile device to build a map.
[0060] Specifically, the autonomous mobile device can use its own sensors or cameras to identify characteristic marks in an unknown environment, and estimate the global coordinates of the autonomous mobile device and the characteristic marks based on the relative position between the autonomous mobile device and the characteristic marks and the readings of the odometer, so as to create or locate the map based on the global coordinates. Among them, the autonomous mobile device mapping can include raster maps, geometric information maps and topological maps, among which the geometric information maps can include vector maps and semantic maps.
[0061] Through the above method, the autonomous mobile device of the present application obtains a correction angle through a line segment corresponding to the boundary of the floor tiles or the floor, so as to detect the angle between the autonomous mobile device and the boundary of the floor tiles or the floor; and based on the correction angle, the autonomous mobile device is angle-corrected so that the direction of movement of the corrected autonomous mobile device and / or the optical axis direction of the camera are perpendicular or parallel to the wall, and the corrected autonomous mobile device is used for mapping, thereby improving the accuracy of mapping by the autonomous mobile device.
[0062] See also Figure 2 As shown, step S13 includes the following steps:
[0063] S21: Calculate the endpoint coordinates of each line segment in the world coordinate system.
[0064] In step S12, the autonomous mobile device extracts multiple line segments from the ground image and obtains the pixel coordinates of the endpoints of each line segment, where the pixel coordinates of the endpoints are (u, v). In other embodiments, the camera of the autonomous mobile device may be a binocular camera, a multi-eye camera, or a depth camera, which can more conveniently obtain the endpoint coordinates of each line segment in the world coordinate system.
[0065] The autonomous mobile device calculates the endpoint coordinates (Xw, Yw, Zw) of each line segment in the world coordinate system, where each line segment may be a line segment corresponding to a floor tile or floor boundary. The endpoint coordinates (Xw, Yw, Zw) of each line segment in the world coordinate system satisfy the following formula:
[0066]
[0067] Among them, the internal and external parameters of the camera of the autonomous mobile device are (f x , f y ,u0,v0,R,T), that is (f x , f y , u0, v0, R, T) are known; the point Yw of the endpoints of all line segments on the floor tiles or floor is known; and the pixel coordinates (u, v) of the endpoints are known, then the autonomous mobile device can calculate the endpoint coordinates (Xw, Yw, Zw) of each line segment in the world coordinate system according to formula (1).
[0068] Among them, the endpoints of all line segments are on the tiles or the floor, so the endpoints of all line segments are the same in the world coordinate system Zw.
[0069] S22: Obtain the angle θ and length L of each line segment based on the endpoint coordinates.
[0070] The autonomous mobile device obtains the angle θ and length L of each line segment based on the endpoint coordinates, that is, the autonomous mobile device calculates the corresponding angle θ and length L based on the coordinates of the two endpoints of the line segment. For example, the coordinates of the two endpoints of the line segment in the world coordinate system are (Xw1, Yw1, Zw) and (Xw2, Yw2, Zw), so the length L of the line segment satisfies the following formula:
[0071]
[0072] The length of the line segment θ satisfies the following formula:
[0073]
[0074] Therefore, the autonomous mobile device obtains the angle θ and length L of each line segment according to formulas (2), (3) and the endpoint coordinates.
[0075] S23: Determine the line segment corresponding to the boundary of the floor tile or the floor by using a histogram statistical method.
[0076] The autonomous mobile device determines the line segments corresponding to the boundaries of the tiles or floors by means of histogram statistics, that is, the line segments corresponding to the boundaries of the tiles or floors are determined by means of histogram statistics based on the angles and lengths of all line segments. Among them, the histogram, also known as the quality distribution graph, is a statistical report graph that represents the data distribution by a series of longitudinal stripes or line segments of varying heights. Usually, the horizontal axis of the quality distribution graph represents the data type, and the vertical axis of the quality distribution graph represents the distribution.
[0077] Please see further Figure 3 As shown, step S23 includes the following steps:
[0078] S31: Allocate the plurality of line segments to different angle intervals based on the angles of the plurality of line segments.
[0079] The autonomous mobile device allocates the multiple line segments to different angle intervals based on the angles of the multiple line segments. The autonomous mobile device divides a certain interval into multiple angle intervals according to the angle threshold in advance. Since the endpoints of all line segments are the same Zw in the world coordinate system, a certain interval can be 180°. The angle threshold can range from 2° to 60°, that is, the angle threshold can be 2°, 5°, 10°, 20°, 30°, and 60°. For example, if the angle threshold is 5°, the autonomous mobile device divides 180° into 36 angle intervals according to 5°.
[0080] The autonomous mobile device allocates the multiple line segments to different angle intervals based on the angles θ of the multiple line segments. For example, if the angle θ of the line segment is 3°, the autonomous mobile device allocates the line to an angle interval of 1°-5°; if the angle θ of the line segment is 16°, the autonomous mobile device allocates the line to an angle interval of 16°-20°, so that the autonomous mobile device allocates the multiple line segments to different angle intervals.
[0081] S32: Count the total length of the line segments within the same angle interval.
[0082] The autonomous mobile device counts the total length of the line segments in the same angle interval, that is, the autonomous mobile device calculates the sum of the lengths L of all line segments in the same angle interval to count the total length of the line segments in the same angle interval. For example, the autonomous mobile device counts that there are 5 lines in the angle interval of 1°-5°, and the lengths of the 5 lines are L1, L2, L3, L4 and L5 respectively. Therefore, the total length of the line segments in the angle interval of 1°-5° counted by the autonomous mobile device is L1+L2+L3+L4+L5.
[0083] S33: Selecting a line segment within the angle interval with the largest total length as a line segment corresponding to a boundary of the floor tile or floor.
[0084] After counting the total lengths of the line segments in the same angle interval, the autonomous mobile device compares the total lengths of all angle intervals to obtain the angle interval with the largest total length. At this time, the autonomous mobile device selects the line segment in the angle interval with the largest total length as the line segment corresponding to the boundary of the floor tile or floor, and then determines the line segment corresponding to the boundary of the floor tile or floor.
[0085] S24: Determine a correction angle based on the angle θ of the line segment corresponding to the tile or floor boundary.
[0086] The autonomous mobile device determines the correction angle based on the angle θ of the line segment corresponding to the tile or floor boundary, that is, the autonomous mobile device determines the correction angle based on the angle θ of all line segments in the angle interval with the largest total length.
[0087] Through the above method, the autonomous mobile device of the present application determines the correction angle based on the angle θ of the line segment corresponding to the boundary of the floor tile or floor, and can obtain the angle between the autonomous mobile device and the boundary of the floor tile or floor. The corrected autonomous mobile device is used for mapping, thereby improving the accuracy of mapping by the autonomous mobile device.
[0088] See also Figure 4 As shown, step S24 includes the following steps:
[0089] S41: Sort the angles θ of the line segments within the angle interval with the largest total length.
[0090] The autonomous mobile device sorts the angles θ of the line segments in the angle interval with the largest total length, wherein the sorting order may be from small to large, or from large to small. For example, the angle interval with the largest total length is 1°-5°, and the autonomous mobile device counts that there are 5 lines in the angle interval of 1°-5°, and the angles θ of the 5 lines are θ1, θ2, θ3, θ4, and θ5 respectively; the autonomous mobile device sorts θ1, θ2, θ3, θ4, and θ5, that is, the autonomous mobile device sorts θ1, θ2, θ3, θ4, and θ5 from large to small. Among them, θ1, θ2, θ3, θ4, and θ5 are 1°, 2°, 3°, 4°, and 5° respectively, and the autonomous mobile device sorts the angles θ1, θ2, θ3, θ4, and θ5 as follows: 5°, 4°, 3°, 2°, and 1°.
[0091] S42: Selecting a middle angle from the sorted angles θ as a correction angle.
[0092] The autonomous mobile device selects the middle angle from the sorted angles θ as the correction angle, so that the autonomous mobile device determines the correction angle based on the angle θ of the line segment corresponding to the boundary of the floor tile or floor. For example: the autonomous mobile device selects the middle angle of 3° from θ1, θ2, θ3, θ4 and θ5, that is, the autonomous mobile device uses the middle angle 3° as the correction angle; or, if the angle θ of the line segment in the angle interval with the largest total length is 2°, 4° and 5°, the autonomous mobile device selects the middle angle of 4°, and the autonomous mobile device uses the middle angle 4° as the correction angle.
[0093] See also Figure 5 As shown, step S24 includes the following steps:
[0094] S51: Calculate the average value of the angle θ of the line segments within the angle interval with the largest total length.
[0095] The autonomous mobile device calculates the average value of the angle θ of the line segment within the angle interval with the largest total length. For example, the autonomous mobile device calculates the average value of θ1, θ2, θ3, θ4 and θ5, and the average value is (θ1+θ2+θ3+θ4+θ5) / 5, that is, the average value is 3°; or, the angle θ of the line segment within the angle interval with the largest total length is 3°, 4° and 5°, then the autonomous mobile device calculates the average value of 3°, 4° and 5° to be 4°.
[0096] S52: The average value is used as the correction angle.
[0097] The autonomous mobile device uses the average value as the correction angle, so that the autonomous mobile device determines the correction angle based on the angle θ of the line segment corresponding to the boundary of the floor tile or floor. For example, the autonomous mobile device uses the average value of 3° as the correction angle, or the autonomous mobile device uses the average value of 4° as the correction angle.
[0098] In the above manner, the autonomous mobile device of the present application selects the middle angle from the sorted angles θ as the correction angle, or takes the average value of the angle θ of the line segment in the angle interval with the largest total length as the correction angle, so as to obtain the correction angle, and then the autonomous mobile device performs angle correction on the autonomous mobile device based on the correction angle. In other embodiments, the autonomous mobile device may also determine the correction angle in other ways, for example, the autonomous mobile device calculates the weight value of the angle θ of the line segment in the angle interval with the largest total length, and uses the weight value as the correction angle.
[0099] See also Figure 6 As shown, step S13 includes the following steps:
[0100] S61: Calculate the endpoint coordinates of each line segment in the world coordinate system.
[0101] S62: Obtain the angle and length of each line segment based on the endpoint coordinates.
[0102] S63: Determine the line segment corresponding to the boundary of the floor tile or the floor by using a histogram statistical method.
[0103] Steps S61-S63 are the same as steps S21-23 and will not be described again here.
[0104] In step S63, the autonomous mobile device selects the line segment within the angle interval with the largest total length as the line segment corresponding to the boundary of the floor tile or floor.
[0105] S64: Determine whether the maximum total length is greater than or equal to a preset length threshold.
[0106] The autonomous mobile device has a preset length threshold. In order to make the corrected moving direction of the autonomous mobile device and / or the optical axis direction of the camera parallel to the boundary of the floor tile or floor, that is, the corrected moving direction of the autonomous mobile device and / or the optical axis direction of the camera are perpendicular or parallel to the wall, the autonomous mobile device can set the length threshold based on the length of the wall to obtain the preset length threshold. For example, when the corrected moving direction of the autonomous mobile device and / or the optical axis direction of the camera are parallel to the wall, the maximum total length can be equal to the length of the wall, that is, the autonomous mobile device sets the length of the wall to the preset length threshold.
[0107] After comparing the maximum total length, the autonomous mobile device further determines whether the maximum total length is greater than or equal to a preset length threshold; in response to the maximum total length being greater than or equal to the length threshold, it enters step S65; in response to the maximum total length being less than the length threshold, it enters step S66.
[0108] S65: Determine a correction angle based on the angle θ of the line segment corresponding to the tile or floor boundary.
[0109] In response to the maximum total length being greater than or equal to the length threshold, the autonomous mobile device executes a step of determining a correction angle based on the angle θ of the line segment corresponding to the tile or floor boundary, which is the same as step S24 and will not be repeated here.
[0110] S66: Control the autonomous mobile device to rotate a preset angle, and return to the step of acquiring the ground image captured by the camera of the autonomous mobile device.
[0111] The autonomous mobile device has a preset angle, which may be 90°. In other embodiments, the autonomous mobile device may set the preset angle to other angles, such as 30°, 45°, or 60°.
[0112] In response to the maximum total length being less than the length threshold, the autonomous mobile device controls the autonomous mobile device to rotate by a preset angle, and returns to the step of acquiring the ground image captured by the camera of the autonomous mobile device, that is, returns to step S11. Further, the autonomous mobile device may be provided with a rotation direction, which may be a clockwise direction or a counterclockwise direction, and the autonomous mobile device controls the autonomous mobile device to rotate by a preset angle according to the rotation direction, for example, the autonomous mobile device rotates 90° in a clockwise direction.
[0113] Specifically, the autonomous mobile device determines that the total length is less than the length threshold, which is equivalent to that the ground image taken by the autonomous mobile device does not include the wall, that is, the moving direction of the autonomous mobile device and / or the optical axis direction of the camera does not face the wall. Therefore, the autonomous mobile device is controlled to rotate a preset angle so that the moving direction of the autonomous mobile device and / or the optical axis direction of the camera faces the wall, and returns to step S11.
[0114] Through the above method, in response to the maximum total length being less than the length threshold, the autonomous mobile device of the present application controls the autonomous mobile device to rotate a preset angle, further performs angle correction on the autonomous mobile device, and improves the accuracy of the angle correction.
[0115] Optionally, before step S66, the autonomous mobile device further determines whether the number of rotations of the autonomous mobile device exceeds a preset number, that is, when the autonomous mobile device rotates by a preset angle, the autonomous mobile device increases the number by one.
[0116] In response to the number of times not exceeding the preset number of times, the autonomous mobile device is controlled to rotate a preset angle, and the process returns to the step of acquiring the ground image captured by the camera of the autonomous mobile device.
[0117] In response to the number of times exceeding the preset number of times, the autonomous mobile device reminds the user that the angle calibration fails, and resets the number of times to 0. For example, the preset number of times is 3 times, the preset angle is 90°, and the autonomous mobile device determines that the autonomous mobile device has rotated 3 times; if the autonomous mobile device rotates another 90°, it is equivalent to the autonomous mobile device rotating 360°, so the autonomous mobile device reminds the user that the angle calibration fails, and resets the number of times to 0, so that the autonomous mobile device can perform angle calibration next time.
[0118] In a specific application scenario, a sweeping robot is used to clean the indoor floor and is provided with a front camera. The sweeping robot can be pre-set with different length thresholds for different scenes. For example, if the scene in which the sweeping robot is located is a living room, the sweeping robot is correspondingly set with a first length threshold; if the scene in which the sweeping robot is located is a room, the sweeping robot is correspondingly set with a second length threshold.
[0119] First, the sweeping robot obtains a ground image through a camera and extracts multiple line segments from the ground image. It can accurately extract multiple line segments from the ground image in a relatively cluttered scene. Then, the sweeping robot calculates the endpoint coordinates of each line segment in the world coordinate system according to formula (1); calculates the angle θ and length L of each line segment according to the endpoint coordinates, formulas (2) and (3); assigns the multiple line segments to different angle intervals based on the angles θ of the multiple line segments; and counts the total length of the line segments in the same angle interval. Next, the sweeping robot determines whether the maximum total length is greater than or equal to a preset length threshold, and the length threshold includes a first length threshold and a second length threshold; in response to the maximum total length being greater than or equal to the length threshold, the line segment in the angle interval with the largest total length is selected as the line segment corresponding to the boundary of the floor tile or floor. Finally, the sweeping robot determines the correction angle based on the angle θ of the line segment corresponding to the boundary of the floor tile or floor; performs angle correction on the autonomous mobile device based on the correction angle, and controls the autonomous mobile device after angle correction to build a map.
[0120] Through the above method, the sweeping robot uses the front camera to capture the ground image, extracts multiple line segments from the ground image, and obtains the correction angle through the line segments corresponding to the boundaries of floor tiles or floors in the multiple line segments, so as to detect the angle between the autonomous mobile device and the boundaries of floor tiles or floors; the sweeping robot performs angle correction on the autonomous mobile device based on the correction angle, and the corrected autonomous mobile device performs mapping, thereby improving the accuracy of mapping, enhancing the user experience and improving the cleaning efficiency of the sweeping robot.
[0121] The above method is applied to hardware devices to achieve angle correction of autonomous mobile devices. Figure 7 , Figure 7 1 is a schematic diagram of the structure of an embodiment of an autonomous mobile device of the present application. The autonomous mobile device 200 of the present embodiment includes a processor 21 and a memory 22. The memory 22 stores a computer program, and the processor 21 is used to execute the computer program to implement the calibration method of the autonomous mobile device.
[0122] The processor 21 is used to obtain a ground image taken by a camera of the autonomous mobile device, extract multiple line segments from the ground image; determine a correction angle of the autonomous mobile device based on line segments corresponding to the boundaries of floor tiles or floors among the multiple line segments; and perform angle correction on the autonomous mobile device based on the correction angle.
[0123] The processor 21 may be an integrated circuit chip with signal processing capability. The processor 21 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 general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0124] for Figure 1-Figure 6 The correction method of the embodiment shown can be presented in the form of a computer program. The present application proposes a computer storage medium carrying the computer program. Figure 8 , Figure 8 It is a schematic diagram of the structure of an embodiment of a computer storage medium of the present application. The computer storage medium 300 of this embodiment includes a computer program 31, which can be executed to implement the calibration method of the autonomous mobile device.
[0125] The computer storage medium 300 of this embodiment can be a medium that can store program instructions, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, or it can also be a server that stores the program instructions. The server can send the stored program instructions to other devices for execution, or it can also execute the stored program instructions by itself.
[0126] In the several embodiments provided in the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation described above is only schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0127] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0128] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0129] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to perform all or part of the steps of each implementation method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.
[0130] The above description is only an implementation method of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly used in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A calibration method for an autonomous mobile device, characterized in that: The correction method comprises: Acquire a ground image captured by a camera of the autonomous mobile device; Extracting a plurality of line segments from the ground image; Calculate the endpoint coordinates of each line segment in the world coordinate system; Obtaining the angle and length of each of the line segments based on the endpoint coordinates; Determine the line segments corresponding to the boundaries of the tiles or floors by means of histogram statistics; determining a correction angle based on the angle of the line segment corresponding to the tile or floor boundary; Angle correction is performed on the autonomous mobile device based on the correction angle.
2. The calibration method according to claim 1, characterized in that: The step of determining the line segments corresponding to the boundaries of the tiles or the floor by means of histogram statistics comprises: Based on the angles of the plurality of line segments, assigning the plurality of line segments to different angle intervals; Counting the total length of the line segments within the same angle interval; The line segment within the angle interval with the largest total length is selected as the line segment corresponding to the boundary of the floor tile or the floor.
3. The calibration method according to claim 2, characterized in that: Before the step of determining the correction angle based on the angle of the line segment corresponding to the boundary of the floor tile or floor, the method further comprises: Determining whether the maximum total length is greater than or equal to a preset length threshold; In response to the largest of the total length being greater than or equal to the length threshold, the step of determining a correction angle based on the angle of the line segment corresponding to the tile or floor boundary is performed.
4. The calibration method according to claim 3, characterized in that: Before the step of determining the correction angle based on the angle of the line segment corresponding to the boundary of the floor tile or floor, the method further comprises: In response to the maximum total length being less than the length threshold, the autonomous mobile device is controlled to rotate by a preset angle, and the step of obtaining the ground image captured by the camera of the autonomous mobile device is returned to.
5. The calibration method according to claim 2, characterized in that: The step of determining the correction angle based on the angle of the line segment corresponding to the tile or floor boundary comprises: Sort the angles of the line segments within the angle interval with the largest total length; Selecting a middle angle from the sorted angles as the correction angle; or The step of determining the correction angle based on the angle of the line segment corresponding to the tile or floor boundary comprises: Calculate the average value of the angles of the line segments within the angle interval with the largest total length; The average value is taken as the correction angle.
6. The calibration method according to claim 1, characterized in that: The step of performing angle correction on the autonomous mobile device based on the correction angle comprises: The autonomous mobile device is controlled to rotate based on the correction angle so that the moving direction of the autonomous mobile device and / or the optical axis direction of the camera are parallel to the floor tile or bottom plate boundary.
7. The calibration method according to claim 6, characterized in that: The camera is a front camera of the autonomous mobile device, and the moving direction of the autonomous mobile device is arranged in the same direction as the optical axis direction of the camera.
8. The calibration method according to claim 1, characterized in that: The method further comprises: The autonomous mobile device after controlling the angle correction is used for mapping.
9. An autonomous mobile device, characterized in that: The autonomous mobile device comprises a processor and a memory; a computer program is stored in the memory, and the processor is used to execute the computer program to implement the steps of the correction method according to any one of claims 1 to 8.
10. A computer storage medium, characterized in that: The computer storage medium stores a computer program, and when the computer program is executed, the steps of the correction method according to any one of claims 1 to 8 are implemented.
