Method and device for determining parking position of unmanned vehicle
The camera collects images of the unmanned vehicle and the reference tag, determines the angle and distance, and controls the rotation of the carrying platform to achieve accurate parking of the unmanned vehicle, solving the problem of inaccurate parking of the unmanned vehicle and ensuring the success of automatic distribution.
Patent Information
- Application Number
- CN201910824186.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-09-02
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2039-09-02
AI Technical Summary
The unmanned vehicle cannot accurately park at the reference parking position when parking, causing the robot to be unable to determine the final parking location of the unmanned vehicle, which in turn leads to the failure of automatic distribution.
The camera collects the images of the vehicle tag and the reference tag on the unmanned vehicle, determines the angle and distance between the two, and controls the rotation of the unmanned vehicle's carrying platform to adjust the angle, thereby achieving accurate parking of the unmanned vehicle.
It ensures that unmanned vehicles can accurately dock at the reference parking position, avoids failure of automatic distribution, and improves the accuracy and efficiency of unmanned vehicle distribution.
Smart Images

Figure CN112446916B
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the field of computer technology, and in particular to a method and device for determining a parking position for an unmanned vehicle. Background Art
[0002] With the rise of artificial intelligence technology, more and more products in people's lives are becoming intelligent. For example, in the existing delivery of goods, unmanned vehicles can be used to achieve automatic delivery of goods.
[0003] Automatic delivery by unmanned vehicles usually requires the unmanned vehicle's navigation and positioning system to park the unmanned vehicle at a preset reference parking position. The robot can then perform operations such as opening the door and loading goods for the unmanned vehicle parked at the reference parking position, thereby realizing automatic delivery of the unmanned vehicle.
[0004] In related technologies, when an unmanned vehicle uses its own positioning and navigation system to dock, it often cannot accurately park the unmanned vehicle at the reference parking position. The robot cannot allocate cargo for the unmanned vehicle if it cannot determine the final parking position of the unmanned vehicle, which will cause the unmanned vehicle's automatic cargo allocation to fail. Summary of the invention
[0005] The embodiments of the present disclosure provide a method and device for determining a parking position for an unmanned vehicle.
[0006] In a first aspect, an embodiment of the present disclosure provides a method for determining a parking position of an unmanned vehicle, the method comprising: in response to receiving parking information, controlling a camera to capture an image of an on-board label on the unmanned vehicle to obtain a first image; based on the first image, determining an angle between the on-board label and a reference label; controlling a carrier platform of the unmanned vehicle to rotate according to the angle so that the unmanned vehicle rotates to an angle indicated by the angle; controlling a camera to capture an image of the on-board label on the rotated unmanned vehicle to obtain a second image; based on the second image, determining a distance between the on-board label and the reference label to obtain the parking position of the unmanned vehicle.
[0007] In some embodiments, based on the first image, the angle between the vehicle-mounted tag and the reference tag is determined, including: based on the first image, determining a first transformation matrix between the camera coordinate system and the vehicle-mounted tag coordinate system; based on the first transformation matrix and a preset second transformation matrix, determining a third transformation matrix between the vehicle-mounted tag coordinate system and the reference tag coordinate system and a rotation matrix of the third transformation matrix, wherein the second transformation matrix is the transformation matrix between the camera coordinate system and the reference tag coordinate system; determining the trace of the rotation matrix of the third transformation matrix to obtain the angle between the vehicle-mounted tag and the reference tag.
[0008] In some embodiments, based on the second image, the distance between the vehicle-mounted tag and the reference tag is determined, including: based on the second image, determining the fourth transformation matrix between the camera coordinate system and the vehicle-mounted tag coordinate system; based on the fourth transformation matrix and the preset second transformation matrix, determining the fifth transformation matrix between the vehicle-mounted tag coordinate system and the reference tag coordinate system and the translation matrix of the fifth transformation matrix, wherein the second transformation matrix is the transformation matrix between the camera coordinate system and the reference tag coordinate system; based on the determined translation matrix of the fifth transformation matrix, the second transformation matrix and the preset sixth transformation matrix, determining the distance between the vehicle-mounted tag and the reference tag in the robot coordinate system, wherein the sixth transformation matrix is the transformation matrix between the camera coordinate system and the robot coordinate system.
[0009] In some embodiments, the second transformation matrix is determined by the following steps: controlling the camera to capture an image of the reference tag; and determining a second transformation matrix between the camera coordinate system and the reference tag coordinate system based on the captured image of the reference tag.
[0010] In some embodiments, determining the trace of the rotation matrix of the third transformation matrix to obtain the angle between the vehicle-mounted tag and the reference tag includes: determining the trace of the rotation matrix of the transformation matrix; using the Rodriguez rotation formula to obtain the angle between the vehicle-mounted tag and the reference tag based on the trace of the rotation matrix of the transformation matrix.
[0011] In some embodiments, the first conversion matrix, the second conversion matrix, and the third conversion matrix are 4×4 matrices, and the rotation matrix of the third conversion matrix is a 3×3 matrix.
[0012] In some embodiments, the fourth conversion matrix, the fifth conversion matrix, and the sixth conversion matrix are 4×4 matrices, and the translation matrix of the fifth conversion matrix is a 3×1 matrix.
[0013] In some embodiments, the vehicle-mounted tags and the reference tags are checkerboard tags or QR code tags.
[0014] In a second aspect, an embodiment of the present disclosure provides a device for determining a parking position of an unmanned vehicle, the device comprising: a first image acquisition unit, configured to control a camera to acquire an image of an on-board label on the unmanned vehicle in response to receiving parking information, so as to obtain a first image; an angle determination unit, configured to determine the angle between the on-board label and a reference label based on the first image; a rotation unit, configured to control the support platform of the unmanned vehicle to rotate according to the angle, so that the unmanned vehicle rotates to the angle indicated by the angle; a second image acquisition unit, configured to control the camera to acquire an image of the on-board label on the rotated unmanned vehicle, so as to obtain a second image; and a distance determination unit, configured to determine the distance between the on-board label and the reference label based on the second image, so as to obtain the parking position of the unmanned vehicle.
[0015] In some embodiments, the angle determination unit is further configured to: determine a first transformation matrix between the camera coordinate system and the vehicle-mounted tag coordinate system based on the first image; determine a third transformation matrix between the vehicle-mounted tag coordinate system and the reference tag coordinate system and a rotation matrix of the third transformation matrix based on the first transformation matrix and a preset second transformation matrix, wherein the second transformation matrix is the transformation matrix between the camera coordinate system and the reference tag coordinate system; determine the trace of the rotation matrix of the third transformation matrix to obtain the angle between the vehicle-mounted tag and the reference tag.
[0016] In some embodiments, the distance determination unit is further configured to: determine the fourth transformation matrix between the camera coordinate system and the vehicle-mounted tag coordinate system based on the second image; determine the fifth transformation matrix between the vehicle-mounted tag coordinate system and the reference tag coordinate system and the translation matrix of the fifth transformation matrix based on the fourth transformation matrix and the preset second transformation matrix, wherein the second transformation matrix is the transformation matrix between the camera coordinate system and the reference tag coordinate system; determine the distance between the vehicle-mounted tag and the reference tag in the robot coordinate system based on the determined translation matrix of the fifth transformation matrix, the second transformation matrix and the preset sixth transformation matrix, wherein the sixth transformation matrix is the transformation matrix between the camera coordinate system and the robot coordinate system.
[0017] In some embodiments, the second transformation matrix is determined by the following steps: controlling the camera to capture an image of the reference tag; and determining a second transformation matrix between the camera coordinate system and the reference tag coordinate system based on the captured image of the reference tag.
[0018] In some embodiments, the angle determination unit is further configured to: determine the trace of the rotation matrix of the transformation matrix; and obtain the angle between the vehicle-mounted tag and the reference tag based on the trace of the rotation matrix of the transformation matrix using the Rodriguez rotation formula.
[0019] In some embodiments, the first conversion matrix, the second conversion matrix, and the third conversion matrix are 4×4 matrices, and the rotation matrix of the third conversion matrix is a 3×3 matrix.
[0020] In some embodiments, the fourth conversion matrix, the fifth conversion matrix, and the sixth conversion matrix are 4×4 matrices, and the translation matrix of the fifth conversion matrix is a 3×1 matrix.
[0021] In some embodiments, the vehicle-mounted tags and the reference tags are checkerboard tags or QR code tags.
[0022] The method and device for determining the parking position of an unmanned vehicle provided by the embodiments of the present disclosure can control the camera to collect the on-board label on the unmanned vehicle when receiving the parking information of the unmanned vehicle to obtain a first image, and then determine the angle between the on-board label and the reference label based on the obtained first image, and then control the supporting platform of the unmanned vehicle to rotate according to the angle so that the unmanned vehicle can rotate the angle indicated by the angle, and then control the camera to collect the image of the on-board label on the rotated unmanned vehicle to obtain a second image, and finally determine the distance between the on-board label and the reference label based on the obtained second image, thereby realizing the accurate acquisition of the final parking position of the unmanned vehicle and avoiding the failure of automatic cargo distribution of the unmanned vehicle. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Other features, objects and advantages of the present disclosure will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:
[0024] Figure 1 is an exemplary system architecture diagram in which some embodiments of the present disclosure may be applied;
[0025] Figure 2 is a flow chart of an embodiment of a method for determining a parking position of an unmanned vehicle according to the present disclosure;
[0026] Figure 3A-3B is a schematic diagram of an application scenario of a method for determining a parking position of an unmanned vehicle according to an embodiment of the present disclosure;
[0027] Figure 4 is a flow chart of another embodiment of a method for determining a parking position of an unmanned vehicle according to the present disclosure;
[0028] Figure 5 is a flow chart of an implementation method for determining the distance between the vehicle-mounted tag and the reference tag according to this embodiment;
[0029] Figure 6 is a structural schematic diagram of an embodiment of a device for determining a parking position of an unmanned vehicle according to the present disclosure;
[0030] Figure 7 It is a schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present disclosure. DETAILED DESCRIPTION
[0031] The present disclosure is further described in detail below in conjunction with the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It is also necessary to explain that, for ease of description, only the parts related to the relevant invention are shown in the accompanying drawings.
[0032] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present disclosure may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0033] Figure 1 An exemplary system architecture 100 is shown to which the method for determining a parking position for an unmanned vehicle or the apparatus for determining a parking position for an unmanned vehicle according to an embodiment of the present disclosure can be applied.
[0034] like Figure 1 As shown, the system architecture 100 may include a camera 101, a carrier 102, a network 103, and a server 104. The network 103 is used to provide a medium for a communication link between the camera 101 and the server 104, and the network 103 may also provide a medium for a communication link between the robot 102 and the server 104. The network 103 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.
[0035] The camera 101 can interact with the server 104 through the network 103, and the camera 101 can receive control information sent by the server 104, and the camera 101 can also send the collected images to the server 104. The carrier 102 can interact with the server 104 through the network 103 to receive or send messages. Optionally, the system architecture 100 can also include a robot, etc. The robot can interact with the server 104 through the network 103 to receive or send messages. Among them, the robot can perform operations such as loading goods and opening doors on the unmanned vehicle.
[0036] The server 104 may be a server that provides various services, such as a background server that processes the images captured by the camera 101. The background server may process the first image and the second image captured by the camera 101, and feed back the processing result (such as the final parking position of the unmanned vehicle) to the carrier 102 and the robot.
[0037] It should be noted that the method for determining the parking position of the unmanned vehicle provided in the embodiment of the present disclosure can be executed by the server 104. Accordingly, the device for determining the parking position of the unmanned vehicle can be set in the server 104.
[0038] It should be noted that the server can be hardware or software. When the server is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or it can be implemented as a single server. When the server is software, it can be implemented as multiple software or software modules for providing distributed services, or it can be implemented as a single software or software module. No specific limitation is made here.
[0039] As an example, the above system architecture 100 can be used in an unmanned delivery station for goods. The server 104 can be a backend server of the unmanned delivery station, the carrier 102 can be used to rotate according to the control instructions sent by the server 104, so that the unmanned vehicle parked on the carrier 102 rotates, the camera 101 can capture images of the vehicle tag on the unmanned vehicle, so that the server 104 can determine the parking position of the unmanned vehicle based on the image captured by the camera 101, and the robot can be an unmanned vehicle door opening robot or an unmanned vehicle loading robot in the unmanned delivery station. After determining the parking position of the unmanned vehicle, the door opening robot or loading robot in the unmanned delivery station can accurately open the door or load goods for the unmanned vehicle based on the parking position of the unmanned vehicle.
[0040] It should be understood that Figure 1 The number of cameras, platforms, robots, networks, and servers in the embodiment is only for illustration. Any number of cameras, platforms, robots, networks, and servers may be provided as required.
[0041] Continue to refer Figure 2 , shows a process 200 of an embodiment of a method for determining a parking position of an unmanned vehicle according to the present disclosure. The method for determining a parking position of an unmanned vehicle comprises the following steps:
[0042] Step 201, in response to receiving parking information, controlling a camera to capture an image of a vehicle tag on the unmanned vehicle to obtain a first image.
[0043] In this embodiment, after the unmanned vehicle has completed parking, the execution subject of the method for determining the parking position of the unmanned vehicle (for example Figure 1 The server shown in the figure) can receive the parking information of the unmanned vehicle through a wired connection or a wireless connection, and the parking information can be used to indicate that the unmanned vehicle has completed parking. Then, the above-mentioned execution entity can control the camera to capture images of the on-board tag on the unmanned vehicle, thereby obtaining a first image showing the on-board tag. Among them, the on-board tag on the unmanned vehicle can be pre-set at a fixed position of the unmanned vehicle, and the camera can be an ordinary camera for capturing two-dimensional images or a depth camera for capturing three-dimensional images. It should be pointed out that the above-mentioned wireless connection method may include but is not limited to 3G / 4G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods currently known or to be developed in the future.
[0044] Step 202: Determine the angle between the vehicle-mounted tag and the reference tag based on the first image.
[0045] Usually, when the unmanned vehicle completes the docking, the unmanned vehicle should theoretically dock at the preset reference docking position. Among them, the reference tag is a tag pre-set on the reference docking position. When the relative position between the reference tag and the on-board tag on the unmanned vehicle meets the preset conditions, for example, the projections of the reference tag and the on-board tag perpendicular to the reference docking position overlap, it can be determined that the unmanned vehicle is accurately docked at the preset reference docking position. If the relative position between the reference tag and the on-board tag on the unmanned vehicle does not meet the preset conditions, it can be determined that the unmanned vehicle is not accurately docked at the reference docking position. At this time, the positional relationship between the unmanned vehicle and the reference docking position can be determined by the positional relationship between the reference tag and the on-board tag. Under the premise that the position of the reference docking position is known, the position of the unmanned vehicle can be determined by the positional relationship between the unmanned vehicle and the reference docking position.
[0046] In this embodiment, based on the first image obtained in step 201, the execution subject (eg Figure 1 The server shown in the figure can process the obtained first image in various ways, so that the angle between the vehicle tag and the reference tag on the unmanned vehicle can be determined by using the processing result of the first image. As an example, the camera can be a depth camera, and the first image collected can be a depth image. The execution subject can extract the depth information of the vehicle tag from the first image to determine the spatial position of the vehicle tag. When the spatial position of the reference tag is known, the angle between the vehicle tag and the reference tag can be determined based on the spatial position of the vehicle tag and the spatial position of the reference tag. This angle can be used to characterize the angle at which the unmanned vehicle deviates from the reference parking position.
[0047] Step 203, controlling the support platform of the unmanned vehicle to rotate according to the included angle, so that the unmanned vehicle rotates by the angle indicated by the included angle.
[0048] In this embodiment, based on the angle determined in step 202, the above-mentioned execution entity can control the supporting platform of the unmanned vehicle to rotate according to the determined angle. Here, the supporting platform can be used to support the parked unmanned vehicle. Therefore, controlling the rotation of the supporting platform can cause the unmanned vehicle parked on the supporting platform to rotate to the angle indicated by the angle. It can be understood that when the above-mentioned execution entity controls the unmanned vehicle to rotate to the angle indicated by the angle, the on-board label on the unmanned vehicle can also rotate to the angle indicated by the above-mentioned angle at the same time. The projection of the rotated unmanned vehicle to the reference parking position is parallel to the reference parking position, so the projection of the on-board label to the reference parking position is also parallel to the reference label.
[0049] Usually, the angle of the above-mentioned angle can be positive or negative, and the corresponding above-mentioned execution body can control the supporting platform to rotate in a clockwise or counterclockwise direction, so that the unmanned vehicle and the vehicle-mounted tag can rotate in a clockwise or counterclockwise direction.
[0050] Step 204: Control the camera to capture an image of the vehicle tag on the rotated unmanned vehicle to obtain a second image.
[0051] In this embodiment, after the vehicle tag on the unmanned vehicle rotates by the angle indicated by the angle, the execution subject can control the camera to collect an image of the rotated vehicle tag, thereby obtaining a second image. The rotated vehicle tag can be displayed in the second image.
[0052] Step 205 , based on the second image, determine the distance between the vehicle tag and the reference tag to obtain the parking position of the unmanned vehicle.
[0053] In this embodiment, based on the second image obtained in step 204, the execution subject may process the obtained second image in various ways, so that the distance between the vehicle tag and the reference tag on the unmanned vehicle may be determined using the processing result of the second image. It is understandable that, with the preset reference parking position as the reference position, when the reference parking position is known, the execution subject may determine the final parking position of the unmanned vehicle according to the distance between the vehicle tag and the reference tag.
[0054] As an example, the camera may be a depth camera, the second image captured may be a depth image, and the execution subject may extract the depth information of the rotated vehicle tag from the second image, thereby determining the spatial position of the rotated vehicle tag. When the spatial position of the reference tag is known, the distance between the vehicle tag and the reference tag may be determined based on the spatial position of the rotated vehicle tag and the spatial position of the reference tag. This distance may characterize the distance that the unmanned vehicle deviates from the reference parking position.
[0055] In the related art, the unmanned vehicle often cannot accurately dock at the reference parking position when docking. In this case, the robot cannot know the specific position of the unmanned vehicle, which will cause the robot to be unable to accurately open the door and load goods for the unmanned vehicle according to the predetermined program. The method for determining the parking position of the unmanned vehicle provided in the above embodiment can correct the deviation angle between the unmanned vehicle and the reference parking position by acquiring the first image through the camera, and then determine the distance between the unmanned vehicle and the reference parking position by acquiring the second image through the camera, so that the robot can determine the final parking position of the unmanned vehicle according to the distance between the unmanned vehicle and the reference parking position, and change the predetermined program according to the final parking position of the unmanned vehicle, so that the door can be opened and goods can be loaded accurately for the unmanned vehicle, avoiding the failure of the automatic distribution of the unmanned vehicle.
[0056] Continue to see Figure 3A-3B , Figure 3A-3B FIG. 1 is a schematic diagram of an application scenario of the method for determining the parking position of an unmanned vehicle according to this embodiment. Figure 3A-3BIn the application scenario, after receiving the parking information of the unmanned vehicle, the background server can control the preset camera 301 to capture the image of the vehicle tag 302 on the unmanned vehicle to obtain a first image; then the background server can determine the angle between the vehicle tag 302 and the reference tag 303 based on the first image; then the background server can control the support platform 304 of the unmanned vehicle to rotate according to the angle, so that the unmanned vehicle can rotate the angle indicated by the above angle, at this time, the projection of the vehicle tag 302 to the reference parking position is parallel to the reference tag 303, such as Figure 3A Then the backend server can control the camera 301 to collect the image of the vehicle tag 302 on the rotated unmanned vehicle to obtain a second image, and finally the distance a and b between the vehicle tag 302 and the reference tag 303 can be determined based on the second image, such as Figure 3B As shown, the final parking position of the unmanned vehicle can be obtained.
[0057] The method for determining the parking position of an unmanned vehicle provided by the above-mentioned embodiment of the present disclosure can control the camera to collect the on-board label on the unmanned vehicle when receiving the parking information of the unmanned vehicle to obtain a first image, and then determine the angle between the on-board label and the reference label based on the obtained first image, and then control the supporting platform of the unmanned vehicle to rotate according to the angle so that the unmanned vehicle can rotate the angle indicated by the angle, and then control the camera to collect the image of the on-board label on the rotated unmanned vehicle to obtain a second image, and finally determine the distance between the on-board label and the reference label based on the obtained second image, thereby realizing the accurate acquisition of the final parking position of the unmanned vehicle and avoiding the failure of automatic cargo distribution of the unmanned vehicle.
[0058] Further references Figure 4 , which shows a process 400 of another embodiment of a method for determining a parking position of an unmanned vehicle according to an embodiment of the present disclosure. The process 400 of the method for determining a parking position of an unmanned vehicle comprises the following steps:
[0059] Step 401, in response to receiving parking information, controlling a camera to capture an image of a vehicle tag on the unmanned vehicle to obtain a first image.
[0060] In this embodiment, after the unmanned vehicle has completed parking, the execution subject of the method for determining the parking position of the unmanned vehicle (for example Figure 1 The server shown in the figure can receive the parking information of the unmanned vehicle through a wired connection or a wireless connection, and the parking information can be used to indicate that the unmanned vehicle has completed parking. Then, the above-mentioned execution subject can control the camera to collect images of the vehicle-mounted tag on the unmanned vehicle, so as to obtain a first image showing the vehicle-mounted tag. Among them, the vehicle-mounted tag on the unmanned vehicle can be pre-set at a fixed position of the unmanned vehicle, and the camera can be an ordinary camera for collecting two-dimensional images.
[0061] Step 402: Determine a first transformation matrix between a camera coordinate system and a vehicle tag coordinate system based on the first image.
[0062] In this embodiment, based on the first image of the vehicle tag obtained in step 401, the execution subject can determine the first transformation matrix T between the camera coordinate system and the vehicle tag coordinate system by using the camera pose estimation method. c Here, the camera pose estimation can be performed by calculating the camera pose and spatial coordinates through several feature points with known coordinates and the imaging of each feature point in the first image. Here, the feature points can be predetermined, for example, the feature points can be the four corner points of the vehicle tag. It can be seen that the method of camera pose estimation only requires the three-dimensional coordinates of the feature points, the two-dimensional coordinates of the pixels in the first image, the camera intrinsic parameter matrix, etc. to determine the transformation matrix between the camera coordinate system and the vehicle tag coordinate system, and the transformation matrix can be determined as the first transformation matrix T c .
[0063] In some optional implementations of this embodiment, the vehicle-mounted tags and the reference tags may be checkerboard tags or QR code tags. Setting the vehicle-mounted tags and the reference tags as checkerboard tags or QR code tags can facilitate accurate matching and identification of the vehicle-mounted tags and the reference tags in the acquired image. Furthermore, setting the vehicle-mounted tags and the reference tags as checkerboard tags or QR code tags can more easily determine the order of the feature points used for camera pose estimation.
[0064] Step 403: Based on the first transformation matrix and the preset second transformation matrix, determine a third transformation matrix between the vehicle-mounted tag coordinate system and the reference tag coordinate system and a rotation matrix of the third transformation matrix.
[0065] In this embodiment, the execution subject may predetermine the second transformation matrix T b , the second transformation matrix T b The first transformation matrix T determined in step 402 may be a transformation matrix between the camera coordinate system and the reference tag coordinate system. c The execution subject uses the determined first transformation matrix T c and the second transformation matrix T b , the conversion matrix between the vehicle-mounted tag coordinate system and the reference tag coordinate system can be calculated, and the conversion matrix is determined as the third conversion matrix T. Specifically, the third conversion matrix T can be calculated by the following formula:
[0066] Among them, R 33 is the rotation matrix in the third transformation matrix T, t 31 is the translation matrix in the third transformation matrix T, Tb is the second transformation matrix, T c is the first transformation matrix.
[0067] In some optional implementations of this embodiment, the second transformation matrix T b The second transformation matrix T between the camera coordinate system and the reference tag coordinate system can be obtained by controlling the camera to collect images of the reference tag to obtain an image containing the reference tag; and then using the camera pose estimation method described in step 402 to determine the second transformation matrix T between the camera coordinate system and the reference tag coordinate system based on the collected image containing the reference tag. b , I will not go into details here.
[0068] In some optional implementations of this embodiment, the first conversion matrix, the second conversion matrix, and the third conversion matrix are 4×4 matrices, and the rotation matrix of the third conversion matrix is a 3×3 matrix. Setting the first conversion matrix, the second conversion matrix, and the third conversion matrix to 4×4 matrices can more conveniently determine the inverse matrix of each conversion matrix, thereby improving the calculation efficiency of the third conversion matrix T.
[0069] Step 404, determining the trace of the rotation matrix of the third transformation matrix to obtain the angle between the vehicle-mounted tag and the reference tag.
[0070] In this embodiment, based on the rotation matrix R in the third transformation matrix T obtained in step 404 33 , the above execution entity can calculate the rotation matrix R 33 The trace of 33 The trajectory of the rotation from the vehicle tag to the reference tag can be obtained, thereby determining the angle between the vehicle tag and the reference tag.
[0071] In some optional implementations of this embodiment, the above-mentioned execution subject may use the Rodrigues rotation formula to obtain the angle between the vehicle-mounted tag and the reference tag based on the trace of the rotation matrix of the transformation matrix T. The formula for solving the angle between the vehicle-mounted tag and the reference tag using the Rodrigues rotation formula may be as follows:
[0072] Among them, θ is the angle between the vehicle tag and the reference tag, tr(R 33 ) is the rotation matrix R 33 Trace of.
[0073] In some optional implementations of this embodiment, the execution subject may also use the rotation matrix R 33 The angle between the vehicle-mounted tag and the reference tag is obtained by solving the Euler angle.
[0074] Step 405, controlling the support platform of the unmanned vehicle to rotate according to the included angle, so that the unmanned vehicle rotates an angle indicated by the included angle.
[0075] In this embodiment, based on the angle determined in step 404, the above-mentioned execution entity can control the supporting platform of the unmanned vehicle to rotate according to the determined angle. Here, the supporting platform can be used to support the parked unmanned vehicle. Therefore, controlling the rotation of the supporting platform can cause the unmanned vehicle parked on the supporting platform to rotate to the angle indicated by the angle. It can be understood that when the above-mentioned execution entity controls the unmanned vehicle to rotate to the angle indicated by the angle, the on-board label on the unmanned vehicle can also rotate to the angle indicated by the above-mentioned angle at the same time. The projection of the rotated unmanned vehicle to the reference parking position is parallel to the reference parking position, so the projection of the on-board label to the reference parking position is also parallel to the reference label.
[0076] Step 406, controlling the camera to capture an image of the vehicle tag on the rotated unmanned vehicle to obtain a second image.
[0077] In this embodiment, after the vehicle tag on the unmanned vehicle rotates by the angle indicated by the angle, the execution subject can control the camera to collect an image of the rotated vehicle tag, thereby obtaining a second image. The rotated vehicle tag can be displayed in the second image.
[0078] Step 407, based on the second image, determine the distance between the vehicle tag and the reference tag to obtain the parking position of the unmanned vehicle.
[0079] In this embodiment, based on the second image obtained in step 406, the execution subject may process the obtained second image in various ways, so that the distance between the vehicle tag and the reference tag on the unmanned vehicle may be determined using the processing result of the second image. It is understandable that, with the preset reference parking position as the reference position, when the reference parking position is known, the execution subject may determine the final parking position of the unmanned vehicle according to the distance between the vehicle tag and the reference tag.
[0080] Please continue to refer to Figure 5 , which shows a flow chart of an implementation method of determining the distance between the vehicle-mounted tag and the reference tag in step 407 according to this embodiment. The method of determining the distance between the vehicle-mounted tag and the reference tag includes the following steps:
[0081] Step 501: Determine a fourth transformation matrix between a camera coordinate system and a vehicle tag coordinate system based on a second image.
[0082] In this implementation, similar to step 402, the execution subject adopts the camera pose estimation method described in step 402, and based on the obtained second image, a fourth transformation matrix T between the camera coordinate system and the vehicle tag coordinate system can be determined.c '.
[0083] Step 502: Based on the fourth transformation matrix and the preset second transformation matrix, a fifth transformation matrix between the vehicle-mounted tag coordinate system and the reference tag coordinate system and a translation matrix of the fifth transformation matrix are determined.
[0084] In this implementation, based on the fourth transformation matrix obtained in step 501 and the preset second transformation matrix T b The execution subject can calculate the fifth transformation matrix T' between the vehicle tag coordinate system and the reference tag coordinate system, and obtain the translation matrix t' of the fifth rotation matrix T' from the fifth rotation matrix T' 31 Here, the second transformation matrix T b Can be the transformation matrix between the camera coordinate system and the fiducial tag coordinate system.
[0085] Specifically, the fifth rotation matrix T' can be calculated by the following formula:
[0086] Among them, R' 33 is the rotation matrix in the fifth transformation matrix T', t' 31 is the translation matrix in the fifth transformation matrix T', T b is the second transformation matrix, T c ' is the fourth transformation matrix.
[0087] Step 503: Determine the distance between the vehicle-mounted tag and the reference tag in the robot coordinate system based on the determined translation matrix of the fifth transformation matrix, the second transformation matrix and the preset sixth transformation matrix.
[0088] In this embodiment, the execution subject may predetermine the conversion matrix between the camera coordinate system and the robot coordinate system, and determine the conversion matrix as the sixth conversion matrix T1. It is understandable that the sixth conversion matrix T1 can be obtained by calibrating the robot coordinate system and the camera coordinate system. b and the preset sixth transformation matrix T1, the above execution subject can determine the distance between the vehicle tag and the reference tag in the robot coordinate system. Specifically, the distance ΔV1 between the vehicle tag and the reference tag can be calculated by the following formula:
[0089] Among them, t' 31 is the translation matrix of the fifth rotation matrix T', T1 is the sixth transformation matrix, T b is the second transformation matrix.
[0090] Optionally, the fourth conversion matrix, the fifth conversion matrix, and the sixth conversion matrix may be 4×4 matrices, and the translation matrix of the fifth conversion matrix may be a 3×1 matrix. By setting the fourth conversion matrix, the fifth conversion matrix, and the sixth conversion matrix to 4×4 matrices, it is possible to more conveniently determine the inverse matrix of each conversion matrix, thereby improving the calculation efficiency of the fifth conversion matrix T' and the distance ΔV1 between the vehicle-mounted tag and the reference tag.
[0091] Optionally, for an unmanned vehicle, there may be multiple robots preset at different positions (such as a loading robot and a door opening robot). For any robot, the above formula can be used to calculate the distance between the on-board label and the reference label in the robot coordinate system.
[0092] and Figure 2 In comparison, the method 400 for determining the parking position of the unmanned vehicle provided in the above-mentioned embodiment of the present application can determine the angle and distance between the on-board tag and the reference tag by means of coordinate system conversion based on the image captured by the ordinary camera, thereby reducing the cost of determining the parking position of the unmanned vehicle.
[0093] Further references Figure 6 As an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of a device for determining a parking position of an unmanned vehicle. Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0094] like Figure 6 As shown, the device 600 for determining the parking position of the unmanned vehicle in this embodiment includes: a first image acquisition unit 601, an angle determination unit 602, a rotation unit 603, a second image acquisition unit 604 and a distance determination unit 605. Among them, the first image acquisition unit is configured to control the camera to acquire an image of the vehicle tag on the unmanned vehicle in response to receiving the parking information, so as to obtain a first image; the angle determination unit is configured to determine the angle between the vehicle tag and the reference tag based on the first image; the rotation unit is configured to control the support platform of the unmanned vehicle to rotate according to the angle, so that the unmanned vehicle rotates at the angle indicated by the angle; the second image acquisition unit is configured to control the camera to acquire an image of the vehicle tag on the rotated unmanned vehicle, so as to obtain a second image; the distance determination unit is configured to determine the distance between the vehicle tag and the reference tag based on the second image, so as to obtain the parking position of the unmanned vehicle.
[0095] In some optional implementations of this embodiment, the angle determination unit 602 is further configured to: determine a first transformation matrix between the camera coordinate system and the vehicle-mounted tag coordinate system based on the first image; determine a third transformation matrix between the vehicle-mounted tag coordinate system and the reference tag coordinate system and a rotation matrix of the third transformation matrix based on the first transformation matrix and a preset second transformation matrix, wherein the second transformation matrix is the transformation matrix between the camera coordinate system and the reference tag coordinate system; determine the trace of the rotation matrix of the third transformation matrix to obtain the angle between the vehicle-mounted tag and the reference tag.
[0096] In some optional implementations of this embodiment, the distance determination unit 605 is further configured to: determine the fourth transformation matrix between the camera coordinate system and the vehicle-mounted tag coordinate system based on the second image; determine the fifth transformation matrix between the vehicle-mounted tag coordinate system and the reference tag coordinate system and the translation matrix of the fifth transformation matrix based on the fourth transformation matrix and the preset second transformation matrix, wherein the second transformation matrix is the transformation matrix between the camera coordinate system and the reference tag coordinate system; determine the distance between the vehicle-mounted tag and the reference tag in the robot coordinate system based on the determined translation matrix of the fifth transformation matrix, the second transformation matrix and the preset sixth transformation matrix, wherein the sixth transformation matrix is the transformation matrix between the camera coordinate system and the robot coordinate system.
[0097] In some optional implementations of this embodiment, the second transformation matrix is determined by the following steps: controlling the camera to capture an image of the reference tag; and determining the second transformation matrix between the camera coordinate system and the reference tag coordinate system based on the captured image of the reference tag.
[0098] In some optional implementations of this embodiment, the angle determination unit 602 is further configured to: determine the trace of the rotation matrix of the transformation matrix; and obtain the angle between the vehicle-mounted tag and the reference tag based on the trace of the rotation matrix of the transformation matrix using the Rodriguez rotation formula.
[0099] In some optional implementations of this embodiment, the first conversion matrix, the second conversion matrix, and the third conversion matrix are 4×4 matrices, and the rotation matrix of the third conversion matrix is a 3×3 matrix.
[0100] In some optional implementations of this embodiment, the fourth conversion matrix, the fifth conversion matrix, and the sixth conversion matrix are 4×4 matrices, and the translation matrix of the fifth conversion matrix is a 3×1 matrix.
[0101] In some optional implementations of this embodiment, the vehicle-mounted tag and the reference tag are checkerboard tags or QR code tags.
[0102] The units described in the device 600 and the reference Figure 2Therefore, the operations and features described above for the method are also applicable to the device 600 and the units included therein, and will not be described in detail here.
[0103] Reference below Figure 7 , which shows an electronic device (eg, Figure 1 A schematic diagram of the structure of the server 700. Figure 7 The server shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0104] like Figure 7 As shown, the electronic device 700 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage device 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the electronic device 700 are also stored. The processing device 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0105] Typically, the following devices may be connected to the I / O interface 705: an input device 706 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 707 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 708 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 709. The communication device 709 may allow the electronic device 700 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 7 The electronic device 700 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 7 Each block shown in the figure may represent one device, or may represent multiple devices as required.
[0106] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through a communication device 709, or installed from a storage device 708, or installed from a ROM 702. When the computer program is executed by the processing device 701, the above functions defined in the method of the embodiment of the present disclosure are executed. It should be noted that the computer-readable medium described in the embodiment of the present disclosure can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, - but not limited to - an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection with one or more conductors, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In an embodiment of the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, an apparatus, or a device. In an embodiment of the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in combination with an instruction execution system, an apparatus, or a device. The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wire, optical cable, RF (radio frequency), etc., or any suitable combination of the foregoing.
[0107] The computer-readable medium may be included in the electronic device; or it may exist independently without being assembled into the electronic device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: in response to receiving parking information, controls the camera to capture images of the vehicle-mounted tag on the unmanned vehicle to obtain a first image; based on the first image, determines the angle between the vehicle-mounted tag and the reference tag; controls the unmanned vehicle's carrier to rotate according to the angle so that the unmanned vehicle rotates to the angle indicated by the angle; controls the camera to capture images of the vehicle-mounted tag on the rotated unmanned vehicle to obtain a second image; based on the second image, determines the distance between the vehicle-mounted tag and the reference tag to obtain the parking position of the unmanned vehicle.
[0108] Computer program code for performing the operations of embodiments of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on a user's computer, partially on a user's computer, as a separate software package, partially on a user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0109] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0110] The units involved in the embodiments described in the present disclosure may be implemented by software or by hardware. The described units may also be provided in a processor, for example, may be described as: a processor including a first image acquisition unit, an angle determination unit, a rotation unit, a second image acquisition unit, and a distance determination unit. Among them, the names of these units do not constitute limitations on the units themselves in certain circumstances. For example, the first image acquisition unit may also be described as a "unit that controls the camera to acquire an image of the vehicle-mounted tag on the unmanned vehicle in response to receiving parking information to obtain a first image".
[0111] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, the above-mentioned features are replaced with the technical features with similar functions disclosed in the embodiments of the present disclosure (but not limited to) to form a technical solution.
Claims
1. A method for determining a parking position of an unmanned vehicle, comprising: In response to receiving the parking information, controlling the camera to capture an image of the vehicle tag on the unmanned vehicle to obtain a first image; Based on the first image, determining an angle between the vehicle-mounted tag and a reference tag, wherein the reference tag is a tag pre-set at a reference parking position, and when the relative position between the reference tag and the vehicle-mounted tag meets a preset condition, it is determined that the unmanned vehicle is accurately parked at the preset reference parking position; Controlling the support platform of the unmanned vehicle to rotate according to the included angle, so that the unmanned vehicle rotates by an angle indicated by the included angle, wherein the unmanned vehicle is parked on the support platform; Controlling the camera to collect an image of the vehicle tag on the rotated unmanned vehicle to obtain a second image; Based on the second image, the distance between the vehicle-mounted tag and the reference tag is determined to obtain the parking position of the unmanned vehicle.
2. The method according to claim 1, wherein: The determining, based on the first image, an angle between the vehicle-mounted tag and a reference tag includes: Based on the first image, determining a first transformation matrix between a camera coordinate system and a vehicle tag coordinate system; Based on the first transformation matrix and the preset second transformation matrix, determine a third transformation matrix between the vehicle-mounted tag coordinate system and the reference tag coordinate system and a rotation matrix of the third transformation matrix, wherein the second transformation matrix is a transformation matrix between the camera coordinate system and the reference tag coordinate system; The trace of the rotation matrix of the third transformation matrix is determined to obtain the angle between the vehicle-mounted tag and the reference tag.
3. The method according to any one of claims 1 or 2, wherein: The determining, based on the second image, the distance between the vehicle-mounted tag and the reference tag comprises: Based on the second image, determining a fourth transformation matrix between a camera coordinate system and a vehicle tag coordinate system; Based on the fourth transformation matrix and the preset second transformation matrix, determine a fifth transformation matrix between the vehicle-mounted tag coordinate system and the reference tag coordinate system and a translation matrix of the fifth transformation matrix, wherein the second transformation matrix is a transformation matrix between the camera coordinate system and the reference tag coordinate system; Based on the determined translation matrix of the fifth transformation matrix, the second transformation matrix and the preset sixth transformation matrix, the distance between the vehicle-mounted tag and the reference tag is determined in the robot coordinate system, wherein the sixth transformation matrix is the transformation matrix between the camera coordinate system and the robot coordinate system.
4. The method according to claim 2, wherein: The second transformation matrix is determined by the following steps: Controlling the camera to capture images of the reference tag; Based on the acquired image of the reference tag, a second transformation matrix between the camera coordinate system and the reference tag coordinate system is determined.
5. The method according to claim 2, wherein: The determining the trace of the rotation matrix of the third transformation matrix to obtain the angle between the vehicle-mounted tag and the reference tag includes: determining a trace of a rotation matrix of the transformation matrix; The angle between the vehicle-mounted tag and the reference tag is obtained based on the trace of the rotation matrix of the transformation matrix using the Rodriguez rotation formula.
6. The method according to claim 2, wherein: The first conversion matrix, the second conversion matrix, and the third conversion matrix are 4×4 matrices, and the rotation matrix of the third conversion matrix is a 3×3 matrix.
7. The method according to claim 3, wherein: The fourth conversion matrix, the fifth conversion matrix, and the sixth conversion matrix are 4×4 matrices, and the translation matrix of the fifth conversion matrix is a 3×1 matrix.
8. The method according to claim 1, wherein: The vehicle-mounted tag and the reference tag are checkerboard tags or QR code tags.
9. A device for determining a parking position of an unmanned vehicle, comprising: A first image acquisition unit is configured to control a camera to acquire an image of a vehicle tag on the unmanned vehicle in response to receiving parking information, so as to obtain a first image; an angle determination unit, configured to determine an angle between the vehicle-mounted tag and a reference tag based on the first image, wherein the reference tag is a tag pre-set at a reference parking position, and when the relative position between the reference tag and the vehicle-mounted tag meets a preset condition, it is determined that the unmanned vehicle is accurately parked at the preset reference parking position; a rotating unit, configured to control the carrying platform of the unmanned vehicle to rotate according to the included angle, so that the unmanned vehicle rotates an angle indicated by the included angle, wherein the unmanned vehicle is parked on the carrying platform; A second image acquisition unit is configured to control the camera to acquire an image of the vehicle tag on the rotated unmanned vehicle to obtain a second image; The distance determination unit is configured to determine the distance between the vehicle-mounted tag and the reference tag based on the second image to obtain the parking position of the unmanned vehicle.
10. The device according to claim 9, wherein: The angle determination unit is further configured to: Based on the first image, determining a first transformation matrix between a camera coordinate system and a vehicle tag coordinate system; Based on the first transformation matrix and the preset second transformation matrix, determine a third transformation matrix between the vehicle-mounted tag coordinate system and the reference tag coordinate system and a rotation matrix of the third transformation matrix, wherein the second transformation matrix is a transformation matrix between the camera coordinate system and the reference tag coordinate system; The trace of the rotation matrix of the third transformation matrix is determined to obtain the angle between the vehicle-mounted tag and the reference tag.
11. The device according to any one of claims 9 or 10, wherein: The distance determination unit is further configured to: Based on the second image, determining a fourth transformation matrix between a camera coordinate system and a vehicle tag coordinate system; Based on the fourth transformation matrix and the preset second transformation matrix, determine a fifth transformation matrix between the vehicle-mounted tag coordinate system and the reference tag coordinate system and a translation matrix of the fifth transformation matrix, wherein the second transformation matrix is a transformation matrix between the camera coordinate system and the reference tag coordinate system; Based on the determined translation matrix of the fifth transformation matrix, the second transformation matrix and the preset sixth transformation matrix, the distance between the vehicle-mounted tag and the reference tag is determined in the robot coordinate system, wherein the sixth transformation matrix is the transformation matrix between the camera coordinate system and the robot coordinate system.
12. An electronic device / terminal / server, comprising: one or more processors; a storage device having one or more programs stored thereon, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 8.
13. A computer readable medium having a computer program stored thereon, wherein: When the program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Positioning method based on machine vision
CN104835173A
Unmanned aerial vehicle and method and device for positioning and controlling mobile terminal
CN106444846A
Vehicle field-of-view following display system
CN106954045A
Unmanned aerial vehicle and vision-based grabbing method thereof
CN107139178A
Robot vision localization method based on convolutional neural network
CN108416428A
