Content of the invention
In view of this, it is an object of the invention to proposing the method and device that a kind of dynamic amplification shows video,
Partial enlargement can be carried out to video, be the optimization to existing video playback mode at present it is intended to operate
During, optimization operation method, give to operate more flexible more smoothly operating experience.
The method that video is shown based on the dynamic amplification that the above-mentioned purpose present invention provides, including:
Under video broadcasting condition, obtain amplifying gesture touching instruction in real time;
According to the generation position of amplifying gesture touching instruction, it is calculated specified magnification region;
Extract the single-frame images specifying magnification region successively;
Amplified video broadcast window is created in the video playback area beyond specified magnification region;
The single-frame images of specified magnification region is carried out the size that image is amplified to amplified video broadcast window, and
Amplified video broadcast window shows successively.
In some embodiments, described amplifying gesture touching instruction refers to that starting point is two touch, and two
The movement locus of individual touch point is essentially linear, and the direction of motion of two touch points is substantially opposite touching
Touch gesture.
In some embodiments, the described generation position according to amplifying gesture touching instruction, is calculated finger
Determine magnification region step to include:
Obtain the coordinate of the rearmost position of two touch points;
Calculate the x-axis distance between the rearmost position of two touch points and y-axis distance, and two touch points
The midpoint of initial position;
Using the midpoint of two touch point initial positions as the center of specified magnification region, using x-axis apart from as
Length on the x-axis direction of specified magnification region, using y-axis distance as the y-axis direction specifying magnification region
On length;
Obtain specifying magnification region.
In some embodiments, create in described video playback area beyond specified magnification region and amplify
The step of video playback window includes:
Screen is divided into 4 blocks of shape size identical, respectively upper left block, lower-left block, the right side
Upper block, bottom right block;
Judge the position specifying magnification region to be centrally located at screen;
If specifying magnification region to be centrally located at the upper left block of screen, create in the bottom right block of screen
Amplified video broadcast window;
If specifying magnification region to be centrally located at the lower-left block of screen, create in the upper right block of screen
Amplified video broadcast window;
If specifying magnification region to be centrally located at the upper right block of screen, create in the lower-left block of screen
Amplified video broadcast window;
If specifying magnification region to be centrally located at bottom right block or the screen center of screen, in the upper left of screen
Amplified video broadcast window is created in block.
In some embodiments, methods described also includes:Monitor and real-time response amplified video broadcast window
Operational order.
In some embodiments, described monitor and real-time response amplified video broadcast window operational order
Step includes:
Listen to new amplifying gesture touching instruction;
Judge whether this amplifying gesture touching instruction occurs in the position of amplified video broadcast window;
If so, then secondary image amplification is carried out to the single-frame images of specified magnification region, and by secondary amplification
The single-frame images of specified magnification region is cut to the size of amplified video broadcast window on the basis of its center, and
Amplified video broadcast window shows successively;
If it is not, then not making any process.
Another aspect of the present invention additionally provides the device that a kind of dynamic amplification shows video, including:
Amplification instruction acquisition module, for obtaining amplifying gesture touching instruction in real time under video broadcasting condition;
Specified magnification region acquisition module, for the generation position according to amplifying gesture touching instruction, calculates
To specified magnification region;
Image zooming-out module, for extracting the single-frame images of specified magnification region successively;
Window creating module, for creating amplified video in the video playback area beyond specified magnification region
Broadcast window;
Image amplification module, is amplified to amplified video for the single-frame images of specified magnification region is carried out image
The size of broadcast window;
Display module, for showing the specified magnification region after amplifying successively in amplified video broadcast window
Single-frame images.
In some embodiments, described amplifying gesture touching instruction refers to that starting point is two touch, and two
The movement locus of individual touch point is essentially linear, and the direction of motion of two touch points is substantially opposite touching
Touch gesture;
Described specified magnification region acquisition module is additionally operable to obtain the coordinate of the rearmost position of two touch points;
Calculate the x-axis distance between the rearmost position of two touch points and y-axis distance, and two touch points
The midpoint of initial position;Using the midpoint of two touch point initial positions as the center of specified magnification region, with
Length on the x-axis direction as specified magnification region for the x-axis, using y-axis distance as specified amplification region
Length on the y-axis direction in domain;Obtain specifying magnification region.
In some embodiments, described device also includes monitoring module, amplifies for monitoring simultaneously real-time response
The operational order of video playback window.
In some embodiments, described monitoring module is additionally operable to listen to new amplifying gesture touching instruction;
Judge whether this amplifying gesture touching instruction occurs in the position of amplified video broadcast window;If so, then to finger
The single-frame images determining magnification region carries out secondary image amplification, and the list by the specified magnification region of secondary amplification
Two field picture is cut to the size of amplified video broadcast window on the basis of its center, and plays window in amplified video
Show successively in mouthful;If it is not, then not making any process.
From the above it can be seen that the dynamic amplification that the present invention provides shows the method and device of video, lead to
Cross amplifying gesture to receive amplification instruction and therefrom to obtain specifying after magnification region, then outside specified magnification region
Video playback area in create amplified video broadcast window, and wherein successively play enlarged drawing, from
And be directed to the interested amplification to video designated area that is partially completed of user and play, with user friendly viewing.
Specific embodiment
For making the object, technical solutions and advantages of the present invention become more apparent, below in conjunction with specific embodiment,
And referring to the drawings, the present invention is described in more detail.
It should be noted that the statement of all uses " first " and " second " is all in the embodiment of the present invention
In order to distinguish the entity of two same names non-equal or the parameter of non-equal it is seen that " first " " second "
Only for the convenience of statement, should not be construed as the restriction to the embodiment of the present invention, subsequent embodiment is to this no longer
Illustrate one by one.
With reference to Fig. 1, show the schematic flow sheet of the embodiment of the method for video for the dynamic amplification that the present invention provides.
The method that described dynamic amplification shows video, including:
Step 101:Under video broadcasting condition, obtain amplifying gesture touching instruction in real time;Wherein, reference
The arrow of small test tube both sides in accompanying drawing 3, described amplifying gesture touching instruction optionally refers to that starting point is at 2 points
Touch, and the movement locus of two touch points is essentially linear, and the direction of motion of two touch points is base
This contrary touch gestures.
Step 102:According to the generation position of amplifying gesture touching instruction, it is calculated specified magnification region;
Preferably, this step 102 also can further include following process step:
Obtain the coordinate of the rearmost position of two touch points;
Calculate the x-axis distance between the rearmost position of two touch points and y-axis distance, and two touch points
The midpoint of initial position;
Using the midpoint of two touch point initial positions as the center of specified magnification region, using x-axis apart from as
Length on the x-axis direction of specified magnification region, using y-axis distance as the y-axis direction specifying magnification region
On length;
(referring to the drawings the little square frame in 4, it is the specified amplification region of this embodiment to obtain specified magnification region
Domain).Thus the specified amplification region that just can be amplified needed for obtaining according to the generation position of amplifying gesture touching instruction
Domain, and need not still further be selected.So, the triggering of amplification instruction is completed by an instruction and put
The selection in big region.
Step 103:After the completion of video data decoding, can obtain video for display single-frame images,
According to the coordinate value of specified magnification region, extract from original video single-frame images successively and specify magnification region
Single-frame images;
Step 104:Amplified video broadcast window is created in the video playback area beyond specified magnification region
(referring to the drawings the big square frame in 4, it is the amplified video broadcast window creating in this embodiment);Described
The size of amplified video broadcast window, is optionally less than 1/4 video playback area, specifies more than 2 times and puts
Big region.
Optionally, described step 104 also can further include following process step:
Screen is divided into 4 blocks of shape size identical, respectively upper left block, lower-left block, the right side
Upper block, bottom right block;
Judge the position specifying magnification region to be centrally located at screen;
If specifying magnification region to be centrally located at the upper left block of screen, create in the bottom right block of screen
Amplified video broadcast window;
If specifying magnification region to be centrally located at the lower-left block of screen, create in the upper right block of screen
Amplified video broadcast window;
If specifying magnification region to be centrally located at the upper right block of screen, create in the lower-left block of screen
Amplified video broadcast window;
If specifying magnification region to be centrally located at bottom right block or the screen center of screen, in the upper left of screen
Amplified video broadcast window is created in block.So it is designed to avoid specifying magnification region to broadcast with amplified video
Put window to overlap;If certain amplified video play area is unavoidably overlapped with specified magnification region
When, also can correspondingly adjust position or size of amplified video broadcast window etc..
Step 105:The single-frame images of specified magnification region is carried out image and is amplified to amplified video broadcast window
Size, and show successively in amplified video broadcast window.So can achieve folding in real time of enlarged drawing
Plus play.
From above-described embodiment as can be seen that the dynamic amplification that the present invention the provides method that shows video, by putting
Big gesture receiving amplification instruction and therefrom to obtain specifying after magnification region, then outside specified magnification region
Create amplified video broadcast window in video playback area, and play enlarged drawing successively wherein, thus pin
The interested amplification to video designated area that is partially completed in user is play, with user friendly viewing.
Preferably, described dynamic amplification shows that the method for video also includes step 106:Monitor and real-time response
The operational order of amplified video broadcast window.
Here, while creating amplified video broadcast window, the window of amplified video broadcast window can be added
Mouthful pattern (as shown in Figure 4), the window upper right corner occurs the icon of X button pattern, when listening to pass
Close the click commands of button icon, amplifying display function can be closed in real time;Additionally, work as listening to amplification
The dragging instruction of video playback window, can be with the position of real-time adjustment amplified video broadcast window, when listening to
Dragging to window border, can be with the size of real-time adjustment window.
Further, the described step monitoring the simultaneously operational order of real-time response amplified video broadcast window also may be used
Including following process step:
Listen to new amplifying gesture touching instruction;
Judge whether this amplifying gesture touching instruction occurs in the position of amplified video broadcast window;
If so, then secondary image amplification is carried out to the single-frame images of specified magnification region, and by secondary amplification
The single-frame images of specified magnification region is cut to the size of amplified video broadcast window on the basis of its center, and
Amplified video broadcast window shows successively;
If it is not, then not making any process.
So, when listening to the amplifying gesture touching instruction for amplified video broadcast window, then it is judged as
Need to carry out secondary amplification to the image of display in amplified video broadcast window, respond the instruction of this secondary amplification,
Secondary amplification is carried out to image, meets the viewing demand of user.
Wherein, the multiplication factor of secondary amplification instruction is optionally 2-4 times of former enlarged drawing.
It is important to note that each step in said method embodiment all can intersect, replace,
Increase, delete, therefore, these rational permutation and combination changes alternatively should also be as belonging to the present invention in methods described
Protection domain, and protection scope of the present invention should not be confined on described embodiment.
With reference to Fig. 2, show the structural representation of the device embodiment of video for the dynamic amplification that the present invention provides.
Described dynamic amplification shows the device 200 of video, including:
Amplification instruction acquisition module 201, refers to for obtaining amplifying gesture under video broadcasting condition in real time and touching
Order;
Specified magnification region acquisition module 202, for the generation position according to amplifying gesture touching instruction, counts
Calculation obtains specifying magnification region;
Image zooming-out module 203, for extracting the single-frame images of specified magnification region successively;
Window creating module 204, amplifies for creating in the video playback area beyond specified magnification region
Video playback window;
Image amplification module 205, is amplified to amplification for the single-frame images of specified magnification region is carried out image
The size of video playback window;
Display module 206, for showing the specified amplification region after amplifying successively in amplified video broadcast window
The single-frame images in domain.
Wherein, described dynamic amplification shows that the device of video can be smart mobile phone, panel computer, tape handling
The touch-screen of function, the PC with touch-screen or notebook computer etc..
Preferably, described amplifying gesture touching instruction optionally refers to that starting point is two touch, and two are touched
The movement locus touched a little is essentially linear, and the direction of motion of two touch points is substantially opposite touch hand
Gesture;
Described specified magnification region acquisition module 202 is additionally operable to obtain the seat of the rearmost position of two touch points
Mark;Calculate the x-axis distance between the rearmost position of two touch points and y-axis distance, and two touch points
The midpoint of initial position;Using the midpoint of two touch point initial positions as the center of specified magnification region, with
Length on the x-axis direction as specified magnification region for the x-axis, using y-axis distance as specified amplification region
Length on the y-axis direction in domain;Obtain specifying magnification region.
Optionally, described dynamic amplification shows the device 200 of video, also includes monitoring module 207, is used for
Monitor the operational order of simultaneously real-time response amplified video broadcast window.
Further, described monitoring module 207 is additionally operable to listen to new amplifying gesture touching instruction;Judge
Whether this amplifying gesture touching instruction occurs in the position of amplified video broadcast window;If so, then put to specifying
The single-frame images in big region carries out secondary image amplification, and the single frames figure by the specified magnification region of secondary amplification
As being cut to the size of amplified video broadcast window on the basis of its center, and in amplified video broadcast window
Show successively;If it is not, then not making any process.
From above-described embodiment as can be seen that the dynamic amplification that the present invention provides shows the device of video, by putting
Big gesture receiving amplification instruction and therefrom to obtain specifying after magnification region, then outside specified magnification region
Create amplified video broadcast window in video playback area, and play enlarged drawing successively wherein, thus pin
The interested amplification to video designated area that is partially completed in user is play, with user friendly viewing.
Referring to Fig. 1, the dynamic amplification introducing present invention offer shows that the dynamic amplification of the device of video shows
The method showing video.
The method that described dynamic amplification shows video, including:
Step 101:Amplification instruction acquisition module 201, under video broadcasting condition, obtains amplifying gesture in real time
Touching instruction;Wherein, referring to the drawings in 3 small test tube both sides arrow, described amplifying gesture touching instruction can
That selects refers to that starting point is two touch, and the movement locus of two touch points is essentially linear, and two
The direction of motion of touch point is substantially opposite touch gestures.
Step 102:Specified magnification region acquisition module 202 according to the generation position of amplifying gesture touching instruction,
It is calculated specified magnification region;
Preferably, this step 102 also can further include following process step:
Specified magnification region acquisition module 202 obtains the coordinate of the rearmost position of two touch points;
Specified magnification region acquisition module 202 calculate x-axis distance between the rearmost position of two touch points and
Y-axis distance, and the midpoint of two touch point initial positions;
Specified magnification region acquisition module 202 is using the midpoint of two touch point initial positions as specified amplification
The center in region, using x-axis distance as the length on the x-axis direction specifying magnification region, with y-axis distance
As the length on the y-axis direction of specified magnification region;
Specified magnification region acquisition module 202 obtain specifying magnification region (the referring to the drawings little square frame in 4,
It is the specified magnification region of this embodiment).Thus according to the generation position of amplifying gesture touching instruction with regard to energy
Obtain the specified magnification region of required amplification, and need not still further be selected.So, instructed by one
Complete the triggering of amplification instruction and the selection of magnification region.
Step 103:Image zooming-out module 203, after the completion of video data decoding, can obtain video and be used for
The single-frame images of display, according to the coordinate value of specified magnification region, carries successively from original video single-frame images
Fetching determines the single-frame images of magnification region;
Step 104:Window creating module 204 creates in the video playback area beyond specified magnification region
(referring to the drawings the big square frame in 4, it is the amplified video creating in this embodiment to amplified video broadcast window
Broadcast window);The size of described amplified video broadcast window, is optionally less than 1/4 video playback area,
More than 2 times of specified magnification regions.
Optionally, described step 104 also can further include following process step:
Screen is divided into 4 blocks of shape size identical, respectively upper left area by window creating module 204
Block, lower-left block, upper right block, bottom right block;
Window creating module 204 judges the position specifying magnification region to be centrally located at screen;
If specifying magnification region to be centrally located at the upper left block of screen, window creating module 204 is then in screen
Bottom right block in create amplified video broadcast window;
If specifying magnification region to be centrally located at the lower-left block of screen, window creating module 204 is then in screen
Upper right block in create amplified video broadcast window;
If specifying magnification region to be centrally located at the upper right block of screen, window creating module 204 is then in screen
Lower-left block in create amplified video broadcast window;
If specifying magnification region to be centrally located at bottom right block or the screen center of screen, window creating module
204 create amplified video broadcast window in the upper left block of screen.
Step 105:The single-frame images of specified magnification region is carried out image and is amplified to by image amplification module 205
The size of amplified video broadcast window, display module 206 shows amplification in amplified video broadcast window successively
The single-frame images of specified magnification region afterwards.So can achieve that the real-time superposition of enlarged drawing is play.
It is important to note that the embodiment that the embodiment of said apparatus use only methods described is come specifically
The course of work of each module is described, those skilled in the art can be it is readily conceivable that arrive these module application
In the other embodiment of methods described.Certainly, because each step in methods described embodiment all can phase
Mutually intersect, replace, increase, delete, therefore, these rational permutation and combination become alternatively in described device
Protection scope of the present invention should be belonged to, and protection scope of the present invention should not be confined to described embodiment
On.
Those of ordinary skill in the art should be understood:The discussion of any of the above embodiment is exemplary only,
It is not intended to imply that the scope of the present disclosure (inclusion claim) is limited to these examples;Think of in the present invention
Under road, can also be combined between the technical characteristic in above example or different embodiment, and exist
Many other changes of the different aspect of the present invention as above, in order to concisely they carry in details
For.Therefore, all any omissions within the spirit and principles in the present invention, made, modification, equivalent,
Improve etc., should be included within the scope of the present invention.