Human-shaped target tracking method and system
By collecting video through the camera and combining the recognition of humanoid targets and movement trend information, the precise tracking of humanoid targets is achieved, which solves the problem in the existing technology that humanoid targets cannot be stably tracked in shooting equipment, and improves the shooting of scenes such as live broadcasts and delivery of goods. Effect.
Patent Information
- Application Number
- CN202410731575.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-06
- Publication Date
- 2024-09-03
AI Technical Summary
When existing shooting equipment tracks humanoid targets, due to errors in the angle and speed of the human hand, it is impossible to ensure that the target is always in the center of the lens, resulting in poor shooting results. Especially in scenes such as live broadcasts with goods, the anchor may walk out of the shooting range, causing problems. A bad experience for consumers and streamers.
The video image is collected through the camera. The main control chip analyzes the position of the humanoid target, calculates its relative position coordinates, and drives the motor through the PTZ control end to adjust the camera so that the humanoid target is located in the middle of the screen. It uses face and posture recognition algorithms to improve accuracy. Combined with The motion trend vector adjusts the direction and speed of motion in real time.
It achieves precise tracking of humanoid targets, ensuring that the target is always in the center of the screen, improving the stability and experience quality of shooting and live broadcasting, and the control method is simple and precise.
Smart Images

Figure CN118590760A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image shooting technology, and in particular to a method and system for tracking a humanoid target. Background Art
[0002] With the rise of new trends such as self-media and live streaming, there are higher requirements for shooting equipment. Previously available devices such as stabilizers usually only have the function of keeping the shooting device stable in the horizontal and vertical directions to prevent the picture in the lens from shaking. When tracking the target, the user needs to rotate his arm to aim the lens of the shooting device at the target. Due to the large errors in the rotation angle and speed of the hand, it cannot be guaranteed that the target is always in the center of the lens, resulting in a bad shooting or live streaming experience.
[0003] For example, in the currently popular live streaming sales, when selling clothing, the live streamer needs to keep moving around to show the products and the effects on the body from multiple angles. However, while walking, the filming equipment is fixed and cannot track the movement of the live streamer. As a result, the live streamer may walk out of the shooting range without knowing it, causing a bad experience for both consumers and the live streamer. Therefore, how to solve this dilemma is the main problem we are currently facing. Summary of the invention
[0004] In view of the technical problems existing in the prior art, the present invention provides a method and system for tracking a humanoid target, which calculates the position and movement trend of the humanoid target by adopting relevant algorithms, thereby ensuring that relevant equipment can adjust the humanoid target to the middle position of the screen.
[0005] To achieve the above object, the present invention provides a method for tracking a humanoid target, comprising the following steps:
[0006] S1: The camera collects video images and transmits the image information to the main control chip;
[0007] S2: The main control chip analyzes the image information and finds the human-shaped target;
[0008] S3: The main control chip calculates the relative position coordinates of the picture frame where the human figure is located according to the position of the area where the human figure is located, and transmits the coordinates to the pan / tilt control end;
[0009] S4: The PTZ control terminal calculates the movement direction of the driving motor when it moves to the middle position according to the relative position coordinates of the frame where the target is located;
[0010] S5: The driving motor controls the camera to collect the target until the human-shaped target is located in the middle of the picture frame.
[0011] Preferably, in step S2, the recognition of the humanoid target includes face recognition and posture recognition; before performing image analysis, different recognition types need to be selected for the humanoid target recognition according to usage requirements.
[0012] Preferably, in step S3, the following steps are specifically included: first, a coordinate system is established with the middle position coordinates of the picture frame as the origin and the size of the picture frame, and then the position information of the humanoid target is substituted into the coordinate system to obtain the edge coordinate information and center coordinate information of the humanoid target, and on the premise of ensuring that all the edge coordinate information falls into the coordinate system, the center coordinate information is transmitted to the gimbal control end.
[0013] Preferably, in step S3, when determining the position of the humanoid target, firstly collect the coordinate change value of the humanoid target within a period of time, obtain the motion trend vector of the humanoid target according to the coordinate change value, and transmit the motion trend vector to the pan-tilt control terminal.
[0014] Preferably, in step S4, the gimbal controller calculates the offset, including lateral offset, longitudinal offset and height offset, based on the center coordinate information, and calculates the movement direction and speed of the motor based on the movement trend vector and the size of the offset.
[0015] The present invention also discloses a tracking system for a human-shaped target, which includes an identification module, a driving module and a computing module that are interconnected. The identification module is used to identify the human-shaped target and transmit the acquired information to the computing module. The computing module transmits the motion information to the driving module according to the position and motion trend of the human-shaped target. The driving module moves according to the motion information to ensure that the human-shaped target is located in the middle position of the identification module.
[0016] Preferably, the recognition module comprises a face recognition unit and a posture recognition unit, the face recognition unit is used to recognize a face, and the posture recognition unit is used to recognize a whole body.
[0017] Preferably, the calculation module includes a first calculation unit and a second calculation unit, the first calculation unit constructs a coordinate system with the middle of the picture frame as the origin, calculates the coordinate information of the humanoid target in the coordinate system, and calculates the offset; the second calculation unit calculates the motion trend vector according to the coordinate change value of the humanoid target in a short time, and obtains the motion information after combining the offset with the motion trend vector, and transmits the motion information to the driving module.
[0018] Preferably, the driving module includes a transverse unit, a longitudinal unit and a height unit. After receiving the motion information, the driving module disassembles the motion information to obtain motion values in three directions, and transmits the corresponding motion values to the transverse unit, the longitudinal unit and the height unit, so that the entire motion process can be completed in the same time.
[0019] Preferably, when the driving unit moves, the recognition module collects information, and when the human-shaped target is located in the middle of the picture frame, the information is fed back to the driving unit, and the driving unit stops moving after receiving the feedback information.
[0020] The beneficial effect of the present invention is that compared with the prior art, the human-shaped target tracking method and system provided by the present invention constructs a coordinate system and substitutes the human-shaped target into the coordinate system to obtain the offset and motion trend vector of the human-shaped target. In this way, the motion trajectory and trend of the human-shaped target are taken into consideration during use, thereby making it easier to adjust so that the human-shaped target is located in the middle of the entire picture frame. The control method is simple and has high accuracy, and can be widely promoted and used. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 It is a flow chart of the steps of the present invention. DETAILED DESCRIPTION
[0022] In order to more clearly illustrate the present invention, the present invention is further described below in conjunction with the accompanying drawings.
[0023] In the following description, the example details are given to provide a deeper understanding of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all embodiments. It should be understood that the specific embodiments are only used to explain the present invention and are not used to limit the present invention.
[0024] It should be understood that when the terms "include" and / or "comprises" are used in this specification, they indicate the existence of the stated features, integers, steps, operations, elements or components, but do not exclude the existence or addition of one or more other features, integers, steps, operations, elements, components or combinations thereof.
[0025] Please refer to the attached Figure 1In order to solve the above technical problems, the present application provides a tracking method and system for a humanoid target, including the following steps: S1: the camera collects video images and transmits the image information to the main control chip; S2: the main control chip analyzes the image information and finds the humanoid target; S3: the main control chip calculates the relative position coordinates of the picture frame where the humanoid is located according to the position of the area where the humanoid target is located, and transmits the coordinates to the pan-tilt control end; S4: the pan-tilt control end calculates the movement direction of the drive motor when it runs to the middle position according to the relative position coordinates of the picture frame where the target is located; S5: the drive motor controls the camera to collect the target until the humanoid target is located in the middle position of the picture frame. In the specific fact process, the camera is a collection device for the humanoid target, and the device connected to the camera and used to display the image information captured by the camera is the "picture frame". By constructing a coordinate system, each node of the humanoid target has a corresponding coordinate point in the coordinate system, thereby obtaining the relevant information of the humanoid target, and then using the drive motor of the pan-tilt control end to move, so that the humanoid target is located in the middle position of the picture frame.
[0026] In hexadecimal, the size of the picture frame is recorded as X=0~0xff; Y=0~0xFF, then the coordinates of the center point should be (0x80,0x80), assuming that the coordinates of the humanoid target are X, Y; then the coordinate difference between the humanoid target and the center point is: ▲X=0x80-X; ▲Y=0x80-Y. If ▲X>0, the target is biased to the left, otherwise it is biased to the right; if ▲Y>0, the target is biased to the top; otherwise it is biased to the bottom. PX and PY are used to control the running speed and direction of the gimbal drive motor. PX>0, the gimbal turns left; PY>0, the gimbal turns up. According to the PX and PY parameters, the running direction and speed of the gimbal are obtained. After the control of the gimbal, XY finally reaches the center point (0x80,0x80), and finally the target is centered in the frame.
[0027] In step S2, the recognition of the humanoid target includes face recognition and posture recognition; before performing image analysis, different recognition types need to be selected for humanoid target recognition according to usage requirements. In the specific implementation process, according to different usage scenarios, when only face tracking is required, relevant algorithms for face recognition can be used. If the entire body needs to be recognized, relevant posture recognition algorithms can be selected to make the recognition process more accurate and more precise. Of course, related recognition of other types of parts is also included, which all fall within the scope of protection of this application.
[0028] In actual use, when face tracking is selected, the face area is first cropped from the picture to locate the key points of the face, and face alignment is achieved by selecting the existing MTCNN algorithm. The MTCNN algorithm has a three-layer convolutional neural network. The first layer is the proposal network, the second layer is the refinement network, and the third layer is the output network. By using this network, face detection and key point positioning are completed. After positioning is completed, the relevant coordinate information can be effectively obtained; when posture recognition is selected, the existing Openpose human posture analysis tool can be selected to obtain each key node and positioning information, thereby obtaining relevant coordinate information.
[0029] In step S3, the following steps are specifically included: first, a coordinate system is established with the coordinates of the middle position of the picture frame as the origin and the size of the picture frame, and then the position information of the humanoid target is substituted into the coordinate system to obtain the edge coordinate information and center coordinate information of the humanoid target, and on the premise of ensuring that all the edge coordinate information falls into the coordinate system, the center coordinate information is transmitted to the gimbal control end.
[0030] In step S3, when determining the position of the humanoid target, first collect the coordinate change value of the humanoid target within a period of time, obtain the motion trend vector of the humanoid target based on the coordinate change value, and transmit the motion trend vector to the PTZ control terminal. In this implementation, for face recognition, the current position is predicted based on the position of the face at the previous moment, which mainly includes a prediction part and an update part. The prediction part can predict the position of the face recognition tracking frame at the next moment. In the prediction stage, the system state and error calculation formula at time k are respectively:
[0031]
[0032] in represents the prior state estimate, A represents the state transfer matrix, represents the posterior state estimate, B represents the control input matrix, u k represents the measurement noise, represents the prior estimated covariance, P k-k represents the posterior estimated covariance, and Q represents the process noise covariance.
[0033] The update part is to update the predicted position based on the result of face detection. In the update stage, the key point is the value of the ratio of the observed value to the predicted value, that is, the gain. The gain calculation formula is:
[0034]
[0035] The calculation formula for updating the system state and error covariance at time k is:
[0036]
[0037] Where K k represents the gain, H represents the state observation matrix, z k represents the actual observation, and R represents the measurement noise covariance.
[0038] For posture recognition, the OpenPose posture algorithm is used, which mainly detects and matches the joint points simultaneously through two network branches, including the confidence S 1 =ρ 1 (F) and affinity field That is, the position and direction set of the joint points, indicating the degree of association between the joint points. The calculation formula used is:
[0039]
[0040] Where t represents the stage in which we are.
[0041] In step S4, the gimbal controller calculates the offset, including the lateral offset, the longitudinal offset and the height offset, based on the center coordinate information, and calculates the movement direction and speed of the motor based on the movement trend vector and the size of the offset. In this embodiment, firstly, the movement trend and current position information of the current humanoid target can be effectively obtained through the above steps, so that when the motor moves, the movement trend of the humanoid target can be combined in real time to adjust the movement range, so that the humanoid target is located in the middle of the frame in the shortest time.
[0042] The present invention also discloses a tracking system for a humanoid target, the tracking system includes an identification module, a driving module and a computing module connected to each other, the identification module is used to identify the humanoid target and transmit the acquired information to the computing module, the computing module transmits the motion information to the driving module according to the position and motion trend of the humanoid target, the driving module moves according to the motion information to ensure that the humanoid target is located in the middle of the identification module. In this embodiment, by determining the motion trend of the humanoid target and combining the offset information between the humanoid target and the middle position of the picture frame, the humanoid target is quickly placed in the middle position of the picture frame.
[0043] The recognition module includes a face recognition unit and a posture recognition unit. The face recognition unit is used to recognize the face, and the posture recognition unit is used to recognize the whole body.
[0044] The calculation module includes a first calculation unit and a second calculation unit. The first calculation unit constructs a coordinate system with the middle of the picture frame as the origin, calculates the coordinate information of the humanoid target in the coordinate system, and calculates the offset; the second calculation unit calculates the motion trend vector according to the coordinate change value of the humanoid target in a short time, and obtains the motion information after combining the offset with the motion trend vector, and transmits the motion information to the driving module.
[0045] The driving module includes a lateral unit, a longitudinal unit and a height unit. After receiving the motion information, the driving module disassembles the motion information to obtain motion values in three directions, and transmits the corresponding motion values to the lateral unit, the longitudinal unit and the height unit, so that the entire motion process can be completed in the same time. In this embodiment, the motion information is split into motions in three directions, so that the motor can be used quickly for driving, combined with the motion trend of the humanoid target, so as to complete the overall motion in a short time.
[0046] When the driving unit moves, the recognition module collects information. When the human target is in the middle of the frame, it is fed back to the driving unit. When the driving unit receives the feedback information, it stops moving.
[0047] The above disclosures are only several specific embodiments of the present invention, but the present invention is not limited thereto, and any changes that can be conceived by those skilled in the art should fall within the protection scope of the present invention.
Claims
1. A method for tracking a humanoid target, characterized in that: The following steps are involved: S1: The camera collects video images and transmits the image information to the main control chip; S2: The main control chip analyzes the image information and finds the human-shaped target; S3: The main control chip calculates the relative position coordinates of the picture frame where the human figure is located according to the position of the area where the human figure is located, and transmits the coordinates to the PTZ control end; S4: The PTZ control end calculates the movement direction of the driving motor when it moves to the middle position according to the relative position coordinates of the frame where the target is located; S5: driving the motor to control the camera to collect the target until the human-shaped target is located in the middle of the picture frame.
2. The tracking method according to claim 1, characterized in that: In step S2, the recognition of the human-shaped target includes face recognition and posture recognition; before performing image analysis, different recognition types need to be selected for the human-shaped target recognition according to usage requirements.
3. The tracking method according to claim 1, characterized in that: In step S3, the following steps are specifically included: first, a coordinate system is established with the coordinates of the middle position of the picture frame as the origin and the size of the picture frame, and then the position information of the humanoid target is substituted into the coordinate system to obtain the edge coordinate information and center coordinate information of the humanoid target, and on the premise of ensuring that all the edge coordinate information falls into the coordinate system, the center coordinate information is transmitted to the gimbal control end.
4. The tracking method according to claim 1, characterized in that: In step S3, when determining the position of the humanoid target, firstly collect the coordinate change value of the humanoid target within a period of time, obtain the motion trend vector of the humanoid target according to the coordinate change value, and transmit the motion trend vector to the pan-tilt control terminal.
5. The tracking method according to claim 1, characterized in that: In step S4, the gimbal controller calculates the offset according to the center coordinate information, including the lateral offset, the longitudinal offset and the height offset, and calculates the movement direction and speed of the motor according to the movement trend vector and the size of the offset.
6. A humanoid target tracking system, characterized in that: The tracking system includes an interconnected recognition module, a driving module and a computing module. The recognition module is used to recognize a human-shaped target and transmit the acquired information to the computing module. The computing module transmits the motion information to the driving module according to the position and motion trend of the human-shaped target. The driving module moves according to the motion information to ensure that the human-shaped target is located in the middle position of the recognition module.
7. The tracking system according to claim 6, characterized in that The recognition module includes a face recognition unit and a posture recognition unit. The face recognition unit is used to recognize a face, and the posture recognition unit is used to recognize the entire body.
8. The tracking system according to claim 6, characterized in that The calculation module includes a first calculation unit and a second calculation unit, wherein the first calculation unit constructs a coordinate system with the middle of the picture frame as the origin, calculates the coordinate information of the humanoid target in the coordinate system, and calculates the offset; The second calculation unit calculates the motion trend vector according to the coordinate change value of the humanoid target in a short period of time, and obtains motion information after combining the offset with the motion trend vector, and transmits the motion information to the driving module.
9. The tracking system according to claim 6, characterized in that: The driving module includes a transverse unit, a longitudinal unit and a height unit. After receiving the motion information, the driving module disassembles the motion information to obtain motion values in three directions, and transmits the corresponding motion values to the transverse unit, the longitudinal unit and the height unit, so that the entire motion process can be completed in the same time.
10. The tracking system according to claim 6, characterized in that: When the driving unit moves, the recognition module collects information. When the human-shaped target is located in the middle of the picture frame, the information is fed back to the driving unit. When the driving unit receives the feedback information, it stops moving.
