Method, apparatus, device and storage medium for controlling device movement
By placing a target image at the target position of the automatic mobile device, identifying the positioning icon and determining the feature extraction area, and extracting feature points, the problem of time-consuming device movement is solved, and faster and more accurate mobile control is achieved.
Patent Information
- Application Number
- CN202211012504.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-23
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2042-08-23
AI Technical Summary
When an automatic mobile device moves to a target location, the movement direction is inaccurate due to the error in posture determination, and the feature point extraction processing is large, resulting in a long movement time.
By placing a target image at the target location, identifying the positioning icon and determining the feature extraction area, the feature points in the background pattern are extracted, and the actual spatial position of the reference feature points is combined to accurately determine the posture and control the movement.
The processing load of feature point extraction is reduced, the accuracy and speed of posture determination are improved, and the time it takes for the device to move to the target position is shortened.
Smart Images

Figure CN115457251B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of automatic mobile equipment, and in particular to a method, apparatus, device and storage medium for controlling the movement of a device. Background Art
[0002] With technological advancements, devices capable of autonomous movement have become widely used. These devices, known as autonomous mobile devices, include robotic lawn mowers, sweeping robots, and delivery robots. These autonomous mobile devices often need to move to a designated target location during operation. For example, an autonomous lawn mower needs to be moved to a charging station for charging. Typically, a target image is placed at the target location to assist the autonomous mobile device in moving to the target location.
[0003] During movement, the mobile device can use its camera to capture images in the direction of the target location. A feature point extraction algorithm is used to extract feature points from the captured images, determining their positions within the image. The current pose of the mobile device is then calculated based on these positions. This pose is then used to control the mobile device's movement toward the target location, enabling subsequent actions such as charging.
[0004] Because there are certain errors in determining the pose, an inaccurate pose can lead to an incorrect movement direction, necessitating periodic pose determination and direction correction. However, images captured by an automated mobile device typically include the target image and some objects in the environment (such as grass and fences). The large number of feature points involved in the image results in a large amount of processing required to extract the feature points, leading to a long pose determination cycle. This results in the automated mobile device's movement direction not being corrected in a timely manner, and in turn, the overall time it takes for the automated mobile device to move to the target location is long. Summary of the Invention
[0005] The present invention provides a method, apparatus, device, and storage medium for controlling device movement, which can solve the problem of a long overall time consumption when an automatic device moves to a target location. The technical solution is as follows:
[0006] In a first aspect, a method for controlling device movement is provided. The method is applied to an automatic mobile device, wherein a target image is placed at a target position of the automatic mobile device, the target image including a background pattern and at least one positioning icon. The method comprises:
[0007] Acquire a first image captured by the automatic mobile device;
[0008] Identifying the positioning icon in the first image and obtaining a position of the positioning icon in the first image;
[0009] Based on the position of the positioning icon in the first image, determining an area in the first image that contains at least a portion of the background pattern as a feature extraction area;
[0010] Extracting feature points in the feature extraction area of the first image to determine a position of at least one first image feature point in the first image;
[0011] The posture of the automatic moving device is determined based on the position of the at least one first image feature point in the first image and the actual spatial position of the reference feature point in the background pattern, and the automatic moving device is controlled to move toward the target position based on the posture.
[0012] In a possible implementation, determining, based on the position of the positioning icon in the first image, a region in the first image containing at least a portion of the background pattern as a feature extraction region includes:
[0013] Taking the center of the positioning icon in the first image as the center, determine an area of a specified shape and a specified size as a feature extraction area.
[0014] In a possible implementation, determining a region of a specified shape and a specified size as a feature extraction region with the center of the positioning icon in the first image as the center includes:
[0015] Taking the center of the positioning icon in the first image as the center of the circle, a circular area with a specified radius is determined as the feature extraction area.
[0016] In a possible implementation, acquiring the first image captured by the automatic mobile device includes:
[0017] When the distance between the automatic moving device and the target location is greater than a first distance threshold and less than a second distance threshold, a first image captured by the automatic moving device is acquired.
[0018] In a possible implementation, the method further includes:
[0019] When the distance between the automatic moving device and the target location is greater than a second distance threshold and less than a third distance threshold, acquiring a second image captured by the automatic moving device;
[0020] identifying the positioning icon in the second image, and obtaining a position of the positioning icon in the second image;
[0021] The posture of the automatic moving device is determined based on the position of the positioning icon in the second image and the actual spatial position of the positioning icon, and the automatic moving device is controlled to move toward the target position based on the posture.
[0022] In a possible implementation, the method further includes:
[0023] When the distance between the automatic moving device and the target location is less than a first distance threshold, acquiring a third image captured by the automatic moving device;
[0024] In the third image, feature point extraction is performed to determine a position of at least one third image feature point in the third image;
[0025] The posture of the automatic moving device is determined based on the position of the at least one third image feature point in the third image and the actual spatial position of the reference feature point in the background pattern, and the automatic moving device is controlled to move toward the target position based on the posture.
[0026] In a possible implementation, extracting feature points in the feature extraction area in the first image and determining a position of at least one first image feature point in the first image includes:
[0027] reducing the resolution of the regional image in the feature extraction area;
[0028] performing feature point extraction on the image after the resolution is reduced, and determining a position of at least one first image feature point in the image after the resolution is reduced;
[0029] Based on the position of the at least one first image feature point in the image after reducing the resolution, the position of the at least one first image feature point in the first image is determined.
[0030] In a possible implementation, after determining the position and posture of the automatic moving device, the method further includes:
[0031] Determining a distance traveled by the automatic mobile device after determining the position and posture;
[0032] An updated position and posture of the autonomous moving device is determined based on the mileage value and the position and posture.
[0033] In one possible implementation, extracting feature points in the feature extraction area in the first image, determining a position of at least one first image feature point in the first image, and determining a position and posture of the automatic moving device based on a position in the first image and an actual spatial position of a feature point belonging to the background pattern among the at least one first image feature point, include:
[0034] Extracting feature points in the feature extraction area of the first image to determine a feature descriptor of at least one first image feature point and a position in the first image;
[0035] Based on pre-stored feature descriptors of a plurality of reference feature points corresponding to the background pattern, determining a target feature point that matches the feature descriptor of any reference feature point among the at least one first image feature point;
[0036] Based on the pre-stored actual spatial positions of the plurality of reference feature points, determining the actual spatial position of the reference feature point corresponding to the target feature point as the actual spatial position of the target feature point;
[0037] The posture of the automatic moving device is determined based on the position of the target feature point in the first image and the actual spatial position.
[0038] In a possible implementation, before acquiring the first image captured by the automatic mobile device, the method further includes:
[0039] Acquire a fourth image of the target image captured by the automatic mobile device;
[0040] identifying the positioning icon in the fourth image, and obtaining a position of the positioning icon in the fourth image;
[0041] determining an extrinsic parameter matrix of the image capturing component of the automatic mobile device based on the position and actual spatial position of the positioning icon in the fourth image and the intrinsic parameter matrix of the image capturing component of the automatic mobile device;
[0042] Extracting feature points from the fourth image to determine positions of a plurality of feature points in the fourth image;
[0043] Determining actual spatial positions of the plurality of feature points based on positions of the plurality of feature points in the fourth image, an intrinsic parameter matrix, and the extrinsic parameter matrix;
[0044] Based on the actual spatial positions of the multiple feature points, a feature point in the actual spatial area corresponding to the background pattern is determined as a reference feature point, and the actual spatial position of the reference feature point is stored.
[0045] In a second aspect, a device for controlling device movement is provided. The device is applied to an automatic mobile device, wherein a target image is placed at a target position where the automatic mobile device moves, the target image including a background pattern and at least one positioning icon. The device includes:
[0046] An acquisition module, configured to acquire a first image captured by the automatic mobile device;
[0047] an identification module, configured to identify the positioning icon in the first image and obtain a position of the positioning icon in the first image;
[0048] a determining module, configured to determine, based on the position of the positioning icon in the first image, an area in the first image containing at least a portion of the background pattern as a feature extraction area;
[0049] an extraction module, configured to extract feature points in the feature extraction area in the first image, and determine a position of at least one first image feature point in the first image;
[0050] A control module is configured to determine a posture of the automatic moving device based on a position of the at least one first image feature point in the first image and an actual spatial position of a reference feature point in the background pattern, and control the automatic moving device to move toward the target position based on the posture.
[0051] In a possible implementation, the determining module is configured to:
[0052] Taking the center of the positioning icon in the first image as the center, determine an area of a specified shape and a specified size as a feature extraction area.
[0053] In a possible implementation, the determining module is configured to:
[0054] Taking the center of the positioning icon in the first image as the center of the circle, a circular area with a specified radius is determined as the feature extraction area.
[0055] In a possible implementation, the acquisition module is configured to:
[0056] When the distance between the automatic moving device and the target location is greater than a first distance threshold and less than a second distance threshold, a first image captured by the automatic moving device is acquired.
[0057] In a possible implementation, the acquisition module is further configured to acquire a second image captured by the automatic mobile device when the distance between the automatic mobile device and the target location is greater than a second distance threshold and less than a third distance threshold;
[0058] The recognition module is further configured to recognize the positioning icon in the second image and obtain a position of the positioning icon in the second image;
[0059] The control module is further configured to determine a posture of the automatic moving device based on the position of the positioning icon in the second image and the actual spatial position of the positioning icon, and control the automatic moving device to move toward the target position based on the posture.
[0060] In a possible implementation, the acquisition module is further configured to acquire a third image captured by the automatic mobile device when the distance between the automatic mobile device and the target location is less than a first distance threshold;
[0061] The extraction module is further configured to extract feature points from the third image and determine a position of at least one feature point of the third image in the third image;
[0062] The control module is further used to determine the posture of the automatic moving device based on the position of the at least one third image feature point in the third image and the actual spatial position of the reference feature point in the background pattern, and control the automatic moving device to move toward the target position based on the posture.
[0063] In a possible implementation, the extraction module is configured to:
[0064] reducing the resolution of the regional image in the feature extraction area;
[0065] performing feature point extraction on the image after the resolution is reduced, and determining a position of at least one first image feature point in the image after the resolution is reduced;
[0066] Based on the position of the at least one first image feature point in the image after reducing the resolution, the position of the at least one first image feature point in the first image is determined.
[0067] In a possible implementation, the control module is further configured to:
[0068] Determining a distance traveled by the automatic mobile device after determining the position and posture;
[0069] An updated position and posture of the autonomous moving device is determined based on the mileage value and the position and posture.
[0070] In a possible implementation, the extraction module is configured to:
[0071] Extracting feature points in the feature extraction area of the first image to determine a feature descriptor of at least one first image feature point and a position in the first image;
[0072] The control module is used to:
[0073] Based on pre-stored feature descriptors of a plurality of reference feature points corresponding to the background pattern, determining a target feature point that matches the feature descriptor of any reference feature point among the at least one first image feature point;
[0074] Based on the pre-stored actual spatial positions of the plurality of reference feature points, determining the actual spatial position of the reference feature point corresponding to the target feature point as the actual spatial position of the target feature point;
[0075] The posture of the automatic moving device is determined based on the position of the target feature point in the first image and the actual spatial position.
[0076] In a possible implementation, the acquisition module is further configured to acquire a fourth image of the target image captured by the automatic mobile device;
[0077] The recognition module is further configured to recognize the positioning icon in the fourth image and obtain a position of the positioning icon in the fourth image;
[0078] The determining module is further configured to determine an extrinsic parameter matrix of the image capturing component of the automatic mobile device based on the position and actual spatial position of the positioning icon in the fourth image and the intrinsic parameter matrix of the image capturing component of the automatic mobile device;
[0079] The extraction module is further configured to extract feature points from the fourth image and determine positions of a plurality of feature points in the fourth image;
[0080] The determining module is further configured to determine the actual spatial positions of the plurality of feature points based on the positions of the plurality of feature points in the fourth image, the intrinsic parameter matrix, and the extrinsic parameter matrix;
[0081] The device also includes a storage module for determining, based on the actual spatial positions of the multiple feature points, feature points within the actual spatial area corresponding to the background pattern among the multiple feature points as reference feature points, and storing the actual spatial positions of the reference feature points.
[0082] In a third aspect, a computer device is provided, comprising a processor and a memory, wherein the memory stores at least one instruction, and the processor loads and executes the at least one instruction to implement the method for controlling device movement as described in the first aspect above.
[0083] In a fourth aspect, a computer-readable storage medium is provided, wherein the storage medium stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the method for controlling the movement of the device as described in the first aspect above.
[0084] In a fifth aspect, a computer program product is provided, which includes computer program code. When the computer program code is executed by a computer device, the computer device executes the method of the first aspect and its possible implementation methods.
[0085] The beneficial effects of the technical solutions provided in the embodiments of the present application include at least:
[0086] In an embodiment of the present application, the target image placed at the target position includes a background pattern and a positioning icon. In the process of determining the posture of the automatic mobile device, the position of the positioning icon in the first image taken can be first identified, and then a feature extraction area is determined in the first image based on the position, and then feature points are extracted in the feature extraction area to determine the posture, and the movement control is performed based on the posture. Because the feature extraction area includes at least a part of the background pattern, the extracted feature points include valid feature points (feature points in the background pattern). Because the feature extraction area is a part of the first image, the extracted feature points are fewer than the feature points in the entire first image. In this way, a more accurate posture can be determined, and the processing amount of feature point extraction can be reduced, thereby reducing the cycle time for determining the posture, so that the moving direction of the automatic mobile device can be corrected more timely, and ultimately the overall time consumed by the automatic mobile device to move to the target position can be reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0087] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. 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 any creative work.
[0088] Figure 1 This is a schematic structural diagram of an automatic mobile device provided in an embodiment of the present application;
[0089] Figure 2 This is a schematic diagram of a positioning icon provided in an embodiment of the present application;
[0090] Figure 3 This is a schematic diagram of a positioning icon provided in an embodiment of the present application;
[0091] Figure 4 This is a schematic diagram of a positioning icon provided in an embodiment of the present application;
[0092] Figure 5 This is a flow chart of a method for controlling device movement provided by an embodiment of the present application;
[0093] Figure 6 This is a schematic diagram of a feature extraction area provided in an embodiment of the present application;
[0094] Figure 7 This is a schematic diagram of a feature extraction area provided in an embodiment of the present application;
[0095] Figure 8 This is a schematic diagram of a feature extraction area provided in an embodiment of the present application;
[0096] Figure 9 This is a distance interval diagram provided in an embodiment of the present application;
[0097] Figure 10 This is a flow chart of a method for controlling device movement provided by an embodiment of the present application;
[0098] Figure 11 This is a flow chart of a method for controlling device movement provided by an embodiment of the present application;
[0099] Figure 12 This is a flow chart of a method for extracting feature points by reducing image resolution provided by an embodiment of the present application;
[0100] Figure 13 This is a flow chart of a method for registering feature points provided in an embodiment of the present application;
[0101] Figure 14 This is a structural diagram of an apparatus for controlling the movement of a device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0102] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.
[0103] Embodiments of the present application provide a method for controlling device movement, which can be implemented by an autonomous mobile device. The autonomous mobile device can be a device with both autonomous movement and image capture capabilities, such as an autonomous lawn mower, a robot vacuum, or a delivery robot. The image capture capability can support a camera or other capture method.
[0104] From the perspective of hardware composition, the structure of automatic mobile equipment can be as follows Figure 1 As shown, it includes a processor 110, a memory 120, an image sensor 130, an odometer 140, a travel mechanism 150, etc.
[0105] The processor 110 may be a central processing unit (CPU), a system on chip (SoC), etc. It may be used to determine image feature regions, extract feature points within feature regions, and calculate device posture.
[0106] The memory 120 may include various volatile or non-volatile memories, such as a solid-state disk (SSD) or dynamic random access memory (DRAM). The memory 120 may be used to store pre-stored data, intermediate data, and result data for displacement control, such as feature descriptors of feature points in an image, the actual spatial positions of the feature points, and the intrinsic and extrinsic parameter matrices of the camera.
[0107] The image sensor 130 may be a linear array or area array charge coupled device (CCD) camera, a digital camera, etc. The image sensor 130 may be used to capture images.
[0108] The odometry 140 may be a wheel odometry, a visual odometry, a visual-inertial odometry, or the like. It can be used to determine the change in the position of the autonomous mobile device over time and the distance the autonomous mobile device has moved relative to an initial position. For example, it can determine the distance the device has moved between time T1 and time T2.
[0109] The travel mechanism 150 can be a wheeled travel mechanism, a tracked travel mechanism, a robot leg travel mechanism, etc. It is used to provide power for the movement of the autonomous mobile device and can also control the direction and speed of the movement of the autonomous mobile device. For example, it can provide power to move the autonomous mobile device toward a target location and adjust the movement direction by obtaining the position and posture of the autonomous mobile device.
[0110] There are many kinds of automatic mobile devices in life, and they often need to move to a specified target location during work. A target image can be placed at this location to assist the automatic mobile device in determining the target location for movement control. When the automatic mobile device is an automatic lawn mower, the target location can be the location of the charging base, the device storage location, etc. When the automatic mobile device is a sweeping robot, the target location can be the location of the charging base, etc. When the automatic mobile device is a courier handling robot, the target location can be the location of a conveyor belt, etc. The embodiment of the present application takes the application scenario of an automatic lawn mower moving to a charging base as an example to provide a detailed description of the solution. Other situations are similar and will not be repeated here.
[0111] A target image is placed on the charging base of the automatic lawn mower. The target image used in the embodiment of the present application includes a background pattern and at least one positioning icon, which are described in detail below.
[0112] Background pattern
[0113] The background pattern is used to accurately calculate the pose. The background pattern should contain evenly distributed rich texture information, which can provide rich feature points such as edges or corners.
[0114] In an embodiment of the present application, when selecting a background pattern, an evaluation is performed on whether the distribution of feature points in the background pattern is uniform. Feature point extraction is performed in the pattern to be selected, and the positions of all feature points contained in the pattern to be selected are determined. The pattern to be selected is evenly divided into M regions, and the number of feature points in each region is counted (n1, n2, ... nM). The standard deviation of the number of feature points in each region is then calculated, and this standard deviation is determined as the uniformity of the distribution of feature points in the pattern to be selected. The smaller the standard deviation, the closer the number of feature points in each region is to the average value, that is, the more uniform the distribution of feature points is. The larger the standard deviation, the closer the number of feature points in each region is to the average value, that is, the more uneven the distribution of feature points is. Ultimately, if the uniformity of the distribution of feature points of the pattern to be selected is less than a preset uniformity threshold, the pattern to be selected can be selected as the background pattern.
[0115] Location Icon
[0116] The positioning icon is used to determine the position of the background pattern and can also be used for rough pose calculation. The positioning icon can be any specified graphic. The graphic can be a commonly used geometric shape such as a rectangle, circle, or ellipse, or it can be a combination of commonly used geometric images, and the combination can be in parallel, nested, etc. For example, Figure 2 Positioning icons formed by combining rectangles in a nested form. Figure 3 A positioning icon formed by two rectangles side by side. Figure 4 A positioning icon formed by nested circles.
[0117] like Figure 5 As shown, the processing flow of the method for controlling the movement of the device may include the following steps:
[0118] 501. Acquire a first image captured by an automatic mobile device.
[0119] In implementation, the automatic mobile device will be set with a charging power ratio threshold, such as 30%. During operation, when the automatic mobile device detects that the battery power is lower than the charging power ratio threshold, it will trigger the automatic mobile device to start moving towards the position of the charging base (which can be called the target position). The automatic mobile device can first locate itself through some positioning methods with slightly lower accuracy, such as global positioning system (GPS), ultra wide band (UWB) and other positioning methods. After determining its own position, it can determine the moving direction based on the pre-stored target position of the charging base and its own position, and move in the moving direction. During the movement, the automatic mobile device can continuously update the positioning and adjust the moving direction. At the same time, the automatic mobile device can shoot in the direction of the target position to obtain a captured image. Image shooting can be performed periodically, with a period of 0.5 seconds. The above-mentioned first image is an image captured by the automatic mobile device during its movement.
[0120] 502 : Identify a positioning icon in the first image and obtain a position of the positioning icon in the first image.
[0121] Among them, the position of the positioning icon in the first image (that is, the position in the two-dimensional image coordinate system of the first image) can be the position of the center of the positioning icon, or it can be the position of a specified point on the positioning icon, such as the upper left corner vertex, etc., or it can be the position range of the positioning icon, and so on.
[0122] During implementation, the automatic mobile device identifies the positioning icon in the captured image during movement. If the positioning icon cannot be identified in the currently captured image, the recognition can continue for the subsequently captured images. For example, the positioning icon is a rectangular nested frame. The automatic mobile device captures an image A during movement and identifies the rectangular nested frame in A. If the rectangular nested frame cannot be identified in A, the device continues to move and captures image B at a subsequent position during movement, and identifies B until the rectangular nested frame can be identified in the image. When the positioning icon is recognized for the first time in the captured image, the position of the positioning icon in the image is stored. When identifying the subsequently captured images, the position of the stored positioning icon in the image can be obtained, and identification can be performed within a certain range around the position. It is not necessary to identify the entire image. After the positioning icon is identified, the stored position of the positioning icon in the image is updated.
[0123] After the positioning icon is identified in the image, the position of the positioning icon in the two-dimensional image coordinate system of the current image (i.e., the first image) can be determined. For example, the positioning icon in the target image is a rectangular nested box, and the processor 110 recognizes that there is a rectangular nested box in the first image. The position of one vertex of the rectangular nested box in the two-dimensional image coordinate system of the first image can be taken as the position of the positioning icon in the first image. For another example, when the positioning icon is a circular nested box, and the processor 110 recognizes that there is a circular nested box in the first image, the position of the positioning icon in the two-dimensional image coordinate system of the first image can be taken as the center of the circle.
[0124] 503 : Determine a feature extraction region in the first image that includes at least a portion of the background pattern based on the position of the positioning icon in the first image.
[0125] The feature extraction area is a local area in the first image.
[0126] In implementation, various methods may be used to determine the feature extraction region based on the position of the positioning icon in the two-dimensional image coordinate system of the first image. Several methods for determining the feature extraction region are provided below:
[0127] Method 1: With the position of the positioning icon in the two-dimensional image coordinate system of the first image as the center, an area of a specified shape and a specified size is determined as the feature extraction area.
[0128] 1. Such as Figure 6 As shown, a circular area with a specified radius is determined as the feature extraction area, with the center of the positioning icon in the 2D image coordinate system of the first image as the center of the circle. For example, if the positioning icon is a rectangular nested box, a circular area with a radius of 50 is determined as the feature extraction area, with the center of the rectangular nested box in the 2D image coordinate system of the first image as the center of the circle.
[0129] 2. Such as Figure 7 As shown, a rectangular area of a specified size is determined as the feature extraction area, with the center of the positioning icon in the two-dimensional image coordinate system of the first image as the center. For example, if the positioning icon is a rectangular nested box, a rectangular area of 100×100 is determined as the feature extraction area, with the center of the rectangular nested box in the first image as the center.
[0130] Method 2: Figure 8 As shown, the area range of the background pattern in the first image can be determined as the feature extraction area based on the pre-stored positional relationship between the positioning icon and the background pattern, and the position of the positioning icon in the two-dimensional image coordinate system of the first image.
[0131] For example, in the target image, the background pattern is rectangular, the positioning icon is a square nested box, and the target image has four positioning icons located at the four corners of the background pattern. In this case, after identifying the four positioning icons, the positions of the specified vertices in the four positioning icons can be determined as the positions of the four corner points of the background pattern, and then the area range of the background pattern in the first image can be determined as the feature extraction area.
[0132] 504 , extract feature points in the feature extraction area of the first image, and determine a position of at least one first image feature point in the first image.
[0133] Among them, feature points can be considered as points that can reflect the visual characteristics of an object. Such visual characteristics will not change with changes in viewing angle, or will only change slightly with changes in viewing angle. For example, when taking a picture of a chair, no matter from which angle the image is taken, the curvature of the chair's contour lines, material texture, angular structure, etc. are the same or very similar. In this case, the points at the positions of the chair's contour lines, material texture, angular structure, etc. in the image can be considered as feature points of the image. Feature points are generally points where the grayscale value of the image changes dramatically or points with large curvature on the edge of the image (i.e., the intersection of two edges). A feature point of an image has two important properties: the position of the point in the image and the feature descriptor of the point. The feature descriptor is usually an n-dimensional vector that describes the information of the pixels around the feature point in a human-designed manner.
[0134] In implementation, the processor 110 extracts feature points in the feature extraction area through a feature point extraction algorithm to obtain a position and a feature descriptor of each feature point (i.e., a first image feature point) in the feature extraction area in the two-dimensional image coordinate system of the first image. The feature extraction algorithm used can be scale-invariant feature transform (SIFT), accelerated robust features (SURF), accelerated segment test features (FAST), binary robust independent elementary features (BRIEF), oriented FAST and rotated BRIEF (ORB), etc.
[0135] 505 , determining the posture of the automatic moving device based on the position of the first image feature point in the first image and the actual spatial position of the reference feature point, and controlling the automatic moving device to move toward the target position based on the posture.
[0136] Among them, the actual spatial position (i.e., the position in the three-dimensional world coordinate system) and feature descriptor of the reference feature point can be obtained and stored through reference feature point registration. The registration method will be described in detail in the following content and will not be introduced here.
[0137] In implementation, first, based on pre-stored feature descriptors of multiple reference feature points corresponding to the background pattern, a first image feature point that matches the feature descriptor of any reference feature point is identified among at least one first image feature point as the target feature point. The criterion for determining feature descriptor matching is that the two feature descriptors are identical, or that the similarity between the two feature descriptors exceeds a specified similarity threshold, which can be set by a technician based on experience. Then, based on the position of the reference feature point in the 3D world coordinate system, the position of the reference feature point corresponding to the target feature point in the 3D world coordinate system is determined as the position of the target feature point in the 3D world coordinate system. Next, based on the position of the target feature point in the 2D image coordinate system and the 3D world coordinate system of the first image, a pose solving function (such as SolvePNP, a pose solving function) is used to solve the pose of the automatic mobile device. At this point, the pose can also be determined in conjunction with a positioning icon, that is, the pose of the automatic mobile device is determined based on the position of the target feature point in the 2D image coordinate system and the 3D world coordinate system of the first image, as well as the position of the positioning icon in the 2D image coordinate system and the 3D world coordinate system of the first image.
[0138] For example, the position of the first image feature point in the two-dimensional image coordinate system of the first image is obtained as (u1, v1), and the feature descriptor is (a1, a2...an). A matching search is performed among the pre-stored reference feature points. If the feature descriptor (a1`, a2`, ...an`) of the reference feature point has a similarity with (a1, a2, ...an) that exceeds a similarity threshold, the position (x1, y1, z1) in the three-dimensional world coordinate system corresponding to the reference feature point is read as the position of the first image feature point in the three-dimensional world coordinate system. Based on the position (u1, v1) of the first image feature point in the two-dimensional image coordinate system, the position (x1, y1, z1) in the three-dimensional world coordinate system, and the camera intrinsic parameter matrix, the pose information of the automatic mobile device is solved using the pose solver function.
[0139] After determining the position and posture of the autonomous mobile device, a route to a target location can be planned based on the position and the autonomous mobile device can be controlled to move along the route.
[0140] In the embodiment of the present application, Figure 5 Some conditions are set for the execution of the process to reduce invalid recognition processing. Figure 9As shown, the processing of this process can be executed when the distance between the automatic mobile device and the target location is greater than the first distance threshold and less than the second distance threshold. In addition, the embodiment of the present application also provides a processing flow when the distance between the automatic mobile device and the target location is greater than the second distance threshold and less than the third distance threshold, and a processing flow when the distance between the automatic mobile device and the target location is less than the first distance threshold.
[0141] The first distance threshold, the second distance threshold, and the third distance threshold may be determined based on experiments.
[0142] Technicians can control the automatic mobile device to take a large number of images of the target image at different angles and distances. Among the captured images, determine the images in which the background image but the positioning icon does not exist, and among the shooting distances of these images, determine the maximum shooting distance as the first distance threshold. In the images with a shooting distance greater than the first distance threshold, extract feature points from each image, determine the number of matches between the image's feature points and the reference feature points, determine the shooting distances of all images with a matching number greater than the target number, and use the maximum shooting distance as the second distance threshold. In the images with a shooting distance greater than the second distance threshold, identify the positioning icon for each image, determine the shooting distances of all images in which the positioning icon can be identified, and use the maximum distance as the third distance threshold.
[0143] When the distance between the automatic mobile device and the target location is greater than the second distance threshold and less than the third distance threshold, the processing flow may be as follows: Figure 10 As shown, the following steps are included:
[0144] 1001. When the distance between the automatic mobile device and the target location is greater than a second distance threshold and less than a third distance threshold, obtain a second image captured by the automatic mobile device.
[0145] The autonomous mobile device may first locate itself using some positioning methods with slightly lower accuracy, such as the global positioning system (GPS), ultra wide band (UWB), etc. The second image is an image captured by the autonomous mobile device during its movement.
[0146] 1002 : Identify a positioning icon in the second image and obtain a position of the positioning icon in the second image.
[0147] The number of positioning icons in the target image is at least three.
[0148] In practice, the automatic mobile device identifies the positioning icon in the captured image while moving toward the target location. If the positioning icon cannot be identified, the recognition of the subsequent captured images can be continued until the positioning icon is identified. Then, the position of the positioning icon in the current image (i.e., the second image) can be determined. When the positioning icon is recognized for the first time in the captured image, the position of the positioning icon in the image is stored. When recognizing the subsequent captured images, the position of the stored positioning icon in the image can be obtained, and recognition is performed within a certain range around the position. It is not necessary to recognize in the entire image. After the positioning icon is recognized, the stored position of the positioning icon in the image is updated.
[0149] 1003 : Determine the posture of the automatic moving device based on the position of the positioning icon in the two-dimensional image coordinate system of the second image and the actual spatial position of the positioning icon, and control the automatic moving device to move toward the target position based on the posture.
[0150] The position of the positioning icon in the three-dimensional world coordinate system can be obtained and stored in advance by manual measurement or automatic acquisition.
[0151] In implementation, the position of the positioning icon in the 2D image coordinate system of the second image is determined based on the pre-stored position of the positioning icon in the 3D world coordinate system. The position of the positioning icon in the 2D image coordinate system and the 3D world coordinate system of the second image is then used to determine the posture of the automatic moving device. Based on the posture, the travel mechanism 150 is controlled to correct the movement path of the automatic moving device toward the target location.
[0152] The embodiment of the present application also provides a processing method for determining the posture using only feature points. The corresponding processing flow can be as follows: Figure 11 As shown, the following steps are included:
[0153] 1101. When the distance between the automatic mobile device and the target location is less than a first distance threshold, obtain a third image captured by the automatic mobile device.
[0154] 1102 , extract feature points from the third image, and determine a position of at least one feature point of the third image in the third image.
[0155] A specific implementation is that the processor 110 extracts feature points from the third image using a feature point extraction algorithm, and reads the positions of the feature points on the third image after extracting the feature points.
[0156] 1103. Determine a posture of the automatic moving device based on a position of at least one third image feature point in the third image and an actual spatial position of a reference feature point in the background pattern, and control the automatic moving device to move toward a target position based on the posture.
[0157] In implementation, based on the feature descriptors of multiple reference feature points corresponding to the pre-stored background pattern, a feature descriptor (a1, a2...an) of a third image feature point that matches the feature descriptor (a1', a2', ...an') of any reference feature point is determined in at least one third image feature point, and the feature point is used as the target feature point. Based on the positions of the multiple pre-stored reference feature points in the three-dimensional world coordinate system, the position of the reference feature point corresponding to the target feature point in the three-dimensional world coordinate system is determined as the position of the target feature point in the three-dimensional world coordinate system. Based on the position of the target feature point in the two-dimensional image coordinate system and the position in the three-dimensional world coordinate system of the third image, the posture of the automatic moving device is determined. Based on the posture control travel mechanism 150, the moving route of the automatic moving device is corrected to move toward the target position.
[0158] like Figure 9 As shown, the process of the automatic mobile device moving toward the target location can be divided into multiple distance intervals. Initially, the distance between the automatic mobile device and the target location is greater than a third distance threshold, and no image capture or image recognition is performed at this time. As the automatic mobile device moves, the distance between the automatic mobile device and the target location gradually decreases. When the distance is greater than a second distance threshold and less than a third distance threshold (referred to as the first distance interval), the process 1001-1003 is used to perform movement control based solely on the position determined by the positioning icon. As the distance between the automatic mobile device and the target location further decreases, when the distance is greater than the first distance threshold and less than a second distance threshold (referred to as the second distance interval), the process 501-505 is used to perform movement control based on both the positioning icon and the background pattern. As the distance between the automatic mobile device and the target location further decreases, when the distance is less than the first distance threshold (referred to as the third distance interval), the process 1101-1103 is used to perform movement control based solely on the background pattern until the automatic mobile device reaches the target location.
[0159] Using the above-mentioned segmented movement control method, within the first distance interval, when it is impossible to extract a valid number of feature points from the background pattern but the positioning icon can be accurately identified, the positioning icon can be used to achieve more accurate movement control than GPS, WiFi, etc.; within the second distance interval, when the positioning icon can be accurately identified and a valid number of feature points can be extracted from the background pattern, accurate and efficient movement control can be achieved by combining the positioning icon and the background pattern; within the third distance interval, when the positioning icon cannot be identified, the background pattern is used for accurate movement control.
[0160] The movement control performed in each distance interval can be performed on a cyclical basis, and each time a cyclic time point is reached, the process processing corresponding to the current distance interval is executed once. The control cycles of the three distance intervals can be the same or different. For example, the first control cycle corresponding to the first distance interval can be set to be smaller than the second control cycle corresponding to the second distance interval, and the second control cycle corresponding to the second distance interval can be set to be smaller than the third control cycle corresponding to the third distance interval. Among them, the first control cycle, the second control cycle, and the third control cycle can be determined through experiments, and the principle of determination can be to ensure that the length of the control cycle is sufficient to complete a movement control process processing of the corresponding distance interval. This cycle setting method can make the moving direction of the automatic moving device corrected as timely as possible, reducing the overall time consumed by the automatic moving device to move to the target position.
[0161] When executing step 504, the image resolution can be reduced first, and then feature point extraction can be performed. The corresponding process is as follows: Figure 12 As shown, the following steps are included:
[0162] 1201, reduce the image resolution of the feature extraction area.
[0163] Image resolution refers to the number of pixels distributed across an image. For example, if the original resolution is 100×100, meaning the image consists of 100 rows and 100 columns of pixels, then reducing the resolution to 50×50 means there are 50 pixels per inch horizontally and vertically. While the pixel size remains the same, the number of pixels decreases, and the image size decreases.
[0164] Reducing the resolution is equivalent to removing some pixels from the image in the feature extraction area. For example, if the original resolution is 100×100 and the reduced resolution is 50×50, the resolution reduction operation can be to divide all the pixels of the image into multiple groups, each containing 2×2 pixels. Then, for each group, only the pixel in the upper left corner is retained, thus obtaining the reduced resolution image.
[0165] 1202 , extract feature points from the image with reduced resolution, and determine a position of at least one first image feature point in the image with reduced resolution.
[0166] The processor 110 extracts feature points from the low-resolution image (ie, the image after reducing the resolution) using a feature point extraction algorithm to obtain the position (u1, v1) of the feature point in the low-resolution image and the feature descriptor (a1, a2, ..., an) of the feature point.
[0167] 1203 : Determine a position of the at least one first image feature point in the two-dimensional image coordinate system of the first image based on the position of the at least one first image feature point in the image after reducing the resolution.
[0168] In practice, because the pixels in the low-resolution image are all pixels in the original image, the extracted feature points are also pixels in the original image. Therefore, the positions of these feature points in the original image can be determined through position conversion. The processor 110 first determines the positions of the feature points within the feature extraction area based on the positions of the extracted feature points in the low-resolution image. Then, based on the position of the positioning icon in the two-dimensional image coordinate system of the first image and the relative positional relationship between the feature extraction area and the positioning icon, the positions of the feature points within the feature extraction area are converted to the positions of the feature points within the first image.
[0169] For example, the original resolution of the feature extraction area is 100×100, and the resolution after reduction is 50×50. The coordinates of a feature point extracted in the low-resolution image are (30, 30), then the coordinates of the feature point in the feature extraction area are (60, 60), and the feature extraction area is a 100×100 rectangle centered on the position (150, 150) of the positioning icon in the two-dimensional image coordinate system of the first image. Then the position of the feature point in the two-dimensional image coordinate system of the first image is (160, 160).
[0170] The above step 1102 may also use a processing method similar to steps 1201 to 1203 to extract feature points.
[0171] Optionally, after determining the posture and moving based on any of the above processes in any cycle, the posture can be continuously updated in combination with the mileage value. Accordingly, the following steps can be performed after steps 505, 1003 or 1103: after determining the posture of the automatic mobile device, determine the mileage value of the automatic mobile device; based on the travel mileage value and the posture, determine the updated posture of the automatic mobile device.
[0172] The mileage value can be obtained by an encoder installed on the engine or wheels, or calculated from the detection data of a motion sensor. Generally, a motion sensor can include an accelerometer, a gyroscope, etc.
[0173] During implementation, after the automatic mobile device determines its posture and moves based on any of the above processes in any cycle, it can start recording the mileage value of the movement. Every time a cycle is reached (the cycle is less than the execution cycle of any of the above processes), the currently recorded mileage value can be obtained, and the route planned after the posture is determined and the position in the posture can be retrieved. The position reached by the automatic mobile device after starting from the position and walking the mileage value along the route is determined, that is, the current position, and the direction of travel corresponding to the current position on the route is determined as the orientation of the automatic mobile device, and the current posture is obtained. The current position and the current posture constitute the updated posture. Then, movement control can be performed based on the updated posture.
[0174] The embodiment of the present application also provides a method for processing registered feature points. This method is performed before the movement control process, and can determine the position of the feature points in the three-dimensional world coordinate system and other information for storage for subsequent movement control processes. The corresponding processing flow can be as follows: Figure 13 As shown, the following steps are included:
[0175] 1301 , obtaining a fourth image of a target image captured by an automatic mobile device.
[0176] The fourth image contains the complete target image.
[0177] During implementation, a technician can place the target image at a suitable distance in front of the automatic mobile device so that the automatic mobile device can capture the entire target image. The target image is of a moderate size within the entire captured image (for example, the target image occupies 50%-100% of the area of the entire captured image) to ensure the accuracy of positioning icon recognition and feature point extraction. The automatic mobile device is then controlled to capture the image to obtain the fourth image.
[0178] 1302 : Identify a positioning icon in the fourth image and obtain a position of the positioning icon in the fourth image.
[0179] In implementation, the location icon can be identified using a machine learning model or other recognition algorithms.
[0180] 1303. Determine an extrinsic parameter matrix of the image capturing component based on the position and actual spatial position of the positioning icon in the fourth image and the intrinsic parameter matrix of the image capturing component of the automatic mobile device.
[0181] The intrinsic parameter matrix is used to transform coordinates between the 3D camera coordinate system and the 2D image coordinate system. For example, the intrinsic parameter matrix can be a 3×3 matrix. The extrinsic parameter matrix includes the rotation matrix and the translation matrix. The rotation matrix and the translation matrix are used to transform coordinates between the 3D world coordinate system and the 3D camera coordinate system. The rotation matrix is used to describe the rotation transformation relationship, and the translation matrix is used to describe the translation transformation relationship.
[0182] In implementation, the position of the positioning icon in the 3D world coordinate system can be obtained by manual measurement or other means. First, the processor 110 can perform a coordinate transformation on the positioning icon's position in the 2D image coordinate system (i.e., its position in the fourth image) based on the intrinsic parameter matrix to obtain the positioning icon's position in the 3D camera coordinate system. Then, based on the positioning icon's position in the 3D camera coordinate system and its position in the 3D world coordinate system (i.e., its actual spatial position), a system of coordinate transformation equations is established, in which all parameters of the extrinsic parameter matrix in this system of equations are unknowns. The extrinsic parameter matrix can then be obtained by solving the system of equations.
[0183] 1304 , extract feature points from the fourth image, and determine positions of the plurality of feature points in the fourth image.
[0184] In implementation, the processor 110 extracts feature points from the fourth image using a feature point extraction algorithm to obtain a position and a feature descriptor of each feature point in the two-dimensional image coordinate system of the fourth image.
[0185] 1305 : Determine the actual spatial position of the feature point based on the position of the feature point in the fourth image, the intrinsic parameter matrix, and the extrinsic parameter matrix.
[0186] In implementation, the positions of the feature points in the 2D image coordinate system of the fourth image are transformed based on the intrinsic parameter matrix of the image capturing component to obtain the positions of the feature points in the 3D camera coordinate system. Then, based on the positions of the feature points in the 3D camera coordinate system and the extrinsic parameter matrix, the positions of the feature points in the 3D world coordinate system are obtained.
[0187] 1306 : Based on the actual spatial positions of the feature points, determine the feature points in the actual spatial area corresponding to the background pattern as reference feature points, and store the actual spatial positions of the reference feature points.
[0188] The actual spatial area of the background pattern can be obtained by manual measurement. Figure X As shown, the positioning icons are rectangular nested boxes, there are four of them, located at the four corners of the background pattern. The vertex coordinates of the outside of each positioning icon can be manually measured to obtain four vertex coordinates. These four vertex coordinates are the coordinates of the four vertices of the background pattern, which can be used to interpret the actual spatial area of the background pattern.
[0189] In implementation, based on the position of the feature point in the three-dimensional world coordinate system and the actual space area of the background pattern, it is determined whether the feature point is in the actual space area of the background pattern. The feature point in the actual space area of the background pattern is used as the reference feature point, and the reference feature point is stored in correspondence with the position in the three-dimensional world coordinate system.
[0190] In an embodiment of the present application, the target image placed at the target position includes a background pattern and a positioning icon. In the process of determining the posture of the automatic mobile device, the position of the positioning icon in the first image taken can be first identified, and then a feature extraction area is determined in the first image based on the position, and then feature points are extracted in the feature extraction area to determine the posture, and the movement control is performed based on the posture. Because the feature extraction area includes at least a part of the background pattern, the extracted feature points include valid feature points (feature points in the background pattern). Because the feature extraction area is a part of the first image, the extracted feature points are fewer than the feature points in the entire first image. In this way, a more accurate posture can be determined, and the processing amount of feature point extraction can be reduced, thereby reducing the cycle time for determining the posture, so that the moving direction of the automatic mobile device can be corrected more timely, and ultimately the overall time consumed by the automatic mobile device to move to the target position can be reduced.
[0191] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present disclosure, and will not be described in detail here.
[0192] Based on the same technical concept, the embodiment of the present application also provides a device for controlling the movement of a device, which can be applied to the automatic moving device in the above embodiment, such as Figure 14 As shown, the device includes:
[0193] The acquisition module 1410 is used to implement the acquisition function in the above step 501 and other implicit steps.
[0194] The identification module 1420 is used to implement the identification function in the above step 502 and other implicit steps.
[0195] The determination module 1430 is used to implement the determination function in the above step 503 and other implicit steps.
[0196] The extraction module 1440 is used to implement the extraction function in the above step 504 and other implicit steps.
[0197] The control module 1450 is used to implement the control function in the above step 505 and other implicit steps.
[0198] In one possible implementation, the determination module 1430 is configured to determine a region of a specified shape and size as a feature extraction region with the center of the positioning icon in the first image as the center, and specifically implement the determination function in the above step 503 and other implicit steps.
[0199] In one possible implementation, the determination module 1430 is configured to determine a circular area with a specified radius as the feature extraction area with the center of the positioning icon in the first image as the center of the circle, and specifically implement the determination function in the above step 503 and other implicit steps.
[0200] In one possible implementation, the acquisition module 1410 is configured to acquire a first image captured by the automatic mobile device when the distance between the automatic mobile device and the target location is greater than a first distance threshold and less than a second distance threshold. Specifically, the acquisition function in step 501 and other implicit steps may be implemented.
[0201] In a possible implementation, the acquisition module 1410 is also used to implement the acquisition function in the above step 1001 and other implicit steps.
[0202] The identification module 1420 is also used to implement the identification function in the above step 1002 and other implicit steps.
[0203] The control module 1450 is also used to implement the control function in the above step 1003 and other implicit steps.
[0204] In a possible implementation, the acquisition module 1410 is also used to implement the acquisition function in the above step 1101 and other implicit steps.
[0205] The extraction module 1440 is also used to implement the extraction function in the above step 1102 and other implicit steps.
[0206] The control module 1450 is also used to implement the control function in the above step 1103 and other implicit steps.
[0207] In a possible implementation, the extraction module 1440 is used to implement the extraction functions in the above steps 1201 to 1203, as well as other implicit steps.
[0208] In one possible implementation, control module 1450 is further configured to determine the distance traveled by the mobile device after determining its position and posture. Based on the distance traveled and the position and posture, the updated position and posture of the mobile device is determined. Specifically, this can implement the control functions described in steps 505, 1003, and 1103 above, as well as other implicit steps.
[0209] In one possible implementation, extraction module 1440 is configured to extract feature points in a feature extraction region in the first image and determine a feature descriptor and a position in the first image of at least one first image feature point. Specifically, this module may implement the extraction function in step 504 above, as well as other implicit steps.
[0210] Control module 1450 is configured to determine, based on pre-stored feature descriptors for multiple reference feature points corresponding to the background pattern, a target feature point that matches the feature descriptor of any reference feature point in at least one first image feature point. Based on the actual spatial positions of the pre-stored multiple reference feature points, the actual spatial position of the reference feature point corresponding to the target feature point is determined as the actual spatial position of the target feature point. The pose of the automatic mobile device is determined based on the position of the target feature point in the first image and the actual spatial position. Specifically, this can implement the control functions described in step 505 above, as well as other implicit steps.
[0211] In a possible implementation, the acquisition module 1410 is also used to implement the acquisition function in the above step 1301 and other implicit steps.
[0212] The identification module 1420 is also used to implement the identification function in the above step 1302 and other implicit steps.
[0213] The determination module 1430 is also used to implement the determination function in the above step 1303 and other implicit steps.
[0214] The extraction module 1440 is also used to implement the extraction function in the above step 1304 and other implicit steps.
[0215] The determination module 1430 is also used to implement the determination function in the above step 1305 and other implicit steps.
[0216] The apparatus further includes a storage module for implementing the storage function in the above step 1306 and other implicit steps.
[0217] In an embodiment of the present application, the target image placed at the target position includes a background pattern and a positioning icon. In the process of determining the posture of the automatic mobile device, the position of the positioning icon in the first image taken can be first identified, and then a feature extraction area is determined in the first image based on the position, and then feature points are extracted in the feature extraction area to determine the posture, and the movement control is performed based on the posture. Because the feature extraction area includes at least a part of the background pattern, the extracted feature points include valid feature points (feature points in the background pattern). Because the feature extraction area is a part of the first image, the extracted feature points are fewer than the feature points in the entire first image. In this way, a more accurate posture can be determined, and the processing amount of feature point extraction can be reduced, thereby reducing the cycle time for determining the posture, so that the moving direction of the automatic mobile device can be corrected more timely, and ultimately the overall time consumed by the automatic mobile device to move to the target position can be reduced.
[0218] Regarding the apparatus in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0219] It should be noted that the apparatus for controlling the movement of a device provided in the above embodiment is only exemplified by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus for controlling the movement of a device provided in the above embodiment and the method for controlling the movement of a device are based on the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0220] In an exemplary embodiment, a computer-readable storage medium is also provided, such as a memory including instructions, which can be executed by a processor in a terminal to implement the method for controlling the movement of a device in the above embodiment. The computer-readable storage medium can be non-transitory. For example, the computer-readable storage medium can be a read-only memory (ROM), a random access memory (RAM), a magnetic tape, a floppy disk, an optical data storage device, etc.
[0221] Those skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or by a program to instruct the relevant hardware, and the program may be stored in a computer-readable storage medium, which may be a read-only memory, a disk, or an optical disk, etc.
[0222] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application.
Claims
1. A method for controlling the movement of a device, characterized in that: The method is applied to an automatic mobile device, wherein a target image is placed at a target position where the automatic mobile device moves, the target image including a background pattern and at least one positioning icon, the positioning icon being a specified geometric image used to determine the position of the background pattern, the background pattern including a plurality of evenly distributed feature points used to calculate the position and posture of the automatic mobile device, the method comprising: Acquire a first image captured by the automatic mobile device; Identifying the positioning icon in the first image and obtaining a position of the positioning icon in the first image; Based on the position of the positioning icon in the first image, determining an area in the first image that contains at least a portion of the background pattern as a feature extraction area, where the feature extraction area is a local area in the first image; Extracting feature points in the feature extraction area of the first image to determine a position of at least one first image feature point in the first image; The posture of the automatic moving device is determined based on the position of the at least one first image feature point in the first image and the actual spatial position of the reference feature point in the background pattern, and the automatic moving device is controlled to move toward the target position based on the posture.
2. The method according to claim 1, characterized in that The determining, based on the position of the positioning icon in the first image, a region in the first image containing at least a portion of the background pattern as a feature extraction region includes: Taking the center of the positioning icon in the first image as the center, determine an area of a specified shape and a specified size as a feature extraction area.
3. The method according to claim 2, characterized in that The step of determining a region of a specified shape and a specified size as a feature extraction region with the center of the positioning icon in the first image as the center includes: Taking the center of the positioning icon in the first image as the center of the circle, a circular area with a specified radius is determined as the feature extraction area.
4. The method according to claim 1, wherein The acquiring of the first image captured by the automatic mobile device includes: When the distance between the automatic moving device and the target location is greater than a first distance threshold and less than a second distance threshold, a first image captured by the automatic moving device is acquired.
5. The method according to claim 4, characterized in that The method further comprises: When the distance between the automatic moving device and the target location is greater than a second distance threshold and less than a third distance threshold, acquiring a second image captured by the automatic moving device; identifying the positioning icon in the second image, and obtaining a position of the positioning icon in the second image; The posture of the automatic moving device is determined based on the position of the positioning icon in the second image and the actual spatial position of the positioning icon, and the automatic moving device is controlled to move toward the target position based on the posture.
6. The method according to claim 4, characterized in that The method further comprises: When the distance between the automatic moving device and the target location is less than a first distance threshold, acquiring a third image captured by the automatic moving device; In the third image, feature point extraction is performed to determine a position of at least one third image feature point in the third image; The posture of the automatic moving device is determined based on the position of the at least one third image feature point in the third image and the actual spatial position of the reference feature point in the background pattern, and the automatic moving device is controlled to move toward the target position based on the posture.
7. The method according to claim 1, characterized in that Extracting feature points in the feature extraction area in the first image to determine a position of at least one first image feature point in the first image includes: reducing the resolution of the regional image in the feature extraction area; performing feature point extraction on the image after the resolution is reduced, and determining a position of at least one first image feature point in the image after the resolution is reduced; Based on the position of the at least one first image feature point in the image after reducing the resolution, the position of the at least one first image feature point in the first image is determined.
8. The method according to claim 1, characterized in that After determining the position and posture of the automatic moving device, the method further includes: Determining a distance traveled by the automatic mobile device after determining the position and posture; An updated position and posture of the autonomous moving device is determined based on the mileage value and the position and posture.
9. The method according to claim 1, characterized in that Extracting feature points in the feature extraction area in the first image to determine a position of at least one first image feature point in the first image, and determining a position and posture of the automatic moving device based on a position in the first image and an actual spatial position of a feature point belonging to the background pattern among the at least one first image feature point, includes: Extracting feature points in the feature extraction area of the first image to determine a feature descriptor of at least one first image feature point and a position in the first image; Based on pre-stored feature descriptors of a plurality of reference feature points corresponding to the background pattern, determining a target feature point that matches the feature descriptor of any reference feature point among the at least one first image feature point; Based on the pre-stored actual spatial positions of the plurality of reference feature points, determining the actual spatial position of the reference feature point corresponding to the target feature point as the actual spatial position of the target feature point; The posture of the automatic moving device is determined based on the position of the target feature point in the first image and the actual spatial position.
10. The method according to any one of claims 1 to 9, characterized in that Before acquiring the first image captured by the automatic mobile device, the method further includes: Acquire a fourth image of the target image captured by the automatic mobile device; identifying the positioning icon in the fourth image, and obtaining a position of the positioning icon in the fourth image; determining an extrinsic parameter matrix of the image capturing component of the automatic mobile device based on the position and actual spatial position of the positioning icon in the fourth image and the intrinsic parameter matrix of the image capturing component of the automatic mobile device; Extracting feature points from the fourth image to determine positions of a plurality of feature points in the fourth image; Determining actual spatial positions of the plurality of feature points based on positions of the plurality of feature points in the fourth image, an intrinsic parameter matrix, and the extrinsic parameter matrix; Based on the actual spatial positions of the multiple feature points, a feature point in the actual spatial area corresponding to the background pattern is determined as a reference feature point, and the actual spatial position of the reference feature point is stored.
11. A device for controlling the movement of a device, characterized in that: The device is applied to an automatic mobile device, wherein a target image is placed at a target position where the automatic mobile device moves, the target image including a background pattern and at least one positioning icon, the positioning icon being a specified geometric image used to determine the position of the background pattern, the background pattern including a plurality of evenly distributed feature points used to calculate the position and posture of the automatic mobile device, the device comprising: An acquisition module, configured to acquire a first image captured by the automatic mobile device; an identification module, configured to identify the positioning icon in the first image and obtain a position of the positioning icon in the first image; a determining module, configured to determine, based on the position of the positioning icon in the first image, an area in the first image containing at least a portion of the background pattern as a feature extraction area, wherein the feature extraction area is a local area in the first image; an extraction module, configured to extract feature points in the feature extraction area in the first image, and determine a position of at least one first image feature point in the first image; A control module is configured to determine a posture of the automatic moving device based on a position of the at least one first image feature point in the first image and an actual spatial position of a reference feature point in the background pattern, and control the automatic moving device to move toward the target position based on the posture.
12. A computer device, characterized in that: The computer device includes a memory and a processor, wherein the memory is used to store computer instructions; The processor executes the computer instructions stored in the memory to enable the computer device to perform the method according to any one of claims 1 to 10.
13. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer program code. When the computer program code is executed by a computer device, the computer device performs the method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Image-based positioning method and device, electronic equipment and storage medium
CN111680685A