CPC G06T 7/20 (2013.01) [G06T 7/11 (2017.01); G06T 7/50 (2017.01); G06T 2207/30241 (2013.01)] | 20 Claims |
1. A focus following method based on a motion gravity center, comprising the following steps:
S1, acquiring video data captured by a camera within an initial time period;
S2, acquiring video data with only a living object within the initial time period;
S3, acquiring a motion gravity center image from the video data with only the living object according to a motion gravity center library;
S4, calculating an initial motion direction and an initial motion speed of the motion gravity center image within the initial time period;
S5, calculating a motion trajectory of the living object according to data in S4; and
S6, calculating a corresponding function relationship between the motion trajectory of the living object and a focus following, wherein
S3 comprises the following substeps:
S31, establishing the motion gravity center library;
S32, acquiring original data about the living object leaving a ground and only being stressed, wherein the original data has video data and image data;
S33, acquiring a reference video image with only the living object from the original data;
S34, acquiring a relative speed of a local body of the living object at a first moment from the reference video image;
S35, fitting the relative speed of the local body at the first moment in a horizontal direction, and calculating an average speed of the living object in the horizontal direction;
S36, acquiring a two-dimensional image block same as the average speed from the reference video image, wherein coordinates where the two-dimensional image block is located are coordinates of the motion gravity center image; and
S37, storing the two-dimensional image block into the motion gravity center library.
|