Embodiment
Below in conjunction with the accompanying drawing among the present invention, the technical scheme among the present invention is clearly and completely described, 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 belong to the scope of protection of the invention not making the every other embodiment that obtains under the creative work prerequisite.
The invention provides a kind of feature richness, video image zooming disposal route simple to operate, easy to use and the video image zooming treating apparatus that uses this video image zooming disposal route.
As shown in Figure 1,1a, 1b, 1c, 1d, 1e and 1f are respectively the sequence number of six included parts of Fig. 1, wherein: the video window in the broadcast window of region representation shown in the O; Left oblique line represents the video image that video window shows; The pixel region that the raw video image of region representation shown in the A is corresponding; Right oblique line represents that pixel region corresponding to raw video image is the pixel in the A; The broadcast window of the player of region representation shown in the P; Region representation shown in the R when the convergent-divergent multiple greater than 1 the time, after according to the convergent-divergent multiple raw video image being amplified, pixel region corresponding to partial video image that shows at video window; Region representation shown in the S amplifies demonstration to the video window in the broadcast window, the video window before amplifying; Region representation shown in the E when the convergent-divergent multiple less than 1 the time, in the time of will dwindling demonstration through the video image that amplifies according to the convergent-divergent multiple, after dwindling, pixel region corresponding to partial video image that shows in the video window, the pixel region that is finally shown by video window after also finishing with regard to reduction operation; The cursor of being drawn by solid line on the video window in 1c and the 1d part among Fig. 1 represents the position after the cursor translation, and the cursor of dotted lines represents the position of cursor before translation.
The video image zooming disposal route that the embodiment of the invention provides overlaps at video window O and broadcast window P, when perhaps video window O is less than broadcast window P, adopts different convergent-divergents to process, and specifically may further comprise the steps:
Reception is by the trigger pip of peripheral hardware input, and determines the convergent-divergent multiple according to trigger pip;
When broadcast window P overlaps with video window O, play the partial video image that intercepts from raw video image according to the convergent-divergent multiple at video window O;
As video window O during less than broadcast window P, with video window O bi-directional scaling, show raw video image according to the convergent-divergent multiple in the video window O of convergent-divergent.
In the time of not only can working as broadcast window P and overlap with video window O by said method, realization is to the accurate amplification of the video image that shows in the video window O, but also can work as video window O less than broadcast window P the time, realize to video window O with and the accurate convergent-divergent of the video image of interior demonstration.
Owing to can (for example can pass through the roll mouse roller by peripheral hardware among the present invention, press a certain button or press left mouse button, the mode of right button is inputted) the input trigger pip, and determine the convergent-divergent multiple according to trigger pip, so can input convergent-divergent multiple accurately and then realize accurate amplification to video image, simultaneously, it is more simple that the method for pulling out a rectangular area by the video image of left button in the broadcast window of player of pinning mouse in peripheral hardware input trigger pip and the prior art is compared operation, convenient, and then solved prior art and have function singleness, the technical matters of troublesome poeration.
How the below minute more detailed elaboration the present invention of a plurality of parts specifically realizes above-mentioned said amplification and reduction operation.
The raw video image that shows in the amplified video window O:
Shown in 1a among Fig. 1 and 1c part, in the present embodiment at broadcast window P when video window O in the broadcast window P overlaps, the step of the partial video image that intercepts from raw video image according to the convergent-divergent multiple in video window O broadcast may further comprise the steps:
Greater than 1 o'clock, calculate pixel region mapping point pixel region corresponding to raw video image in corresponding to partial video image that raw video image amplification after among video window Os show according to the convergent-divergent multiple at the convergent-divergent multiple;
Pixel data corresponding to pixel region that the extract real-time mapping point limits, and in video window O, play out corresponding partial video image according to pixel data.
The pixel region that raw video image is corresponding is the corresponding pixel region of whole video image, when the pixel region that raw video image is corresponding is play in video window O, at this moment, what show in the video window O is raw video image, can choose partial pixel zone on pixel region corresponding to raw video image (for example 1/2) by said method plays in video window O, at this moment, just can play out the video image of amplification (for example 2 times) in the video window O.
Dwindle that video window O shows by the partial video image on the raw video image:
Shown in 1c among Fig. 1 and 1e part, in the present embodiment when broadcast window P overlaps with video window O, the step of the partial video image that intercepts from raw video image according to the convergent-divergent multiple in video window O broadcast, further comprising the steps of:
At the convergent-divergent multiple less than 1, and video window O show be the partial video image of raw video image the time, calculate the mapping point of pixel region in pixel region A corresponding to raw video image corresponding to partial video image that the raw video image after dwindling according to the convergent-divergent multiple shows in video window O;
Pixel data corresponding to pixel region that the extract real-time mapping point limits, and in video window O, play out corresponding partial video image according to pixel data.
Among the present invention when video window O show be raw video image partial video image the time, when being pixel region R corresponding to the partial video image that shows of video window O less than pixel region A corresponding to raw video image, be described this moment, the partial video image that video window O shows still is in the state of amplification, for example: after 10 times of raw video image amplifications, dwindle again 2 times, at this moment, the partial video image that video window O shows still is in and amplifies 5 times state, so the pixel region E of the part correspondence that the video image after dwindling shows at video window O is still less than pixel region A corresponding to raw video image.
Because the present invention can also be implemented in the situation of frame size constancy of video window O the partial video image that shows in the video window O is dwindled demonstration, so that the user is when using player to watch video image, can in the situation of the frame size constancy of video window O, arbitrarily amplify, dwindle the partial video image that shows in the video window O, for example: in amplification process, the multiple that amplifies is too large, can also will dwindle again through the video image that amplifies, thereby the video image amplification effect that obtains wanting, so use more convenient.
Dwindle the raw video image that video window O shows:
Video window O comprises also that less than the condition of broadcast window P the size of video window O, raw video image overlaps with broadcast window P three in the present embodiment.
When the size that is to say video window O, raw video image overlaps with broadcast window P three, also can be according to the convergent-divergent multiple with video window O bi-directional scaling, if this moment broadcast window P size dimension when constant, then convergent-divergent only refers to dwindling the frame of video window O and raw video image.
Shown in 1a among Fig. 1 and 1b part, show raw video image at video window O in the present embodiment, and broadcast window P is when being not less than video window O, this video image zooming disposal route, further comprising the steps of:
Show raw video image at video window O, and the convergent-divergent multiple dwindles video window O less than 1 o'clock according to the convergent-divergent multiple, determine video window O contracted position coordinate;
The step of contracted position coordinate is: being that the height of convergent-divergent multiple and current video window O is long-pending with the reduced height of video window O, is the amassing of width of convergent-divergent multiple and current video window O with the reduced width of video window O;
The pixel data that the extract real-time raw video image is corresponding, and in the video window O that dwindles, play out corresponding video image according to pixel data.
Broadcast window P is not less than video window O and has two kinds of situations, and the one, it is broadcast window P and video window O overlaid that video window O equals broadcast window P, the one, broadcast window P is greater than video window O.
When pixel region R corresponding to video image that shows at video window O is pixel region A corresponding to raw video image, the shown raw video image of video window O, at this moment, raw video image is dwindled demonstration, namely dwindle the raw video image that video window O shows, at this moment, the frame size that only need to dwindle video window O, need not to change pixel region corresponding to video image that shows at video window O, for example the convergent-divergent multiple is 1/2 o'clock, 1/2 before the frame of video window O is of a size of and dwindles.At this moment, the convergent-divergent multiple can be set to 1/k, k is greater than 1, when being set as backward (or downwards) scroll wheel, inductor produces a trigger pip, k increases 1 or 0.1, the value that is the convergent-divergent multiple diminishes, can think the raw video image after dwindling is dwindled demonstration again this moment, and during (or upwards) scroll wheel, inductor produces a trigger pip forward, it is the value increase of convergent-divergent multiple that k reduces 1 or 0.1, when the value of k was reduced to 1, when continuing forward (or upwards) scroll wheel, inductor produced a trigger pip, then be considered as the convergent-divergent multiple and increase to 2 or 1.1 from 1, if when continuing forward (or upwards) scroll wheel, inductor produces a trigger pip, then the convergent-divergent multiple increases 1 or 0.1.
Shown in 1b among Fig. 1 and 1f part, video image zooming disposal route in the present embodiment, further comprising the steps of:
Show raw video image at video window O, video window O greater than 1 o'clock, according to convergent-divergent multiple amplified video window O, determines that video window O amplifies position coordinates less than broadcast window P and convergent-divergent multiple; The step of amplifying position coordinates is: it is long-pending with the height of current video window S shown in 1f part among Fig. 1 that the height of video window O frame is enlarged into the convergent-divergent multiple, the width of video window O is enlarged into the amassing of width of convergent-divergent multiple and current video window S;
The pixel data that the extract real-time raw video image is corresponding, and in the video window that amplifies, play out corresponding video image according to pixel data.
The current video window refers to the video window of the last time before zooming in or out, and for example: amplify if want that video window is carried out the 5th, then then for after the 4th amplifies, the 5th is amplified video window before to the current video window.
When the pixel region corresponding to video image that can show at video window O according to said method be pixel region corresponding to raw video image, the video window O after will dwindling and all again amplify with the video image that same ratio dwindles with video window O.
In the present embodiment, this video image zooming disposal route, further comprising the steps of:
As video window O during less than broadcast window P, Fill Color between video window O and broadcast window P; And/or, when the border of video image O moves into video window P, Fill Color between the border of video window O and video image.
The color of filling is preferably ColorKey look (Transparent color) or black, also can fill other colors outside the black such as blueness, green, certainly, dwindle in the present embodiment and also can make broadcast window P in the process of video window O along with video window O and dwindling of video image and scaled down.
As shown in Figure 1, in the present embodiment, in this video image zooming disposal route, according to the convergent-divergent multiple calculate amplify after or dwindle after the step of the mapping point of pixel region in pixel region corresponding to raw video image corresponding to the partial video image that in video window O, shows of raw video image, may further comprise the steps:
Judge whether cursor is positioned at video window O;
When cursor is positioned at video window O, pixel with cursor in the pixel region pointed or that point to the geometric center place of video window O is as the constant point in position, calculate the mapping point of pixel region R in pixel region A corresponding to raw video image corresponding to partial video image that in video window O, shows according in the raw video image after the amplification of convergent-divergent multiple, perhaps
Pixel in the pixel region that points to the geometric center place of video window O is as the constant point in position, calculates the mapping point of pixel region in pixel region A corresponding to raw video image corresponding to partial video image that the raw video image after dwindling according to the convergent-divergent multiple shows in video window O.
In the present embodiment when cursor is positioned at video window O, be preferably with the pixel in the cursor pixel region pointed as the constant point in position, calculate the mapping point of pixel region R in pixel region A corresponding to raw video image corresponding to partial video image that video window O shows, because the position of cursor can artificially be controlled by the user, so the user can control mapping point in pixel region R corresponding to video image that the shown needs of video window O amplify by the position of control cursor, and then can zoom in or out more freely the position of the shown partial video image of video window O, be conducive to improve user's experience.
No matter whether cursor is positioned at video window O in the present embodiment, be preferably geometric center with video window O as the constant point in position, calculate the mapping point of pixel region in pixel region A corresponding to raw video image corresponding to partial video image that the raw video image after dwindling according to the convergent-divergent multiple shows at video window O, because the geometric center of video window O is the point that location comparison is determined easily, so point to pixel in the pixel region as the constant point in position with the geometric center place of video window O, the partial video image that raw video image after calculating is dwindled shows in video window O is when the mapping point of pixel region corresponding on the raw video image in pixel region A corresponding to raw video image, calculating operation can be more easy, and counting yield can be higher.
The raw video image that the translation video window shows after being amplified by raw video image:
Shown in 1c among Fig. 1 and 1d part, video image zooming disposal route provided by the present invention may further comprise the steps:
When cursor is positioned at the broadcast window P of player and translation functions key and is activated, follow the trail of the track of cursor in broadcast window P;
Overlap with video window O in the broadcast window P at broadcast window P, and video window O is when showing partial video image on the raw video image video image translation with the track of cursor that video window O is shown.
Overlap with video window O in the broadcast window P at broadcast window P, and during the partial video image on the video window O demonstration raw video image, this moment is because the not change of the size of broadcast window P and video window O, but the area of the upper video image that shows of video window O has diminished relatively before, so being the video image that video window O shows, the visual effect that the video image that shows on the video window O brings to the user has been exaggerated than original image, so can realize by the way of playing the partial video image on the raw video image at video window O the amplification to the video image of video window O broadcast, like this, use the user of technique scheme provided by the present invention, in the situation of the frame size constancy of the video window O in broadcast window P, after the raw video image that shows in the video window O with broadcast window P (referring to not through amplifying also the not video image through dwindling) amplifies, when wanting the video image of demonstration in the translation broadcast window P, (for example: pin Ctrl can activate first the translation functions key, pin simultaneously left mouse button), then, mode by mobile cursor moves the video image that shows in the broadcast window P, thereby the video image that the video window O in the broadcast window P does not show is moved to video window O to be shown, compared with prior art, when watching the video image that does not show in the video window O under the state that amplifies among the present invention, need not to reduce first video after amplifying, also need not again to pull out again a rectangular area, so it is more convenient to operate.
When the translation functions key was activated in the present embodiment, its trigger pip of sending can be used as the translation instruction, and for example: can be triggered when namely being activated Ctrl and left mouse button, the trigger pip of sending is as the translation instruction.Because the position of cursor is to be controlled by mouse, when arranging like this, clicks by left mouse button, just can confirm the video image that shows in the video window O is carried out translation.Certainly, in the time of also right mouse button and/or other buttons can being triggered in the present embodiment, the trigger pip of sending is as the translation instruction.
Can use following provided by the present inventionly overlap with video window O in the broadcast window P at the broadcast window P of player as shown in Figure 2 in the present embodiment, and show the step of taking from the partial video image on the raw video image in the situation of the frame size constancy of video window O, the video image that shows in the video window O is amplified demonstration, then, after the video image amplification that shows in the video window O, re-use the partial video image that shows in the said method translation video window O provided by the present invention, also can use the method that provides in the prior art with after the video image amplification that shows in the video window O, re-use the video image after amplifying in the said method translation video window O provided by the present invention.
The raw video image that the translation video window shows after being dwindled by raw video image:
Video image zooming disposal route in the present embodiment, further comprising the steps of:
Video window O in broadcast window P is not less than broadcast window P, and video window O is when showing raw video image, make video window O with and all translations with the track of cursor of video image of interior demonstration.
There are two kinds of situations in the video window O that broadcast window P is not less than in the broadcast window P, the one, broadcast window P and video window O overlaid, the one, broadcast window P is greater than video window O, at this moment, video window O with and the video image of interior demonstration all reduced with same ratio, so translation this moment video image need to be with video image and in the lump translation of video window O, but, because this moment, video window O showed raw video image, the video image that video window O shows is whole pixel regions corresponding to raw video image at pixel region corresponding to raw video image.
In the present embodiment, the track of cursor is cursor mobile track in video window O, make in this video image zooming disposal route video window O with and the equal step of translation with the track of cursor of the video image of interior demonstration, may further comprise the steps:
According to the corresponding relation between the coordinate of the track of the coordinate of video window O before the translation in broadcast window P, cursor and predefined track and video window O, calculate the coordinate of translation rear video window O in broadcast window P, and with the position movement of video window O to the corresponding position of the coordinate that calculates;
The pixel data that the extract real-time raw video image is corresponding, and in video window O, play out corresponding video image according to pixel data.
The track of cursor can be cursor mobile track in video window O, and the track that also can move for the zone of cursor between video window O and broadcast window P is preferably the track of movement in video window O.Corresponding relation between the coordinate of track and video window O is in advance artificial setting, and be preferably: the coordinate Complete Synchronization of track and video window O, like this, in the translation process, the coordinate of video window O is relative static with cursor each other.
In the present embodiment video image zooming disposal route, make the step of the video image translation with the track of cursor that shows in the video window O, may further comprise the steps:
The mapping point of pixel region on pixel region corresponding to raw video image corresponding to partial video image that video window O is shown followed the track of cursor and changed;
Pixel data corresponding to pixel region that extract real-time is limited by the mapping point after changing, and in video window O, play out with mapping point according to pixel data and to follow the trail of accordingly video image.
Because video window O display part video image, so video image is in magnifying state, simultaneously, because video window O overlaps each other with broadcast window P and is relative static, so can move by the mode of mobile cursor the partial video image that shows in the broadcast window P, show thereby the video image that the video window O in the broadcast window P does not show is moved to video window O.
In the present embodiment, this video image zooming disposal route, further comprising the steps of:
When video window O less than broadcast window P or part when shifting out broadcast window P, Fill Color between video window O and broadcast window P.
The color of filling is preferably ColorKey look (Transparent color) or black, also can fill other colors outside the black such as blueness, green.
The below more describes for example among the present invention the amplification that specifically how to operate to realize to the video image of playing in the video window in detail, dwindles and translation:
The process of amplifying:
During video playback, pin Ctrl, when mouse pointer (cursor) was positioned on the picture (video image that video window is shown), pointer became the magnifier shape.When unclamping Ctrl, mouse pointer recovers acquiescence and namely is reduced to magnifier shape shape before.
When mouse pointer is positioned on the picture, pin Ctrl, rotate the middle button of mouse roller forward, mouse becomes the magnifier shape with plus sige, picture is pressed the length breadth ratio geometric ratio of Set For Current and is amplified, in the process of amplifying, it is constant that the point at mouse pointer place is kept its relative position in whole video window.Mouse whenever sends a signal, and the picture length and width respectively multiply by 1.1 (this convergent-divergent multiple can artificially be set).When picture after 60 times (this number of times can artificially be set) amplified on the basis of original size, even rotate mouse roller forward, image also no longer amplifies, and mouse pointer is shown as magnifier (not being with plus sige) shape again.
The process of dwindling:
When mouse pointer is positioned on the picture, pin Ctrl, rotate the middle button of mouse roller backward, mouse becomes the magnifier shape with minus sign, picture is by current length breadth ratio Scaling, in the process of dwindling, if picture is also large than window, then to keep its relative position in whole video window constant for the point at mouse pointer place; If picture narrows down to less than window, then picture is placed in the middle.Mouse whenever sends a signal, and the picture length and width are respectively divided by 1.1 (or respectively multiply by 1/1.1).When picture after the basis of original size dwindles 24 times (this number of times can artificially be set), even rotate mouse roller backward, image also no longer dwindles again, and mouse pointer is shown as magnifier (not being with minus sign) shape.
If picture rotates, overturns, then the picture after rotation, upset is done the picture zoom operations.
Picture is exaggerated or when dwindling, shows in picture upper right corner information display area: " pin Ctrl, double-click the picture reduction ".Herein, reduction instigates video window to be back to the state that shows raw video image;
The picture convergent-divergent is only to playing effectively when inferior.
The process of translation:
During video playback, pin Ctrl, when mouse pointer was positioned on the picture, pointer became the magnifier shape.When unclamping Ctrl, mouse pointer recovers acquiescence.
Pin Ctrl, when mouse pointer is positioned on the picture, pin left mouse button, pointer becomes hand shape, drags mouse, and picture is translation thereupon.Mouse moves a pixel, and then picture also moves a pixel.Unclamp left mouse button, pointer recovers the magnifier shape.
If picture rotates, overturns, zooms in or out, then the picture after rotating, overturning, zoom in or out is done the pan operation.
Picture shows in picture upper right corner information display area during by translation: " pin Ctrl, double-click the picture reduction ".
Pan is only to playing effectively when inferior.
Below more detailed elaboration realizes the employed algorithm of above-mentioned functions of the present invention, and following algorithm is part preferred implementation provided by the present invention only, and the present invention can also realize with other algorithms outside the following algorithm:
In the present embodiment, the pixel region A that video window O and raw video image are corresponding is all rectangular, and both are preferably similar figures;
The step of the mapping point in the pixel region A of pixel region R correspondence on raw video image that the partial video image that the raw video image after calculating is amplified according to the convergent-divergent multiple shows in video window O is corresponding may further comprise the steps:
As the window initial point, determine that cursor is with respect to the coordinate figure of window initial point with one of them summit of video window O;
With one of them summit of pixel region corresponding to the video image before amplifying as the temporary transient initial point of pixel, according to the height of the frame of video window O, width respectively with amplify before the height, the proportionate relationship between the width of pixel region corresponding to video image, determine that the position of the pixel in the cursor pixel region pointed is with respect to the coordinate figure of the temporary transient initial point of pixel;
With one of them summit of raw video image as pixel benchmark initial point, determine that the temporary transient initial point of pixel is with respect to the coordinate figure of pixel benchmark initial point, and according to the coordinate figure of the temporary transient initial point of pixel with respect to pixel benchmark initial point, the convergent-divergent multiple, the height of video window O, the position of the pixel in width and the cursor pixel region pointed is with respect to the coordinate figure of the temporary transient initial point of pixel, the height of the pixel region that the video image that shows at video window O before amplifying is corresponding, width calculates at least two nonadjacent vertices of pixel region R corresponding to partial video image that the raw video image after amplifying according to the convergent-divergent multiple shows at video window O with respect to the coordinate figure of pixel benchmark initial point.
The pixel region A that video window O and raw video image are corresponding is similar figures, and both are when all rectangular, raw video image can be on video window O the complete video image that demonstrates.Certainly, video window O and raw video image can not be similar figures also, like this, video window O can play out the partial video image on the raw video image, perhaps, when video window O play raw video image, video window O did not show that the part of image can fill black.
Any one summit of video window O all can be used as the window initial point, any one summit of the pixel region A that raw video image is corresponding is as the temporary transient initial point of pixel, the coordinate figure of any two nonadjacent vertices all can be determined position and the size of a rectangle, in the present embodiment, be preferably the point in the use video window O upper left corner as the window initial point, use the point in the upper left corner of pixel region A corresponding to raw video image as the temporary transient initial point of pixel, use the coordinate of the upper left angle point of pixel region R of the part correspondence that the raw video image after amplifying according to the convergent-divergent multiple shows in video window O and bottom right angle point to determine the position of pixel region R in pixel region A corresponding to raw video image corresponding to video image through amplification.Because point, the bottom right angle point in the upper left corner are than the point that is easier to determine, identify, so help the workload that reduces to calculate.
More elaborate the how video image in the amplified video window O of the present invention below in conjunction with Fig. 2.
As shown in Figure 2, implication regional and among Fig. 1 is identical shown in the A, before region representation shown in the B amplifies, and pixel region corresponding to partial video image that shows in the video window O; Region representation shown in the C amplifies video image according to the convergent-divergent multiple after, pixel region corresponding to partial video image that in video window O, shows, also with regard to after the amplifieroperation, the pixel region of finally playing, showing by video window O;
The coordinate of benchmark initial point is (0,0), and the coordinate of the temporary transient initial point of pixel is (Xbo, Ybo).
In the present embodiment, determine that the position of the pixel in the cursor pixel region pointed with respect to the step of the coordinate figure of the temporary transient initial point of pixel, is specially:
According to formula Px=W1*X/W, Py=H1*Y/H calculates the position of the pixel in the cursor pixel region pointed with respect to the coordinate figure of the temporary transient initial point of pixel, wherein:
Px, Py respectively are the position of the pixel in the cursor pixel region pointed with respect to the horizontal ordinate of the temporary transient initial point of pixel, the coordinate figure of ordinate;
The width of the pixel region that the video image before W1, H1 respectively are and amplify is corresponding, highly;
X, Y respectively are cursor with respect to the horizontal ordinate of window initial point, the coordinate figure of ordinate;
W, H respectively are the width of the frame of video window O, highly;
Calculate at least two nonadjacent vertices of pixel region C corresponding to partial video image that the raw video image after amplifying according to the convergent-divergent multiple shows with respect to the step of the coordinate figure of pixel benchmark initial point in video window O, be specially:
According to formula Xo=(n-1) * Px/n+Xbo, Yo=(n-1) * Py/n+Ybo,
The summit in the upper left corner of the pixel region R that the partial video image that the raw video image after X1=W1/n+Xo, Y1=H1/n+Yo calculate respectively and amplify according to the convergent-divergent multiple shows in video window O is corresponding and the summit in the lower right corner are with respect to the coordinate figure of pixel benchmark initial point; Wherein:
N is the convergent-divergent multiple, n>1;
The summit in the upper left corner of the pixel region R that the partial video image that the raw video image after Xo, Yo respectively are and amplify according to the convergent-divergent multiple shows in video window O is corresponding is with respect to the horizontal ordinate of pixel benchmark initial point, the coordinate figure of ordinate;
The summit in the lower right corner of the pixel region R that the partial video image that the raw video image after X1, Y1 respectively are and amplify according to the convergent-divergent multiple shows in video window O is corresponding is with respect to the horizontal ordinate of pixel benchmark initial point, the coordinate figure of ordinate;
Xbo, Ybo respectively are the temporary transient initial point of pixel with respect to the horizontal ordinate of pixel benchmark initial point, the coordinate figure of ordinate.
In the time of can being implemented in accurately the invariant position of the pixel in the cursor pixel region pointed by the above coordinate figure that calculates, to the amplification of video window O inner video image.
The mapping point of pixel region R on pixel region A corresponding to raw video image corresponding to partial video image that video window O is shown followed the track of cursor translation and the step of translation is specially:
In real time the summit in the upper left corner of the pixel region R that the video image that shows in the video window O is corresponding is adjusted into Xo+ Δ X* (n-1)/(n*W) with respect to the coordinate figure of the horizontal ordinate of pixel benchmark initial point, and the coordinate figure of ordinate is adjusted into Yo+ Δ Y* (n-1)/(n*W);
In real time the summit in the lower right corner of the pixel region R that the video image that shows in the video window O is corresponding is adjusted into Y1+ Δ Y* (n-1)/(n*W) with respect to the coordinate figure that the coordinate figure of the horizontal ordinate of pixel benchmark initial point is adjusted into X1+ Δ X* (n-1)/(n*W), ordinate, wherein:
Δ X, Δ Y respectively are cursor on video window O in the translation process, and the horizontal ordinate of cursor, ordinate are with respect to the distance of window origin translation.
Can realize accurately realizing the partial video image that shows in the video window O is carried out translation by the translation cursor by the above coordinate figure that calculates.
That dwindles video window O demonstration has passed through the video image that amplifies by raw video image:
More elaborate the present invention below in conjunction with 1c among Fig. 1 and 1e part and Fig. 3 and how to dwindle in the video window O the video image through amplifying.
As shown in Figure 3, identical among the implication of region representation shown in A, the E and Fig. 1 among the figure, region representation shown in the D dwindles the partial video image that shows in the video window when showing, before dwindling, and pixel region corresponding to partial video image that shows in the video window; The coordinate of benchmark initial point is (0,0).
In the present embodiment, pixel region R corresponding to the partial video image that shows at video window O is during less than pixel region A corresponding to raw video image, calculate the step of the mapping point of pixel region in pixel region A corresponding to raw video image corresponding to the partial video image that in video window O, shows, be specially:
According to formula XBo=Xo-(1-n) * (X1-Xo) * Xo/[Wo-(X1-Xo)],
YBo==Yo-(1-n)*(Y1-Yo)*Yo/[Ho-(Y1-Yo)],
XB1=X1+(1-n)*(X1-Xo)-X1*Xo/[Wo-(X1-Xo)],
YB1=Y1+ (1-n) * (Y1-Yo)-Y1*Yo/[Ho-(Y1-Yo)] calculate respectively in pixel region A corresponding to raw video image, the summit in the pixel region upper left corner that the partial video image that shows in video window O is corresponding and the summit in the lower right corner are with respect to the coordinate figure of pixel benchmark initial point; Wherein:
N is the convergent-divergent multiple, 1>n>0;
XBo, YBo respectively are in pixel region A corresponding to raw video image, and the summit in the pixel region upper left corner that the partial video image that the raw video image after dwindling according to the convergent-divergent multiple shows in video window O is corresponding is with respect to the horizontal ordinate of pixel benchmark initial point, the coordinate figure of ordinate;
XB1, YB1 respectively are in pixel region A corresponding to raw video image, and the summit in the pixel region lower right corner that the partial video image that the raw video image after dwindling according to the convergent-divergent multiple shows in video window O is corresponding is with respect to the horizontal ordinate of pixel benchmark initial point, the coordinate figure of ordinate;
Wo, Ho respectively are the width of pixel region A corresponding to raw video image, highly.
As shown in Figure 3, owing to want multidisplay pixel to be in X-direction after dwindling: x1=(1-n) * (X1-Xo);
Want multidisplay pixel to be in Y direction after dwindling: y1=(1-n) * (Y1-Yo);
So dwindling rear point (Xo, Yo) should translation on x axle negative direction, the distance of translation is:
FBx=x1*Xo/[Wo-(X1-Xo)];
So, XBo=Xo-x1*Xo/[Wo-(X1-Xo)]
=Xo-(1-n)*(X1-Xo)*Xo/[Wo-(X1-Xo)];
In like manner: dwindling rear point (Xo, Yo) should translation on the Y-axis negative direction, and the distance of translation is:
FBy=y1*Yo/[Ho-(Y1-Yo)];
So, YBo=Yo-y1*Yo[Ho-(Y1-Yo)];
=Yo-(1-n)*(Y1-Yo)*Yo/[Ho-(Y1-Yo)];
Dwindle rear point (X1, Y1) should be on x axle positive dirction translation x1-FBx;
So dwindle the point (XB1, YB1) in the rear lower right corner be
XB1=X1+x1-FBx;
=X1+(1-n)*(X1-Xo)-x1*Xo/[Wo-(X1-Xo)];
Dwindle rear point (X1, Y1) should be on the Y-axis positive dirction translation y1-FBy;
YB1=Y1+y1-FBy;
=Y1+(1-n)*(Y1-Yo)-y1*Yo/[Ho-(Y1-Yo)];
When partial video image shown in the video window O is dwindled demonstration, convergent-divergent multiple n is greater than 0, less than 1, at this moment, owing to be to dwindle through the video image that amplifies, when the multiple that dwindles during less than the multiple that before raw video image amplified, although video image has dwindled, but the effect that shown video image brings the user in the video window O for the raw video image that never amplifies still is the state that video image is in amplification, for example will amplify 6 times video image, be reduced into and amplify 2 times video image, at this moment, although video image has dwindled 3 times, but, amplify 2 times video image, for the video image that does not amplify, still be in and amplify 2 times state, so the interior shown partial video image of video window O still only is the partial video image on raw video image.
In the time of can being implemented in accurately the invariant position of the pixel in the cursor pixel region pointed by the above coordinate figure that calculates, the partial video image that shows in the video window O is dwindled demonstration.
Because the sense organ of user's naked eyes usually can be too inaccurate, so above coordinate figure is to allow suitable error, even can carry out suitable change by above coordinate figure.Certainly, also can determine above-mentioned coordinate figure with the additive method outside the above method, for example: can set other relatively more suitable coordinate figures according to use experience.
In the present embodiment, be made as mouse and button outward, button comprises translation functions key and zoom function key; Reception is by the trigger pip of peripheral hardware input, and determines to may further comprise the steps the method for convergent-divergent multiple according to trigger pip:
Judge whether predefined zoom function key is activated;
If the zoom function key is activated, then detect number of times and rotating direction that inductor in the roller in the roller rolling process sends trigger pip;
The rule of correspondence between number of times, rotating direction and predefined number of times, rotating direction and the convergent-divergent multiple of the trigger pip of sending according to inductor is determined the concrete numerical value of convergent-divergent multiple.
The zoom function key can artificially be set, and zoom function key and translation functions key also can be same button.For example, zoom function key and translation functions key all can be set as Ctrl.
When the zoom function key is pressed, mode by scroll wheel just can be inputted the convergent-divergent multiple, for example: in wanting the amplified video window during shown video image, can be set as when (or making progress) rolls a roller forward, inductor produces a trigger pip, the convergent-divergent multiple increases by 0.1, (or upwards) is when rolling a roller namely for the first time forward, the convergent-divergent multiple becomes 1.1 from 1, video image is exaggerated 1.1 times, the initial value that is to say the convergent-divergent multiple can be defaulted as 1, also can be defaulted as 1.1, in the time of can being set as in the given time forward (or upwards) scroll wheel this moment, inductor produces a trigger pip, convergent-divergent multiple n becomes n square (for example 1.21) or convergent-divergent multiple n by n (for example 1.1) and becomes n+0.1 by n (for example 1), backward during (or downwards) scroll wheel, inductor produces a trigger pip, convergent-divergent multiple n becomes the square root (for example 1.1) of n or convergent-divergent multiple n by n (for example 1.21) and becomes n-0.1 by n (for example 1), until n is 1 o'clock, if when continuing backward in the given time (or downwards) scroll wheel this moment, inductor produces a trigger pip, convergent-divergent multiple n becomes 1-0.1 namely 0.9 or become 1/ (k+1) or be 1/ (k+0.1) by 1/k by n (for example 1), n is 1 o'clock, k is 1, if when continuing backward (or downwards) scroll wheel, inductor produces a trigger pip, and k increases by 1.
Certainly, in the present embodiment pressing keys can use press+or-number (for example: by once+the convergent-divergent multiple adds 1 or 0.1) or the mode of directly inputting concrete numerical value input the convergent-divergent multiple.
As shown in Figure 4, the video image zooming treating apparatus of the video image zooming disposal route that use the invention described above provided by the present invention provides, comprise User Interface 1, player 2, peripheral hardware, player 2 comprises broadcast window 20, video window 200 and transmit control module 25, video window 200 is positioned within the broadcast window 20, wherein:
User Interface 1 is used for receiving the trigger pip by the peripheral hardware input;
Transmit control module 25 is used for determining the convergent-divergent multiple according to trigger pip when broadcast window 20 overlaps with video window 200, plays the partial video image that intercepts from raw video image according to the convergent-divergent multiple at video window 200;
User Interface 1 also is used for determining the convergent-divergent multiple when video window 200 during less than the video window 200 interior demonstration raw video image of broadcast window 20 and convergent-divergent according to trigger pip, and according to the convergent-divergent multiple with video window 200 bi-directional scalings.
Video image zooming treating apparatus provided by the present invention has identical technical characterictic with the video image zooming disposal route that the invention described above provides, so also can realize identical technique effect, solve identical technical matters, so no longer repeat to set forth herein.
Player 2 in the present embodiment, also comprise Video Rendering module 24, wherein:
Transmit control module 25, be used for overlapping with video window 200 at broadcast window 20, and the convergent-divergent multiple is greater than 1 o'clock, calculates raw video image after the amplification at the mapping point of pixel region in pixel region corresponding to raw video image corresponding to the partial video image of video window 200 interior demonstrations according to the convergent-divergent multiple;
Transmit control module 25, also be used for video window 200 show be the partial video image of raw video image and convergent-divergent multiple less than 1 o'clock, calculate raw video image after dwindling according to the convergent-divergent multiple at the mapping point of pixel region in pixel region corresponding to raw video image corresponding to the partial video image of video window 200 interior demonstrations;
Video Rendering module 24 is used for pixel data corresponding to pixel region that the extract real-time mapping point limits, and plays out corresponding partial video image according to pixel data in video window 200.
Above method can be implemented in the situation of size constancy of broadcast window 20 and video window 200, to the amplification of the video image of video window 200 interior demonstrations, can also the video image after amplifying be dwindled.
Present embodiment is made as mouse 5 and button 6 at home and abroad, and player 2 also comprises file read module 21, separation module 22 and video decode module 23, wherein:
Video window 200 comprises also that less than the condition of broadcast window 20 size of video window 200, raw video image overlaps with broadcast window 20 threes;
User Interface 1 also is used for showing that at video window 200 raw video image and convergent-divergent multiple less than 1 o'clock, dwindle video window 200 according to the convergent-divergent multiple, determines video window 200 contracted position coordinates;
User Interface 1 also is used for showing raw video images at video window 200, and video window 200 greater than 1 o'clock, determines that video window 200 amplifies position coordinateses less than broadcast window 20 and convergent-divergent multiple;
The step of determining video window 200 contracted position coordinates is: being that the height of convergent-divergent multiple and current video window 200 is long-pending with the reduced height of video window 200 frames, is the amassing of width of convergent-divergent multiple and current video window 200 with the reduced width of video window 200;
Determine that the step that video window 200 amplifies position coordinateses is: the height that the height of video window 200 frames is enlarged into convergent-divergent multiple and current video window 200 is long-pending, the width of video window 200 is enlarged into the amassing of width of convergent-divergent multiple and current video window 200;
Video Rendering module 24 also is used for pixel data corresponding to extract real-time raw video image, and plays out corresponding video image according to pixel data in video window 200;
File read module 21 is used for reading the transmission control end and has the video file that node was obtained of video resource in the P2P network in the mode of P2P, and video file is sent to separation module 22;
Separation module 22 is used for video file is separated into video data encoder and voice data, and video data encoder is sent to video decode module 23;
Video decode module 23 is used for video data encoder is decoded as input video rendering module 24 behind the pixel data corresponding with the pixel region of video image;
Transmit control module 25 also is used for starting or closing Video Rendering module 24, file read module 21, separation module 22 and video decode module 23.
Can realize scaled down to the video image of the video window 200 in the broadcast window 20 and video window 200 interior demonstrations can also after scaled down, realizing the equal proportion amplification by the said method User Interface.
Transmission control end 7 is with P2P (Peer-to-Peer, Chinese can be translated into " equity " or " point-to-point ") the mode node that has video resource in the P2P network 8 obtain video file, be conducive to the fast transport of video file, and then help the quick broadcast of video image.Certainly, transmission control end 7 also can use other modes outside the P2P to obtain video file.
User Interface in the present embodiment, also for Fill Color between the video window after dwindling and the broadcast window, the color of filling is preferably ColorKey look (Transparent color) or black, also can fill other colors outside the black such as blueness, green.
The preferred implementation that provides in the method that the video image of 25 pairs of video window 200 interior demonstrations of transmit control module is processed in the present embodiment and the preferred implementation of applied algorithm thereof and the video image zooming disposal route that the invention described above provides is identical, so no longer repeat to set forth herein.
The present invention can be by the roller of roll mouse 6 and/or the mode of pressing keys 5, be preferably to adopt and pin Ctrl, and the mode of the roller of roll mouse 6 is inputted the convergent-divergent multiple, thereby be implemented in the situation of frame size constancy of video window 200, the raw video image of video window 200 interior demonstrations amplified show or dwindle, need not to adopt the method for prior art in video window 200, to pull out a rectangular area, not only can realize amplifying, input convergent-divergent multiple can be more accurate, but also can realize dwindling, simultaneously, operation is also more convenient.
The above; be the specific embodiment of the present invention only, but protection scope of the present invention is not limited to this, anyly is familiar with those skilled in the art in the technical scope that the present invention discloses; can expect easily changing or replacing, all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection domain of claim.