Search

CN-122027902-A - Camera automatic tracking method and device based on machine vision

CN122027902ACN 122027902 ACN122027902 ACN 122027902ACN-122027902-A

Abstract

The invention relates to the technical field of machine vision and intelligent monitoring, and discloses a camera automatic tracking method and device based on machine vision, wherein the method comprises the steps of acquiring a real-time video frame sequence and preprocessing to obtain an initial image set; the method comprises the steps of identifying characteristics of an initial image set, merging data to generate behavior change trend data when abnormal states are judged, predicting smooth tracks based on the data, calculating deviation according to camera positions to obtain a parameter adjustment data set, adjusting camera parameters according to the generated instructions, detecting shielding and merging track data to obtain real-time tracking parameters, applying the parameters and complementing missing frame verification, updating flow re-extraction characteristics, and analyzing time sequence when abnormal states to obtain a final tracking logic sequence. The method can achieve accurate target locking and improve stability and accuracy of abnormal emotion tracking in a crowded environment.

Inventors

  • PAN PENGCHENG
  • HU PING

Assignees

  • 深圳市互通创新科技有限公司

Dates

Publication Date
20260512
Application Date
20260416

Claims (8)

  1. 1. The camera automatic tracking method based on machine vision is characterized by comprising the following steps of: Acquiring a real-time video frame sequence, and performing image preprocessing to obtain an initial image set containing target object characteristics; performing feature recognition on the initial image set, extracting expression features and gesture features of a target object, analyzing a state, and performing data fusion on the initial image set to generate behavior change trend data if the state is judged to be a preset abnormal state; Track prediction and smoothing are carried out based on the behavior change trend data, track data are determined, track deviation is calculated by combining with current position parameters of a camera, and a camera parameter adjustment data set is obtained; generating a control instruction according to the camera parameter adjustment data set, adjusting the working parameters of the camera, and simultaneously carrying out shielding detection on the real-time video frame sequence to obtain shielding data, and fusing the track data to obtain real-time tracking parameters; Applying the real-time tracking parameters to the processing cycle of the real-time video frame sequence, and if the frame data loss caused by shielding is detected, filling the missing frame data by adopting linear interpolation and carrying out data consistency check to obtain continuous tracking data; And updating the processing flow of the real-time video frame sequence based on the continuous tracking data, re-extracting the characteristics of the target object and updating the state, and if the target object is still in the preset abnormal state, generating new behavior change trend data and performing time sequence analysis to obtain a final tracking logic sequence.
  2. 2. The automatic tracking method of camera based on machine vision according to claim 1, wherein the acquiring the real-time video frame sequence, performing image preprocessing to obtain an initial image set including the features of the target object, comprises: Acquiring a real-time video frame sequence acquired by a camera; Acquiring image data of a target person from the real-time video frame sequence, and separating out first image data containing characteristics of the target object through face detection and human body contour segmentation; Removing background noise from the first image data through median filtering to generate second image data; enhancing image contrast by histogram equalization for the second image data, generating third image data; And extracting facial expression characteristics and limb posture characteristics from the third image data through key point detection, and generating an initial facial image and an initial limb image to form an initial image set.
  3. 3. The automatic camera tracking method based on machine vision according to claim 1, wherein the performing feature recognition on the initial image set, extracting expression features and gesture features of a target object, and analyzing a state, and if the state is determined to be a preset abnormal state, performing data fusion on the initial image set to generate behavior change trend data, includes: extracting facial expression characteristics of an initial facial image in the initial image set by adopting a convolutional neural network, analyzing eyebrow lifting amplitude and eye squinting frequency, and generating expression characteristic data; aiming at the expression characteristic data, if the eyebrow lifting amplitude is larger than a preset amplitude threshold or the eye squinting frequency exceeds a preset frequency threshold, judging that the eye squinting frequency is in a preset abnormal state, and generating an abnormal emotion label; according to the abnormal emotion labels, extracting a human body gesture key point sequence from the initial limb images in the initial image set through key point detection, calculating displacement vectors among key points, and generating displacement vector data; and combining the displacement vector data with the expression characteristic data, and adopting weighted fusion to generate behavior change trend data.
  4. 4. The automatic tracking method of camera based on machine vision according to claim 3, wherein the performing track prediction and smoothing based on the behavior change trend data, determining track data, calculating track deviation in combination with current position parameters of the camera, and obtaining a camera parameter adjustment data set includes: acquiring current position parameters of a camera; Extracting dynamic characteristics from the behavior change trend data by adopting a convolutional neural network, and carrying out track prediction by combining the abnormal emotion labels to obtain a moving track of a target object; carrying out smoothing treatment on the moving track through a Bezier curve algorithm to determine track data; Calculating the deviation between the track data and the current position parameter of the camera, and if the deviation exceeds a preset deviation threshold, obtaining the track deviation by calculating the Euclidean distance to generate correction data; And according to the correction data, calculating adjustment values of the camera translation parameter and the scaling parameter by adopting linear interpolation, and generating a camera parameter adjustment data set.
  5. 5. The automatic tracking method of camera based on machine vision according to claim 4, wherein the generating a control instruction according to the camera parameter adjustment dataset, adjusting a camera working parameter, performing occlusion detection on the real-time video frame sequence after parameter adjustment to obtain occlusion data, fusing the track data, and obtaining real-time tracking parameters includes: generating a control instruction conforming to a camera control protocol according to the camera parameter adjustment data set, and driving the camera to adjust a shooting angle and a focal length; extracting the characteristics of an occlusion region from the real-time video frame sequence acquired by the adjusted camera through pixel density comparison, and generating occlusion detection data; If the shielding detection data exceeds a preset shielding threshold value, fusing the track data and the shielding detection data through a linear interpolation method to generate a first tracking parameter; And adjusting the weight of the first tracking parameter through weighted average according to the first tracking parameter and the abnormal emotion label to obtain a real-time tracking parameter.
  6. 6. The automatic tracking method of camera based on machine vision according to claim 1, wherein the applying the real-time tracking parameter to the processing cycle of the real-time video frame sequence, if a frame data loss caused by occlusion is detected, fills the missing frame data by linear interpolation and performs data consistency check to obtain continuous tracking data, includes: The real-time tracking parameters are applied to the processing cycle of the real-time video frame sequence, the shooting angle is adjusted through a camera control unit, and an optimized video frame sequence is generated; Detecting the frame integrity of the optimized video frame sequence, and judging whether a missing frame caused by shielding exists or not; if the missing frame exists, determining position coordinates and morphological characteristics of a target object in an effective frame before and after the missing frame based on the track data, calculating key characteristic parameters of the target object in the missing frame by adopting linear interpolation, and filling the missing frame data to obtain a filled video frame sequence; Performing data consistency check on the filled video frame sequence, and calculating the position deviation and the variation amplitude of morphological characteristics of the target objects between adjacent frames; And if the variation amplitude of the position deviation and the morphological feature exceeds a preset continuity threshold, optimizing the key feature parameter again based on the track data until the preset continuity threshold is met, and generating continuous tracking data.
  7. 7. The automatic tracking method of camera based on machine vision according to claim 1, wherein the updating the processing flow of the real-time video frame sequence based on the continuous tracking data, re-extracting the characteristics of the target object and updating the state, if the target object is still in the preset abnormal state, generating new behavior change trend data and performing time sequence analysis to obtain a final tracking logic sequence comprises: updating the processing flow of the real-time video frame sequence based on the continuous tracking data, and re-extracting updated expression features and gesture features from the real-time video frame sequence; Judging whether the updated state of the target object belongs to a preset abnormal state according to the updated expression features and gesture features, and generating new behavior change trend data if the updated state is still the preset abnormal state; And carrying out time sequence analysis on the new behavior change trend data to generate abnormal emotion tracking logic, and obtaining a final tracking logic sequence.
  8. 8. Machine vision-based camera automatic tracking device, characterized by comprising: the data acquisition module acquires a real-time video frame sequence, performs image preprocessing, and obtains an initial image set containing target object characteristics; The feature analysis module is used for carrying out feature recognition on the initial image set, extracting expression features and gesture features of a target object, analyzing states, and carrying out data fusion on the initial image set to generate behavior change trend data if the states are judged to be preset abnormal states; The track prediction module is used for carrying out track prediction and smoothing processing based on the behavior change trend data, determining track data, and calculating track deviation by combining with the current position parameters of the camera to obtain a camera parameter adjustment data set; The control tracking module is used for generating a control instruction according to the camera parameter adjustment data set, adjusting the camera working parameters, simultaneously carrying out shielding detection on the real-time video frame sequence to obtain shielding data, and fusing the track data to obtain real-time tracking parameters; The frame loss compensation module is used for applying the real-time tracking parameters to the processing cycle of the real-time video frame sequence, and if the frame data loss caused by shielding is detected, filling the missing frame data by adopting linear interpolation and carrying out data consistency verification to obtain continuous tracking data; And the logic output module is used for updating the processing flow of the real-time video frame sequence based on the continuous tracking data, re-extracting the characteristics of the target object and updating the state, and generating new behavior change trend data and performing time sequence analysis if the target object is still in a preset abnormal state to obtain a final tracking logic sequence.

Description

Camera automatic tracking method and device based on machine vision Technical Field The invention relates to the technical field of machine vision and intelligent monitoring, in particular to a camera automatic tracking method and device based on machine vision. Background Currently, in the fields of intelligent monitoring and man-machine interaction, an automatic tracking technology based on machine vision is very important due to wide application of the automatic tracking technology in safety monitoring, motion analysis and intelligent equipment. The technology captures and tracks the moving track of the target person in real time through the camera, provides possibility for accurate positioning in a dynamic scene, can assist in realizing core requirements such as safety control and service optimization especially in crowded public places such as markets and stations, and is an important development direction in the current vision detection application field. In the prior art, an automatic tracking method generally relies on static features (such as appearance and outline) or a single motion track of a target to perform tracking. For example, some systems determine the tracking object by identifying the clothing color and body shape profile of the target person, and then calculate the predicted movement path according to the simple displacement, and other techniques acquire the target movement direction by comparing the pixels between successive frames, and then adjust the camera parameters. However, the method has obvious limitations in complex dynamic scenes, namely, the prior art is difficult to effectively separate the target from the background information and easily generate tracking interruption in the face of background noise interference and frequent shielding between the targets in a crowded environment, and neglects the influence of the emotional state of the target on the behavior, and when the target generates sudden actions due to emotional changes (such as tension and panic), the system cannot timely adjust the tracking strategy, so that track prediction deviation, tracking lag and even target off are caused. In the prior art, due to the lack of a dynamic association mechanism of emotion-behavior-tracking parameters, single occlusion processing strategy and insufficient flexibility of camera parameter adjustment, the stability and the accuracy of an automatic tracking technology in a crowded environment are difficult to meet the demands. Therefore, the prior art has the problem that accurate targeting and continuous following are difficult to achieve. Disclosure of Invention The invention provides a camera automatic tracking method and device based on machine vision, which are used for solving the problem that accurate target locking and continuous following are difficult to realize in the prior art. In order to solve the above technical problems, the present invention provides an automatic camera tracking method based on machine vision, including: Acquiring a real-time video frame sequence, and performing image preprocessing to obtain an initial image set containing target object characteristics; performing feature recognition on the initial image set, extracting expression features and gesture features of a target object, analyzing a state, and performing data fusion on the initial image set to generate behavior change trend data if the state is judged to be a preset abnormal state; Track prediction and smoothing are carried out based on the behavior change trend data, track data are determined, track deviation is calculated by combining with current position parameters of a camera, and a camera parameter adjustment data set is obtained; generating a control instruction according to the camera parameter adjustment data set, adjusting the working parameters of the camera, and simultaneously carrying out shielding detection on the real-time video frame sequence to obtain shielding data, and fusing the track data to obtain real-time tracking parameters; Applying the real-time tracking parameters to the processing cycle of the real-time video frame sequence, and if the frame data loss caused by shielding is detected, filling the missing frame data by adopting linear interpolation and carrying out data consistency check to obtain continuous tracking data; And updating the processing flow of the real-time video frame sequence based on the continuous tracking data, re-extracting the characteristics of the target object and updating the state, and if the target object is still in the preset abnormal state, generating new behavior change trend data and performing time sequence analysis to obtain a final tracking logic sequence. In an alternative embodiment, the acquiring the real-time video frame sequence, performing image preprocessing to obtain an initial image set containing the characteristics of the target object, includes: Acquiring a real-time video frame sequence acquired by a camera; Acqu