Intelligent shooting method for micro-class tracking
Technical Field
The invention relates to the field, in particular to an intelligent shooting method for micro-class tracking.
Background
The micro lesson is a teaching process which takes video as a main carrier to record the whole teaching process of a teacher around a single or a plurality of knowledge points in the teaching process. The video quality of shooting seems very important, and the little class main part is the mr, so mainly lie in the tracking shooting to the mr, at present divide into several regions at little class shooting in-process podium, every region sets for a fixed shooting point with shooting camera, and then switch over the shooting point in this region when the mr gets into certain region, but this mode has the limitation because the shooting point has been fixed, when different height fat slim mr teach, the personage can not shoot in the middle of in the picture, influences the teaching.
In order to effectively reduce the garbage pictures and perfectly present the core composition content of the whole micro-class which is the class example segment of the class teaching video, the invention provides an intelligent shooting method for micro-class tracking.
Disclosure of Invention
The invention aims to solve the technical problems of non-centered shooting and poor usability in the prior art. The intelligent shooting method for micro class tracking has the characteristics of convenience and accuracy in shooting centering and capability of enabling a target to be centered in a plane all the time without depending on characteristic changes of target detection points.
In order to solve the technical problems, the technical scheme is as follows:
a smart photographing method for micro-class tracking, the smart photographing method for micro-class tracking comprising:
step 1, defining the corresponding relation between the edge of an area to be analyzed and detected and shooting positioning, and simultaneously defining a two-dimensional space coordinate system as a Z system coordinate;
step 2, converting the amplification values of four points of the coordinate of the Z system into corresponding amplification values by utilizing the conversion from the three-dimensional space to the two-dimensional space coordinate system, and calculating the Z coordinate of the detection point as an amplification instruction of the shooting camera according to the quadrilateral similarity principle;
step 3, using the multi-point positioning of the plane of the analysis and detection area, using the image analysis to detect the moving target point, calculating the mapping between the detection point and the actual absolute coordinate xy, and calculating the positioning instruction of the shooting camera;
and 4, the shooting camera works according to the positioning instruction and the amplification instruction in the step 2 and the step 3, and shooting is centered.
The working principle of the invention is as follows: the invention firstly defines a corresponding relation between the edge of an analysis detection area and shooting positioning. And converting the amplification values of four points in the Z system coordinate into corresponding amplification values to obtain the Z coordinate of the detection point according to a quadrilateral similarity principle by using the conversion from the three-dimensional space to the two-dimensional space coordinate system and the change of the amplification values of the four points in the Z system coordinate closer to the origin to form the change of a linear relation. According to the multi-point positioning of the plane of the detection area, a moving reasonable target point is detected by utilizing image analysis, as long as the detection point belongs to the point of the plane area, the mapping relation of a mathematical model formed at multiple points can accurately calculate the mapping between the detection point and an actual absolute coordinate xy at any time according to a proportional formula, so that the picture is centered.
In the above scheme, for optimization, further, the shooting positioning in step 1 is completed by 4 positioning cameras, and the 4 positioning cameras are respectively arranged at point a, point B, point C, and point D;
in the Z coordinate system, the A point is (X1, Y1), the B point is (X2, Y2), the C point is (X3, Y3) and the D point is (X4, Y4).
Further, step 2 comprises:
step A1, setting the center of the picture of the shooting camera at the position of each positioning camera, and calculating the corresponding amplification value;
step A2, defining the coordinates of the tracking point as SourceX and SourceY, and when the positioning camera detects the coordinates of the tracking point, calculating the transverse proportion SSX = SourceX/MaxX and the longitudinal proportion SSY = SourceY/MaxY;
step A3, calculating the magnification value of the target point according to the magnification value in step a1 as:
CZ=(Q-P)*SSY+P,P=(B-A)*SSX+A,Q=(D-C)*SSX+C;
CZ=((D-C)*SSX+C-((B-A)*SSX+A))*SSY+(B-A)*SSX+A
and finally calculating a zoom-in command CZ of the shooting camera as follows:
CZ=((Z4-Z3)*SSX+Z3-((Z2-Z1)*SSX+Z1))*SSY+(Z2-Z1)*SSX+Z1。
further, the step a1 includes:
setting the position A point (X1, Y1) of the A positioning camera, setting the center of the picture of the shooting camera at the point A (X1, Y1), and calculating an amplification value Z1;
setting the position B point (X2, Y2) of the B positioning camera, setting the center of the picture of the shooting camera at the point B (X2, Y2), and calculating an amplification value Z2;
setting the C point (X3, Y3) of the position of the C positioning camera, setting the center of the picture of the shooting camera at the C point (X3, Y3), and calculating an amplification value Z3;
the position D of the D-position camera is set (X4, Y4), the center of the shot camera screen is set at the point D (X4, Y4), and the zoom value Z4 is calculated.
Further, step 3 comprises:
step B1, based on the four A, B, C, D points in step 1, calculates:
PX=(X2-X1)*SSX+X1,PY=(Y2-Y1)*SSY+Y1,QX=(X4-X3)*SSX+X3,QY=(Y4-Y3)*SSY+Y3;
calculating a positioning command (CX, CY) of the shooting camera:
CX=(X4-X3-X2+X1)*SSX*SSX+(X3+X2-2*X1)*SSX+X1;
CY=(Y4-Y3-Y2+Y1)*SSY*SSY+(Y3+Y2-2*Y1)*SSY+Y1。
the invention has the beneficial effects that: the invention utilizes the mathematical model to establish the mapping change from the geometrically used three-dimensional space to the two-dimensional plane, can quickly calculate the conversion of the physical coordinate by positioning the coordinate, is very convenient and accurate, does not depend on the characteristic change of the target detection point to ensure that the target is always centered in the plane, and is very suitable for shooting the dynamically changed scene in a micro-course.
Drawings
The invention is further illustrated with reference to the following figures and examples.
Fig. 1, a positioning camera setup schematic.
Fig. 2, a schematic diagram of a calculation scale.
Fig. 3 is a schematic diagram of an enlarged value calculation.
Fig. 4 is a schematic diagram of the calculation of the positioning coordinates.
Fig. 5 is a schematic flow chart of an intelligent shooting method for micro-class tracking.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail with reference to the following embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Example 1
The present embodiment provides a smart shooting method for micro-class tracking, as shown in fig. 5, the smart shooting method for micro-class tracking includes:
step 1, defining the corresponding relation between the edge of an area to be analyzed and detected and shooting positioning, and simultaneously defining a two-dimensional space coordinate system as a Z system coordinate;
step 2, converting the amplification values of four points of the coordinate of the Z system into corresponding amplification values by utilizing the conversion from the three-dimensional space to the two-dimensional space coordinate system, and calculating the Z coordinate of the detection point as an amplification instruction of the shooting camera according to the quadrilateral similarity principle;
step 3, using the multi-point positioning of the plane of the analysis and detection area, using the image analysis to detect the moving target point, calculating the mapping between the detection point and the actual absolute coordinate xy, and calculating the positioning instruction of the shooting camera;
and 4, the shooting camera works according to the positioning instruction and the amplification instruction in the step 2 and the step 3, and shooting is centered.
Specifically, as shown in fig. 2, the shooting positioning in step 1 is completed by 4 positioning cameras, and the 4 positioning cameras are respectively arranged at a point a, a point B, a point C, and a point D;
in the Z coordinate system, the A point is (X1, Y1), the B point is (X2, Y2), the C point is (X3, Y3) and the D point is (X4, Y4).
Specifically, step 2 comprises:
step A1, setting the center of the picture of the shooting camera at the position of each positioning camera, and calculating the corresponding amplification value;
step A2, defining the coordinates of the tracking point as SourceX and SourceY, and when the positioning camera detects the coordinates of the tracking point, calculating the transverse proportion SSX = SourceX/MaxX and the longitudinal proportion SSY = SourceY/MaxY;
step A3, calculating the magnification value of the target point according to the magnification value in step a1 as:
CZ=(Q-P)*SSY+P,P=(B-A)*SSX+A,Q=(D-C)*SSX+C;
CZ=((D-C)*SSX+C-((B-A)*SSX+A))*SSY+(B-A)*SSX+A
as shown in fig. 3, the zoom-in command CZ for the shooting camera is finally calculated as:
CZ=((Z4-Z3)*SSX+Z3-((Z2-Z1)*SSX+Z1))*SSY+(Z2-Z1)*SSX+Z1。
specifically, the step a1 includes:
setting the position A point (X1, Y1) of the A positioning camera, setting the center of the picture of the shooting camera at the point A (X1, Y1), and calculating an amplification value Z1;
setting the position B point (X2, Y2) of the B positioning camera, setting the center of the picture of the shooting camera at the point B (X2, Y2), and calculating an amplification value Z2;
setting the C point (X3, Y3) of the position of the C positioning camera, setting the center of the picture of the shooting camera at the C point (X3, Y3), and calculating an amplification value Z3;
the position D of the D-position camera is set (X4, Y4), the center of the shot camera screen is set at the point D (X4, Y4), and the zoom value Z4 is calculated.
Specifically, step 3 includes:
step B1, based on the four A, B, C, D points in step 1, calculates:
PX=(X2-X1)*SSX+X1,PY=(Y2-Y1)*SSY+Y1,QX=(X4-X3)*SSX+X3,QY=(Y4-Y3)*SSY+Y3;
as shown in fig. 4, the positioning command (CX, CY) of the photographing camera is calculated:
CX=(X4-X3-X2+X1)*SSX*SSX+(X3+X2-2*X1)*SSX+X1;
CY=(Y4-Y3-Y2+Y1)*SSY*SSY+(Y3+Y2-2*Y1)*SSY+Y1。
the embodiment utilizes the mathematical model to establish the mapping change from the geometric three-dimensional space to the two-dimensional plane, can quickly calculate the conversion of the physical coordinate through the positioning coordinate, is very convenient and accurate, does not depend on the characteristic change of the target detection point to enable the target to be centered in the plane all the time, and is very suitable for shooting a dynamically-changed scene in a micro-class.
Although the illustrative embodiments of the present invention have been described above to enable those skilled in the art to understand the present invention, the present invention is not limited to the scope of the embodiments, and it is apparent to those skilled in the art that all the inventive concepts using the present invention are protected as long as they can be changed within the spirit and scope of the present invention as defined and defined by the appended claims.