Positioning method, device, self-contained equipment and storage medium

The image sensor identifies patterns and marking points, decodes the target code, and determines the position of the mobile device in the world coordinate system. This solves the problem of positioning failure of existing technologies under indoor environment changes or interference, and achieves higher positioning applicability. and accuracy.

CN113390426BActive Publication Date: 2024-08-30BEIJING ORION STAR TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110642495.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-10-16
Publication Date
2024-08-30
Estimated Expiration
2040-10-16

AI Technical Summary

Technical Problem

Existing positioning technology cannot effectively locate mobile devices when the indoor environment changes or people interfere with lidar scanning, resulting in positioning failure.

Method used

Collect images through the image sensor, identify the pattern parts and marker points, determine the candidate coordinate system, decode the target code, query the position of the marker point in the world coordinate system, and then determine the pose of the mobile device.

Benefits of technology

Even under environmental changes or interference, mobile devices can be effectively positioned, improving the applicability and accuracy of positioning methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113390426B
    Figure CN113390426B
Patent Text Reader

Abstract

The present application proposes a positioning method, device, self-moving device and storage medium, which relates to the field of positioning technology, wherein the method comprises: obtaining an image captured by an image sensor; wherein the image shows a pattern part and a mark point part; determining a candidate coordinate system according to the pattern part; decoding to obtain a target code according to the coordinate position of each mark point in the mark point part in the candidate coordinate system; querying to obtain the coordinate position of each mark point in the world coordinate system according to the target code; determining the posture of the self-moving device equipped with the image sensor in the world coordinate system according to the coordinate position of each mark point in the world coordinate system and the coordinate position in the image. Thus, the self-moving device can be effectively positioned.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of positioning technology, and in particular to a positioning method, device, self-moving device and storage medium. Background Art

[0002] With the continuous development of artificial intelligence technology, artificial intelligence products, such as self-mobile devices, are becoming more and more popular. When controlling the movement of a self-mobile device, it is first necessary to locate the self-mobile device, that is, to identify the position of the self-mobile device in the space where it is located, and then the self-mobile device can be navigated.

[0003] In the related art, a map navigation method is used to determine the position of a mobile device in an indoor space. Specifically, a laser radar is installed on the mobile device, and the laser radar is used to scan the surrounding environment in real time during the movement of the mobile device to obtain a laser point cloud map, and then the point cloud map collected by the laser radar in real time is matched with a preset map to determine the real-time position of the mobile device in the map, thereby realizing the positioning of the mobile device.

[0004] However, the above positioning method is not suitable for scenarios where the indoor environment changes frequently. For example, when the position of indoor furniture and other indoor furnishings changes, or when the movement of people interferes with the laser radar scanning of the surrounding environment, the laser point cloud map collected by the mobile device during movement will not match the preset map, and the position of the mobile device cannot be located. Summary of the invention

[0005] The present application aims to solve one of the technical problems in the related art at least to some extent.

[0006] The present application proposes a positioning method, device, self-moving device and storage medium, so as to achieve effective positioning of the self-moving device even if the placement of the self-moving device in the space where it is located changes, or the movement of people interferes with the laser radar scanning of the surrounding environment, thereby improving the applicability of the positioning method.

[0007] The first embodiment of the present application provides a positioning method, including:

[0008] Acquire an image captured by an image sensor; wherein the image displays a pattern portion and a marking point portion;

[0009] Determining a candidate coordinate system based on the pattern portion;

[0010] Decoding to obtain a target code according to the coordinate position of each marking point in the marking point part in the candidate coordinate system;

[0011] According to the target code, query and obtain the coordinate position of each of the marking points in the world coordinate system;

[0012] The position and posture of the self-moving device equipped with the image sensor in the world coordinate system are determined according to the coordinate position of each of the marking points in the world coordinate system and the coordinate position in the image.

[0013] In a first possible implementation manner of the embodiment of the present application, the pattern portion displays an asymmetric pattern, and determining a candidate coordinate system according to the pattern portion includes:

[0014] Determining the coordinate axis of the candidate coordinate system according to the set reference line in the asymmetric pattern; wherein the direction of the coordinate axis is determined according to the position of the set local pattern in the asymmetric pattern;

[0015] and / or,

[0016] According to the position of the key point set in the asymmetric pattern, the coordinate point set in the candidate coordinate system is determined.

[0017] In a second possible implementation manner of the embodiment of the present application, decoding to obtain a target code according to a coordinate position of each marking point in the marking point part in the candidate coordinate system includes:

[0018] Performing coordinate transformation on the candidate coordinate system and the set standard coordinate system to obtain an affine transformation matrix between the candidate coordinate system and the standard coordinate system;

[0019] Using the affine transformation matrix, transform the coordinate position of each of the marking points in the candidate coordinate system to the standard coordinate system to obtain the coordinate position of each of the marking points in the standard coordinate system;

[0020] According to the coordinate position of each of the marking points in the standard coordinate system, the corresponding target code is determined.

[0021] In a third possible implementation manner of the embodiment of the present application, decoding to obtain a target code according to a coordinate position of each marking point in the marking point part in the candidate coordinate system includes:

[0022] Performing coordinate transformation on the candidate coordinate system and the set standard coordinate system to obtain an affine transformation matrix between the candidate coordinate system and the standard coordinate system;

[0023] The affine transformation matrix is ​​used to transform the coordinate position of each of the marking points in the candidate coordinate system to the standard coordinate system, so as to obtain the angle between each of the marking points and the coordinate axis in the standard coordinate system and / or the distance from the origin of the standard coordinate system;

[0024] The corresponding target code is determined according to the angle between each of the marking points in the standard coordinate system and the coordinate axis in the standard coordinate system and / or the distance from the origin of the standard coordinate system.

[0025] In a fourth possible implementation manner of the embodiment of the present application, after decoding the target code according to the coordinate position of each marking point in the marking point part in the candidate coordinate system, the method further includes:

[0026] If the number of the marking points is less than the set threshold number, querying the first coordinate position of the auxiliary marking point corresponding to the target code in the world coordinate system and the coordinate position in the standard coordinate system;

[0027] Using the radial transformation matrix, transform the coordinate position of the auxiliary marking point in the standard coordinate system to the candidate coordinate system to obtain the coordinate position of the auxiliary marking point in the candidate coordinate system;

[0028] Determining a second coordinate position of the auxiliary marking point in the image according to the coordinate position of the origin of the candidate coordinate system in the image;

[0029] The auxiliary marking point is determined as the marking point which is located at the first coordinate position in the world coordinate system and at a second coordinate position in the image.

[0030] In a fifth possible implementation manner of the embodiment of the present application, after acquiring the image captured by the image sensor, the method further includes:

[0031] The pattern portion is determined according to the value of each pixel in the image.

[0032] In a sixth possible implementation manner of the embodiment of the present application, after determining the candidate coordinate system according to the pattern portion, the method further includes:

[0033] Determining a set distribution range of the marking point portion according to the candidate coordinate system;

[0034] Each of the marking points is identified within the set distribution range in the image.

[0035] In a seventh possible implementation manner of the embodiment of the present application, decoding to obtain a target code according to a coordinate position of each marking point in the marking point part in the candidate coordinate system includes:

[0036] Verifying the number of the marking points;

[0037] If the verification is passed, the target code is decoded according to the coordinate position of each marking point in the candidate coordinate system.

[0038] In an eighth possible implementation manner of the embodiment of the present application, querying and obtaining the coordinate position of each of the marking points in the world coordinate system according to the target code includes:

[0039] In the established navigation map, query the target code to obtain the position of the position mark to which the target code belongs in the world coordinate system;

[0040] The coordinate position of each marking point in the world coordinate system is determined according to the posture of the position marker in the world coordinate system and the coordinate position of each marking point in the standard coordinate system where the position marker is located.

[0041] In a ninth possible implementation manner of the embodiment of the present application, determining the posture of the self-mobile device equipped with the image sensor in the world coordinate system according to the coordinate position of each of the marking points in the world coordinate system and the coordinate position in the image includes:

[0042] According to the coordinate position of each of the marking points in the world coordinate system and the coordinate position in the image, a perspective n-point PnP algorithm is used to determine the position and posture of the self-moving device equipped with the image sensor in the world coordinate system.

[0043] The positioning method of the embodiment of the present application determines the candidate coordinate system based on the pattern part in the image captured by the image sensor, and then decodes the target code according to the coordinate position of each mark point in the mark point part of the image in the candidate coordinate system, and then queries the coordinate position of each mark point in the world coordinate system according to the target code, so as to determine the position of the self-moving device equipped with the image sensor in the world coordinate system according to the coordinate position of each mark point in the world coordinate system and the coordinate position in the image. Therefore, even if the display position of the self-moving device in the space where the self-moving device is located changes, or the movement of people interferes with the laser radar scanning of the surrounding environment, the position of the self-moving device can be effectively located, which can improve the applicability of the positioning method.

[0044] The second aspect of the present application provides a positioning device, including:

[0045] An acquisition module, used to acquire an image captured by an image sensor; wherein the image displays a pattern portion and a marking point portion;

[0046] A determination module, used to determine a candidate coordinate system according to the pattern portion;

[0047] A decoding module, used for decoding and obtaining a target code according to the coordinate position of each marking point in the marking point part in the candidate coordinate system;

[0048] A query module, used for querying and obtaining the coordinate position of each of the marking points in the world coordinate system according to the target code;

[0049] The positioning module is used to determine the position and posture of the mobile device equipped with the image sensor in the world coordinate system according to the coordinate position of each mark point in the world coordinate system and the coordinate position in the image.

[0050] In a first possible implementation manner of the embodiment of the present application, the pattern portion displays an asymmetric pattern, and the determining module is specifically configured to:

[0051] Determining the coordinate axis of the candidate coordinate system according to the set reference line in the asymmetric pattern; wherein the direction of the coordinate axis is determined according to the position of the set local pattern in the asymmetric pattern;

[0052] and / or,

[0053] According to the position of the key point set in the asymmetric pattern, the coordinate point set in the candidate coordinate system is determined.

[0054] In a second possible implementation manner of the embodiment of the present application, the decoding module is specifically configured to:

[0055] Performing coordinate transformation on the candidate coordinate system and the set standard coordinate system to obtain an affine transformation matrix between the candidate coordinate system and the standard coordinate system;

[0056] Using the affine transformation matrix, transform the coordinate position of each of the marking points in the candidate coordinate system to the standard coordinate system to obtain the coordinate position of each of the marking points in the standard coordinate system;

[0057] According to the coordinate position of each of the marking points in the standard coordinate system, the corresponding target code is determined.

[0058] In a third possible implementation manner of the embodiment of the present application, the decoding module is specifically configured to:

[0059] Performing coordinate transformation on the candidate coordinate system and the set standard coordinate system to obtain an affine transformation matrix between the candidate coordinate system and the standard coordinate system;

[0060] The affine transformation matrix is ​​used to transform the coordinate position of each of the marking points in the candidate coordinate system to the standard coordinate system, so as to obtain the angle between each of the marking points and the coordinate axis in the standard coordinate system and / or the distance from the origin of the standard coordinate system;

[0061] The corresponding target code is determined according to the angle between each of the marking points in the standard coordinate system and the coordinate axis in the standard coordinate system and / or the distance from the origin of the standard coordinate system.

[0062] In a fourth possible implementation manner of the embodiment of the present application, the device further includes:

[0063] The first processing module is used for querying the first coordinate position of the auxiliary marking point corresponding to the target code in the world coordinate system and the coordinate position in the standard coordinate system if the number of the marking points is less than the set threshold number; using the radial transformation matrix to transform the coordinate position of the auxiliary marking point in the standard coordinate system to the candidate coordinate system to obtain the coordinate position of the auxiliary marking point in the candidate coordinate system; determining the second coordinate position of the auxiliary marking point in the image according to the coordinate position of the origin of the candidate coordinate system in the image; and determining the auxiliary marking point as the marking point that is at the first coordinate position in the world coordinate system and at the second coordinate position in the image.

[0064] In a fifth possible implementation manner of the embodiment of the present application, the device further includes:

[0065] The second processing module is used to determine the pattern part according to the value of each pixel in the image.

[0066] In a sixth possible implementation manner of the embodiment of the present application, the device further includes:

[0067] The third processing module is used to determine a set distribution range of the marking point part according to the candidate coordinate system; and identify each of the marking points within the set distribution range in the image.

[0068] In a seventh possible implementation manner of the embodiment of the present application, the decoding module is specifically configured to:

[0069] Verifying the number of the marking points;

[0070] If the verification is passed, the target code is decoded according to the coordinate position of each marking point in the candidate coordinate system.

[0071] In an eighth possible implementation manner of the embodiment of the present application, the query module is specifically used to:

[0072] In the established navigation map, query the target code to obtain the position of the position mark to which the target code belongs in the world coordinate system;

[0073] The coordinate position of each marking point in the world coordinate system is determined according to the posture of the position marker in the world coordinate system and the coordinate position of each marking point in the standard coordinate system where the position marker is located.

[0074] In a ninth possible implementation manner of the embodiment of the present application, the positioning module is specifically configured to:

[0075] According to the coordinate position of each of the marking points in the world coordinate system and the coordinate position in the image, a perspective n-point PnP algorithm is used to determine the position and posture of the self-moving device equipped with the image sensor in the world coordinate system.

[0076] The positioning device of the embodiment of the present application determines the candidate coordinate system based on the pattern part in the image captured by the image sensor, and then decodes the target code according to the coordinate position of each mark point in the mark point part of the image in the candidate coordinate system, and then queries the coordinate position of each mark point in the world coordinate system according to the target code, so as to determine the position of the self-moving device equipped with the image sensor in the world coordinate system according to the coordinate position of each mark point in the world coordinate system and the coordinate position in the image. Therefore, even if the display position of the self-moving device in the space where the self-moving device is located changes, or the movement of people interferes with the laser radar scanning of the surrounding environment, the position of the self-moving device can be effectively located, which can improve the applicability of the positioning device.

[0077] The third aspect embodiment of the present application proposes a self-mobile device, including: an image sensor, a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the positioning method proposed in the first aspect embodiment of the present application is implemented.

[0078] The fourth aspect embodiment of the present application proposes a non-temporary computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the positioning method proposed in the first aspect embodiment of the present application is implemented.

[0079] The fifth aspect embodiment of the present application proposes a computer program product. When the instructions in the computer program product are executed by a processor, the positioning method proposed in the first aspect embodiment of the present application is implemented.

[0080] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0081] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0082] Figure 1 A flowchart of the positioning method provided in Example 1 of the present application;

[0083] Figure 2 This is a schematic diagram of position identification in an embodiment of the present application;

[0084] Figure 3 A flowchart of the positioning method provided in Embodiment 2 of the present application;

[0085] Figure 4 A flowchart of the positioning method provided in Embodiment 3 of the present application;

[0086] Figure 5 A flowchart of the positioning method provided in Embodiment 4 of the present application;

[0087] Figure 6 A flowchart of a method for establishing a navigation map provided in Embodiment 5 of the present application;

[0088] Figure 7 A schematic diagram of the structure of a positioning device provided in Example 6 of the present application;

[0089] Figure 8 This is a schematic diagram of the structure of the positioning device provided in Example 7 of the present application. DETAILED DESCRIPTION

[0090] Embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.

[0091] The following describes the positioning method, apparatus, self-mobile device and storage medium according to the embodiments of the present application with reference to the accompanying drawings.

[0092] Figure 1 A flowchart of the positioning method provided in Example 1 of the present application.

[0093] The executing entity of the embodiments of the present application may be the positioning device provided in the present application, and the positioning device may be configured in a self-mobile device, for example, the positioning device may be a local controller of the self-mobile device, thereby positioning the self-mobile device; or, the positioning device may also be configured in a server, for example, the positioning device may be a cloud server that communicates with the self-mobile device, thereby positioning the self-mobile device.

[0094] Among them, the self-moving device can be a device such as an intelligent robot that has navigation and obstacle avoidance functions and can move autonomously.

[0095] like Figure 1 As shown, the positioning method includes the following steps:

[0096] Step 101, obtaining an image captured by an image sensor; wherein the image shows a pattern portion and a marking point portion.

[0097] In the embodiment of the present application, the image sensor may be a charge coupled device (CCD), a complementary metal oxide semiconductor (CMOS), a thin film transistor (TFT), or the like. The image sensor may be arranged on a self-mobile device, and after the image sensor acquires an image, the self-mobile device may directly acquire the image acquired by the image sensor. Alternatively, the image sensor may also be arranged independently of the self-mobile device, and after the image sensor acquires an image, the image sensor may send the image to the self-mobile device by wireless communication methods such as Bluetooth and wireless Fidelity (WiFi).

[0098] In an embodiment of the present application, when the positioning device is configured in a self-mobile device, the positioning device can directly obtain an image captured by an image sensor, or receive an image sent by an image sensor; and when the positioning device is configured in a server, the self-mobile device can send the image captured by the image sensor to the server after receiving the image, so that the positioning device can obtain the image.

[0099] In the embodiment of the present application, a two-dimensional location marker (or road sign) can be set in the space where the self-mobile device is located, for example, the location marker can be attached to the indoor wall or roof. The location marker can display a pattern part and a marking point part, wherein the pattern part is used to determine the coordinate system, and the marking point part is used to decode the code corresponding to the location marker and locate the observation position.

[0100] It can be understood that the pattern part in the location mark and the shape, size, color and other characteristics of each marking point in the marking point part are known. Therefore, in a possible implementation method of an embodiment of the present application, after the positioning device obtains the image captured by the image sensor, it can identify the pattern part and the marking point part in the image based on the target detection algorithm.

[0101] For example, based on target detection algorithms such as Single Shot MultiBox Detector (SSD), You Only Look Once (YOLO), and Faster-RCNN, the image captured by the image sensor can be recognized to determine the pattern part and the marker part. This application does not impose any restrictions on this.

[0102] In another possible implementation of the embodiment of the present application, after acquiring the image captured by the image sensor, the positioning device can perform connected domain detection on the image captured by the image sensor to obtain multiple connected areas, and determine the pattern part and the marking point part according to the geometric features of each connected area. The geometric features can be feature information such as the size, aspect ratio, and color distribution of the connected area.

[0103] It should be understood that in order to improve the accuracy of the recognition results and improve the image processing efficiency, the location markers in the image can be identified first. For example, based on the region of interest (ROI) extraction algorithm, the target detection algorithm, etc., the area where the location marker is located in the image can be identified, and then the pattern part and the marker point part can be identified in the area where the location marker is located.

[0104] In another possible implementation of the embodiment of the present application, after acquiring the image captured by the image sensor, the positioning device can pre-process the image captured by the image sensor, such as Gaussian blur, binarization, edge extraction, etc., and determine the pattern part and the marking point part according to the value of each pixel point in the pre-processed image. Alternatively, the pattern part and the marking point part can also be determined directly according to the value of each pixel point in the image captured by the image sensor.

[0105] For example, it is possible to determine the pixels in the image whose values ​​exceed a preset threshold, and determine the connected domains based on the pixels whose values ​​exceed the preset threshold. Then, the pattern part and the marker part can be identified based on the geometric features of each connected domain. In other words, the pattern part and the marker part can be identified based on the brightness in the connected domain, and the connected domains whose shapes are similar to the pattern part or the marker part but whose brightness does not meet the conditions can be excluded to improve the accuracy of the detection results of the pattern part and the marker part.

[0106] Step 102, determining a candidate coordinate system according to the pattern portion.

[0107] In the embodiment of the present application, the candidate coordinate system is a two-dimensional coordinate system, which is a coordinate system established on the image, specifically a coordinate system constructed by the pattern part.

[0108] In a possible implementation of an embodiment of the present application, the pattern portion may display an asymmetric pattern, and the coordinate axis of the candidate coordinate system may be determined based on a set reference line in the asymmetric pattern; wherein the direction of the coordinate axis is determined based on the position of a set local pattern in the asymmetric pattern.

[0109] For example, the asymmetric pattern may have two connecting lines, which may be used as the X-axis and Y-axis of the candidate coordinate system, respectively. The directions of the X-axis and the Y-axis may be determined according to the location of the local pattern set in the asymmetric pattern. For example, the quadrant where the local pattern is located may be set as the first quadrant, thereby determining the directions of the X-axis and the Y-axis. Of course, the quadrant where the local pattern is located may also be set as the second quadrant, the third quadrant, or the fourth quadrant, and the present application does not limit this.

[0110] It should be noted that the above is only an example of determining the direction of the coordinate axis according to the position of the local pattern set in the asymmetric pattern. In actual application, the direction of the coordinate axis can also be determined directly according to the image features of the set local pattern. For example, if the local pattern is set to an arrow pattern, the positive direction of the coordinate axis can be determined according to the arrow direction of the set local pattern.

[0111] In another possible implementation of the embodiment of the present application, the pattern portion may display an asymmetric pattern, and the coordinate point set in the candidate coordinate system may be determined according to the position of the key point set in the asymmetric pattern. For example, if the coordinate point set in the candidate coordinate system for the key point set in the asymmetric pattern is known to be (-1, 1), then the candidate coordinate system may be directly established based on the set coordinate point (-1, 1).

[0112] In another possible implementation of the embodiment of the present application, the pattern portion may display an asymmetric pattern, and the coordinate axis of the candidate coordinate system may be determined according to the set reference line in the asymmetric pattern, and the coordinate point set in the candidate coordinate system may be determined according to the position of the key point set in the asymmetric pattern. The direction of the coordinate axis is determined according to the position of the local pattern set in the asymmetric pattern.

[0113] As an example, see Figure 2 , Figure 2Schematic diagram of the position identification in the embodiment of the present application. The position identification includes a set local pattern 21 and a marking point part 22 composed of three marking points. The set reference line can be the symmetry axis of the set local pattern 21, and the set reference line can be used as the X-axis in the candidate coordinate system. The arrow direction of the set local pattern 21 is used as the positive direction of the X-axis. At least one set key point is set in the asymmetric pattern. The set key point can be the origin of the candidate coordinate system, or a point in the positive or negative direction of the Y-axis. According to the set key point and the X-axis, a candidate coordinate system can be established.

[0114] Step 103: Decode the target code according to the coordinate position of each marking point in the marking point part in the candidate coordinate system.

[0115] In an embodiment of the present application, the unit in the candidate coordinate system can be a pixel, or can be set according to actual needs. For example, the unit in the candidate coordinate system can be set to a set length, and the set length can be, for example, 0.001 cm, 0.01 cm, etc. This application does not impose any restrictions on this.

[0116] In an embodiment of the present application, after a candidate coordinate system is established in an image, the coordinate position of each marking point in the marking point part in the candidate coordinate system can be determined, and the target code can be decoded based on the coordinate position of each marking point in the candidate coordinate system.

[0117] It can be understood that a marking point may include multiple pixel points, and for each marking point, the coordinate position of the marking point in the candidate coordinate system may be determined according to the coordinate positions of the multiple pixel points included in the marking point.

[0118] As an example, for each marking point, the coordinate positions of multiple pixel points contained in the marking point in the candidate coordinate system can be determined, and the coordinate positions of the multiple pixel points contained in the marking point in the candidate coordinate system can be averaged to determine the coordinate position of the marking point in the candidate coordinate system.

[0119] As another example, for each marking point, the coordinate positions of multiple pixel points contained in the marking point in the candidate coordinate system can be determined, and a mathematical equation is fitted to the shape of the marking point based on the coordinate positions of the multiple pixel points contained in the marking point in the candidate coordinate system. Based on the fitted mathematical equation, the centroid of the marking point is determined, and the coordinate position of the centroid is used as the coordinate position of the marking point in the candidate coordinate system.

[0120] It should be understood that when the coordinate axes in the candidate coordinate system have directions, the codes have different meanings in different quadrants. By establishing a coordinate system, the coding capacity can also be increased.

[0121] Step 104: According to the target code, query and obtain the coordinate position of each marking point in the world coordinate system.

[0122] In the embodiment of the present application, the world coordinate system refers to the map coordinate system generated by the mobile device or server when establishing the navigation map. For example, when establishing the navigation map, the position of the mobile device when it is started can be used as the origin of the world coordinate system, the forward direction of the mobile device can be used as the positive direction of the X-axis, the direction perpendicular to the X-axis can be used as the Y-axis, and the direction perpendicular to the X-axis and the Y-axis can be used as the Z-axis, or the forward direction of the mobile device can be used as the positive direction of the Y-axis, the direction perpendicular to the Y-axis can be used as the X-axis, and the direction perpendicular to the X-axis and the Y-axis can be used as the Z-axis. That is, the origin of the world coordinate system is the position of the mobile device when it is started, and each coordinate axis and the direction of each coordinate axis can be predefined.

[0123] In the embodiment of the present application, the specific query process is: in the established navigation map, query the target code, obtain the position and posture of the location mark to which the target code belongs in the world coordinate system, and determine the coordinate position of each mark point in the world coordinate system according to the position and posture of the location mark in the world coordinate system and the coordinate position of each mark point in the standard coordinate system where the location mark is located. The above-mentioned position and posture may include coordinate position and / or posture.

[0124] Among them, the standard coordinate system is the coordinate system where the position mark is located, that is, the standard coordinate system is a coordinate system pre-calibrated on the position mark based on the pattern part on the position mark in the space where the self-mobile device is located. It should be understood that the image captured by the image sensor may be distorted, and the candidate coordinate system may be distorted or twisted. It is an observed coordinate system that changes with the change of the observation position, and the coordinate axis may not be straight. The standard coordinate system is a coordinate system corresponding to the candidate coordinate system, and there is no distortion, that is, the standard coordinate system does not change with the change of the observation position.

[0125] That is to say, the position and posture of each location marker in the world coordinate system, such as the coordinate position and posture, are known and are determined by the mobile device or server when establishing the navigation map. For example, when establishing the navigation map, the mobile device or server can generate the position and posture of the location marker corresponding to each target code in the world coordinate system based on each target code. Therefore, in the present application, the pre-established navigation map can be queried according to the target code to obtain the position and posture of the location marker to which the target code belongs in the world coordinate system, so that the coordinate position of each marker point in the world coordinate system can be determined according to the position and posture of the location marker in the world coordinate system and the coordinate position of each marker point in the standard coordinate system where the location marker is located.

[0126] It should be noted that the navigation map can be established by the self-mobile device, and after the self-mobile device establishes the navigation map, the navigation map can be stored locally. When the positioning device is configured in the self-mobile device, the positioning device can directly query the target code in the navigation map, obtain the position of the location identifier to which the target code belongs in the world coordinate system, and determine the coordinate position of each marker point in the world coordinate system according to the position of the location identifier in the world coordinate system and the coordinate position of each marker point in the standard coordinate system where the location identifier is located. When the positioning device is configured in the server, the self-mobile device can send the established navigation map to the server, so that the positioning device can perform the above query process according to the navigation map, determine the position of the location identifier to which the target code belongs in the world coordinate system, and determine the coordinate position of each marker point in the world coordinate system according to the position of the location identifier in the world coordinate system and the coordinate position of each marker point in the standard coordinate system where the location identifier is located.

[0127] Alternatively, the navigation map may also be established by the server. After establishing the navigation map, the server may store the correspondence between the identifiers of the respective mobile devices and the navigation map in the database. When the positioning device is configured in the server, the positioning device may query the above correspondence according to the identifier of the self-mobile device, determine the navigation map corresponding to the self-mobile device, and query the target code in the queried navigation map to obtain the position of the location identifier to which the target code belongs in the world coordinate system, and determine the coordinate position of each marker point in the world coordinate system according to the position of the location identifier in the world coordinate system and the coordinate position of each marker point in the standard coordinate system where the location identifier is located. When the positioning device is configured in a self-mobile device, the server can query the above-mentioned correspondence according to the identification of the self-mobile device, determine the navigation map corresponding to the self-mobile device, and send the corresponding navigation map to the self-mobile device. Alternatively, the self-mobile device can actively query its own corresponding navigation map from the server side, so that the positioning device can perform the above-mentioned query process according to the navigation map, determine the position of the location identifier to which the target code belongs in the world coordinate system, and determine the coordinate position of each marking point in the world coordinate system according to the position of the location identifier in the world coordinate system and the coordinate position of each marking point in the standard coordinate system where the location identifier is located.

[0128] In a possible implementation of the embodiments of the present application, when a navigation map is established by a mobile device or a server, images collected by the mobile device during movement and the device posture of the mobile device in the world coordinate system when the images are collected can be obtained. According to the coordinate position of each marker point in the candidate coordinate system (for example, marked as a reference coordinate position), the target code is decoded, and the coordinate position of each marker point in the standard coordinate system where the position identifier is located is queried according to the target code (for example, marked as a standard coordinate position). According to the standard coordinate position and the reference coordinate position, the coordinate transformation relationship between the standard coordinate system and the coordinate system of the mobile device when the image is collected is determined. According to the coordinate transformation relationship and the device posture of the mobile device in the world coordinate system, the predicted posture of the position identifier is marked in the world coordinate system. The specific mapping process of the mobile device can be found in the subsequent embodiments, which will not be repeated here.

[0129] Therefore, in the present application, the above-mentioned established navigation map can be queried according to the target code to obtain the position and posture of the location marker to which the target code belongs in the world coordinate system, so that the coordinate position of each marking point in the world coordinate system can be determined according to the position and posture of the location marker in the world coordinate system and the coordinate position of each marking point in the standard coordinate system where the location marker is located.

[0130] It should be noted that the execution sequence of positioning and establishing a navigation map (i.e., mapping) can be performed sequentially, i.e., mapping first and then positioning, or, mapping and positioning can be performed at the same time. The above application only takes the example of first executing mapping and then performing positioning.

[0131] Step 105 , determining the position and posture of the mobile device equipped with the image sensor in the world coordinate system according to the coordinate position of each marking point in the world coordinate system and the coordinate position in the image.

[0132] In the embodiment of the present application, the position and posture of the self-moving device equipped with the image sensor in the world coordinate system may include the coordinate position (absolute position) and / or posture of the self-moving device in the world coordinate system.

[0133] In the embodiment of the present application, the coordinate position of each marking point in the image can be the coordinate position of each marking point in the image coordinate system, or it can also be the coordinate position of each marking point in the pixel coordinate system, and the present application does not limit this. Among them, the coordinate origin of the image coordinate system is the center point of the image, the X axis is horizontal to the right, the Y axis is horizontal downward, and the unit is pixel. The coordinate origin of the pixel coordinate system is the upper left corner of the image, the X axis is horizontal to the right, the Y axis is horizontal downward, and the unit is pixel.

[0134] In the embodiment of the present application, after determining the coordinate position of the marking point in the world coordinate system, the perspective n-point PnP algorithm can be used to determine the position and posture of the self-moving device equipped with the image sensor in the world coordinate system according to the coordinate position of each marking point in the world coordinate system and the coordinate position of each second marking point in the image. Among them, the PnP (pespective-n-point) algorithm can include P3P, EPnP, UPnP, DLT (Direct Linear Transform), optimization solution and other algorithms.

[0135] It should be noted that the PnP algorithm may have more than one solution. In order to improve the accuracy of the pose calculation results of the mobile device in the world coordinate system, a check point can be set in the standard coordinate system where the position marker is located. The coordinate position of the check point in the candidate coordinate system is determined based on the affine transformation matrix between the candidate coordinate system and the standard coordinate system. The coordinate position of the check point in the candidate coordinate system is used to check multiple solutions to eliminate incorrect poses.

[0136] As an application scenario, the positioning device is configured in a self-moving device for example. When a location marker is attached to the wall or roof of the indoor space where the self-moving device is located, the pattern of the location marker can be as follows: Figure 2 As shown, the self-moving device can determine the absolute position of the self-moving device in the world coordinate system by capturing an image containing the location identifier and identifying the image. Therefore, even if the furnishings in the indoor space change, or the movement of people interferes with the laser radar scanning of the surrounding environment, the self-moving device can still be positioned. That is, the positioning method is not easily affected by the surrounding environment, which can improve the applicability of the method.

[0137] The positioning method of the embodiment of the present application determines the candidate coordinate system based on the pattern part in the image captured by the image sensor, and then decodes the target code according to the coordinate position of each mark point in the mark point part of the image in the candidate coordinate system, and then queries the coordinate position of each mark point in the world coordinate system according to the target code, so as to determine the position of the self-moving device equipped with the image sensor in the world coordinate system according to the coordinate position of each mark point in the world coordinate system and the coordinate position in the image. Therefore, even if the display position of the self-moving device in the space where the self-moving device is located changes, or the movement of people interferes with the laser radar scanning of the surrounding environment, the position of the self-moving device can be effectively located, which can improve the applicability of the positioning method.

[0138] It should be noted that in order to facilitate image recognition, a high-contrast design can be adopted for the design of the location marker. For example, the background color of the location marker can be black, and the colors of the pattern part and the marking point part can be white, or the background color of the location marker can be white, and the colors of the pattern part and the marking point part can be black, or the location marker can be designed to be highly reflective, etc. The present application does not impose any restrictions on this.

[0139] The colors of the pattern part and the marking point part may be the same or different. Furthermore, the colors of the marking points in the marking point part may be the same or different, and this application does not limit this.

[0140] In a possible implementation of the embodiment of the present application, the location mark may be affected by lighting and illumination. When the ambient brightness is high or low, the accuracy of the image recognition result is affected. Therefore, in the present application, in order to improve the accuracy of the recognition results of the pattern part and the mark point part in the collected image, thereby improving the accuracy of the pose calculation results, when a two-dimensional location mark is set in the space where the self-mobile device is located, an infrared LED light source can be set at the position where the pattern part and the mark point part in the location mark are located, which is used to emit infrared light outward, and the image sensor can be an infrared camera, so that an image containing the location mark can be taken, which is not affected by the ambient brightness in the space where the self-mobile device is located, and the accuracy of the recognition result can be improved. In addition, the wavelength of the infrared light can be 940 nanometers, so that it is invisible to the user's naked eye, thereby avoiding interference with the user.

[0141] In another possible implementation of the embodiment of the present application, the location marker can be designed to be highly reflective, and the mobile device can carry a light emitter for emitting light outward. The emitted light is projected onto the location marker for reflection, so that the location marker can be captured based on the light reflected from the location marker.

[0142] For example, the light emitter may include a light emitting diode, which may emit visible light, or non-visible light, such as infrared light.

[0143] As a possible implementation method, the coordinate position of the marking point in the candidate coordinate system can be mapped to the standard coordinate system where the position identifier is located to obtain the coordinate position of the marking point in the standard coordinate system, and the target code is determined according to the coordinate position of each marking point in the standard coordinate system. The above process is described in detail below in conjunction with Example 2.

[0144] Figure 3 A flowchart of the positioning method provided in Example 2 of the present application.

[0145] like Figure 3 As shown, in Figure 1Based on the illustrated embodiment, step 103 may specifically include the following steps:

[0146] Step 201 , coordinate transformation is performed on the candidate coordinate system and the set standard coordinate system to obtain an affine transformation matrix between the candidate coordinate system and the standard coordinate system.

[0147] In the embodiment of the present application, the standard coordinate system is a coordinate system pre-calibrated on the position mark in the space where the self-mobile device is located. Specifically, the coordinate system pre-calibrated on the position mark according to the pattern part on the position mark. The standard coordinate system is a coordinate system corresponding to the candidate coordinate system and has no distortion.

[0148] In the embodiment of the present application, the affine transformation can be understood as a new coordinate axis formed by scaling, rotating, and translating the original coordinate axis. After determining the candidate coordinate system and the standard coordinate system, the affine transformation matrix between the candidate coordinate system and the standard coordinate system can be determined according to the two-dimensional geometric transformation.

[0149] Step 202: using an affine transformation matrix, transform the coordinate position of each marking point in the candidate coordinate system to the standard coordinate system to obtain the coordinate position of each marking point in the standard coordinate system.

[0150] In an embodiment of the present application, for each marking point in the candidate coordinate system, an affine transformation matrix can be used to transform the coordinate position of the marking point to the standard coordinate system to obtain the coordinate position of the marking point in the standard coordinate system.

[0151] Step 203: Determine the corresponding target code according to the coordinate position of each marking point in the standard coordinate system.

[0152] In the embodiment of the present application, the corresponding target code can be determined according to the coordinate position of each marking point in the standard coordinate system. For example, the coordinate position of each marking point in the standard coordinate system can be combined to obtain the corresponding target code. For example, when the number of marking points is 3, assuming that the coordinate positions of the 3 marking points in the standard coordinate system are (1, 1), (2, 2) and (3, 3), respectively, the target code can be 112233, 11-22-33, 11 22 33, 1-1-2-2-3-3, etc.

[0153] As another possible implementation, the coordinate position of the marking point in the candidate coordinate system can be mapped to the standard coordinate system where the position identifier is located, and the angle between the marking point and the coordinate axis in the standard coordinate system and / or the distance from the origin of the standard coordinate system are obtained. The target code is determined according to the angle between each marking point and the coordinate axis in the standard coordinate system and / or the distance from the origin of the standard coordinate system. The above process is described in detail below in conjunction with Example 3.

[0154] Figure 4 This is a flow chart of the positioning method provided in Example 3 of the present application.

[0155] like Figure 4 As shown, in Figure 1 Based on the illustrated embodiment, step 103 may specifically include the following steps:

[0156] Step 301 , transform the candidate coordinate system with the set standard coordinate system to obtain an affine transformation matrix between the candidate coordinate system and the standard coordinate system.

[0157] The execution process of step 301 may refer to the execution process of step 201 in the above embodiment, and will not be described in detail here.

[0158] Step 302, using an affine transformation matrix, transforms the coordinate position of each marking point in the candidate coordinate system to the standard coordinate system to obtain the angle between each marking point and the coordinate axis in the standard coordinate system and / or the distance from the origin of the standard coordinate system.

[0159] In the embodiment of the present application, the coordinate axis may be the X-axis in the standard coordinate system, or may be the Y-axis in the standard coordinate system, without limitation.

[0160] In an embodiment of the present application, an affine transformation matrix can be used to transform the coordinate position of each marking point in the candidate coordinate system to the standard coordinate system to obtain the coordinate position of each marking point in the standard coordinate system. Thereafter, based on the coordinate position of each marking point in the standard coordinate system, the angle between each marking point and the coordinate axis in the standard coordinate system can be calculated, and / or the distance between each marking point and the origin of the standard coordinate system can be calculated.

[0161] Step 303: Determine the corresponding target code according to the angle between each marking point and the coordinate axis in the standard coordinate system and / or the distance from the origin of the standard coordinate system.

[0162] In the embodiment of the present application, the corresponding target code can be determined according to the angle between each marking point and the coordinate axis in the standard coordinate system, and / or the distance between each marking point and the origin of the standard coordinate system. For example, the angle between the coordinate axes of each marking point in the standard coordinate system, and / or the distance between each marking point and the origin of the standard coordinate system can be combined to obtain the corresponding target code.

[0163] For example, when the number of marking points is 3, it is assumed that the coordinate axis is the X axis, and the coordinate positions of the three marking points in the standard coordinate system are (1, 1), (1, )and( 1), the angles between the three marking points and the coordinate axes in the standard coordinate system are 45°, 60°, and 30° respectively, and the distances between the three marking points and the origin of the standard coordinate system are 2.2. If the corresponding target code is determined according to the angle between each marking point and the coordinate axis in the standard coordinate system, the target code can be, for example, 45°60°30°, 45°-60°-30°, 45°60°30°, etc.; if the corresponding target code is determined according to the distance between each marking point and the origin of the standard coordinate system, the target code can be, for example, etc.; if the corresponding target code is determined according to the angle between each marking point and the coordinate axis in the standard coordinate system and the distance between each marking point and the origin of the standard coordinate system, the target code can be, for example, wait.

[0164] Therefore, it is possible to calculate the target code in a variety of ways, which can improve the applicability of the positioning method.

[0165] It should be noted that in the present application, it is necessary to locate the posture of the self-moving device in the world coordinate system based on a set threshold number of marking points. For example, when the perspective n-point PnP algorithm is used to calculate the posture of the self-moving device equipped with an image sensor in the world coordinate system, the set threshold number can be 3. When the number of marking points is less than the set threshold number, the posture of the self-moving device in the world coordinate system cannot be calculated. Therefore, as a possible implementation method of an embodiment of the present application, in order to realize real-time positioning of the self-moving device, when the number of marking points is less than the set threshold number, auxiliary marking points can be added to multiple marking points to assist in calculating the posture of the self-moving device in the world coordinate system, so as to effectively locate the self-moving device. The above process is described in detail below in conjunction with Example 4.

[0166] Figure 5 This is a flow chart of the positioning method provided in Example 4 of the present application.

[0167] like Figure 5 As shown, based on the above embodiment, after step 103, or after step 203, or after step 303, the positioning method may further include the following steps:

[0168] Step 401: If the number of marking points is less than the set threshold number, query the first coordinate position of the auxiliary marking point corresponding to the target code in the world coordinate system and the coordinate position in the standard coordinate system.

[0169] In the embodiment of the present application, the number of threshold values ​​is preset, for example, the number of threshold values ​​may be 3.

[0170] In the embodiment of the present application, each target code has a corresponding auxiliary marking point, and the auxiliary marking point is located on the position mark. The coordinate position of each auxiliary marking point in the standard coordinate system where the position mark is located, and the coordinate position of each auxiliary marking point in the world coordinate system can be predetermined, which is recorded as the first coordinate position in the present application, and a corresponding relationship is established between each target code and the first coordinate position of the auxiliary marking point in the world coordinate system, and the coordinate position in the standard coordinate system. Therefore, in the present application, when it is determined that the number of marking points is less than the set threshold number, the above-mentioned corresponding relationship can be queried according to the target code to determine the first coordinate position of the auxiliary marking point corresponding to the target code in the world coordinate system, and the coordinate position in the standard coordinate system.

[0171] Step 402: using an affine transformation matrix, transform the coordinate position of the auxiliary marking point in the standard coordinate system to the candidate coordinate system to obtain the coordinate position of the auxiliary marking point in the candidate coordinate system.

[0172] In an embodiment of the present application, the affine transformation matrix between the candidate coordinate system and the standard coordinate system calculated in step 201 can be used to transform the coordinate position of the auxiliary marker point in the standard coordinate system to the candidate coordinate system to obtain the coordinate position of the auxiliary marker point in the candidate coordinate system.

[0173] Step 403: Determine the second coordinate position of the auxiliary marking point in the image according to the coordinate position of the origin of the candidate coordinate system in the image.

[0174] In the embodiment of the present application, the second coordinate position of the auxiliary marking point in the image can be determined based on the coordinate position of the origin of the candidate coordinate system in the image and the coordinate position of the auxiliary marking point in the candidate coordinate system.

[0175] For example, when the coordinate position of the auxiliary marker point in the image is the coordinate position of the auxiliary marker point in the image coordinate system, if the coordinate position of the origin of the candidate coordinate system in the image is (a, b), and the coordinate position of the auxiliary marker point in the candidate coordinate system is (c, d), then the second coordinate position of the auxiliary marker point in the image is (a+c, b+d).

[0176] Step 404: determine the auxiliary marking point as a marking point that is located at a first coordinate position in the world coordinate system and at a second coordinate position in the image.

[0177] In an embodiment of the present application, after determining the first coordinate position of the auxiliary marking point in the world coordinate system and the second coordinate position in the image, the auxiliary marking point can be used as a marking point in the marking point part, so that the position and posture of the self-moving device equipped with an image sensor in the world coordinate system can be determined based on the coordinate position of each marking point in the world coordinate system and the coordinate position in the image.

[0178] In an embodiment of the present application, when the number of marking points is less than a set threshold number, the auxiliary marking points corresponding to the target code can be used to assist in calculating the posture of the self-moving device equipped with an image sensor in the world coordinate system, thereby effectively locating the position of the self-moving device.

[0179] In a possible implementation of the embodiment of the present application, in order to improve processing efficiency and reduce workload, after determining the candidate coordinate system in the image based on the pattern portion in the image, each marking point can be determined only from within a set distribution range.

[0180] Specifically, the pattern part can be first determined according to the value of each pixel point in the preprocessed image, or directly determined according to the value of each pixel point in the captured image. Then, based on the pattern part, a candidate coordinate system can be determined. Then, in the candidate coordinate system, a set distribution range of the marking point part can be determined. Finally, each marking point can be identified within the set distribution range in the preprocessed image or the captured image.

[0181] That is to say, the position mark is known, and the distribution range of the marker point is also known. In order to improve the processing efficiency of the image, only the marker points within the set distribution range can be identified as marker points. Figure 2 As shown, the distribution range may be set to the second quadrant of the candidate coordinate system, and only the marking points in the second quadrant of the image may be used as the marking points in the marking point part.

[0182] It should be noted that in the present application, it is necessary to locate the pose of the self-moving device in the world coordinate system according to the set threshold number of marking points. For example, when the perspective n-point PnP algorithm is used to calculate the pose of the self-moving device equipped with an image sensor in the world coordinate system, the set threshold number can be 3. When the number of marking points is less than the set threshold number, the pose of the self-moving device in the world coordinate system cannot be calculated. Therefore, as a possible implementation method of an embodiment of the present application, the number of marking points can be checked, for example, whether the number of marking points is greater than or equal to the set threshold number. If the check passes, such as the number of marking points is greater than or equal to the set threshold number, then according to the coordinate position of each marking point in the candidate coordinate system, the target code is decoded and obtained. If the check fails, the image is discarded to collect the next frame of the image, that is, step 101 and subsequent steps are repeated, or, if the check fails, steps 401 to 404 are executed.

[0183] The following is a detailed description of the map building process of the mobile device in conjunction with the fifth embodiment.

[0184] Figure 6This is a flowchart of a method for establishing a navigation map used in the aforementioned positioning method provided in Example 5 of the present application.

[0185] In the embodiment of the present application, the method for establishing the navigation map can be applied to the mobile device, or to a server that communicates with the mobile device.

[0186] like Figure 6 As shown, the method for establishing the navigation map may include the following steps:

[0187] Step 501, obtaining an image captured by a mobile device during movement, and a device posture of the mobile device in a map coordinate system when the image is captured; wherein a location mark is displayed in the image.

[0188] Among them, the map coordinate system can be the world coordinate system in the above embodiment, which refers to the coordinate system generated by the mobile device or server when establishing the navigation map. For example, when establishing the navigation map, the position of the mobile device when it is started can be used as the origin of the map coordinate system, the forward direction of the mobile device can be used as the positive direction of the X-axis, the direction perpendicular to the X-axis can be used as the Y-axis, and the direction perpendicular to the X-axis and the Y-axis can be used as the Z-axis, or the forward direction of the mobile device can be used as the positive direction of the Y-axis, the direction perpendicular to the Y-axis can be used as the X-axis, and the direction perpendicular to the X-axis and the Y-axis can be used as the Z-axis. That is, the origin of the map coordinate system is the position of the mobile device when it is started, and each coordinate axis and the direction of each coordinate axis can be predefined.

[0189] In the embodiment of the present application, an image sensor may be used to capture an image during movement of the self-mobile device. The image shows a location marker, which includes a pattern portion and a marking point portion. The recognition process of the location marker, the pattern portion, and the marking point portion can refer to the execution process of the above embodiment, and will not be repeated here.

[0190] In an embodiment of the present application, the device posture may include the coordinate position and / or posture of the self-moving device. The device posture of the self-moving device can be detected by relevant sensors. For example, the device posture of the self-moving device can be measured by sensors such as laser radar, odometer, inertial measurement unit (Inertial Measurement Unit, referred to as IMU). For example, when the self-moving device is started, the map coordinate system can be determined, and the coordinate position of the self-moving device in the map coordinate system can be determined according to the moving direction and moving distance of the self-moving device. In addition, according to the moving direction, moving angle and moving distance of each time during the movement of the self-moving device, the posture of the self-moving device relative to the initial startup can be determined, and the posture is the device posture of the self-moving device. Among them, the moving angle can be the angle between the moving direction and the reference direction calibrated by the IMU.

[0191] In an embodiment of the present application, when the method for establishing a navigation map is applied to a mobile device, the mobile device can directly obtain the above-mentioned image and the device position of the mobile device in the map coordinate system when the image is collected. When the method for establishing a navigation map is applied to a server, after the mobile device collects images during movement, the collected images and the device position of the mobile device in the map coordinate system when the image is collected can be sent to the server. Accordingly, the server can receive the above-mentioned image and the device position of the mobile device in the map coordinate system when the image is collected.

[0192] Step 502: Determine a candidate coordinate system according to the pattern portion in the location marker.

[0193] The execution process of step 502 may refer to the execution process of step 102 in the above embodiment, and will not be described in detail here.

[0194] Step 503: Decode the target code according to the coordinate position of each marking point in the marking point part of the position identifier in the candidate coordinate system.

[0195] In the embodiment of the present application, after the candidate coordinate system is established in the image, the coordinate position of each marking point in the candidate coordinate system can be determined. After the coordinate position of each marking point in the candidate coordinate system is calculated, the coordinate position of the marking point in the candidate coordinate system can be mapped to the standard coordinate system where the position identifier is located to obtain the coordinate position of the marking point in the standard coordinate system, and the target code is determined according to the coordinate position of each marking point in the standard coordinate system.

[0196] Specifically, the candidate coordinate system and the standard coordinate system can be transformed to obtain an affine transformation matrix between the candidate coordinate system and the standard coordinate system; the coordinate position of each marking point in the candidate coordinate system can be transformed to the standard coordinate system using the affine transformation matrix to obtain the coordinate position of each marking point in the standard coordinate system; according to the coordinate position of each marking point in the standard coordinate system, the corresponding target code is determined.

[0197] For example, the coordinate positions of each marking point in the standard coordinate system can be combined to obtain the corresponding target code. For example, when the number of marking points is 3, assuming that the coordinate positions of the 3 marking points in the standard coordinate system are (1, 1), (2, 2) and (3, 3), the target code can be 112233, 11-22-33, 11 22 33, 1-1-2-2-3-3, etc.

[0198] Step 504, according to the target code, query and obtain the coordinate position of each mark point in the standard coordinate system where the position identifier is located, which is recorded as the standard coordinate position in this application.

[0199] In the embodiment of the present application, since the candidate coordinate system may be distorted, and the target code is determined based on the coordinate position of the marked point part in the candidate coordinate system, the target code may deviate from the actual code. Therefore, in the present application, in order to improve the accuracy of the positioning result, the standard coordinate position of each marked point in the standard coordinate system where the position identifier is located can be queried based on the target code.

[0200] It should be understood that each position marker is known, and the pattern part and the marking point part in the position marker are also known. After the position marker is set in the space where the self-mobile device is located, the standard coordinate system can be determined, and the standard coordinate position of each marking point in the marking point part in the standard coordinate system can also be determined. For example, see Figure 2 , the standard coordinate position of each mark point in the mark point part in the standard coordinate system can be calculated. Therefore, in this application, for each location identifier, the standard coordinate position of each mark point in the mark point part of the location identifier in the standard coordinate system where the location identifier is located can be calculated in advance, and each location identifier and the standard coordinate position of the mark point in the mark point part of the location identifier in the standard coordinate system where the location identifier is located are stored accordingly.

[0201] Therefore, in this application, the stored data can be queried according to the target code to obtain the standard coordinate position that matches the target code as the standard coordinate position of each marking point in the marking point part in the standard coordinate system where the position identifier is located.

[0202] For example, when the number of marking points is 3 and the target code is 1-1-2-2-3.1-3.1, you can query the standard coordinate positions of the three marking points in the same location identifier that have the highest match with the target code, such as (1, 1), (2, 2) and (3, 3). The standard coordinate positions obtained by the query can be used as the standard coordinate positions of the three marking points in the marking point part in the standard coordinate system where the location identifier is located.

[0203] Step 505, determining the coordinate transformation relationship between the standard coordinate system and the coordinate system of the mobile device when capturing the image based on the standard coordinate position and the reference coordinate position; wherein the reference coordinate position is the coordinate position of each marking point in the candidate coordinate system.

[0204] In an embodiment of the present application, the coordinate system of the self-moving device is a pre-calibrated coordinate system. For example, the coordinate system of the self-moving device may be a coordinate system pre-calibrated on the self-moving device. For example, the origin of the coordinate system of the self-moving device may be the center of mass of the self-moving device, the Y-axis is vertically upward, and the X-axis is horizontally to the right or left.

[0205] In an embodiment of the present application, a PnP algorithm can be used to determine the coordinate transformation relationship between the standard coordinate system and the coordinate system of the self-mobile device when acquiring images based on the standard coordinate positions and reference coordinate positions corresponding to multiple marking points. The coordinate transformation relationship may include a rotation matrix R and a displacement vector t (or translation vector) between the standard coordinate system and the coordinate system of the self-mobile device when acquiring images. For example, the coordinate transformation relationship may be a transformation matrix T_tn composed of a rotation matrix R and a displacement vector t.

[0206] Step 506: annotate the predicted position of the location marker in the map coordinate system according to the coordinate transformation relationship and the device position of the mobile device in the map coordinate system.

[0207] In an embodiment of the present application, the predicted pose of the location marker in the map coordinate system can be determined based on the coordinate transformation relationship between the standard coordinate system and the coordinate system of the mobile device when acquiring the image, and the device pose of the mobile device in the map coordinate system, and the predicted pose of the location marker can be marked in the map coordinate system.

[0208] For example, the predicted position of the marker location is Target_id_P, and the device position of the mobile device in the map coordinate system is Pn, then Target_id_P = Pn⊕T_tn.

[0209] Therefore, for step 104, the above-mentioned established navigation map can be queried according to the target code to obtain the position of the location marker in the world coordinate system or the map coordinate system, so that the coordinate position of each marker point in the world coordinate system can be determined according to the position of the location marker in the world coordinate system and the coordinate position of each marker point in the standard coordinate system where the location marker is located.

[0210] Figure 7 This is a schematic diagram of the structure of the positioning device provided in Example 6 of the present application.

[0211] like Figure 7 As shown, the positioning device 100 may include: an acquisition module 110 , a determination module 120 , a decoding module 130 , a query module 140 and a positioning module 150 .

[0212] The acquisition module 110 is used to acquire an image captured by an image sensor; wherein the image displays a pattern portion and a marking point portion.

[0213] The determination module 120 is used to determine a candidate coordinate system according to the pattern portion.

[0214] The decoding module 130 is used to decode and obtain the target code according to the coordinate position of each marking point in the marking point part in the candidate coordinate system.

[0215] The query module 140 is used to query and obtain the coordinate position of each marking point in the world coordinate system according to the target code.

[0216] The positioning module 150 is used to determine the position and posture of the mobile device equipped with the image sensor in the world coordinate system according to the coordinate position of each marking point in the world coordinate system and the coordinate position in the image.

[0217] In a possible implementation of an embodiment of the present application, the pattern portion displays an asymmetric pattern, and the determination module 120 is specifically used to: determine the coordinate axis of the candidate coordinate system based on the set reference line in the asymmetric pattern; wherein the direction of the coordinate axis is determined based on the position of the local pattern set in the asymmetric pattern; and / or, determine the coordinate point set in the candidate coordinate system based on the position of the key point set in the asymmetric pattern.

[0218] In a possible implementation of an embodiment of the present application, the decoding module 130 is specifically used to: perform a coordinate system transformation on a candidate coordinate system and a set standard coordinate system to obtain an affine transformation matrix between the candidate coordinate system and the standard coordinate system; use the affine transformation matrix to transform the coordinate position of each marking point in the candidate coordinate system to the standard coordinate system to obtain the coordinate position of each marking point in the standard coordinate system; determine the corresponding target code according to the coordinate position of each marking point in the standard coordinate system.

[0219] In another possible implementation of the embodiment of the present application, the decoding module 130 is specifically used to: perform a coordinate system transformation on the candidate coordinate system and the set standard coordinate system to obtain an affine transformation matrix between the candidate coordinate system and the standard coordinate system; use the affine transformation matrix to transform the coordinate position of each marking point in the candidate coordinate system to the standard coordinate system to obtain the angle between each marking point and the coordinate axis in the standard coordinate system and / or the distance from the origin of the standard coordinate system in the standard coordinate system; determine the corresponding target code according to the angle between each marking point and the coordinate axis in the standard coordinate system and / or the distance from the origin of the standard coordinate system in the standard coordinate system.

[0220] Further, in a possible implementation of the embodiment of the present application, see Figure 8 ,exist Figure 7 Based on the illustrated embodiment, the positioning device 100 may further include:

[0221] The first processing module 160 is used to query the first coordinate position of the auxiliary marking point corresponding to the target code in the world coordinate system and the coordinate position in the standard coordinate system if the number of marking points is less than the set threshold number; use a radial transformation matrix to transform the coordinate position of the auxiliary marking point in the standard coordinate system to the candidate coordinate system to obtain the coordinate position of the auxiliary marking point in the candidate coordinate system; determine the second coordinate position of the auxiliary marking point in the image according to the coordinate position of the origin of the candidate coordinate system in the image; determine the auxiliary marking point as a marking point that is at the first coordinate position in the world coordinate system and at the second coordinate position in the image.

[0222] The second processing module 170 is used to determine the pattern part according to the value of each pixel in the image.

[0223] The third processing module 180 is used to determine a set distribution range of the marking point part according to the candidate coordinate system; and identify each marking point within the set distribution range in the image.

[0224] In another possible implementation of the embodiment of the present application, the decoding module 130 is specifically used to: verify the number of marking points; if the verification passes, decode to obtain the target code according to the coordinate position of each marking point in the candidate coordinate system.

[0225] In a possible implementation method of an embodiment of the present application, the query module 140 is specifically used to: query the target code in the established navigation map to obtain the posture of the location identifier to which the target code belongs in the world coordinate system; determine the coordinate position of each marking point in the world coordinate system according to the posture of the location identifier in the world coordinate system and the coordinate position of each marking point in the standard coordinate system where the location identifier is located.

[0226] In a possible implementation of an embodiment of the present application, the positioning module 150 is specifically used to: determine the posture of the self-moving device equipped with an image sensor in the world coordinate system by using a perspective n-point PnP algorithm based on the coordinate position of each marker point in the world coordinate system and the coordinate position in the image.

[0227] It should be noted that the above explanations of the positioning method embodiment are also applicable to the positioning device 100 of this embodiment, and will not be repeated here.

[0228] The positioning device of the embodiment of the present application determines the candidate coordinate system based on the pattern part in the image captured by the image sensor, and then decodes the target code according to the coordinate position of each mark point in the mark point part of the image in the candidate coordinate system, and then queries the coordinate position of each mark point in the world coordinate system according to the target code, so as to determine the position of the self-moving device equipped with the image sensor in the world coordinate system according to the coordinate position of each mark point in the world coordinate system and the coordinate position in the image. Therefore, even if the display position of the self-moving device in the space where the self-moving device is located changes, or the movement of people interferes with the laser radar scanning of the surrounding environment, the position of the self-moving device can be effectively located, which can improve the applicability of the positioning device.

[0229] In order to implement the above embodiments, the present application also proposes a self-mobile device, including: an image sensor, a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the positioning method proposed in the above embodiments of the present application is implemented.

[0230] In order to implement the above embodiments, the present application also proposes a non-temporary computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the positioning method proposed in the above embodiments of the present application is implemented.

[0231] In order to implement the above embodiments, the present application further proposes a computer program product. When the instructions in the computer program product are executed by a processor, the positioning method proposed in the above embodiments of the present application is performed.

[0232] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0233] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0234] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.

[0235] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute the instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purpose of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.

[0236] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0237] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0238] In addition, each functional unit in each embodiment of the present application may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0239] The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the present application. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present application.

Claims

1. A positioning method, characterized in that: The method comprises the following steps: Acquire an image of a location mark captured by an image sensor, wherein the location mark displays a pattern portion and a marking point portion, the pattern portion is used to determine a coordinate system, and the marking point portion is used to decode and obtain a code corresponding to the location mark and locate an observation position; identifying an asymmetric pattern in the pattern portion; Determining a candidate coordinate system according to the asymmetric pattern; Determining a set distribution range of the marker points in the image according to the candidate coordinate system, and identifying the marker points within the set distribution range in the image; Decoding to obtain a target code according to the coordinate position of each of the marking points in the candidate coordinate system; According to the target code, query and obtain the coordinate position of each of the marking points in the world coordinate system; Determine the position and posture of the mobile device equipped with the image sensor in the world coordinate system according to the coordinate position of each of the marking points in the world coordinate system and the coordinate position of each of the marking points in the image; The step of determining a candidate coordinate system according to the asymmetric pattern comprises: Determining the coordinate axis of the candidate coordinate system according to the set reference line in the asymmetric pattern; wherein the direction of the coordinate axis is determined according to the position of the set local pattern in the asymmetric pattern; and / or, Determining a coordinate point set in the candidate coordinate system according to a position of a key point set in the asymmetric pattern; After decoding the target code according to the coordinate position of each of the marking points in the candidate coordinate system, the method further includes: If the number of the marking points is less than the set threshold number, querying the first coordinate position of the auxiliary marking point corresponding to the target code in the world coordinate system and the coordinate position in the standard coordinate system; Determining a second coordinate position of the auxiliary marking point in the image according to the coordinate position of the auxiliary marking point in the standard coordinate system; The auxiliary marking point is determined as the marking point which is located at the first coordinate position in the world coordinate system and at a second coordinate position in the image.

2. The positioning method according to claim 1, characterized in that: The decoding to obtain the target code according to the coordinate position of each of the marking points in the candidate coordinate system includes: Performing coordinate transformation on the candidate coordinate system and the set standard coordinate system to obtain an affine transformation matrix between the candidate coordinate system and the standard coordinate system; Using the affine transformation matrix, transform the coordinate position of each of the marking points in the candidate coordinate system to the standard coordinate system to obtain the coordinate position of each of the marking points in the standard coordinate system; According to the coordinate position of each of the marking points in the standard coordinate system, the corresponding target code is determined.

3. The positioning method according to claim 1, characterized in that: The decoding to obtain the target code according to the coordinate position of each of the marking points in the candidate coordinate system includes: Performing coordinate transformation on the candidate coordinate system and the set standard coordinate system to obtain an affine transformation matrix between the candidate coordinate system and the standard coordinate system; The affine transformation matrix is ​​used to transform the coordinate position of each of the marking points in the candidate coordinate system to the standard coordinate system, so as to obtain the angle between each of the marking points and the coordinate axis in the standard coordinate system and / or the distance from the origin of the standard coordinate system; The corresponding target code is determined according to the angle between each of the marking points in the standard coordinate system and the coordinate axis in the standard coordinate system and / or the distance from the origin of the standard coordinate system.

4. The positioning method according to claim 2 or 3, characterized in that: Determining a second coordinate position of the auxiliary marking point in the image according to the coordinate position of the auxiliary marking point in the standard coordinate system includes: Using the affine transformation matrix, transform the coordinate position of the auxiliary marking point in the standard coordinate system to the candidate coordinate system to obtain the coordinate position of the auxiliary marking point in the candidate coordinate system; The second coordinate position of the auxiliary marking point in the image is determined according to the coordinate position of the origin of the candidate coordinate system in the image.

5. The positioning method according to any one of claims 1 to 3, characterized in that: The decoding to obtain the target code according to the coordinate position of each of the marking points in the candidate coordinate system includes: Verifying the number of the marking points; If the verification is passed, the target code is decoded according to the coordinate position of each marking point in the candidate coordinate system.

6. The positioning method according to any one of claims 1 to 3, characterized in that: The querying and obtaining the coordinate position of each of the marking points in the world coordinate system according to the target code includes: In the established navigation map, query the target code to obtain the position of the position mark to which the target code belongs in the world coordinate system; The coordinate position of each of the marking points in the world coordinate system is determined according to the posture of the position marker in the world coordinate system and the coordinate position of each of the marking points in the standard coordinate system where the position marker is located.

7. The positioning method according to any one of claims 1 to 3, characterized in that: The determining the position and posture of the mobile device equipped with the image sensor in the world coordinate system according to the coordinate position of each of the marking points in the world coordinate system and the coordinate position of each of the marking points in the image includes: According to the coordinate position of each marking point in the world coordinate system and the coordinate position of each marking point in the image, a perspective n-point PnP algorithm is used to determine the position and posture of the self-moving device equipped with the image sensor in the world coordinate system.

8. A positioning device, characterized in that: include: An acquisition module is used to acquire an image of a location mark collected by an image sensor, wherein the location mark has a pattern portion and a marking point portion, the pattern portion is used to determine a coordinate system, and the marking point portion is used to decode and obtain a code corresponding to the location mark and locate an observation position; a second processing module, configured to identify an asymmetric pattern in the pattern portion; A determination module, configured to determine a candidate coordinate system according to the asymmetric pattern; A third processing module, configured to determine a set distribution range of the marking points in the image according to the candidate coordinate system, and identify the marking points within the set distribution range in the image; A decoding module, used for decoding and obtaining a target code according to the coordinate position of each of the marking points in the candidate coordinate system; A query module, used for querying and obtaining the coordinate position of each of the marking points in the world coordinate system according to the target code; A positioning module, used to determine the position and posture of the mobile device equipped with the image sensor in the world coordinate system according to the coordinate position of each of the marking points in the world coordinate system and the coordinate position of each of the marking points in the image; The determination module is specifically used for: Determining the coordinate axis of the candidate coordinate system according to the set reference line in the asymmetric pattern; wherein the direction of the coordinate axis is determined according to the position of the set local pattern in the asymmetric pattern; and / or, Determining a coordinate point set in the candidate coordinate system according to a position of a key point set in the asymmetric pattern; The first processing is used to query the first coordinate position of the auxiliary marking point corresponding to the target code in the world coordinate system and the coordinate position in the standard coordinate system if the number of the marking points is less than the set threshold number; determine the second coordinate position of the auxiliary marking point in the image according to the coordinate position of the auxiliary marking point in the standard coordinate system; determine the auxiliary marking point as the marking point that is at the first coordinate position in the world coordinate system and at the second coordinate position in the image.

9. The positioning device according to claim 8, characterized in that: The decoding module is specifically used for: Performing coordinate transformation on the candidate coordinate system and the set standard coordinate system to obtain an affine transformation matrix between the candidate coordinate system and the standard coordinate system; Using the affine transformation matrix, transform the coordinate position of each of the marking points in the candidate coordinate system to the standard coordinate system to obtain the coordinate position of each of the marking points in the standard coordinate system; According to the coordinate position of each of the marking points in the standard coordinate system, the corresponding target code is determined.

10. The positioning device according to claim 8, characterized in that: The decoding module is specifically used for: Performing coordinate transformation on the candidate coordinate system and the set standard coordinate system to obtain an affine transformation matrix between the candidate coordinate system and the standard coordinate system; The affine transformation matrix is ​​used to transform the coordinate position of each of the marking points in the candidate coordinate system to the standard coordinate system, so as to obtain the angle between each of the marking points and the coordinate axis in the standard coordinate system and / or the distance from the origin of the standard coordinate system; The corresponding target code is determined according to the angle between each of the marking points in the standard coordinate system and the coordinate axis in the standard coordinate system and / or the distance from the origin of the standard coordinate system.

11. The positioning device according to claim 9 or 10, characterized in that: Also includes: The first processing is specifically used to transform the coordinate position of the auxiliary marking point in the standard coordinate system to the candidate coordinate system by using the affine transformation matrix to obtain the coordinate position of the auxiliary marking point in the candidate coordinate system; The second coordinate position of the auxiliary marking point in the image is determined according to the coordinate position of the origin of the candidate coordinate system in the image.

12. The positioning device according to any one of claims 8 to 10, characterized in that: The decoding module is specifically used for: Verifying the number of the marking points; If the verification is passed, the target code is decoded according to the coordinate position of each marking point in the candidate coordinate system.

13. The positioning device according to any one of claims 8 to 10, characterized in that: The query module is specifically used for: In the established navigation map, query the target code to obtain the position of the position mark to which the target code belongs in the world coordinate system; The coordinate position of each of the marking points in the world coordinate system is determined according to the posture of the position marker in the world coordinate system and the coordinate position of each of the marking points in the standard coordinate system where the position marker is located.

14. The positioning device according to any one of claims 8 to 10, characterized in that: The positioning module is specifically used for: According to the coordinate position of each marking point in the world coordinate system and the coordinate position of each marking point in the image, a perspective n-point PnP algorithm is used to determine the position and posture of the self-moving device equipped with the image sensor in the world coordinate system.

15. A self-propelled device, characterized in that: The method comprises an image sensor, a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the program, the positioning method as claimed in any one of claims 1 to 7 is implemented.

16. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the positioning method as described in any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Indoor robot vision positioning system

    CN108195381A

  • Method and device for determining three-dimensional pose of target object and electronic equipment

    CN110298878A