CN103780837B - A kind of motion detection and the method and its device of positioning shooting - Google Patents
A kind of motion detection and the method and its device of positioning shooting Download PDFInfo
- Publication number
- CN103780837B CN103780837B CN201410001630.0A CN201410001630A CN103780837B CN 103780837 B CN103780837 B CN 103780837B CN 201410001630 A CN201410001630 A CN 201410001630A CN 103780837 B CN103780837 B CN 103780837B
- Authority
- CN
- China
- Prior art keywords
- camera
- movable body
- video camera
- length
- matrix
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Landscapes
- Studio Devices (AREA)
Abstract
The invention discloses a kind of motion detection and the method and its device of positioning shooting, belong to field of video monitoring.This method includes:Camera model is obtained according to the Intrinsic Matrix of video camera and outer parameter matrix;Number of pixels threshold value when the default height of acquisition movable body motion or length in the picture;Whether default height or length are moved to according to the number of pixels value of present image and number of pixels threshold decision movable body;When judging that movable body moves to default height or length, video camera rotational angle and scaling focal length are adjusted to control movable body at the center of image plane.Using the embodiment of the present invention, join matrix outside camera internal reference by constructing, whether adaptive judgement movable body moves to default height or length, angle and the scaling focal length that video camera rotates then is controlled to control movable body at the center of the plane of delineation, so that locating and tracking shoots movable body.
Description
Technical field
The present invention relates to technical field of video monitoring, more particularly to a kind of motion detection and the method and its dress of positioning shooting
Put.
Background technology
IT application in education sector is increasingly paid attention to by responsible educational institution, and wherein intelligent teaching recording and broadcasting system is educational information
The important component of change.According to the requirement of national " platform of threeway two " construction, needed in intelligent teaching recording and broadcasting system to teaching
The interactive teaching and learning behavior of process middle school student carries out video monitoring, and particularly when student makes a speech, recording and broadcasting system needs to carry out it
Video amplifier and video recording, will be related to classroom scene middle school student stand up action judgement and the problem of Camera Positioning.
Traditional classroom scene middle school student stand up action judgement and Camera Positioning method mainly using ultrasonic wave track
Localization method, infrared knitmesh method for tracking and positioning, infrared transmission module method for tracking and positioning etc..Ultrasonic wave method for tracking and positioning is adopted
Being blocked and positioned with ultrasonic wave, multiple ultrasonic waves easily occur frame losing phenomenon in critical localisation, and to needing according to
The height of raw height needs to carry out software set, and troublesome in poeration, shooting picture is unsightly.Infrared knitmesh method for tracking and positioning due to
Infrared birth defects, for example, easily by illumination effect, and transmitting receives bar and needed embedded in classroom surrounding within the walls, installation is safeguarded
Trouble, the difference in height after lecture theater and Irregular Classrooms stand up because of student such as can not use greatly very much at a series of shortcomings.It is and infrared
Transmitter module method for tracking and positioning, it is infrared that big, and student is disturbed by strong light using filling infrared transmission module on microphone
Necessary hand-hold wireless microphone, does not realize normalization teaching.
By extensive literature survey, other correlation techniques of same domain, such as based on pattern-recognition control method(It is open
Number:103327250A, publication date:2013-09-25)[1], collection student's panoramic picture inputs to monitor in real time first, then
Detection spokesman stand up action and position;Then camera rotates relative position and calculates camera focal length;Finally rotate shooting
Head simultaneously adjusts camera focal length so that camera alignment spokesman carries out feature shooting.The patent being capable of automatic detection spokesman
Student, which stands up, to be acted and allows camera to be automatically positioned alignment spokesman, but this method has full classroom scene and uses same threshold value
(The threshold value needs to be manually set according to actual conditions, and the fact that do not account for the threshold value difference at the diverse location of classroom)To sentence
Disconnected detection spokesman student stand up action the problem of, and follow-up camera rotate control whether it is accurate(Specific water is not provided
The computational methods of flat rotational angle and vertical rotational angle, and focal length f calculating is also required to dependence and is manually entered parameter)There is also
Problem.
The content of the invention
In view of this, the technical problem to be solved in the present invention is to provide a kind of motion detection and positioning shooting method and its
Device, whether default height or length are moved to adaptive judgement movable body, then control adjustment video camera rotates
Angle and scaling focal length, so as to be accurately positioned track up movable body.
Technical scheme is as follows used by the present invention solves above-mentioned technical problem:
According to an aspect of the present invention, there is provided a kind of motion detection and positioning shooting method, including:
Camera model is obtained according to the Intrinsic Matrix of video camera and outer parameter matrix;
Number of pixels threshold value when the default height of acquisition movable body motion or length in the picture;
Whether default height is moved to according to the number of pixels value of present image and number of pixels threshold decision movable body
Or length;
When judging that movable body performs predetermined movement, video camera rotational angle and scaling focal length are adjusted to control movable body to exist
The center of the plane of delineation.
Preferably, camera model is obtained to further comprise:
Camera intrinsic parameter matrix is calculated by the inner parameter of video camera;
By establishing the relation between world coordinate system and camera coordinate system, with reference to the outer parameter of video camera, construct
The outer parameter matrix of video camera;
Camera model Intrinsic Matrix and outer parameter matrix being bonded under world coordinate system.
Preferably, the outer parameter matrix that video camera is calculated by establishing world coordinate system further comprises:
It is world coordinate system to establish the vertical horizontal right-handed coordinate system downwards of Z axis, make spatial point world coordinate system with
Homogeneous coordinates in camera coordinate system are respectively X=(x, y, z, 1) and XC=(xc,yc,zc, 1), then relationship below be present:
Wherein,The inhomogeneous coordinate for being camera center in world coordinate system, R are that the pan and tilt of video camera join
Array into video camera spin matrix, for the arbitrary of video camera(pan,tilt), there is a corresponding spin matrix R
(pan,tilt).
Preferably, internal reference matrix and outer ginseng matrix are bonded camera model and further comprised:
The parameter matrix P of video camera under world coordinate system is:
Wherein, K represents the internal reference matrix of video camera, and R is the rotation for the video camera that the pan and tilt parameters of video camera form
Matrix,The inhomogeneous coordinate for being camera center in world coordinate system, I are 3 × 3 unit matrix.
Preferably, number of pixels threshold value when movable body moves default height or length in the picture is obtained further to wrap
Include:
In the image point coordinates of the plane of delineation during acquisition movable body original state, and input camera model and obtain initial shape
Space coordinates during state;
Input motion body moves to the space coordinates of default height or length in camera model, obtains the plane of delineation
Image point coordinates when moving to default height or length of upper prediction;
According to image coordinate during movable body original state on the plane of delineation and move to default height or length yes
Image coordinate, obtain the number of pixels threshold value on the plane of delineation.
Preferably, whether moved to according to the number of pixels value of present image and number of pixels threshold decision movable body default
Height or length further comprise:
Obtain image pixel number when vertically movable height or horizontal movement length;
If image pixel number when vertically movable height or horizontal movement length is more than number of pixels threshold value, sentence
Determine movable body and perform default motion.
Preferably, adjust video camera rotational angle and scaling focal length further comprises:
Calculate the relative rotation angle delta pan of video camera in the horizontal plane:
And
Calculate relative rotation angle of the video camera on vertical plane:
And
Calculate focal length of camera f':
And tilt'=tilt+ Δs tilt
Rotation and the focal length of adjustment video camera are controlled according to result of calculation;
Wherein, its inhomogeneous coordinate of top on the image plane is when movable body moves(u2,v2), image center
Inhomogeneous coordinate is(u0,v0), the current focus of video camera is f, and the vertical distance of camera center from the ground is H, and video camera is worked as
Preceding inclination angle is tilt, and the width and height of CCD actual physical sizes are ccdx and ccdy, and the length and width of output video image is
Imgx and imgy;
Δpan>0 expression camera intrinsic world coordinate system Z axis rotate counterclockwise | Δ pan | angle, Δ pan<0, table
Show that the Z axis of camera intrinsic world coordinate system rotates clockwise | Δ pan | angle;
Δtilt>0 expression camera intrinsic camera coordinate system X-axis rotate counterclockwise | Δ tilt | angle, Δ tilt<
0, represent camera intrinsic camera coordinate system X-axis rotate clockwise | Δ tilt | angle.
According to another aspect of the present invention, there is provided a kind of motion detection and positioning shooting device include:
Camera model acquisition module, camera model is obtained according to the Intrinsic Matrix of video camera and outer parameter matrix;
Number of pixels threshold value acquisition module, obtain pixel in the picture when movable body moves default height or length
Number threshold value;
Motion detection block, whether moved according to the number of pixels value of present image and number of pixels threshold decision movable body
To default height or length;
Camera control module, for when judging that movable body performs predetermined movement, adjusting video camera rotational angle and contracting
It is put-focus away to control movable body at the center of the plane of delineation.
Preferably, camera model acquisition module further comprises:
Intrinsic Matrix acquiring unit, for calculating camera intrinsic parameter matrix by the inner parameter of video camera;
Outer parameter matrix acquiring unit, for by establishing the relation between world coordinate system and camera coordinate system, tying
The outer parameter of video camera is closed, constructs the outer parameter matrix of video camera;
World coordinate system matrix acquiring unit, for Intrinsic Matrix and outer parameter matrix to be bonded into world coordinate system
Under camera model;
Preferably, number of pixels threshold value acquisition module further comprises:
Original state coordinate acquiring unit, in the image point coordinates of the plane of delineation during for obtaining movable body original state,
And input camera model and obtain original state time space coordinate;
Coordinates of motion acquiring unit, in camera model input motion body move to default height or length
Space coordinates, image point coordinates when obtain predicting on the plane of delineation moves to default height or length;
Number of pixels threshold value acquiring unit, for according to image coordinate during movable body original state on the plane of delineation and fortune
Image coordinate when default height or length is moved, obtains the number of pixels threshold value on the plane of delineation.
The method and apparatus of the embodiment of the present invention, join matrix outside camera internal reference by constructing, adaptive judgement movable body is
Angle and scaling focal length no to move to default height or length, that then control adjustment video camera rotates, so that movable body
The center of the plane of delineation is appeared in, so as to be accurately positioned track up movable body.
The method of the invention and device are suitable for intelligent teaching recording and broadcasting system and recorded broadcast of session system, in classroom not
Either when the spokesman of meeting room diverse location is standing up or sat down, the present apparatus can adaptively be sentenced student with position
It is disconnected, omnirange rotation and zoom are carried out according to the position auto-adjustment control video camera of student or spokesman, realized to student
Or spokesman is accurately positioned.
Brief description of the drawings
Fig. 1 is the method flow diagram of a kind of motion detection provided in an embodiment of the present invention and positioning shooting.
Fig. 2 is a kind of method flow diagram for acquisition camera model that the preferred embodiment of the present invention provides.
Fig. 3 is a kind of method flow diagram for acquisition number of pixels threshold value that the preferred embodiment of the present invention provides.
Fig. 4 is a kind of method flow diagram for Camera Positioning that the preferred embodiment of the present invention provides.
Fig. 5 is that the preferred embodiment of the present invention applies in intelligent tutoring recording and broadcasting system track up to stand up the method stream of student
Cheng Tu.
Fig. 6 is the function structure chart of a kind of motion detection that the preferred embodiment of the present invention provides and positioning filming apparatus.
Embodiment
In order that technical problems, technical solutions and advantages to be solved are clearer, clear, tie below
Drawings and examples are closed, the present invention will be described in further detail.It should be appreciated that specific embodiment described herein is only
To explain the present invention, it is not intended to limit the present invention.
Embodiment one
Referring to Fig. 1, the embodiment of the present invention provides a kind of motion detection and the method for positioning shooting comprises the following steps:
S102, camera model obtained according to the Intrinsic Matrix of video camera and outer parameter matrix.
S104, obtain number of pixels threshold value in the picture when movable body moves to default height or length.
Specifically, default height or length are relevant with practical application scene, such as, in intelligent teaching recorded broadcast system
Height is relevant when system, height when default height or length are sat down with student and standing, in recorded broadcast of session system, with speech
Height when people sits down is relevant with height during standing, can be directed to the different bodies of spokesman at classroom or meeting room diverse location
Height carries out setting different default height.
It is S106, default according to whether the number of pixels value and number of pixels threshold decision movable body of present image move to
Height or length.
Specifically, image pixel number when vertically movable height or horizontal movement length is obtained;It is if described perpendicular
Image pixel number when straight moving height or horizontal movement length is more than number of pixels threshold value, then it is pre- to judge that movable body performs
If motion, otherwise judge that movable body is not carried out default motion state.
S108, when judge movable body perform predetermined movement when, adjust video camera rotational angle and scaling focal length with control fortune
Kinetoplast is at the center of the plane of delineation.
The method of the embodiment of the present invention, join matrix outside video camera internal reference by constructing, whether adaptive judgement movable body is transported
Default height or length are moved, the angle and scaling focal length that then control adjustment video camera rotates, to cause movable body to go out
The center of the present plane of delineation, so as to be accurately positioned track up movable body.
Embodiment two
Referring to Fig. 2, a kind of method for acquisition camera model that the preferred embodiment of the present invention provides comprises the following steps:
S1022, camera intrinsic parameter matrix calculated by the inner parameter of video camera;
Specifically, the correspondence between the coordinate of spatial point and plane of delineation epigraph point coordinates under camera coordinate system is established
Relation:m=K(I,0)XC=PXC
Wherein, XCThe homogeneous coordinates of the spatial point under camera coordinate system are represented, I is 3 × 3 unit matrix, and m represents figure
The homogeneous coordinates of picture point, Intrinsic Matrix are in image plane:
Wherein, fx=f/dx, fy=fsinθ/dy, s=- fcot θ/dx, u0=(x0-y0cotθ)/dx, v0=y0sinθ/dy, dx=
Ccdx/imgx, dy=ccdy/imgy, f represent the focal length of video camera, and ccdx and ccdy represent CCD actual physical sizes respectively
Width and height, imgx and imgy represent the length and width of output image.
S1024, the outer parameter matrix for calculating by establishing world coordinate system video camera;
Specifically, this step further comprises:
Establish using Z axis vertical-horizontal right-handed coordinate system downwards as world coordinate system, make spatial point in world coordinate system
It is respectively X=(x, y, z, 1) and X with the homogeneous coordinates in camera coordinate systemC=(xc,yc,zc, 1), then relationship below be present:
Wherein,The inhomogeneous coordinate for being camera center in world coordinate system, R are that the pan and tilt of video camera join
Array into video camera spin matrix, for the arbitrary of video camera(pan,tilt), there is a corresponding spin matrix R
(pan,tilt).
S1026, the camera model being bonded Intrinsic Matrix and outer parameter matrix under world coordinate system.
Specifically, this step can specifically be obtained using following formula:
The parameter matrix P of video camera under world coordinate system is:
Wherein, K represents the Intrinsic Matrix of video camera, and R is the rotation for the video camera that the pan and tilt parameters of video camera form
Torque battle array,The inhomogeneous coordinate for being camera center in world coordinate system, I are 3 × 3 unit matrix.
The method for the acquisition camera model that the present embodiment provides, calculates shooting by the inner parameter of video camera first
Machine Intrinsic Matrix, then by establishing the relation between world coordinate system and camera coordinate system, with reference to the outer parameter of video camera,
The outer parameter matrix of video camera is extrapolated, Intrinsic Matrix and outer parameter matrix are finally bonded camera model, so as to
The corresponding relation between picture point in the spatial point in actual three-dimensional scenic and image plane is established, and need not be demarcated manually, is used
It is convenient.
Embodiment three
Referring to Fig. 3, a kind of method for acquisition number of pixels threshold value that the preferred embodiment of the present invention provides includes:
In the image point coordinates of the plane of delineation when S1042, acquisition movable body original state, and input camera model and obtain
Space coordinates during original state;
Specifically, state when original state includes movable body initial motion.
S1044, space coordinates when input motion body moves to default height or length in camera model, are obtained
That is predicted on the plane of delineation moves to the image point coordinates of default height or length;
S1046, according to image coordinate during movable body original state on the plane of delineation and move to default height or length
The image coordinate of degree, obtain the number of pixels threshold value on the plane of delineation.
The present embodiment provide acquisition number of pixels threshold value method, can obtain movable body move to default height or
Image pixel number threshold value during length, the threshold value changes with starting point and default height or length change, hence for not
The number of pixels threshold value on the adaptive plane of delineation is provided with opening position, without setting manually.
Example IV
Referring to Fig. 4, the method for the Camera Positioning that the preferred embodiment of the present invention provides comprises the following steps:
Movable body after this method control video camera divertical motion simultaneously causes position of the movable body in the plane of delineation, size
It is suitable, it is necessary to calculate (Δ pan, the Δ tilt, f') of video camera, Δ pan is the relative rotation angle on camera horizon face, Δ
Tilt is the relative rotation angle on video camera perpendicular, and f' is the focal length of video camera, if now movable body is in the plane of delineation
On inhomogeneous coordinate be(u2,v2), the inhomogeneous coordinate of image center is(u0,v0), the focal length of video camera is f, video camera
The vertical distance of center from the ground is H, and the inclination angle of video camera now is tilt, and the width and height of CCD actual physical sizes are
Ccdx and ccdy, the length and width of output video image is respectively imgx and imgy.Calculating process is as follows:
S1082, calculate the relative rotation angle delta pan of video camera in the horizontal plane:
And
Wherein Δ pan>0 expression camera intrinsic world coordinate system Z axis rotate counterclockwise | Δ pan | angle, Δ pan<
0, represent camera intrinsic world coordinate system Z axis rotate clockwise | Δ pan | angle.
S1084, calculate relative rotation angle delta tilt of the video camera on perpendicular:
And
Wherein Δ tilt>0 expression camera intrinsic camera coordinate system X-axis rotate counterclockwise | Δ tilt | angle, Δ
tilt<0, represent that the X-axis of camera intrinsic camera coordinate system rotates clockwise | Δ tilt | angle, other letters in the formula
Implication be same as above.
S1086, the focal length f' for calculating video camera:
The focal length for the video camera for causing student to be in suitable size is calculated, calculation formula is as follows:
Wherein tilt'=tilt+ Δs tilt.
S1088, rotation and the focal length for adjusting video camera are controlled according to result of calculation.
The method for the Camera Positioning that the present embodiment provides, providing accurate video camera by reasoning calculation needs what is rotated
Angle and suitable focal length multiple, and by controlling video camera to rotate and scale focal length so that after control video camera divertical motion
Movable body, and appear in plane of delineation center with appropriately sized.
Embodiment five
Referring to Fig. 5, the embodiment for being applied particularly to intelligent teaching recording and broadcasting system is introduced below.
S202, the parameter matrix for obtaining camera model.
As previously described in the embodiment, this step further comprises:
Obtain the Intrinsic Matrix of camera model:Establish under camera coordinate system on the coordinate and the plane of delineation of spatial point
Corresponding relation between image point coordinates.
Obtain the outer parameter matrix of camera model:Reach the state using video camera(Including(Pan, tilt)Parameter and
Inhomogeneous coordinate of the camera center in world coordinate system)To represent outer parameter matrix, it is established that the sky in world coordinate system
Between point and camera coordinate system in spatial point between relation.
Obtain the parameter matrix under world coordinate system:Set up under world coordinate system on the coordinate and the plane of delineation of spatial point
Corresponding relation between picpointed coordinate, beneficial between picture point on the convenient spatial point represented in actual three-dimensional scenic and the plane of delineation
Corresponding relation.
Specific formula for calculation is applied to the mode described in embodiment above.
S204, obtain the number of pixels threshold value that student stands up highly in the picture.
Specifically, in actual classroom, establish with camera center in the horizontal plane be projected as world coordinate system
Origin, the right-handed coordinate system of Z axis vertical-horizontal downwards is established, if the height of video camera with respect to the horizontal plane is H, i.e., nowAssuming that the height that student sits down is h0, the height that student stands up is h1, the angle of classroom and horizontal plane
For α.If action of standing up occurs in some student in classroom, its head homogeneous coordinates is X1=(x1,y1,h0+y1* tan α), then its
Homogeneous coordinates on camera image plane are m1=(u1,v1, 1), after the completion of standing up, the homogeneous coordinates after it is stood are X2=(x2,
y2,-h1+y2* tan α), the homogeneous coordinates on camera image plane are m2=(u2,v2,1).Actual classroom scene middle school student station
Relation between coordinate after vertical and the coordinate sat down is as follows:Here gap represents student after standing up in y
The offset that axle upper body position occurs, this constant understand according to actual scene debugging, then asks for student and stand up the step of height pixel
Rapid block diagram is as shown in figure 3, specific steps are expressed as follows:
Detect that student stands up action in camera image plane first, at this moment detect that plane of delineation middle school student head is sat
It is designated as m1=(u1,v1, 1), according to camera model m=PX, then by m1、h0It can obtain X1=(x1,y1,h0+y1*tanα).According to step 3
The parameter matrix P of the camera model under world coordinate system can be obtained, to represent convenientIts
Middle several PijFor matrix P (i, j) member, 1≤i≤3,1≤j≤3, specific calculating process are as follows here:
Establish equation group:
Deform:
Finally solve X1(the x of point1,y1) coordinate value.
By X1It can obtain X2, by X2It is updated in m=PX, then can obtain student and stand up occiput summit in the plane of delineation
Coordinate m2, then it is in student's pixels tall of standing up:
NumOfPixel=|v2-v1|
The step can obtain student and stand up number of pixels threshold value, and the threshold value changes with u, v change, and reflection is to actual
Change in scene namely with classroom scene middle school student position x, y change, risen hence for the student at the diverse location of classroom
Vertical height provides the number of pixels threshold value on the adaptive plane of delineation, without setting manually.
S206, judge whether student stands up.
Specifically, judged according to the number of pixels calculated in picture point m1=(u1,v1, 1) and the student that detects
Whether motion on vertical direction is that student stands up action, rather than violate-action.
Detect m in the plane of delineation1=(u1,v1, 1) and there is motion on student's vertical direction, the motion process is tracked to transporting
Move and stop, now picture point m2=(u2,v2, 1) and m1=(u1,v1, 1) vertical component on pixels tall difference absolute value be Δ l;
Determine whether that genuine student stands up
Even stood up height picture when the pixels tall difference of certain point detected in this step is less than the student that calculates
Plain number threshold value, then it is assumed that the motion on student's vertical direction is not action of standing up;Otherwise it is assumed that on student's vertical direction
Motion be action of standing up.
This method can stop the exhausted of vertical component difference of the picture point with moving beginning picture point by the motion detected
To being worth and moving the size for starting the student that calculates at picture point and standing up between number of pixels threshold value, judge to examine on the plane of delineation
Whether the motion measured is that student stands up action.This method can effectively exclude the non-violate-action that stands up such as raise one's hand, whisper to each other,
Scratch first-class, and student can be accurately judged to and stood up action.
S208, the rotation for controlling video camera and focal length.
This step is mainly to realize to need (Δ pan, the Δ tilt, f') that changes to video camera, the accurate calculating of parameter,
Here Δ pan is the relative rotation angle on camera horizon face, and Δ tilt is the relative rotation angle on video camera perpendicular
Degree, f' are the focal length of video camera, and by controlling video camera to rotate scaling focal length so that standing student is appeared in appropriately sized
Plane of delineation center is shot, and specific algorithm is controlled adjustment video camera with embodiment above according to result of calculation.
Student provided in an embodiment of the present invention stands up judgement and Camera Positioning, joins matrix outside camera internal reference by constructing,
Establishing camera model and calculating student at the diverse location of classroom automatically and stand up increases height pixel on the image plane
Number threshold values, the threshold value that automatic decision classroom diverse location student stands, realize that student stands up the adaptive determination method sat down;It is logical
Crossing the video camera accurately calculated needs the scaling multiple of the angle and focal length rotated, and control video camera rotates and focal length variations,
After Camera Positioning, student's standing crown be imaged on the image plane after be image center, it is achieved thereby that video camera
Control and positioning, realize the track and localization to the student that made a speech in teacher's recorded broadcast video.
By the present embodiment, those skilled in the art it is seen that, it is similar that this method can be applied in meeting room etc.
Scene spokesman stands up the judgement of action and positioning and any movable body move to default starting point height or length inspection
Survey on judging and positioning.
Referring to Fig. 6, a kind of motion detection provided in an embodiment of the present invention and the device of positioning shooting are included with lower module:
Camera model acquisition module 10, video camera is obtained for the Intrinsic Matrix according to video camera and outer parameter matrix
Model.
Number of pixels threshold value acquisition module 20, for obtaining when movable body moves default height or length in the picture
Number of pixels threshold value.
Motion detection block 30, it is for the number of pixels value according to present image and number of pixels threshold decision movable body
It is no to move to default height or length.
Camera control module 40, for when judge movable body perform predetermined movement when, adjust video camera rotational angle and
Focal length is scaled to control movable body at the center of the plane of delineation.
As a kind of preferred scheme of the present embodiment, camera model acquisition module 10 further comprises that Intrinsic Matrix obtains
Unit 101, outer parameter matrix acquiring unit 102 and world coordinate system matrix acquiring unit 103 are taken, wherein:
Intrinsic Matrix acquiring unit 101, for calculating camera intrinsic parameter matrix by the inner parameter of video camera;
Outer parameter matrix acquiring unit 102, for by establishing the relation between world coordinate system and camera coordinate system,
With reference to the outer parameter of video camera, the outer parameter matrix of video camera is constructed;
World coordinate system matrix acquiring unit 103, sat for Intrinsic Matrix and outer parameter matrix to be bonded into the world
Camera model under mark system.
Specifically, world coordinate system is got by the inside and outside parameter matrix acquisition methods different from traditional scaling method
Under camera model, it is corresponding between the spatial point in actual three-dimensional scenic and picture point in image plane so as to conveniently establish
Relation.Camera model obtains convenient, it is not necessary to demarcation manually, and it can be changed automatically according to the state change of video camera
Camera model.For example, the single camera of speech student is tracked for the needs in the present apparatus, uses camera model
The corresponding relation that acquisition module 10 can be established conveniently on the target point in teacher's scene and the plane of delineation between putting.
As another preferred scheme of the present embodiment, number of pixels threshold value acquisition module 20 further comprises original state
Coordinate acquiring unit 201, coordinates of motion acquiring unit 202 and number of pixels threshold value acquiring unit 203, wherein:
Original state coordinate acquiring unit 201, picture point during for obtaining movable body original state in the plane of delineation are sat
Mark, and input camera model and obtain original state time space coordinate;
Coordinates of motion acquiring unit 202, in camera model input motion body move to default height or length
Space coordinates when spending, image point coordinates when obtain predicting on the plane of delineation moves to default height or length;
Number of pixels threshold value acquiring unit 203, for according to image coordinate during movable body original state on the plane of delineation
Image coordinate with when moving to default height or length, obtains the number of pixels threshold value on the plane of delineation.
For example, be applied to teacher student stand up judgement or conference speech people stand up when judging, number of pixels threshold value
If acquisition module 20 can calculate any position on the plane of delineation have a student or spokesman stand up after the increased pixel of institute
Number threshold value, the threshold value change with the change of plane of delineation point, reflected in actual scene namely with classroom scene middle school student position
Put or meeting room spokesman change in location and change, hence for the student at the diverse location of classroom or meeting room difference position
The height of standing up of the spokesman at the place of putting provides adaptive number of pixels threshold value on the image plane, accurate without setting manually
It is really convenient.The fortune that motion detection block 30 detects according to the number of pixels value and the number of pixels threshold decision of present image
It is dynamic whether to be student or meeting people spokesman stands up action, so as to effectively excluding for example to raise one's hand, whispering to each other, scratching first-class do
Disturbance is made.If camera control module 40, which realizes judge module, judges how student rotates and zoom for standing state video camera
Method, by controlling video camera to rotate and focal length scales, picpointed coordinate of the student station immediately on the plane of delineation that will make a speech moves to
Central point using speech student as the plane of delineation, and size is suitable, realizes the accurate track and localization recorded broadcast spokesman's of video camera
Video.
It should be noted that the technical characteristic in above method embodiment is corresponding applicable in the present apparatus, it is no longer heavy here
State.
The method and apparatus of the embodiment of the present invention, join matrix outside camera internal reference by constructing, adaptive judgement movable body is
Angle and scaling focal length no to move to default height or length, that then control adjustment video camera rotates, so that movable body
The center of the plane of delineation is appeared in, so as to be accurately positioned track up movable body.
The method of the invention and device are suitable for intelligent teaching recording and broadcasting system and recorded broadcast of session system, in classroom not
Student with position can be adaptively judged, root either when the spokesman of meeting room diverse location is standing up or sat down
Omnirange rotation and zoom are carried out according to the position auto-adjustment control video camera of student or spokesman, is realized to student or hair
Speech people is accurately positioned.
Above by reference to the preferred embodiments of the present invention have been illustrated, not thereby limit to the interest field of the present invention.This
Art personnel do not depart from the scope of the present invention and essence, can have a variety of flexible programs to realize the present invention, for example as one
The feature of individual embodiment can be used for another embodiment and obtain another embodiment.All institutes within the technical concept with the present invention
The all any modification, equivalent and improvement of work, all should be within the interest field of the present invention.
Claims (8)
1. a kind of motion detection and the method for positioning shooting, it is characterised in that this method includes:
Camera model is obtained according to the Intrinsic Matrix of video camera and outer parameter matrix;
Number of pixels threshold value when the default height of acquisition movable body motion or length in the picture, the default height or length
Degree is related to the position that the movable body is presently in, and specifically includes:
In the image point coordinates of the plane of delineation when obtaining movable body original state, and input camera model to obtain movable body initial
Coordinate between state space-time;
Input motion body moves to the space coordinates of default height or length in camera model, obtains pre- on the plane of delineation
The movable body of survey moves to image point coordinates when default height or length;
Image when according to image coordinate during movable body original state on the plane of delineation and moving to default height or length
Coordinate, obtain the number of pixels threshold value on the plane of delineation;
Whether default height is moved to according to the number of pixels value of present image and the number of pixels threshold decision movable body
Or length;
When judging that movable body performs predetermined movement, video camera rotational angle and scaling focal length are adjusted to control movable body in image
The center of plane.
2. motion detection according to claim 1 and the method for positioning shooting, it is characterised in that the acquisition video camera mould
Type further comprises:
Camera intrinsic parameter matrix is calculated by the inner parameter of video camera;
By establishing the relation between world coordinate system and camera coordinate system, with reference to the outer parameter of video camera, shooting is constructed
The outer parameter matrix of machine;
The camera model Intrinsic Matrix and the outer parameter matrix being bonded under world coordinate system.
3. motion detection according to claim 2 and the method for positioning shooting, it is characterised in that described by establishing the world
Relation between coordinate system and camera coordinate system, the outer parameter matrix for constructing video camera further comprise:
It is world coordinate system to establish the right-handed coordinate system of Z axis vertical-horizontal downwards, makes spatial point in world coordinate system and shooting
Homogeneous coordinates in machine coordinate system are respectively X=(x, y, z, 1) and XC=(xc,yc,zc, 1), then relationship below be present:
Wherein,The inhomogeneous coordinate for being camera center in world coordinate system, R are that pan the and tilt parameters of video camera form
Video camera spin matrix, for arbitrary (pan, the tilt) of video camera, have a corresponding spin matrix R (pan,
tilt)。
4. motion detection according to claim 2 and the method for positioning shooting, it is characterised in that by the internal reference matrix and
The outer ginseng matrix is bonded camera model and further comprised:
The parameter matrix P of video camera under world coordinate system is:
Wherein, K represents the Intrinsic Matrix of video camera, and R is the spin moment for the video camera that the pan and tilt parameters of video camera form
Battle array,The inhomogeneous coordinate for being camera center in world coordinate system, I are 3 × 3 unit matrix.
5. motion detection according to claim 1 and the method for positioning shooting, it is characterised in that according to the picture of present image
Whether plain numerical value and the number of pixels threshold decision movable body move to default height or length and further comprise:
Obtain image pixel number when vertically movable height or horizontal movement length;
If image pixel number when the vertically movable height or horizontal movement length is more than number of pixels threshold value, sentence
Determine movable body and perform default motion.
6. motion detection according to claim 1 and the method for positioning shooting, it is characterised in that the adjustment video camera turns
Dynamic angle and scaling focal length further comprise:
Calculate the relative rotation angle delta pan of video camera in the horizontal plane:
And
Calculate relative rotation angle delta tilt of the video camera on vertical plane:
And
Calculate focal length of camera f':
And tilt'=tilt+ Δs tilt
Rotation and the focal length of adjustment video camera are controlled according to result of calculation;
Wherein, its inhomogeneous coordinate of top on the image plane is (u when movable body moves2,v2), the non homogeneity of image center
Secondary coordinate is (u0,v0), the current focus of video camera is f, the vertical distance of camera center from the ground is H, and video camera is current
Inclination angle is tilt, and the width and height of CCD actual physical sizes are ccdx and ccdy, and the length and width of output video image is imgx
And imgy;
Δ pan > 0 represent camera intrinsic world coordinate system Z axis rotate counterclockwise | Δ pan | angle, Δ pan < 0, represent
The Z axis of camera intrinsic world coordinate system rotates clockwise | Δ pan | angle;
Δ tilt > 0 represent camera intrinsic camera coordinate system X-axis rotate counterclockwise | Δ tilt | angle, Δ tilt < 0,
Represent camera intrinsic camera coordinate system X-axis rotate clockwise | Δ tilt | angle.
7. a kind of motion detection and the device of positioning shooting, it is characterised in that the device includes:
Camera model acquisition module, camera model is obtained according to the Intrinsic Matrix of video camera and outer parameter matrix;
Number of pixels threshold value acquisition module, obtain number of pixels threshold in the picture when movable body moves default height or length
Value, the default height or length are related to the position that the movable body is presently in, and the number of pixels threshold value obtains mould
Block specifically includes:
Original state coordinate acquiring unit, in the image point coordinates of the plane of delineation during for obtaining movable body original state, and it is defeated
Enter space coordinates when camera model obtains original state;
Coordinates of motion acquiring unit, in camera model input motion body move to the space of default height or length
Coordinate, image point coordinates when obtain predicting on the plane of delineation moves to default height or length;
Number of pixels threshold value acquiring unit, for according to image coordinate during movable body original state on the plane of delineation and moving to
Image coordinate when default height or length, obtain the number of pixels threshold value on the plane of delineation;
Motion detection block, whether moved according to the number of pixels value of present image and the number of pixels threshold decision movable body
To default height or length;
Camera control module, for when judging that movable body performs predetermined movement, adjusting video camera rotational angle and scaling Jiao
Away to control movable body at the center of the plane of delineation.
8. motion detection according to claim 7 and the device of positioning shooting, it is characterised in that the camera model obtains
Modulus block further comprises:
Intrinsic Matrix acquiring unit, for calculating camera intrinsic parameter matrix by the inner parameter of video camera;
Outer parameter matrix acquiring unit, for calculating the outer parameter matrix of video camera by establishing world coordinate system;
World coordinate system matrix acquiring unit, sat for the Intrinsic Matrix and the outer parameter matrix to be bonded into the world
Camera model under mark system.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410001630.0A CN103780837B (en) | 2014-01-02 | 2014-01-02 | A kind of motion detection and the method and its device of positioning shooting |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410001630.0A CN103780837B (en) | 2014-01-02 | 2014-01-02 | A kind of motion detection and the method and its device of positioning shooting |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103780837A CN103780837A (en) | 2014-05-07 |
CN103780837B true CN103780837B (en) | 2018-02-09 |
Family
ID=50572623
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410001630.0A Expired - Fee Related CN103780837B (en) | 2014-01-02 | 2014-01-02 | A kind of motion detection and the method and its device of positioning shooting |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103780837B (en) |
Families Citing this family (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104680916B (en) * | 2015-03-03 | 2018-04-27 | 郁剑 | A kind of photography teaching system and method |
CN106027913B (en) * | 2016-07-15 | 2019-06-18 | 深圳市金立通信设备有限公司 | A kind of photographic method and terminal |
CN106488124A (en) * | 2016-10-20 | 2017-03-08 | 努比亚技术有限公司 | A kind of tracking lock microshot method and terminal |
CN106502418B (en) * | 2016-11-09 | 2019-04-16 | 南京阿凡达机器人科技有限公司 | A kind of vision follower method based on monocular gesture identification |
CN108229251A (en) * | 2016-12-15 | 2018-06-29 | 中国移动通信有限公司研究院 | A kind of action identification method and device |
CN109389642A (en) * | 2017-08-04 | 2019-02-26 | 惠州市阿图达机电有限公司 | Vision system is to the scaling method of robot, system and has store function device |
CN109444905B (en) * | 2018-09-12 | 2020-08-25 | 深圳市杉川机器人有限公司 | Dynamic object detection method and device based on laser and terminal equipment |
CN109712188A (en) * | 2018-12-28 | 2019-05-03 | 科大讯飞股份有限公司 | A kind of method for tracking target and device |
CN109559522B (en) * | 2019-01-21 | 2021-09-28 | 熵基科技股份有限公司 | Debugging method, telescopic upright post, camera and storage medium |
CN112581328B (en) * | 2019-07-26 | 2022-11-08 | 重庆电子工程职业学院 | Student education supervision system |
CN112446925B (en) * | 2020-10-20 | 2024-02-23 | 广州视源电子科技股份有限公司 | Parameter calibration method, device and system for image pickup device |
CN112731343B (en) * | 2020-12-18 | 2023-12-12 | 福建汇川物联网技术科技股份有限公司 | Target measurement method and device for measurement camera |
CN114189627A (en) * | 2021-11-24 | 2022-03-15 | 河南牧原智能科技有限公司 | Method and product for acquiring preset angle of camera and monitoring breeding fence |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1422494A (en) * | 2000-12-05 | 2003-06-04 | 皇家菲利浦电子有限公司 | Method and apparatus for predicting events in video conferencing and other applications |
CN103327250A (en) * | 2013-06-24 | 2013-09-25 | 深圳锐取信息技术股份有限公司 | Method for controlling camera lens based on pattern recognition |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102244762A (en) * | 2011-06-03 | 2011-11-16 | 深圳市东微智能科技有限公司 | Camera tracking method and system used in conference system |
-
2014
- 2014-01-02 CN CN201410001630.0A patent/CN103780837B/en not_active Expired - Fee Related
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1422494A (en) * | 2000-12-05 | 2003-06-04 | 皇家菲利浦电子有限公司 | Method and apparatus for predicting events in video conferencing and other applications |
CN103327250A (en) * | 2013-06-24 | 2013-09-25 | 深圳锐取信息技术股份有限公司 | Method for controlling camera lens based on pattern recognition |
Also Published As
Publication number | Publication date |
---|---|
CN103780837A (en) | 2014-05-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103780837B (en) | A kind of motion detection and the method and its device of positioning shooting | |
CN109151439B (en) | Automatic tracking shooting system and method based on vision | |
CN103716594B (en) | Panorama splicing linkage method and device based on moving target detecting | |
TWI397317B (en) | Method for providing output image in either cylindrical mode or perspective mode | |
CN105718862A (en) | Method, device and recording-broadcasting system for automatically tracking teacher via single camera | |
CN103716595B (en) | Panoramic mosaic video camera and ball machine inter-linked controlling method and device | |
CN103971375B (en) | A kind of panorama based on image mosaic stares camera space scaling method | |
US9752875B2 (en) | Virtual sport system for acquiring good image of ball by controlling camera according to surrounding brightness | |
CN105072414B (en) | A kind of target detection and tracking and system | |
KR101347450B1 (en) | Image sensing method using dual camera and apparatus thereof | |
CN104574359B (en) | A kind of student trace localization method based on principal and subordinate's video camera | |
CN106251334A (en) | A kind of camera parameters method of adjustment, instructor in broadcasting's video camera and system | |
CN110163963B (en) | Mapping device and mapping method based on SLAM | |
CN103914855B (en) | The localization method and device of a kind of moving target | |
CN105957048A (en) | 3D panorama display method and system of shooting image through fish eye lens | |
CN107343165A (en) | A kind of monitoring method, equipment and system | |
CN107038714B (en) | Multi-type visual sensing cooperative target tracking method | |
CN206575538U (en) | A kind of intelligent projection display system of trend | |
CN104506773A (en) | Camera automatic zoom control method based on human eye distance | |
CN107147841A (en) | A kind of binocular camera method of adjustment, device and system | |
WO2022141826A1 (en) | Smart tracking projection method and system | |
CN112019759A (en) | Method, device and equipment for tracking and shooting students in recorded and broadcast classes | |
CN107396059A (en) | A kind of panorama position adaptive student graphical analysis control method | |
CN107734254A (en) | A kind of unmanned plane is selected a good opportunity photographic method automatically | |
CN104184994A (en) | Camera and high-speed ball correlation control method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20180209 Termination date: 20200102 |