Summary of the invention
Embodiment of the invention technical problem to be solved is, a kind of video record device and video recording method are provided.Automatically setting is recorded the position and the size in zone.
In order to solve the problems of the technologies described above, the embodiment of the invention provides a kind of video record device, and this device comprises: mesh module is used on the screen of display video, setting the certification mark of being made up of a plurality of pixels; Detecting module, whether be used to judge has pixel value to be modified on the said certification mark; Choose module, be used for confirming to record the zone according to the said certification mark that has pixel value to be modified; Record module, be used to record the video data in the said zone.
Wherein, said certification mark comprises that at least two pixels of arranging by at least one horizontal line along said screen axis of abscissas direction reach at least two pixels of arranging by at least one vertical line with the crossing edge said screen axis of ordinates direction of said at least one horizontal line.
Said detecting module judges whether that the value that is positioned at the value of at least one pixel on said at least one horizontal line and is positioned at least one pixel on said at least one vertical line is revised simultaneously.
The said module of choosing comprises locator module and regional submodule; When the value that said locator module is used for the value of at least one pixel on being positioned at said at least one horizontal line and is positioned at least one pixel on said at least one vertical line is revised simultaneously; Obtain and comprise that horizontal line and the vertical line of being revised pixel simultaneously, said regional submodule are used to obtain the maximum rectangular area that is positioned at simultaneously on said horizontal line that is modified pixel and the vertical line as recording the zone.
Said detecting module judges according to the frequency preset continuous several times whether the value of the pixel on the said certification mark is modified.
Accordingly, the embodiment of the invention also provides a kind of video recording method, comprising: on the screen of display video, set the certification mark of being made up of a plurality of pixels; Whether judge has pixel value to be modified on the said certification mark; When the value of the pixel on the said certification mark is modified, confirm to record the zone according to the said certification mark that has pixel value to be modified; Record the said video data of recording in the zone.
Wherein, In the step of the said certification mark that setting is made up of a plurality of pixels on screen, said certification mark comprises that at least two pixels of arranging by at least one horizontal line along said screen axis of abscissas direction reach at least two pixels of arranging by at least one vertical line with the crossing edge said screen axis of ordinates direction of said at least one horizontal line.
In the step whether value of the pixel on judging said certification mark is modified, judge whether that the value that is positioned at least one pixel on said at least one horizontal line and is positioned at least one pixel on said at least one vertical line is revised simultaneously.
In the step of the maximum region that said certification mark surrounded that the value of obtaining pixel is modified, comprise following substep:
When the value of at least one pixel on being positioned at said at least one horizontal line and the value that is positioned at least one pixel on said at least one vertical line are revised simultaneously, obtain and comprise horizontal line and the vertical line of being revised pixel simultaneously;
Obtain the maximum rectangular area that is positioned at simultaneously on said horizontal line that is modified pixel and the vertical line as recording the zone.
In the step whether value of the pixel on judging said certification mark is modified, judge according to the frequency preset continuous several times whether the value of the pixel on the said certification mark is modified.
Video record device provided by the invention utilizes and chooses the maximum region that module confirms that pixel changes, the i.e. zone of video playback window through the variation of pixel on said mesh module and the detecting module monitoring screen.Thereby automatic setting is recorded the position and the size in zone, saves and manually defines the inconvenience of recording the zone.
Embodiment
To combine the accompanying drawing in the embodiment of the invention below, the technical scheme in the embodiment of the invention is carried out clear, intactly description, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills are not making the every other embodiment that is obtained under the creative work prerequisite, all belong to the scope of the present invention's protection.
In embodiment of the present invention; The latticed certification mark of being made up of pixel is set on screen, detects the zone that pixel changes, the i.e. zone of video playback through said certification mark; And should the zone as the zone of recorded video, thereby realize that the purpose in zone is recorded in definition automatically.
See also Fig. 1, be a kind of video record device 100 provided by the invention.Said video record device 100 comprises mesh module 110, detecting module 120, chooses module 130 and records module 140.
See also Fig. 2, said video record device 100 is used for the video of the broadcast window 210 of recorded video player 200.
Said mesh module 110 is used on the screen 300 of display video, setting the certification mark 300a that is made up of a plurality of pixels.In this execution mode; Said mesh module 110 is used on screen 300 according to the longitudinal pitch H of each preset bar horizontal line 310 and the horizontal spacing L of each bar vertical line 320, at least one vertical line of being made up of pixel 320 of the axis of ordinates direction extension of at least one horizontal line of being made up of pixel 310 that definition is extended along said screen 300 axis of abscissas directions and the said screen 300 in edge that intersects with said at least one horizontal line 310.That is, be the direction of horizontal line 310 among Fig. 2 along said screen 300 axis of abscissas directions, be the direction of vertical line 320 among Fig. 2 along said screen 300 axis of ordinates directions.Said horizontal line 310 and said vertical line 320 are woven into latticed certification mark.In this execution mode, the longitudinal pitch of preset each bar horizontal line 310 is 160 pixels in the said mesh module 110, and the horizontal spacing of said each bar vertical line 320 is 120 pixels.Said mesh module 110 defines the vertical line 320 that horizontal line 310 that many stripe pitch are 160 pixels and many stripe pitch are 120 pixels on said screen 300.Certainly, in other embodiments, it is littler that said longitudinal pitch and horizontal spacing also can be provided with, and to obtain closeer monitoring grid, monitors littler broadcast window 210.Or with said longitudinal pitch and said horizontal spacing be provided with bigger, to obtain reaction speed faster.
Whether said detecting module 120 is used to judge on the said certification mark 300a has pixel value to be modified.In this execution mode, said detecting module 120 is used to judge whether that the value that is positioned at the value of at least one pixel on said at least one horizontal line 310 and is positioned at least one pixel on said at least one vertical line 320 is revised simultaneously.Said detecting module 120 per 100 milliseconds obtain the value that once is positioned at all pixels on said horizontal line 310 and the vertical line 320, and judge in the value of these pixels whether have at least the value of a pixel to be modified.When certain horizontal line 311 and vertical line 321 are arranged in said broadcast window 210; If said broadcast window 210 displaying videos; The value of the pixel in the said broadcast window 210 will constantly change; Promptly be positioned on said horizontal line 311 and the vertical line 321, and be positioned at the pixel value of said broadcast window 210 will be by continuous modification, with dynamic display video.So can whether change through the value that judgement is positioned at pixel on said horizontal line 311 and the vertical line 321, thereby judge that said broadcast window 210 drops on which horizontal line 311 and the vertical line 321.So that judge the position and the size of broadcast window 210.In order to reduce the probability of erroneous judgement, said detecting module 120 can be judged continuously repeatedly, or judge repeatedly continuously according to frequency preset.For example, said detecting module 120 can be in continuous three refresh processes of said screen 300 judges all whether the pixel that is positioned on said horizontal line 311 and the vertical line 321 variation has taken place simultaneously continuous three times.When the pixel on horizontal line 311 and the vertical line 321 described in continuous three times are judged all simultaneously variation has taken place, think that just said horizontal line 311 and vertical line 321 are positioned on the said broadcast window 210.
The said module 130 of choosing is used for confirming to record zone 9 according to the said certification mark 300a that has pixel value to be modified.In this execution mode, the said module 130 of choosing comprises locator module 131 and regional submodule 132.When the value that said locator module 131 is used for the value of at least one pixel on being positioned at said at least one horizontal line 310 and is positioned at least one pixel on said at least one vertical line 320 is revised simultaneously, obtain and comprise horizontal line 311 and the vertical line 321 of being revised pixel simultaneously.In this execution mode; When the value that said locator module 131 is used for the value of the pixel on being positioned at said at least one horizontal line 310 and is positioned at the pixel on said at least one vertical line 320 is revised simultaneously; Obtain and comprise horizontal line 311 and the vertical line 321 of being revised pixel simultaneously; Choose the abscissa of the pixel b that is modified of abscissa and the rightmost side of the pixel a that is modified that is positioned at the leftmost side on the said horizontal line that is modified 311, choose the ordinate of the pixel d that is modified of ordinate and the lower side of the pixel c that is modified that is positioned at the top side on the said vertical line that is modified 321.If with said screen 300 upper left corners is initial point, abscissa increases to the right, and ordinate increases downwards.Said locator module 131 is obtained all pixels that said horizontal line 311 is modified, and the abscissa of all pixels that are modified relatively.From the pixel of revising, obtain the abscissa of two minimum pixel a of abscissa, obtain the abscissa of two maximum pixel b of abscissa.Simultaneously; Said locator module 131 is also obtained all pixels that said vertical line 321 is modified; And the ordinate of all pixels that are modified relatively, from the pixel of revising, obtain the ordinate of a minimum pixel c of ordinate, obtain the ordinate of a maximum pixel d of ordinate.
Said regional submodule 132 is used to obtain the maximum rectangular area that is positioned at simultaneously on said horizontal line 311 that is modified pixel and the vertical line 321 as recording zone 9.In this execution mode, said to record the zone 9 promptly be the zone that is surrounded by said pixel a, pixel b, pixel c and pixel d.It is said that to record the zone 9 are the frames of recording that will enroll video; This is recorded zone 9 and comprises that the last horizontal edge 91 that extends along said screen 300 axis of abscissas directions reaches horizontal edge 92 down; Left longitudinal edge 93 and right longitudinal edge 94 along said screen 300 axis of ordinates directions extension; The abscissa of said left longitudinal edge 93 is the abscissa of the pixel a of the said leftmost side; The abscissa of said right longitudinal edge 94 is the abscissa of the pixel b of the said rightmost side, and the said ordinate of going up horizontal edge 91 is the ordinate of the pixel c of said top side, and the said ordinate of horizontal edge 92 down is the ordinate of the pixel d of said lower side.Said regional submodule 132 utilizes the abscissa of pixel a of the said leftmost side as the abscissa of said left longitudinal edge 93, defines said position of recording the left longitudinal edge 93 in zone 9, promptly defines the left margin of recording frame.The abscissa of pixel b that utilizes the said rightmost side defines the position of said right longitudinal edge 94 as the abscissa of said right longitudinal edge 94, promptly defines the said right margin of recording frame.The ordinate of pixel c that utilizes said top side is as the said ordinate of going up horizontal edge 91, define said on the position of horizontal edge 91, promptly define said coboundary of recording frame.The ordinate of pixel d that utilizes said lower side define the position of said time horizontal edge 92 as the ordinate of said down horizontal edge 92, promptly defines the said lower boundary of recording frame.The zone that pixel changed when the zone that said upward horizontal edge 91, following horizontal edge 92, left longitudinal edge 93 and right longitudinal edge 94 are surrounded was displaying video promptly is said broadcast window 210.The said zone 9 of recording overlaps with said broadcast window 210.
The said module 140 of recording is used to record the said video data of recording in the zone 9.In this execution mode, the said module 140 recorded adopts the software of recording commonly used to obtain the method for recording video data in the frame and record the video data in the zone 9.
See also Fig. 3, the flow chart of the video recording method that provides for embodiment of the present invention, concrete steps are following:
Step 401: on the screen 300 of display video, set the certification mark 300a that forms by a plurality of pixels.In this execution mode, utilizing said mesh module 110 on screen 300, to define horizontal line 310 and the many stripe pitch that many stripe pitch are 160 pixels is the vertical line 320 of 120 pixels.
Whether step 403: judging on the said certification mark 300a has pixel to be modified.In this execution mode, utilize said detecting module 120 to obtain pixel and the pixel on the vertical line 320 on the horizontal line 310 of said certification mark 300a, and judge whether whether there is the pixel that is modified simultaneously on horizontal line 310 and the vertical line 320.
Step 405: when the pixel value on the said certification mark 300a is modified, confirm to record the zone according to the said certification mark 300a that has pixel value to be modified.In this execution mode; When the value of the pixel on being positioned at said at least one horizontal line 310 and the value that is positioned at the pixel on said at least one vertical line 320 are revised simultaneously; Utilize said locator module 131 to obtain and comprise horizontal line 311 and the vertical line 321 of being revised pixel simultaneously; Choose the abscissa of the pixel b that is modified of abscissa and the rightmost side of the pixel a that is modified that is positioned at the leftmost side on the said horizontal line that is modified 311, choose the ordinate of the pixel d that is modified of ordinate and the lower side of the pixel c that is modified that is positioned at the top side on the said vertical line that is modified 321.
And then utilize said regional submodule 132 to obtain to be positioned at simultaneously said horizontal line 310 that is modified pixel and the maximum rectangular area on the vertical line 320 as recording zone 9.Said regional submodule 132 obtains through said pixel a, pixel b, pixel c and pixel d and records zone 9.The said zone 9 of recording comprises the last horizontal edge 91 that extends along said screen 300 axis of abscissas directions and horizontal edge 92 down, along the left longitudinal edge 93 and the right longitudinal edge 94 of said screen 300 axis of ordinates directions extension.Wherein, The abscissa of said left longitudinal edge 93 is the abscissa of the pixel a of the said leftmost side; The abscissa 94 of said right longitudinal edge is the abscissa of the pixel b of the said rightmost side; The said ordinate of going up horizontal edge 91 is the ordinate of the pixel c of said top side, and the said ordinate of horizontal edge 92 down is the ordinate of the pixel d of said lower side.Thereby define said size and position of recording zone 9.
Step 407: record the said video data of recording in the zone 9.In this execution mode, utilize the said module 140 recorded to adopt the software of recording commonly used to obtain the method for recording video data in the frame and record the video data in the zone 9.
In step 403, if the value that is not positioned at the pixel on said at least one horizontal line 310 and is positioned at the pixel on said at least one vertical line 320 is then come back to step 403 by modification simultaneously.
In step 403, when pixel on being positioned at said at least one horizontal line 310 and the value that is positioned at the pixel on said at least one vertical line 320 are revised simultaneously, can also get back to step 403 once more and carry out continuous several times and judge.This repeatedly judges and can carry out according to frequency preset, when the pixel on horizontal line 311 described in repeatedly judging and the vertical line 321 all simultaneously variation has been taken place, forwards step 405 again to.
Video record device provided by the invention utilizes and chooses the maximum region that module confirms that pixel changes, the i.e. zone of video playback window through the variation of pixel on said mesh module and the detecting module monitoring screen.Thereby automatic setting is recorded the position and the size in zone, saves and manually defines the inconvenience of recording the zone.
Above disclosedly be merely a kind of preferred embodiment of the present invention, can not limit the present invention's interest field certainly with this, the equivalent variations of therefore doing according to claim of the present invention still belongs to the scope that the present invention is contained.