Pose estimation system, method and equipment based on distributed pan-tilt camera and medium
Through the distributed gimbal camera system and pose estimation method, the gimbal camera position is adjusted and the external parameters are optimized to solve the problem of pose estimation failure caused by moving objects beyond the field of view and improve the accuracy of pose estimation.
Patent Information
- Application Number
- CN202410625753.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-20
- Publication Date
- 2024-09-03
AI Technical Summary
In existing pose estimation systems, objects easily exceed the camera's field of view when moving, leading to pose estimation failure.
Using a distributed pan/tilt camera system, through the cooperation of the main camera and the adjustable pan/tilt camera, the pan/tilt camera position is adjusted to keep the object within the field of view, and the pan/tilt camera to be adjusted is determined by calculating the pixel distance, and the external parameters are optimized to Improve the accuracy of pose estimation.
It effectively avoids the failure of pose estimation caused by the object exceeding the field of view, improves the accuracy and robustness of pose estimation, and enables the object's pose to be successfully estimated within the field of view of the gimbal camera.
Smart Images

Figure CN118583131A
Abstract
Description
Technical Field
[0001] The present application relates to the field of visual navigation technology, and in particular to a posture estimation system, method, device and medium based on a distributed gimbal camera. Background Art
[0002] Estimating the pose of moving objects from images is widely used in various scenarios, some of which are typical scenarios including augmented reality, human posture detection, and robotic arm grasping objects.
[0003] The multi-camera pose estimation method estimates the pose of an object by reconstructing the pose relationship between multiple cameras. During the pose estimation process, line of sight occlusion and field of view limitation are important reasons that hinder the robustness of pose estimation. However, the positions of cameras in multi-camera pose estimation are fixed, which may cause the object to exceed the camera's field of view when moving, resulting in pose estimation failure. Summary of the invention
[0004] The main purpose of this application is to provide a posture estimation system, method, device and medium based on a distributed gimbal camera, aiming to solve the technical problem that in the existing posture estimation process, an object is prone to exceed the camera's field of view when moving, resulting in failure of object posture estimation.
[0005] To achieve the above objectives, the present application provides a posture estimation system, the posture estimation system comprising:
[0006] The posture estimation system includes a main camera with a fixed camera position, at least one pan-tilt camera with an adjustable camera position, and a controller.
[0007] The controller is used to:
[0008] Obtaining the pixel position of the target object in each pan-tilt camera in the current positioning cycle, and using the pixel position of the target object in each pan-tilt camera as the mark position corresponding to each pan-tilt camera;
[0009] For each of the pan-tilt cameras, calculating the pixel distance between a preset position of the pan-tilt camera and a marked position corresponding to the pan-tilt camera, wherein the preset position includes a center position of a field of view;
[0010] The pan-tilt camera corresponding to the maximum pixel distance among the pixel distances is used as the pan-tilt camera to be adjusted, and the pan-tilt camera to be adjusted is adjusted;
[0011] Determine a target gimbal camera among the gimbal cameras except the gimbal camera that has been adjusted in the previous positioning cycle, estimate the pose of the target object in the world coordinate system based on the main camera and the target gimbal camera, and obtain the target pose, wherein the world coordinate system is the coordinate system of the main camera.
[0012] In one embodiment, the main camera and the gimbal camera are distributed in a manner of converging viewing angles.
[0013] In addition, to achieve the above purpose, the present application also provides a posture estimation method based on a distributed gimbal camera, the posture estimation method based on a distributed gimbal camera is applied to the posture estimation system as described above, and the posture estimation method based on a distributed gimbal camera includes:
[0014] Step S10, obtaining the pixel position of the target object in each pan-tilt camera in the current positioning cycle, and using the pixel position of the target object in each pan-tilt camera as the mark position corresponding to each pan-tilt camera;
[0015] Step S20, for each of the pan-tilt cameras, calculating the pixel distance between a preset position of the pan-tilt camera and a marked position corresponding to the pan-tilt camera, wherein the preset position includes a center position of a field of view;
[0016] Step S30, taking the pan / tilt camera corresponding to the maximum pixel distance among the pixel distances as the pan / tilt camera to be adjusted, and adjusting the pan / tilt camera to be adjusted;
[0017] Step S40, determining a target gimbal camera among the gimbal cameras except the gimbal camera that has been adjusted in the previous positioning cycle, estimating the pose of the target object in the world coordinate system based on the main camera and the target gimbal camera, and obtaining the target pose, wherein the world coordinate system is the coordinate system of the main camera.
[0018] In one embodiment, before estimating the position and posture of the target object in the world coordinate system based on the subject camera and the target gimbal camera in step S40, the method further includes:
[0019] Acquire a current pose of the target object in the world coordinate system relative to the target gimbal camera in a current positioning cycle, and acquire a historical pose of the target object relative to the target gimbal camera, wherein the historical pose includes a pose of the target object relative to the target gimbal camera in a previous positioning cycle corresponding to the current positioning cycle;
[0020] The external parameters of the target gimbal camera are optimized based on the historical posture and the current posture, so that the target gimbal camera performs posture estimation based on the optimized external parameters.
[0021] In one embodiment, the step of estimating the pose of the target object in the world coordinate system based on the subject camera and the target gimbal camera in step S40 to obtain the target pose includes:
[0022] A multi-camera positioning algorithm is used based on the main camera and the target gimbal camera to estimate the pose of the target object in the world coordinate system to obtain the target pose, wherein the target pose is the pose with the smallest reprojection residual of the target object.
[0023] In one embodiment, the step of adjusting the pan / tilt camera to be adjusted in step S30 includes:
[0024] If the target object is not at the center of the field of view of the gimbal camera to be adjusted, the camera position of the gimbal camera to be adjusted is adjusted until the pixel position of the target object at the gimbal camera to be adjusted coincides with the center position of the field of view of the gimbal camera to be adjusted.
[0025] In one embodiment, before step S40, the method further includes:
[0026] The external parameters of the gimbal camera adjusted in the previous positioning cycle are updated, so that when the gimbal camera adjusted in the previous positioning cycle is selected as the target gimbal camera, the pose estimation is performed based on the updated external parameters.
[0027] In one embodiment, the execution order of step S10 to step S40 in one positioning cycle is:
[0028] Execute step S10, step S20 and step S30 in sequence, and execute step S40 simultaneously during the execution of step S20 or step S30, until all steps S10 to S40 are completed, then return to execute step S10 to enter the next positioning cycle; or,
[0029] Step S10, step S20, step S30 and step S40 are sequentially executed until step S10 to step S40 are all executed, and then the execution returns to step S10 to enter the next positioning cycle.
[0030] In addition, to achieve the above-mentioned objectives, the present application also provides a posture estimation device based on a distributed gimbal camera, comprising: a memory, a processor, and a posture estimation program stored on the memory and executable on the processor, wherein when the posture estimation program is executed by the processor, the steps of the posture estimation method based on the distributed gimbal camera as described above are implemented.
[0031] In addition, to achieve the above-mentioned purpose, the present application also provides a readable storage medium, which includes a computer-readable storage medium, and a pose estimation program is stored on the computer-readable storage medium. When the pose estimation program is executed by the processor, the steps of the pose estimation method based on the distributed gimbal camera as described above are implemented.
[0032] The present application proposes a posture estimation system, including: the posture estimation system includes a main camera with a fixed camera position and at least one gimbal camera with an adjustable camera position. Thus, in contrast to the posture estimation method with a fixed camera position, the present application embodiment sets at least one gimbal camera with an adjustable camera position, so that the object is kept within the field of view of the gimbal camera by adjusting the position of the gimbal camera, so that the posture of the object within the field of view of the gimbal camera can be successfully estimated, thereby reducing the phenomenon that the object exceeds the field of view of the camera when moving, resulting in the failure of the object posture estimation, and taking the gimbal camera with the largest pixel distance between the pixel position of the target object in the gimbal camera and the center position of the field of view as the gimbal camera to be adjusted, determining the target gimbal camera among the gimbal cameras except the gimbal camera to be adjusted, estimating the posture of the target object based on the main camera and the target gimbal camera, and performing posture estimation based on the target gimbal camera close to the center of the field of view of the gimbal camera, thereby improving the accuracy of posture estimation. When the distance between the pixel position of the target object and the center position of the field of view of the gimbal camera is large, the target object is likely to exceed the field of view of the gimbal camera. At this time, the gimbal camera is used as the gimbal camera to be adjusted to facilitate the subsequent adjustment of the camera position of the gimbal camera, so that the target object is always kept within the field of view of the gimbal camera. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0034] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0035] Figure 1 A schematic diagram of the system architecture involved in an embodiment of the posture estimation system of the present application;
[0036] Figure 2 A schematic diagram of a three-dimensional model of a visual mark on a target object in an embodiment of the present application;
[0037] Figure 3 This is a flow chart of the first embodiment of the posture estimation method based on a distributed gimbal camera of the present application;
[0038] Figure 4 This is a brief flowchart of the pose estimation method based on a distributed gimbal camera in this application;
[0039] Figure 5This is a schematic diagram of initializing the external parameters of the gimbal camera in the posture estimation method based on the distributed gimbal camera in this application;
[0040] Figure 6 This is a schematic diagram of a gimbal camera with a maximum deviation distance adjusted in a posture estimation method based on a distributed gimbal camera in this application;
[0041] Figure 7 A schematic diagram of optimizing the external parameters of a gimbal camera and updating and adjusting the external parameters of a camera in a posture estimation method based on a distributed gimbal camera in this application;
[0042] Figure 8 This is a schematic diagram of a camera performing pose estimation of a moving object in a pose estimation method based on a distributed gimbal camera in this application;
[0043] Fig. 9 Schematic diagram of the structure of a posture estimation device based on a distributed gimbal camera in an embodiment of the present application. DETAILED DESCRIPTION
[0044] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0045] Estimating the pose of moving objects from images is widely used in various scenarios, some of which are typical scenarios including augmented reality, human posture detection, and robotic arm grasping objects.
[0046] Methods for pose estimation are divided into three categories: feature-based methods, template-based methods, and learning-based methods. Feature matching-based methods are more robust by matching feature points between 3D models and images, and are widely used in refined tasks such as surgical instrument tracking.
[0047] In the feature matching-based method, line of sight occlusion and field of view limitation are important reasons that hinder robust pose estimation, and multi-camera fusion is often used to solve this problem. Although this method can overcome this challenge to a certain extent, the camera positions are fixed, which may cause the object to exceed the field of view of the tracking device when it moves, and then the pose estimation fails.
[0048] Based on this, the main solution of the present application is to set a main camera and at least one gimbal camera, wherein the camera position of the main camera is fixed, and the camera position of the gimbal camera is adjustable.
[0049] The present application sets up at least one gimbal camera with adjustable camera position. In this way, the position of the gimbal camera can be adjusted so that the object remains within the field of view of the gimbal camera, so that the pose of the object within the field of view of the gimbal camera can be successfully estimated, thereby reducing the phenomenon that the object moves beyond the field of view of the camera, resulting in failure of object pose estimation.
[0050] Based on this, the present application proposes a first embodiment of a posture estimation system, wherein the posture estimation system includes a main camera with a fixed camera position, at least one pan / tilt camera with an adjustable camera position, and a controller.
[0051] The controller is used to:
[0052] Obtaining the pixel position of the target object in each pan-tilt camera within the same positioning cycle, and using the pixel position of the target object in each pan-tilt camera as the mark position corresponding to each pan-tilt camera;
[0053] For each of the pan-tilt cameras, calculating the pixel distance between a preset position of the pan-tilt camera and a marked position corresponding to the pan-tilt camera, wherein the preset position includes a center position of a field of view;
[0054] The PTZ camera corresponding to the maximum pixel distance among the pixel distances is used as the PTZ camera to be adjusted, and a target PTZ camera other than the PTZ camera to be adjusted is determined among the PTZ cameras;
[0055] The pose of the target object in a world coordinate system is estimated based on the subject camera and the target gimbal camera to obtain the target pose, wherein the world coordinate system is the coordinate system of the subject camera.
[0056] It should be noted that the main camera and the gimbal camera can be distributed in any manner, such as side-by-side distribution, network distribution, field of view convergence distribution, etc., and this embodiment does not impose any specific restrictions on this.
[0057] In this embodiment, the world coordinate system is constructed with the coordinate system of the main camera. Specifically, the coordinate system of the main camera can be used as the world coordinate system. Specifically, the center of mass of the main camera can be used as the coordinate origin, and the shooting direction of the main camera can be used as the z-axis to establish the world coordinate system to estimate the pose of the target object in the world coordinate system, so that the pose estimation result of the target object in the same coordinate system can be detected, and the target object can be quickly located through this pose estimation result.
[0058] The adjustable camera position of the gimbal camera includes but is not limited to the adjustable camera angle of the gimbal camera. For example, in a feasible implementation, the adjustable camera position of the gimbal camera may also include that the gimbal camera is movable. By way of example, the various embodiments of the present application are described with reference to the adjustable camera angle of the gimbal camera.
[0059] The camera angle includes one or more of the camera pitch angle, camera yaw angle and camera flip angle, that is, the gimbal camera has multiple degrees of freedom, such as 2 degrees of freedom, 4 degrees of freedom or 6 degrees of freedom, etc., and this embodiment does not impose any specific limitation on this.
[0060] By adjusting the position of the gimbal camera so that the target object remains within the field of view of the gimbal camera, it should be noted that when there are multiple gimbal cameras, adjusting the position of the gimbal camera so that the target object is within the field of view of the gimbal camera can be to make the target object appear within the field of view of at least one gimbal camera. Considering that the gimbal camera that captures the target object can be used to estimate the pose of the target object, the more gimbal cameras that the target object appears in the field of view, the more gimbal cameras that can be used to estimate the pose of the target object, and thus the higher the accuracy of the pose estimation of the target object, in a preferred embodiment, the position of the gimbal camera is adjusted so that the target object appears within the field of view of all gimbal cameras.
[0061] It should be noted that there is a visual marker attached to the target object. When the camera captures the visual marker attached to the target object, it is confirmed that the target object is within the field of view of the camera. Specifically, the visual marker consists of multiple visual marker points. At this time, the camera is confirmed to have captured the visual marker when it captures multiple visual marker points, or it is confirmed to have captured the visual marker when the number of visual marker points captured by the camera is greater than or equal to a preset number, or it is confirmed to have captured the visual marker when the captured visual marker points all have complete boundaries. This embodiment does not impose specific restrictions on this. For example, referring to Figure 2 As shown, the visual mark on the target object contains a total of 23×6 complete color blocks, the color blocks are alternately distributed in black and white, the number of visual marker points 4 is 24×7=168, and the visual marker points 4 have corresponding labels, so that each visual marker point 4 has a unique feature. It only needs to detect 3×3 complete color blocks to identify the label of the visual marker point 4 corresponding to the 3×3 color blocks.
[0062] In this embodiment, a posture estimation system is proposed, including: the posture estimation system includes a main camera with a fixed camera position and at least one gimbal camera with an adjustable camera position. Thus, compared with the posture estimation method with a fixed camera position, this embodiment sets at least one gimbal camera with an adjustable camera position to adjust the position of the gimbal camera so that the object remains within the field of view of the gimbal camera, so that the posture of the object within the field of view of the gimbal camera can be successfully estimated, thereby reducing the phenomenon that the object exceeds the field of view of the camera when moving, resulting in the failure of the object posture estimation.
[0063] Further, based on the first embodiment of the pose estimation system, a second embodiment of the pose estimation system is proposed. In the second embodiment of the pose estimation system, the same or similar contents as those in the first embodiment can be referred to the above introduction and will not be described in detail later. On this basis, the main camera and the gimbal camera are distributed in a way that the viewing angle converges.
[0064] In this embodiment, the main camera and the gimbal camera are distributed in a manner of convergent viewing angles. It is easy to understand that, with the distribution manner of convergent viewing angles, the target object can appear in the field of view of all cameras. Even if the target object does not appear in the field of view of all cameras under abnormal circumstances (such as camera battery failure, camera power failure, etc.), the target object can also appear in the field of view of more cameras, which ensures that more cameras can capture the target object, thereby improving the accuracy of target object pose estimation.
[0065] It should be noted that, unless otherwise specified, when the embodiments of the present application only describe the camera, the camera refers to the main camera and the gimbal camera.
[0066] Furthermore, considering that the target object may have a fixed range of motion, such as a scalpel, a robot arm, and the like, which usually have a fixed range of motion, based on this, the main camera and the gimbal camera can be distributed in a way of convergence of perspectives around the range of motion of the target object. In this way, the range of convergence of the perspectives of the main camera and the gimbal camera includes the range of motion of the target object, ensuring that the target object will not exceed the field of view of the main camera and the gimbal camera during normal motion, that is, ensuring that the target object can always appear within the field of view of the main camera and the gimbal camera, thereby ensuring that the position and posture of the target object can be successfully estimated.
[0067] For example, to help understand the technical concept or technical principle of the pose estimation system after combining this embodiment with the above-mentioned embodiment 1, please refer to Figure 1 , Figure 1 A brief architecture diagram of the pose estimation system is provided, as follows:
[0068] A main camera 2 with a fixed camera position, whose camera coordinate system is the fixed world coordinate system {C}, and the main camera 2 is numbered 1;
[0069] One or more pan-tilt cameras 3 with the same specifications and adjustable camera positions, the pan-tilt cameras 3 are numbered 2 to n, and the number of pan-tilt cameras is n-1.
[0070] The target object 1 is a known moving object with a three-dimensional model, and a stereoscopic visual marker is attached to the target object.
[0071] Among them, the three-dimensional model of the target object can be obtained according to the method of visual three-dimensional reconstruction, and the positions of the main camera 2 and the gimbal camera 3 are distributed in a way of visual convergence, which is used to detect the visual marks on the target object and estimate its posture.
[0072] It should be noted that the above examples are only used to assist in understanding the present application and do not constitute a limitation on the posture estimation system of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0073] Based on the above-mentioned posture estimation system, various embodiments of the posture estimation method based on a distributed gimbal camera of the present application are proposed. It should be noted that the execution subject of each embodiment of the posture estimation method based on a distributed gimbal camera of the present application can be the controller in the above-mentioned posture estimation system, or it can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or a posture estimation device based on a distributed gimbal camera that can realize the above functions, etc., and the various embodiments of the posture estimation method based on a distributed gimbal camera of the present application do not make specific limitations on this.
[0074] Based on this, this application proposes a first embodiment of a posture estimation method based on a distributed gimbal camera, please refer to Figure 3 The method for posture estimation based on a distributed PTZ camera includes steps S10 to S40:
[0075] Step S10, obtaining the pixel position of the target object in each pan-tilt camera in the current positioning cycle, and using the pixel position of the target object in each pan-tilt camera as the mark position corresponding to each pan-tilt camera;
[0076] To facilitate subsequent explanation and description, the main camera and the gimbal camera can be numbered so that they have unique number identifications. For example, the main camera is numbered 1 and the gimbal cameras are numbered sequentially starting from 2 to explain the various embodiments of the posture estimation method based on the distributed gimbal camera.
[0077] It should be noted that the pixel position of the centroid of the target object in the gimbal camera can be used as the pixel position of the target object in the gimbal camera. Specifically, the gimbal camera captures the visual marker attached to the target object, and calculates the pixel position of the centroid of the visual marker based on the captured image of the visual marker, that is, the pixel position of the centroid of the target object.
[0078] It can be understood that before performing pose estimation, it is necessary to calibrate the intrinsic parameters of the main camera and the gimbal camera. Specifically, the intrinsic parameters of the main camera and the gimbal camera can be calibrated by a known calibration method. As an example, the intrinsic parameter calibration of the camera can be completed by photographing a checkerboard calibration plate of known size. The calibration toolbox can be the camera calibration toolbox cameraCalibrator of MATLAB (Matrix Laboratory). The camera intrinsic parameters include an intrinsic parameter matrix and a distortion parameter. This embodiment does not impose any specific restrictions on the specific method of the intrinsic parameter calibration.
[0079] The duration of the positioning cycle can be set in advance, such as 45 milliseconds, 50 milliseconds, 60 milliseconds, etc., and this embodiment does not impose any specific limitation on this.
[0080] In addition, further, after receiving the pose estimation request, the camera is controlled to capture images for pose estimation. The user can preset the triggering conditions for the pose estimation request in advance, such as initiating a pose estimation request through a mobile phone APP (Application), capturing a press or touch operation on the target object, capturing a preset gesture of the user, etc. This embodiment does not impose specific restrictions on this.
[0081] Furthermore, if the current positioning cycle is the first positioning cycle, the external parameters of the camera can be initialized so that the pose estimation can be performed in the subsequent positioning cycle. Specifically, each camera simultaneously shoots the target object, and the relative pose between the gimbal camera and the main camera is calculated based on the shooting results, thereby initializing the external parameters of each gimbal camera relative to the main camera.
[0082] As a feasible implementation method for initializing camera extrinsic parameters, the initialization process of camera extrinsic parameters can be specifically as follows:
[0083] S101: Obtain the position of the target object relative to the camera numbered i
[0084] S102: The external parameters of each gimbal camera relative to the main camera are obtained by the following formula: in, is the external parameter of camera numbered i.
[0085] Step S20, for each of the pan-tilt cameras, calculating the pixel distance between a preset position of the pan-tilt camera and a marked position corresponding to the pan-tilt camera, wherein the preset position includes a center position of a field of view;
[0086] The preset position includes but is not limited to the center of field of view, and may also be a position close to the center of field of view in the field of view of the gimbal camera. Considering that the closer the target object appears to the center of field of view of the gimbal camera, the higher the accuracy of the detected position of the target object relative to the gimbal camera, by way of example, the embodiments of the present application are described with the preset position as the center of field of view.
[0087] For the convenience of subsequent explanation, the position of the gimbal camera numbered i is marked as p i , then it is easy to understand that in, M P represents the three-dimensional coordinates of the target object in its own marking coordinate system, represents the position of the target object relative to the gimbal camera numbered i, K i Indicates the internal parameters of the gimbal camera numbered i.
[0088] The pixel distance between the center of the gimbal camera's field of view and the marker position can be specifically the Euclidean distance between the two, which can be expressed as: d i =|p i -p * |2, where d i Indicates the pixel distance corresponding to the gimbal camera numbered i, p * Indicates the center position of the field of view of the gimbal camera numbered i, specifically (w,h) represent the width and height of the gimbal camera’s field of view, respectively.
[0089] Step S30, taking the pan / tilt camera corresponding to the maximum pixel distance among the pixel distances as the pan / tilt camera to be adjusted, and adjusting the pan / tilt camera to be adjusted;
[0090] It should be noted that the gimbal camera adjusted in the current positioning cycle is not used for posture estimation in the next positioning cycle.
[0091] The adjustment target of the camera position can be preset, and the camera position of the gimbal camera corresponding to the maximum pixel distance is adjusted until the preset adjustment target is reached. As one implementation manner, the preset adjustment target may be that the target object appears completely within the field of view of the gimbal camera. As another implementation manner, the preset adjustment target may be that the pixel distance between the pixel position of the gimbal camera to be adjusted and the center position of the field of view of the gimbal camera to be adjusted is less than the preset distance. As another implementation manner, the preset adjustment target may be that the pixel position of the target object in the gimbal camera to be adjusted coincides with the center position of the field of view of the gimbal camera to be adjusted, that is, the target object appears in the center of the field of view of the gimbal camera.
[0092] The camera position is adjusted for the gimbal camera with the largest pixel distance between the mark position and the center position of the field of view. It can be understood that the closer the target object appears to the center position of the field of view of the gimbal camera, the higher the accuracy of the detected pose of the target object relative to the gimbal camera. The gimbal camera with the largest pixel distance between the mark position and the center position of the field of view is selected for adjustment, so that the gimbal camera with the target object appearing position closer to the center position of the field of view of the gimbal camera is subsequently selected to estimate the final pose of the target object, thereby improving the pose estimation accuracy of the target object.
[0093] Step S40, determining a target gimbal camera among the gimbal cameras except the gimbal camera that has been adjusted in the previous positioning cycle, estimating the pose of the target object in the world coordinate system based on the main camera and the target gimbal camera, and obtaining the target pose, wherein the world coordinate system is the coordinate system of the main camera.
[0094] The target PTZ camera may be one or more PTZ cameras other than the PTZ camera that has been adjusted in the previous positioning cycle, or may be a PTZ camera other than the PTZ camera that has been adjusted in the previous positioning cycle and that has captured the target object. Exemplarily, all PTZ cameras other than the PTZ camera to be adjusted are selected as target PTZ cameras to illustrate various embodiments of the present application.
[0095] It should be noted that it is possible to detect whether the current positioning cycle is the first positioning cycle. If the current positioning cycle is the first positioning cycle, the position of the target object relative to the subject camera can be As the pose estimation result of the target object C T M .
[0096] If the current positioning cycle is not the first positioning cycle, the target gimbal camera and the main camera are selected to estimate the pose of the target object. It can be understood that the pose of the gimbal camera whose camera position was adjusted in the previous positioning cycle relative to the main camera will also change. At this time, its pose relative to the main camera is uncertain, or, after adjusting the camera position of the gimbal camera, the external parameters of the gimbal camera are recalibrated based on the adjusted position. At this time, the external parameters of the gimbal camera are calibrated based only on the relative pose detection results of one positioning cycle, which may not be able to calibrate the external parameters of the gimbal camera more accurately. Based on this, the gimbal camera whose camera position was not adjusted in the previous positioning cycle is selected as the target gimbal camera of the current positioning cycle.
[0097] The target pose of the target object in the world coordinate system is estimated based on the subject camera and the target gimbal camera. It can be understood that the target gimbal camera is used to correct the pose of the target object detected by the subject camera relative to the subject camera to obtain the corrected target pose. Specifically, the target pose of the target object can be estimated using a known multi-camera positioning algorithm. C T M , this embodiment does not impose any specific limitation on this.
[0098] Furthermore, after estimating the target pose of the target object, the reprojection error of the target object under the target pose can be calculated. If the reprojection error is greater than a preset threshold, the extrinsic parameters of the gimbal camera can be reinitialized. When the pose estimation result error is large (such as the extrinsic parameter error of the gimbal camera is large, resulting in a large pose estimation result error, the camera power failure causes a large pose estimation result error, etc.), the extrinsic parameters of the gimbal camera are reinitialized, its pose is re-estimated, and the accuracy of the object pose estimation is improved.
[0099] In a possible implementation, the execution order of step S10 to step S40 in one positioning cycle is:
[0100] Execute step S10, step S20 and step S30 in sequence, and execute step S40 simultaneously during the execution of step S20 or step S30, until all steps S10 to S40 are completed, then return to execute step S10 to enter the next positioning cycle; or,
[0101] Step S10, step S20, step S30 and step S40 are sequentially executed until step S10 to step S40 are all executed, and then the execution returns to step S10 to enter the next positioning cycle.
[0102] In this way, step S40 can be executed simultaneously during step S20 and step S30, that is, determining the gimbal camera to be adjusted in the current positioning cycle and the pose estimation of the current positioning cycle can be performed simultaneously. In this way, the duration of a positioning cycle can be shortened and the pose estimation speed can be improved so that the pose of the target object can be obtained in real time.
[0103] In this embodiment, the pan-tilt camera with the largest pixel distance between the pixel position of the target object in the pan-tilt camera and the center position of the field of view is used as the pan-tilt camera to be adjusted, and the target pan-tilt camera other than the pan-tilt camera to be adjusted is determined among the pan-tilt cameras, and the pose of the target object is estimated based on the main camera and the target pan-tilt camera, so that the pose estimation is performed based on the target pan-tilt camera where the target object is close to the center of the field of view of the pan-tilt camera, thereby improving the accuracy of the pose estimation. When the distance between the pixel position of the target object and the center position of the field of view of the pan-tilt camera is large, the possibility that the target object exceeds the field of view of the pan-tilt camera is large. At this time, the pan-tilt camera is used as the pan-tilt camera to be adjusted, so as to facilitate the subsequent adjustment of the camera position of the pan-tilt camera, thereby making the target object always remain within the field of view of the pan-tilt camera.
[0104] Based on the first embodiment of the method for posture estimation based on the distributed gimbal camera, a second embodiment of the method for posture estimation based on the distributed gimbal camera is proposed. In the second embodiment of the method for posture estimation based on the distributed gimbal camera, the same or similar contents as those in the first embodiment can be referred to the above introduction and will not be repeated later. On this basis, before estimating the posture of the target object in the world coordinate system based on the subject camera and the target gimbal camera in step S40, the method further includes:
[0105] Step A10, obtaining a current pose of the target object in the world coordinate system relative to the target gimbal camera in the current positioning cycle, and obtaining a historical pose of the target object relative to the target gimbal camera, wherein the historical pose includes a pose of the target object relative to the target gimbal camera in a previous positioning cycle corresponding to the current positioning cycle;
[0106] For the convenience of subsequent explanation and description, the current position of the camera under the target gimbal numbered i is The historical position is
[0107] Step A20, optimizing the external parameters of the target gimbal camera based on the historical posture and the current posture, so that the target gimbal camera performs posture estimation based on the optimized external parameters.
[0108] The current external parameters of the target gimbal camera can be optimized based on a preset iterative optimization algorithm to obtain the target gimbal camera after optimizing the external parameters. And a loss function can be set to obtain the external parameters with the minimum loss function value. For example, let the camera number of the camera position adjusted in the previous positioning cycle be x, and the camera number of the camera position not adjusted be 1 to m, the loss function can be specifically:
[0109]
[0110] in, Represents the rotation matrix component in the external parameters of the target gimbal camera numbered i, Indicates the external parameters of the target gimbal camera numbered i, Represents the translation component of the external parameters of the target gimbal camera numbered i, Represents the rotation matrix component in the historical pose of the target gimbal camera numbered i, represents the rotation matrix component in the current pose of the target gimbal camera numbered i, t(T) represents the translation component in the pose matrix and is expressed in vector form, θ(R) represents the axis angle of the rotation matrix component R, and the calculation method is Where trace(R) represents the trace of the rotation matrix, ω1 and ω2 are preset values, which can generally be taken as ω2=1. Solving for It is understandable that the external parameter matrix Among them, R represents the rotation matrix component, t represents the translation component, so we get The optimized external parameters of the target gimbal camera can also be obtained.
[0111] It should be noted that after the external parameters of the target gimbal camera are optimized, the pose of the target gimbal camera relative to the main camera can be re-acquired based on the optimized external parameters, and the target pose can be iteratively solved based on the relative pose relationship after the external parameters are optimized.
[0112] In this embodiment, the external parameters of the target gimbal camera are optimized based on the current posture of the current positioning cycle and the historical posture of the previous positioning cycle, that is, the external parameters of the gimbal camera are optimized based on the posture detection results of two positioning cycles. In the actual posture estimation process, the external parameters of the gimbal camera are continuously optimized based on the actual posture detection results, thereby continuously improving the accuracy of the external parameters, so that the external parameters of the gimbal camera tend to be close to the actual values, and compared with the method of optimizing the external parameters based on the posture detection results of only one positioning cycle, the historical posture can provide additional reference information, thereby further improving the accuracy of the optimized external parameters.
[0113] In a possible implementation, the step of estimating the pose of the target object in the world coordinate system based on the subject camera and the target gimbal camera in step S40 to obtain the target pose includes:
[0114] Step B10, estimating the pose of the target object in the world coordinate system using a multi-camera positioning algorithm based on the main camera and the target gimbal camera, and obtaining the target pose, wherein the target pose is the pose with the smallest reprojection residual of the target object.
[0115] For the convenience of subsequent elaboration and illustration, the position of the target object relative to the subject camera in the world coordinate system is taken as the first position, and the position of the target gimbal camera relative to the subject camera is taken as the second position.
[0116] The position and posture of the target object relative to the camera can be calculated based on the two-dimensional image of the target object taken by the camera. Specifically, the position and posture of the object relative to the camera can be calculated in a known manner, such as calculating the position and posture of the object relative to the camera through an EPnP algorithm. This embodiment does not impose any specific limitation on the method of calculating the position and posture of the object relative to the camera.
[0117] Furthermore, after obtaining the pose of the target object relative to the camera, the acquired pose can be optimized, such as using a bundle adjustment algorithm to optimize the pose, and subsequent steps are performed based on the optimized first pose and second pose to further improve the accuracy of the pose estimation results.
[0118] Specifically, the second pose and the first pose can be input into a preset multi-camera positioning algorithm to output the target pose. The multi-camera positioning algorithm can be any iterative optimization algorithm set in advance, such as the Gauss-Newton method, the stochastic gradient descent method, etc. This embodiment does not impose any specific restrictions on this.
[0119] The minimum reprojection residual of the target object can be used as the loss function of the pre-multi-camera positioning algorithm to obtain the target pose with the minimum reprojection residual of the target object. For example, the loss function can be specifically: Among them, i represents the camera numbered i, n represents the total number, j represents the jth visual marker point, and Ni represents the total number of visual markers captured by camera number i, p ij represents the pixel coordinates of the jth visual marker point captured by the camera numbered i, Z j represents the Z coordinate of the jth visual marker point, K i represents the intrinsic parameter matrix of camera number i, represents the external parameters of camera number i, C T M represents the target pose to be iteratively optimized, M P j represents the three-dimensional coordinates of the jth visual marker point in its own marker coordinate system {M}. The first pose can be selected as C T M The initial value of the iteration is used to reduce the number of iterations and efficiently find the target pose.
[0120] In this embodiment, the target pose with the smallest reprojection residual is obtained through iterative optimization, so that the pose estimation result of the target object is closer to the actual pose of the target object, thereby improving the accuracy of pose estimation.
[0121] Based on the first embodiment and / or the second embodiment of the method for estimating the posture of a distributed gimbal camera, a third embodiment of the method for estimating the posture of a distributed gimbal camera is proposed. In the third embodiment of the method for estimating the posture of a distributed gimbal camera, the same or similar contents as those of the first and second embodiments can be referred to the above introduction and will not be described in detail later. On this basis, the step of adjusting the gimbal camera to be adjusted in step S30 includes:
[0122] Step C10: If the target object is not at the center of the field of view of the gimbal camera to be adjusted, adjust the camera position of the gimbal camera to be adjusted until the pixel position of the target object at the gimbal camera to be adjusted coincides with the center position of the field of view of the gimbal camera to be adjusted.
[0123] As for the adjustment method of the camera position, as one implementation method, it can be a random adjustment. As another implementation method, it can be adjusted by using a visual servo (PBVS, Position-based visual servo), which is not specifically limited in this embodiment. Specifically, the specific adjustment process of the visual servo method is: Δp = pp * =J p v, J p It is the interaction matrix in PBVS, p represents the current pixel position of the target object in the gimbal camera to be adjusted, v represents the adjustment speed, and the gimbal camera to be adjusted is adjusted based on the calculated adjustment speed v until the pixel position of the target object in the gimbal camera to be adjusted coincides with the center position of the field of view of the gimbal camera to be adjusted.
[0124] Considering that the position of the gimbal camera to be adjusted is adjusted until the target object appears in the center of the field of view of the gimbal camera to be adjusted, on the one hand, adjusting the target object to the center of the field of view can reduce the probability that the target object exceeds the field of view of the gimbal camera to be adjusted when it moves, and on the other hand, adjusting the target object to the center of the field of view makes it possible for the pose estimation result to have a high accuracy when the gimbal camera is subsequently selected for pose estimation. The pose of the target object can be accurately detected in each positioning cycle during the entire pose process, and the pose estimation has high robustness. Based on this, this embodiment selects the target object to appear in the center of the field of view of the gimbal camera as the preset adjustment target.
[0125] In a possible implementation manner, before step S40, the method further includes:
[0126] Step D10, updating the external parameters of the gimbal camera adjusted in the previous positioning cycle, so that when the gimbal camera adjusted in the previous positioning cycle is selected as the target gimbal camera, pose estimation is performed based on the updated external parameters.
[0127] It is understandable that after the camera position of the gimbal camera is adjusted, its external parameters will also change accordingly. Based on this, in this embodiment, the current positioning cycle updates the external parameters of the gimbal camera whose camera position has been adjusted in the previous positioning cycle. Specifically, the gimbal camera is recalibrated based on the main camera to obtain the current position and posture of the gimbal camera relative to the main camera, and the external parameters are updated. Specifically, Here, x indicates the number of the gimbal camera that has been adjusted in the previous positioning cycle.
[0128] In this embodiment, after the camera position of the gimbal camera is adjusted, the gimbal camera is recalibrated to update the external parameters of the gimbal camera, thereby ensuring the timely update and accuracy of the external parameters of the gimbal camera. At the same time, the current positioning cycle updates the external parameters of the gimbal camera that has been adjusted in the previous positioning cycle, that is, the external parameters of the gimbal camera that has been adjusted in the current positioning cycle are updated in the next positioning cycle. In this way, even if the gimbal camera has been adjusted in the current positioning cycle to participate in the pose estimation, it will not affect the pose estimation result.
[0129] For example, in order to help understand the technical concept or technical principle of the method for posture estimation based on a distributed gimbal camera after combining this embodiment with the above-mentioned embodiment 1 and embodiment 2, please refer to Figure 4 , Figure 4 A brief flow chart of the pose estimation method based on a distributed gimbal camera is provided, as follows:
[0130] 1. Before the system is running, all cameras should be calibrated internally.
[0131] 2. In the first positioning cycle, refer to Figure 5 As shown in the figure, the coordinate system where the target object is located is {M}, and the coordinate system where the gimbal camera numbered i is located is {C i Each camera simultaneously captures the visual markers on the moving object. Based on the detection results, the external parameters of each gimbal camera relative to the main camera are initialized. The pose estimation result of this positioning cycle C T M Assign the position of the visual marker relative to the subject camera
[0132] 3. For all gimbal cameras that detect visual markers, refer to Figure 6 As shown, the position p of the center of mass 6 of the mark in the camera field of view is calculated, and the pixel distance d = ||△p||2, △p = (pp*) of the center of mass relative to the position p* of the camera field of view center 5 is calculated, and the gimbal camera with the largest deviation distance between the center of mass of the visual mark and the center of the camera field of view among these gimbal cameras is obtained; based on the visual servoing method, only the camera with the largest deviation distance is adjusted in a single cycle to make the visual mark appear in the center of the camera field of view.
[0133] 4. In the subsequent positioning cycle, each camera simultaneously captures the visual markers on the moving object, and estimates the position of the visual markers relative to each camera through the 2D detection results of the visual markers and their 3D models. Combined with the camera external parameters of the previous positioning cycle, the camera external parameters of the camera whose position was not adjusted in the previous positioning cycle are optimized, and the camera external parameters of the camera whose position was adjusted in the previous cycle are updated. Figure 7 As an example to illustrate the process, assume that the deviation distance between the center of mass of the visual marker in the field of view of the gimbal camera numbered 2 in the previous positioning cycle and the center of the camera field of view is the largest, that is, the gimbal camera adjusted in the previous positioning cycle, then it is necessary to calibrate the posture between cameras 1, 3 and 4, and use the detection results of the two positioning cycles to optimize the external parameters. The external parameters of camera 2 in the current positioning cycle need to be updated.
[0134] 5. Based on the new camera external parameters, use the multi-camera localization algorithm to estimate the position of the visual marker relative to the subject camera C T M ,by Figure 8 To illustrate the process as an example, assume that the gimbal camera numbered 2 in the previous positioning cycle adjusts the camera position, and the current positioning cycle uses cameras 1, 3, and 4 to estimate the posture of the object.
[0135] 6. Calculate the reprojection error of the pose under the current detection result. If the reprojection error is too large, use the method in the first positioning cycle to reinitialize all camera extrinsics, and assign the pose estimation result to the pose of the visual marker relative to the subject camera.
[0136] It should be noted that the above examples are only used to assist in understanding the present application and do not constitute a limitation on the pose estimation method based on the distributed gimbal camera of the present application. More forms of simple transformations based on this technical concept are all within the scope of protection of the present application.
[0137] In addition, an embodiment of the present application also proposes a posture estimation device based on a distributed gimbal camera. The posture estimation device based on the distributed gimbal camera includes a memory, a processor, and a posture estimation program stored in the memory and executable on the processor. When the posture estimation program is executed by the processor, the steps of the posture estimation method based on the distributed gimbal camera are implemented as described above.
[0138] Reference below Fig. 9 , which shows a schematic diagram of the structure of a distributed PTZ camera-based pose estimation device suitable for implementing the embodiment of the present application. The distributed PTZ camera-based pose estimation device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), etc., and fixed terminals such as digital TVs, desktop computers, etc. Fig. 9 The distributed gimbal camera-based pose estimation device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0139] like Fig. 9As shown, the posture estimation device based on the distributed pan-tilt camera may include a processing device 1001 (such as a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM: Read Only Memory) 1002 or the program loaded from the storage device 1003 to the random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the posture estimation device based on the distributed pan-tilt camera are also stored. The processing device 1001, ROM1002 and RAM1004 are connected to each other through a bus 1005. The input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 1003 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 1009. The communication device 1009 can allow the distributed gimbal camera-based pose estimation device to communicate wirelessly or wired with other devices to exchange data. Although the figure shows a distributed gimbal camera-based pose estimation device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems may be implemented or have instead.
[0140] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program, 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, or installed from the storage device 1003, or installed from the ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0141] The posture estimation device based on the distributed gimbal camera provided in the embodiment of the present application adopts the posture estimation method based on the distributed gimbal camera in the above embodiment, which can solve the technical problem of posture estimation. Compared with the prior art, the beneficial effects of the posture estimation device based on the distributed gimbal camera provided in the present application are the same as the beneficial effects of the posture estimation method based on the distributed gimbal camera provided in the above embodiment, and the other technical features in the posture estimation device based on the distributed gimbal camera are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0142] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0143] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0144] In addition, to achieve the above-mentioned purpose, an embodiment of the present application also provides a readable storage medium having computer-readable program instructions (i.e., computer programs) stored thereon, and the computer-readable program instructions are used to execute the posture estimation method based on the distributed gimbal camera in the above-mentioned embodiment.
[0145] The computer-readable storage medium provided in the embodiment of the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, 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 wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the 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, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.
[0146] The above-mentioned computer-readable storage medium may be included in the posture estimation device based on the distributed gimbal camera; or it may exist independently without being assembled into the posture estimation device based on the distributed gimbal camera.
[0147] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by a posture estimation device based on a distributed gimbal camera, the posture estimation device based on the distributed gimbal camera: obtains the pixel position of the target object in each gimbal camera in the current positioning cycle, and uses the pixel position of the target object in each gimbal camera as the mark position corresponding to each gimbal camera; for each gimbal camera, calculates the pixel distance between the preset position of the gimbal camera and the mark position corresponding to the gimbal camera, wherein the preset position includes the center position of the field of view; uses the gimbal camera corresponding to the maximum pixel distance among the pixel distances as the gimbal camera to be adjusted, and adjusts the gimbal camera to be adjusted; determines the target gimbal camera among the gimbal cameras except the gimbal camera that has been adjusted in the previous positioning cycle, estimates the posture of the target object in the world coordinate system based on the main camera and the target gimbal camera, and obtains the target posture, wherein the world coordinate system is the coordinate system of the main camera.
[0148] Computer program code for performing the operations of the present application 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 the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through 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).
[0149] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program according to various embodiments of the present application. In this regard, each 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 alternative implementations, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two 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 box in the block diagram and / or flow chart, and the combination of the 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.
[0150] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0151] The readable storage medium provided in this application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned posture estimation method based on distributed gimbal cameras, and can solve the technical problem of posture estimation. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the posture estimation method based on distributed gimbal cameras provided in the above-mentioned embodiments, and will not be repeated here.
[0152] In addition, an embodiment of the present application also proposes a computer program, including a pose estimation program, which, when executed by a processor, implements the steps of the pose estimation method based on a distributed gimbal camera as described above.
[0153] The specific implementation methods of the computer program of the present application are basically the same as the above-mentioned embodiments of the posture estimation method based on the distributed gimbal camera, and will not be repeated here.
[0154] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0155] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0156] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software sensor, which is stored in a storage medium (such as ROM / RAM, disk, CD) as described above, including a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0157] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A posture estimation system based on a distributed pan-tilt camera, characterized in that: The posture estimation system includes a main camera with a fixed camera position, at least one pan-tilt camera with an adjustable camera position, and a controller. The controller is used to: Obtaining the pixel position of the target object in each pan-tilt camera in the current positioning cycle, and using the pixel position of the target object in each pan-tilt camera as the mark position corresponding to each pan-tilt camera; For each of the pan-tilt cameras, calculating the pixel distance between a preset position of the pan-tilt camera and a marked position corresponding to the pan-tilt camera, wherein the preset position includes a center position of a field of view; The pan-tilt camera corresponding to the maximum pixel distance among the pixel distances is used as the pan-tilt camera to be adjusted, and the pan-tilt camera to be adjusted is adjusted; Determine a target gimbal camera among the gimbal cameras except the gimbal camera that has been adjusted in the previous positioning cycle, estimate the pose of the target object in the world coordinate system based on the main camera and the target gimbal camera, and obtain the target pose, wherein the world coordinate system is the coordinate system of the main camera.
2. The system according to claim 1, characterized in that The main camera and the pan / tilt camera are distributed in a manner of converging viewing angles.
3. A method for posture estimation based on a distributed pan-tilt camera, characterized in that: The posture estimation method based on the distributed gimbal camera is applied to the posture estimation system according to any one of claims 1 to 2, and the posture estimation method based on the distributed gimbal camera comprises: Step S10, obtaining the pixel position of the target object in each pan-tilt camera in the current positioning cycle, and using the pixel position of the target object in each pan-tilt camera as the mark position corresponding to each pan-tilt camera; Step S20, for each of the pan-tilt cameras, calculating the pixel distance between a preset position of the pan-tilt camera and a marked position corresponding to the pan-tilt camera, wherein the preset position includes a center position of a field of view; Step S30, taking the pan / tilt camera corresponding to the maximum pixel distance among the pixel distances as the pan / tilt camera to be adjusted, and adjusting the pan / tilt camera to be adjusted; Step S40, determining a target gimbal camera among the gimbal cameras except the gimbal camera that has been adjusted in the previous positioning cycle, estimating the pose of the target object in the world coordinate system based on the main camera and the target gimbal camera, and obtaining the target pose, wherein the world coordinate system is the coordinate system of the main camera.
4. The method according to claim 3, characterized in that Before estimating the position and posture of the target object in the world coordinate system based on the subject camera and the target gimbal camera in step S40, the method further includes: Acquire a current pose of the target object in the world coordinate system relative to the target gimbal camera in a current positioning cycle, and acquire a historical pose of the target object relative to the target gimbal camera, wherein the historical pose includes a pose of the target object relative to the target gimbal camera in a previous positioning cycle corresponding to the current positioning cycle; The external parameters of the target gimbal camera are optimized based on the historical posture and the current posture, so that the target gimbal camera performs posture estimation based on the optimized external parameters.
5. The method according to claim 3, characterized in that The step of estimating the position and posture of the target object in the world coordinate system based on the subject camera and the target gimbal camera in step S40 to obtain the target position and posture comprises: A multi-camera positioning algorithm is used based on the main camera and the target gimbal camera to estimate the pose of the target object in the world coordinate system to obtain the target pose, wherein the target pose is the pose with the smallest reprojection residual of the target object.
6. The method according to claim 3, characterized in that The step of adjusting the pan / tilt camera to be adjusted in step S30 includes: If the target object is not at the center of the field of view of the gimbal camera to be adjusted, the camera position of the gimbal camera to be adjusted is adjusted until the pixel position of the target object at the gimbal camera to be adjusted coincides with the center position of the field of view of the gimbal camera to be adjusted.
7. The method according to claim 3, characterized in that Before step S40, the method further includes: The external parameters of the gimbal camera adjusted in the previous positioning cycle are updated, so that when the gimbal camera adjusted in the previous positioning cycle is selected as the target gimbal camera, the pose estimation is performed based on the updated external parameters.
8. The method according to claim 3, characterized in that The execution order of steps S10 to S40 in one positioning cycle is: Execute step S10, step S20 and step S30 in sequence, and execute step S40 simultaneously during the execution of step S20 or step S30, until all steps S10 to S40 are completed, then return to execute step S10 to enter the next positioning cycle; or, Step S10, step S20, step S30 and step S40 are sequentially executed until step S10 to step S40 are all executed, and then the execution returns to step S10 to enter the next positioning cycle.
9. A posture estimation device based on a distributed pan-tilt camera, characterized in that: The posture estimation device based on the distributed gimbal camera includes: a memory, a processor, and a posture estimation program stored in the memory and executable on the processor. When the posture estimation program is executed by the processor, the steps of the posture estimation method based on the distributed gimbal camera as described in any one of claims 3 to 8 are implemented.
10. A readable storage medium, characterized in that: The readable storage medium includes a computer-readable storage medium, on which a pose estimation program is stored. When the pose estimation program is executed by a processor, the steps of the pose estimation method based on a distributed gimbal camera as described in any one of claims 3 to 8 are implemented.
