Summary of the invention
The invention provides a kind of front, side image collecting device associating method for testing motion and equipment, to solve the problem.
The invention provides the method for testing motion of a kind of front, the associating of side image collecting device.Said method comprises the following steps: direct picture collecting device and side image collecting device gather the image of target area simultaneously; Described direct picture collecting device gathers direct picture, and detects first direction of motion of target to be monitored in described direct picture; Described side image collecting device gathers side image, and detects second direction of motion of target to be monitored in described side image; When described first direction of motion and described second direction of motion be move both vertically direction time, described direct picture collecting device carries out feature shooting to described target to be monitored.
The present invention also provides the motion detection device of a kind of front, the associating of side image collecting device, and the said equipment comprises: direct picture collecting device, side image collecting device, control appliance; Wherein, described control appliance is connected with described side image collecting device between two with described direct picture collecting device; Described direct picture collecting device, for gathering the direct picture of target area, and detects first direction of motion of target to be monitored in described direct picture, will detect that first direction of motion of target to be monitored sends to described control appliance; Described direct picture collecting device is also for carrying out feature shooting to described target to be monitored; Described side image collecting device, for gathering the side image of target area, and detects second direction of motion of target to be monitored in described side image, will detect that second direction of motion of target to be monitored sends to described control appliance; Described control appliance, for receiving first direction of motion of the target to be monitored that described direct picture collecting device sends, and receive second direction of motion of the target to be monitored that described side image collecting device sends, when described first direction of motion and described second direction of motion be move both vertically direction time, described control appliance controls described direct picture collecting device and carries out feature shooting to described target to be monitored.
Compared to prior art, according to front provided by the invention, the method for testing motion of side image collecting device associating and equipment, the present invention adopts direct picture collecting device and side image collecting device Collect jointly and detection, the detection that monitoring objective carries out the direction of motion is treated by direct picture collecting device, verified the direction of motion of target to be monitored by side image collecting device simultaneously, when the direction of motion of the target to be monitored that direct picture collecting device and side image collecting device detect is vertical direction, treat monitoring objective again and carry out feature shooting.Such testing process avoids and moves both vertically because single direct picture collecting device detects to distinguish and to move the flase drop brought along the depth of camera optical axis direction, improve the accuracy rate detected, simultaneously, method of the present invention does not need complex process side coordinate system being mapped to front coordinate system in implementation process, improves the efficiency of detection.
Embodiment
Hereinafter also describe the present invention in detail with reference to accompanying drawing in conjunction with the embodiments.It should be noted that, when not conflicting, the embodiment in the application and the feature in embodiment can combine mutually.
Be illustrated in figure 1 the flow chart of method for testing motion of front that preferred embodiment according to the present invention provides, the associating of side image collecting device.As shown in Figure 1, preferred embodiment of the present invention provide front, side image collecting device associating method for testing motion comprise step 101-104.
Step 101: direct picture collecting device and side image collecting device gather the image of target area simultaneously;
Described side image collecting device is one or more.
The setting height(from bottom) of described direct picture collecting device is the height higher than human body when standing.
The setting height(from bottom) of described side image collecting device is the height higher than human body during sitting, and is less than the height of human body when standing.
Step 102: described direct picture collecting device gathers direct picture, and detects first direction of motion of target to be monitored in described direct picture;
When comprising multiple moving target in described direct picture, by Feature Points Matching algorithm and/or coordinate position matching algorithm, the moving target of the moving target in described direct picture with described side image is mated, using match and the moving target all with the direction that moves both vertically as target described to be monitored to be tracked.
Determine that in image, the method for moving target comprises: frame differential method, background subtraction method and optical flow method.
Step 103: described side image collecting device gathers side image, and detects second direction of motion of target to be monitored in described side image;
Step 104: when described first direction of motion and described second direction of motion be move both vertically direction time, described direct picture collecting device carries out feature shooting to described target to be monitored.
The direction of motion of described target to be monitored be move both vertically direction and be more than or equal to preset value at the described move distance moved both vertically on direction time, described direct picture collecting device carries out feature shooting to described target to be monitored.
Described feature shooting is to target following to be monitored described in image, and adjusting focal length bust shot.
Early warning height is set, if when the height of described target to be monitored is greater than early warning height, described direct picture collecting device carries out feature shooting to described target to be monitored.
Citing is below described in detail:
In Online class, as shown in Figure 3, install front camera and side camera, 1 front camera is installed on the dead ahead in classroom, 1 side camera is installed on the side in classroom.Wherein, the setting height(from bottom) of front camera is the standing height higher than the highest student of height in classroom, and front camera is the image that depression angle gathers student; The setting height(from bottom) H of side camera is the sitting height higher than student the highest during sitting in classroom, is less than the standing height of the student that height is the shortest when standing simultaneously.By camera collection classroom, front middle school student's regional display, obtain the image A of 680 × 480 pixel sizes, and the direction of motion of image A middle school student M (target to be monitored) detected.While front camera carries out the collection of student's regional display, side camera also gathers the picture in student region simultaneously, obtains the image B of 680 × 480 pixel sizes, and the student M in detected image B.
Then, the testing result of front camera is verified in conjunction with side camera.For front camera, the motion that stand up motion and the motion of front and back depth of student M are all thought in vertical direction.Suppose that student M actual motion is front and back depth motions, now the testing result of front camera moves both vertically.The testing result of side camera is front and back depth motions.Because both result of determination are inconsistent, therefore, judge that this student M is not in vertical motion, front camera is without the need to carrying out feature shooting to student M.And when the actual motion of student M be move both vertically, the testing result of front camera moves both vertically, and the testing result of side camera also moves both vertically, and both testing results are identical, then judge that student M is in vertical motion, front camera carries out feature shooting to student M.The testing result of therefore using side camera can help front camera to tell the situation of depth motion before and after moving target, can not judge by accident, cause tracking error.
In addition, determining that student M is when being in vertical motion, also needing to judge whether the amplitude that moves both vertically of student M is greater than preset value, if be greater than preset value, then carry out feature shooting to this student M, front camera adjusting focal length amplifies the image of student M.Like this, the little trick of student M can be prevented and cause the tracking action of camera, thus reducing rubbish camera lens.
In the above embodiments, in the image that camera collects, only have a moving target, if the image gathered has multiple moving target, following method will be adopted process in the present embodiment.
Suppose front camera collection to image A in comprise two moving targets, moving target 1 and moving target 2 respectively, simultaneously, side camera collection to image B in also comprise two moving targets, need to distinguish the moving target of two in image B, in two moving targets of resolution image B, which is the moving target 1 in image A, which is the moving target 2 in image A, for Feature Points Matching algorithm, the moving target 1 how determined in image B and moving target 2 are described in detail below, to front camera collection to image A in moving target 1 and and moving target 2 carry out characteristic pattern collection, the characteristic pattern obtaining moving target 1 is cross, the characteristic pattern of moving target 2 is triangle, respectively using cruciform pattern and triangle pattern as characteristic body template to side camera collection to image B mate, find out pixel identical with cruciform pattern or triangle pattern pixel in image B, if obtaining in image B with same pixel number in cruciform pattern is 350, and judge this same pixel number be greater than preset value (this preset value be pre-set for judging the critical value whether two images mate, such as 320), then determine moving target 1 in image B, in like manner, determine moving target 2 in image B.Respectively the direction of motion of the moving target 1 in image A and image B and moving target 2 is judged further.Judge when passing through, when obtaining the moving target 1 in image A and the moving target 1 in image B all for moving both vertically, meanwhile, when the moving target 2 when the moving target 2 in image A is for moving both vertically and in image B is for horizontal movement, camera is pursuit movement target 1 only, carries out feature shooting.When the moving target 1 in image A and the moving target 1 in image B are all for moving both vertically, simultaneously, when the moving target 2 in image A and the moving target 2 in image B are all for moving both vertically, camera pursuit movement target 1 and moving target 2, carry out feature shooting.
In another preferred embodiment, side camera collection to image B in arrange early warning height, the position of early warning height is the sitting height higher than student the highest during sitting in classroom, be less than the standing height of the student that height is the shortest when standing simultaneously, early warning height is exceeded when there being student in image B, front camera follows the tracks of the student exceeding early warning height, carries out feature shooting.
Figure 2 shows that the motion detection device structure chart of front that preferred embodiment according to the present invention provides, the associating of side image collecting device.As shown in Figure 2, the motion detection device of what preferred embodiment of the present invention provided be applied to front, the associating of side image collecting device, the said equipment comprises: direct picture collecting device 201, side image collecting device 202, control appliance 203; Wherein, described control appliance 203 is connected with described side image collecting device 202 between two with described direct picture collecting device 201; Described direct picture collecting device 201, for gathering the direct picture of target area, and detects first direction of motion of target to be monitored in described direct picture, will detect that first direction of motion of target to be monitored sends to described control appliance 203; Described direct picture collecting device 201 is also for carrying out feature shooting to described target to be monitored; Described side image collecting device 202, for gathering the side image of target area, and detects second direction of motion of target to be monitored in described side image, will detect that second direction of motion of target to be monitored sends to described control appliance 203; Described control appliance 203, for receiving first direction of motion of the target to be monitored that described direct picture collecting device 201 sends, and receive second direction of motion of the target to be monitored that described side image collecting device 202 sends, when described first direction of motion and described second direction of motion be move both vertically direction time, described control appliance 203 controls described direct picture collecting device 201 and carries out feature shooting to described target to be monitored.
In addition, about the specific operation process of the said equipment with described in said method, therefore repeat no more in this.
In sum, the method for testing motion of front of the present invention, the associating of side image collecting device and equipment, the present invention adopts direct picture collecting device and side image collecting device Collect jointly and detection, the detection that monitoring objective carries out the direction of motion is treated by direct picture collecting device, verified the direction of motion of target to be monitored by side image collecting device simultaneously, when the direction of motion of the target to be monitored that direct picture collecting device and side image collecting device detect is vertical direction, then treats monitoring objective and carry out feature shooting.Such testing process avoids and moves both vertically because single direct picture collecting device detects to distinguish and to move the flase drop brought along the depth of image capture device optical axis direction, improve the accuracy rate detected, simultaneously, method of the present invention does not need complex process side coordinate system being mapped to front coordinate system in implementation process, improves the efficiency of detection.
The foregoing is only the preferred embodiments of the present invention, be not limited to the present invention, for a person skilled in the art, the present invention can have various modifications and variations.Within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.