CN106131628B - A kind of method of video image processing and device - Google Patents
A kind of method of video image processing and device Download PDFInfo
- Publication number
- CN106131628B CN106131628B CN201610550261.XA CN201610550261A CN106131628B CN 106131628 B CN106131628 B CN 106131628B CN 201610550261 A CN201610550261 A CN 201610550261A CN 106131628 B CN106131628 B CN 106131628B
- Authority
- CN
- China
- Prior art keywords
- signal
- sliding
- area
- coordinate
- touch signal
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/41—Structure of client; Structure of client peripherals
- H04N21/414—Specialised client platforms, e.g. receiver in car or embedded in a mobile appliance
- H04N21/41407—Specialised client platforms, e.g. receiver in car or embedded in a mobile appliance embedded in a portable device, e.g. video client on a mobile phone, PDA, laptop
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0487—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
- G06F3/0488—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/47—End-user applications
- H04N21/472—End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content
- H04N21/47202—End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content for requesting content on demand, e.g. video on demand
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Human Computer Interaction (AREA)
- Theoretical Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The present invention relates to field of video broadcasting technology, and in particular to a kind of method of video image processing and device.Wherein, method includes: to receive the first slip signals and the second slip signals, and the first slip signals include the first initial touch signal and first terminates touch signal, and the second slip signals include that the second initial touch signal and second terminate touch signal;According to the first initial touch signal and the second initial touch signal determine video source being played on to zoom area;Determine to zoom in and out treated target area to zoom area according to the first end touch signal and the second end touch signal;And it is played out target area is plotted to the video image in zoom area.Through the invention, the region and the target area after scaling that user can according to need selection scaling, do not generate black background when video image is reduced and played, and can also compare in amplification and check other region contents, meet user demand, substantially increases user experience.
Description
Technical Field
The invention relates to the technical field of video playing, in particular to a video image processing method and device.
Background
With the continuous development of video playing technology, the proportion of the time for people to browse videos in life is greatly increased. When browsing a video, the video may be enlarged or reduced according to different needs, and for example, when observing details of a certain area in order to adjust the image in real time, the video image of the area needs to be enlarged.
At present, the function of enlarging or reducing a video image usually adopts a digital zoom technology to process the video image, and since the digital zoom image has no unified standard in the industry, the existing method enlarges or reduces the video image as a whole, so as to enlarge or reduce a certain part of the video image. However, although this method achieves local enlargement or reduction in the video image, there still exist some defects, for example, when the image needs to be reduced, a black background appears on the reduced boundary, which results in poor user experience; when the image is enlarged, only the enlarged area is displayed on the interface, and the contents of other areas cannot be contrasted and viewed.
Disclosure of Invention
The technical problem to be solved by the present invention is to provide a method and an apparatus for processing a video image, in which a black background is easily generated when a video image zooming function in the prior art is reduced, and contents of other areas cannot be contrasted and viewed when the video image zooming function is enlarged.
According to an aspect of the present invention, there is provided a video image processing method including: receiving a first sliding signal and a second sliding signal, wherein the first sliding signal and the second sliding signal are sliding signals of two fingers of a user on a touch screen respectively, the first sliding signal comprises a first initial touch signal and a first end touch signal, and the second sliding signal comprises a second initial touch signal and a second end touch signal; determining a region to be zoomed of a video source which is playing according to the first initial touch signal and the second initial touch signal; determining a target area of the area to be zoomed after zooming according to the first ending touch signal and the second ending touch signal; and drawing the video image in the area to be zoomed to the target area for playing.
Further, determining a region to be zoomed of a video source being played according to the first initial touch signal and the second initial touch signal comprises: determining a first coordinate corresponding to the first initial touch signal on a resolution coordinate system of the touch screen and a second coordinate corresponding to the second initial touch signal on the resolution coordinate system of the touch screen; converting the first coordinate to a third coordinate on a coordinate system of the video source and converting the second coordinate to a fourth coordinate on the coordinate system of the video source; and taking the third coordinate and the fourth coordinate as two vertexes of a first rectangular area, and taking the first rectangular area as the area to be zoomed.
Further, drawing the video image in the region to be zoomed to the target region for playing comprises: determining a fifth coordinate corresponding to the first ending touch signal on a resolution coordinate system of the touch screen and a sixth coordinate corresponding to the second ending touch signal on the resolution coordinate system of the touch screen; determining a second rectangular area by taking the fifth coordinate and the sixth coordinate as two vertexes; and mapping the vertex coordinates of the first rectangular area to the vertex coordinates of the second rectangular area, and drawing the video image of the first rectangular area in the second rectangular area.
Further, after receiving the first sliding signal and the second sliding signal, the method further comprises: determining whether the video image of the area to be zoomed is enlarged or reduced according to the sliding directions of the first sliding signal and the second sliding signal, wherein if the sliding direction of the first sliding signal is opposite to the sliding direction of the second sliding signal, the video image is determined to be reduced; the sliding direction of the first sliding signal is opposite to that of the second sliding signal, and amplification is determined; or determining whether the video image of the area to be zoomed is zoomed in or zoomed out according to the sliding distance of the first sliding signal and the second sliding signal, wherein if the distance between the coordinate corresponding to the first initial touch signal and the coordinate corresponding to the second initial touch signal is greater than the distance between the coordinate corresponding to the first ending touch signal and the coordinate corresponding to the second ending touch signal, the zoom-out is determined; and if the distance between the coordinate corresponding to the first initial touch signal and the coordinate corresponding to the second initial touch signal is smaller than the distance between the coordinate corresponding to the first end touch signal and the coordinate corresponding to the second end touch signal, determining to be amplification.
Further, the method further comprises: if the sliding directions of the first sliding signal and the second sliding signal are the same direction, determining that the operation on the area to be zoomed is moving; calculating the motion vector coordinate of the area to be zoomed according to the first sliding signal and the second sliding signal; adding the vertex coordinates of the area to be zoomed to the movement vector coordinates to obtain vertex coordinates of the moved area so as to determine the moved area; and drawing the video image in the area to be zoomed in the moved area.
According to another aspect of the present invention, there is provided a video image processing apparatus including: the touch screen comprises a receiving unit, a first touch unit and a second touch unit, wherein the receiving unit is used for receiving a first sliding signal and a second sliding signal, the first sliding signal and the second sliding signal are sliding signals of two fingers of a user on the touch screen respectively, the first sliding signal comprises a first initial touch signal and a first end touch signal, and the second sliding signal comprises a second initial touch signal and a second end touch signal; the first determining unit is used for determining a region to be zoomed of a video source which is playing according to the first initial touch signal and the second initial touch signal; a second determining unit, configured to determine, according to the first end touch signal and the second end touch signal, a target area of the to-be-zoomed area after zooming processing is performed; and the playing unit is used for drawing the video image in the area to be zoomed to the target area for playing.
Further, the first determination unit includes: the first determining module is used for determining a first coordinate corresponding to the first initial touch signal on a resolution coordinate system of the touch screen and a second coordinate corresponding to the second initial touch signal on the resolution coordinate system of the touch screen; the conversion module is used for converting the first coordinate into a third coordinate on a coordinate system of the video source and converting the second coordinate into a fourth coordinate on the coordinate system of the video source; and the second determining module is used for taking the third coordinate and the fourth coordinate as two vertexes of a first rectangular area and taking the first rectangular area as the area to be zoomed.
Further, the play unit includes: a third determining module, configured to determine a fifth coordinate corresponding to the first end touch signal in a resolution coordinate system of the touch screen, and a sixth coordinate corresponding to the second end touch signal in the resolution coordinate system of the touch screen; a fourth determining module, configured to determine a second rectangular area by using the fifth coordinate and the sixth coordinate as two vertices; and the mapping module is used for mapping the vertex coordinates of the first rectangular area to the vertex coordinates of the second rectangular area and drawing the video image of the first rectangular area in the second rectangular area.
Further, the apparatus further comprises: a third determining unit, configured to determine whether a video image of the area to be zoomed is enlarged or reduced according to sliding directions of a first sliding signal and a second sliding signal after receiving the first sliding signal and the second sliding signal, where the sliding direction of the first sliding signal and the sliding direction of the second sliding signal are opposite, and then the video image is determined to be reduced; the sliding direction of the first sliding signal is opposite to that of the second sliding signal, and amplification is determined; or, a fourth determining unit, configured to determine whether a video image of the region to be zoomed is zoomed in or zoomed out according to a sliding distance of the first sliding signal and the second sliding signal, wherein if a distance between a coordinate corresponding to the first initial touch signal and a coordinate corresponding to the second initial touch signal is greater than a distance between a coordinate corresponding to the first end touch signal and a coordinate corresponding to the second end touch signal, it is determined to be zoomed out; and if the distance between the coordinate corresponding to the first initial touch signal and the coordinate corresponding to the second initial touch signal is smaller than the distance between the coordinate corresponding to the first end touch signal and the coordinate corresponding to the second end touch signal, determining to be amplification.
Further, the apparatus further comprises: a fifth determining unit, configured to determine that the operation on the region to be zoomed is moving if the sliding directions of the first sliding signal and the second sliding signal are the same direction; the first calculation unit is used for calculating the motion vector coordinates of the area to be zoomed according to the first sliding signal and the second sliding signal; the second calculation unit is used for adding the vertex coordinates of the area to be zoomed with the movement vector coordinates to obtain vertex coordinates of the moved area so as to determine the moved area; the playing unit is further used for drawing the video image in the area to be zoomed in the moved area.
According to the invention, by receiving a first sliding signal and a second sliding signal; determining a region to be zoomed of a video source which is playing according to the first initial touch signal and the second initial touch signal; determining a target area of the area to be zoomed after zooming according to the first ending touch signal and the second ending touch signal; and drawing the video image in the area to be zoomed to the target area for playing, so that a user selects the zooming area and the zooming size through fingers, and after the local part of the video image is amplified or reduced, the playing of the part of the video image does not influence the playing of other parts of contents of the video, and only covers the playing of the video content in the target area.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of a specific example of a video image processing method in embodiment 1 of the present invention;
FIGS. 2a and 2b are diagrams illustrating a specific example of video image magnification in an embodiment of the present invention;
fig. 3 is a schematic block diagram of a specific example of a video image processing apparatus according to embodiment 2 of the present invention.
Detailed Description
The technical solutions of the present invention will be described clearly and completely with reference to the accompanying drawings, and it should be understood that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In addition, the technical features involved in the different embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
Example 1
The embodiment provides a video image processing method, which can be used in a terminal with a touch screen, such as a mobile phone, a tablet computer, and the like.
As shown in fig. 1, the method includes:
step S101, receiving a first sliding signal and a second sliding signal. The first sliding signal and the second sliding signal are sliding signals of two fingers of a user on the touch screen respectively, the first sliding signal comprises a first initial touch signal and a first end touch signal, and the second sliding signal comprises a second initial touch signal and a second end touch signal.
Step S102, determining a region to be zoomed of a video source which is playing according to the first initial touch signal and the second initial touch signal.
And step S103, determining a target area subjected to zooming processing in the area to be zoomed according to the first ending touch signal and the second ending touch signal.
And step S104, drawing the video image in the area to be zoomed to the target area for playing.
When a user needs to enlarge or reduce a video being played, a region to be zoomed is selected by finger touch, and then whether a video image of the region needs to be enlarged or reduced is determined by sliding a finger, wherein a region between positions where two fingers stop after sliding is a target region after zooming, taking zooming as an example, when the user needs to enlarge a certain region when watching the video being played, as shown in fig. 2a, the user selects the region to be zoomed by the finger, wherein two differences are x-shaped and respectively represent a first initial touch signal and a second initial touch signal, and the region between the first initial touch signal and the second initial touch signal is the region to be zoomed, after the finger selects the region to be zoomed, the user slides in the opposite direction (as shown by arrows in the figure) to positions (a first ending touch signal and a second ending touch signal) shown as ○ in fig. 2b, and the target region is between the first ending touch signal and the second ending touch signal, so that the original video image played in the region to be zoomed is drawn into the target region to be played in a later playing process, and local enlargement processing of the video image is realized.
It should be noted that, in this embodiment, after the local part of the video image is enlarged or reduced, the playing of the local part of the video image does not affect the playing of other parts of the video content, and only covers the playing of the video content in the target area, so that a black background is not generated when the video image is reduced and played, and the contents of other areas can be contrasted and viewed when the video image is enlarged, and a user can select a zoom area and a target area after zooming as needed, thereby greatly improving user experience.
Preferably, the determining the area to be zoomed of the video source being played according to the first initial touch signal and the second initial touch signal comprises: determining a first coordinate corresponding to the first initial touch signal on a resolution coordinate system of the touch screen and a second coordinate corresponding to the second initial touch signal on the resolution coordinate system of the touch screen; converting the first coordinate into a third coordinate on the coordinate system of the video source, and converting the second coordinate into a fourth coordinate on the coordinate system of the video source; and taking the third coordinate and the fourth coordinate as two vertexes of the first rectangular area, and taking the first rectangular area as an area to be zoomed.
In this embodiment, because the touch signals correspond to the coordinates on the resolution of the touch screen, the user determines the corresponding coordinates on the resolution coordinate system of the touch screen first on the touch screen, then converts the coordinates into the coordinates (the third coordinate and the fourth coordinate) in the video source coordinate system through the conversion of the coordinate system, and obtains a first rectangular area on the coordinate system of the video source by using the coordinates as a vertex, where the area is an area with zoom, thereby determining an area that needs to be enlarged or reduced on the video source.
Further, drawing the video image in the region to be zoomed to the target region for playing comprises: determining a fifth coordinate corresponding to the first ending touch signal on a resolution coordinate system of the touch screen and a sixth coordinate corresponding to the second ending touch signal on the resolution coordinate system of the touch screen; determining a second rectangular area by taking the fifth coordinate and the sixth coordinate as two vertexes; and mapping the vertex coordinates of the first rectangular area to the vertex coordinates of the second rectangular area, and drawing the video image of the first rectangular area in the second rectangular area.
When performing reduction or enlargement processing with a zoom region, it is necessary to determine a target region on the screen. And determining corresponding coordinates (a fifth coordinate and a sixth coordinate) according to touch signals (a first finishing touch signal and a second finishing touch signal) of a finger of a user, determining a second rectangular area, namely a target area, namely a playing window after scaling processing by taking the coordinates as a vertex, mapping the vertex coordinates of the first rectangular area (on a coordinate system of a video source) to the second rectangular area (on a resolution coordinate system of the touch screen), and drawing a video image of the first rectangular area in the second rectangular area for playing.
Preferably, after receiving the first sliding signal and the second sliding signal, the method further comprises: determining whether the video image of the area to be zoomed is enlarged or reduced according to the sliding directions of the first sliding signal and the second sliding signal, wherein if the sliding direction of the first sliding signal is opposite to the sliding direction of the second sliding signal, the video image is determined to be reduced; and if the sliding direction of the first sliding signal is opposite to that of the second sliding signal, the amplification is determined.
In this embodiment, whether the video image is enlarged or reduced may be determined by the sliding direction of the first slide signal and the second slide signal. As shown in fig. 2a, the two sliding signals are opposite in direction, and then are magnified, and conversely, if the two sliding signals are opposite in direction, then the two sliding signals are shrunk.
Optionally, it may also be determined whether the video image of the area to be zoomed is zoomed in or zoomed out according to a sliding distance of the first sliding signal and the second sliding signal, wherein if a distance between a coordinate corresponding to the first initial touch signal and a coordinate corresponding to the second initial touch signal is greater than a distance between a coordinate corresponding to the first end touch signal and a coordinate corresponding to the second end touch signal, it is determined to be zoomed out; and determining to be amplified if a distance between the coordinates corresponding to the first initial touch signal and the coordinates corresponding to the second initial touch signal is less than a distance between the coordinates corresponding to the first end touch signal and the coordinates corresponding to the second end touch signal.
For example, the distance between the initial touch signals is L1, the distance between the end touch signals is L2, and if L1 is greater than L2, it is reduced; l1 being less than L2 is exaggerated. In the calculation process of coordinate conversion and the like, a scaling ratio, i.e., L1/L2, may also be calculated using L1 and L2, where the scaling factor of an image area is the square of the scaling ratio.
Preferably, the method further comprises: if the sliding directions of the first sliding signal and the second sliding signal are the same direction, determining that the operation of the area to be zoomed is moving; calculating the motion vector coordinate of the area to be zoomed according to the first sliding signal and the second sliding signal; adding the vertex coordinates of the area to be zoomed to the movement vector coordinates to obtain the vertex coordinates of the moved area so as to determine the moved area; and drawing the video image in the area to be zoomed in the moved area.
In this embodiment, the selected area may be moved after being enlarged or reduced, or only a part may be moved without being enlarged or reduced. In this embodiment, the vertex coordinates of the moving area are respectively added to the motion vector coordinates, so that the moved vertex coordinates can be obtained, and a video image is drawn in the area corresponding to the vertex coordinates to play.
Example 2
The present embodiment provides a video image processing apparatus, as shown in fig. 1, including:
the receiving unit 10 is configured to receive a first slide signal and a second slide signal, where the first slide signal and the second slide signal are slide signals of two fingers of a user on a touch screen, respectively, the first slide signal includes a first initial touch signal and a first end touch signal, and the second slide signal includes a second initial touch signal and a second end touch signal;
the first determining unit 20 is configured to determine a region to be zoomed of a video source being played according to the first initial touch signal and the second initial touch signal;
the second determining unit 30 is configured to determine, according to the first end touch signal and the second end touch signal, a target area to be zoomed, where zooming processing is performed on the area to be zoomed;
the playing unit 40 is used for drawing the video image in the region to be zoomed to the target region for playing.
When a user needs to enlarge or reduce a video being played, a region to be zoomed is selected by finger touch, and then whether a video image of the region needs to be enlarged or reduced is determined by sliding a finger, wherein a region between positions where two fingers stop after sliding is a target region after zooming, taking zooming as an example, when the user needs to enlarge a certain region when watching the video being played, as shown in fig. 2a, the user selects the region to be zoomed by the finger, wherein two differences are x-shaped and respectively represent a first initial touch signal and a second initial touch signal, and the region between the first initial touch signal and the second initial touch signal is the region to be zoomed, after the finger selects the region to be zoomed, the user slides in the opposite direction (as shown by arrows in the figure) to positions (a first ending touch signal and a second ending touch signal) shown as ○ in fig. 2b, and the target region is between the first ending touch signal and the second ending touch signal, so that the original video image played in the region to be zoomed is drawn into the target region to be played in a later playing process, and local enlargement processing of the video image is realized.
It should be noted that, in this embodiment, after the local part of the video image is enlarged or reduced, the playing of the local part of the video image does not affect the playing of other parts of the video content, and only covers the playing of the video content in the target area, so that a black background is not generated when the video image is reduced and played, and the contents of other areas can be contrasted and viewed when the video image is enlarged, and a user can select a zoom area and a target area after zooming as needed, thereby greatly improving user experience.
Preferably, the first determination unit includes: the first determining module is used for determining a first coordinate corresponding to the first initial touch signal on a resolution coordinate system of the touch screen and a second coordinate corresponding to the second initial touch signal on the resolution coordinate system of the touch screen; the conversion module is used for converting the first coordinate into a third coordinate on a coordinate system of the video source and converting the second coordinate into a fourth coordinate on the coordinate system of the video source; and the second determining module is used for taking the third coordinate and the fourth coordinate as two vertexes of the first rectangular area and taking the first rectangular area as an area to be zoomed.
In this embodiment, because the touch signals correspond to the coordinates on the resolution of the touch screen, the user determines the corresponding coordinates on the resolution coordinate system of the touch screen first on the touch screen, then converts the coordinates into the coordinates (the third coordinate and the fourth coordinate) in the video source coordinate system through the conversion of the coordinate system, and obtains a first rectangular area on the coordinate system of the video source by using the coordinates as a vertex, where the area is an area with zoom, thereby determining an area that needs to be enlarged or reduced on the video source.
Further, the play unit includes: the third determining module is used for determining a fifth coordinate corresponding to the first touch ending signal on a resolution coordinate system of the touch screen and a sixth coordinate corresponding to the second touch ending signal on the resolution coordinate system of the touch screen; the fourth determining module is used for determining a second rectangular area by taking the fifth coordinate and the sixth coordinate as two vertexes; and the mapping module is used for mapping the vertex coordinates of the first rectangular area to the vertex coordinates of the second rectangular area and drawing the video image of the first rectangular area in the second rectangular area.
When performing reduction or enlargement processing with a zoom region, it is necessary to determine a target region on the screen. And determining corresponding coordinates (a fifth coordinate and a sixth coordinate) according to touch signals (a first finishing touch signal and a second finishing touch signal) of a finger of a user, determining a second rectangular area, namely a target area, namely a playing window after scaling processing by taking the coordinates as a vertex, mapping the vertex coordinates of the first rectangular area (on a coordinate system of a video source) to the second rectangular area (on a resolution coordinate system of the touch screen), and drawing a video image of the first rectangular area in the second rectangular area for playing.
Preferably, the apparatus further comprises: a third determining unit, configured to determine whether the video image of the area to be zoomed is enlarged or reduced according to sliding directions of the first sliding signal and the second sliding signal after receiving the first sliding signal and the second sliding signal, wherein the sliding direction of the first sliding signal and the sliding direction of the second sliding signal are opposite, and then the video image is determined to be reduced; and if the sliding direction of the first sliding signal is opposite to that of the second sliding signal, the amplification is determined.
In this embodiment, whether the video image is enlarged or reduced may be determined by the sliding direction of the first slide signal and the second slide signal. As shown in fig. 2a, the two sliding signals are opposite in direction, and then are magnified, and conversely, if the two sliding signals are opposite in direction, then the two sliding signals are shrunk.
Optionally, it may also be that the apparatus may comprise: a fourth determining unit, configured to determine whether a video image of the area to be zoomed is zoomed in or out according to a sliding distance of the first sliding signal and the second sliding signal, wherein if a distance between a coordinate corresponding to the first initial touch signal and a coordinate corresponding to the second initial touch signal is greater than a distance between a coordinate corresponding to the first end touch signal and a coordinate corresponding to the second end touch signal, it is determined to be zoomed out; and determining to be amplified if a distance between the coordinates corresponding to the first initial touch signal and the coordinates corresponding to the second initial touch signal is less than a distance between the coordinates corresponding to the first end touch signal and the coordinates corresponding to the second end touch signal.
For example, the distance between the initial touch signals is L1, the distance between the end touch signals is L2, and if L1 is greater than L2, it is reduced; l1 being less than L2 is exaggerated. In the calculation process of coordinate conversion and the like, a scaling ratio, i.e., L1/L2, may also be calculated using L1 and L2, where the scaling factor of an image area is the square of the scaling ratio.
Preferably, the apparatus further comprises: a fifth determining unit, configured to determine that the operation on the region to be zoomed is moving if the sliding directions of the first sliding signal and the second sliding signal are the same direction; the first calculation unit is used for calculating the motion vector coordinates of the area to be zoomed according to the first sliding signal and the second sliding signal; the second calculation unit is used for adding the vertex coordinates of the area to be zoomed with the motion vector coordinates to obtain the vertex coordinates of the moved area so as to determine the moved area; and the playing unit is also used for drawing the video image in the area to be zoomed in the moved area.
In this embodiment, the selected area may be moved after being enlarged or reduced, or only a part may be moved without being enlarged or reduced. In this embodiment, the vertex coordinates of the moving area are respectively added to the motion vector coordinates, so that the moved vertex coordinates can be obtained, and a video image is drawn in the area corresponding to the vertex coordinates to play.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It should be understood that the above examples are only for clarity of illustration and are not intended to limit the embodiments. Other variations and modifications will be apparent to persons skilled in the art in light of the above description. And are neither required nor exhaustive of all embodiments. And obvious variations or modifications therefrom are within the scope of the invention.
Claims (10)
1. A video image processing method, comprising:
receiving a first sliding signal and a second sliding signal, wherein the first sliding signal and the second sliding signal are sliding signals of two fingers of a user on a touch screen respectively, the first sliding signal comprises a first initial touch signal and a first end touch signal, and the second sliding signal comprises a second initial touch signal and a second end touch signal;
determining a region to be zoomed of a video source which is playing according to the first initial touch signal and the second initial touch signal;
determining a target area of the area to be zoomed after zooming according to the first ending touch signal and the second ending touch signal; and
and drawing the video image in the area to be zoomed to the target area for playing, so that after the local part of the video image is amplified or reduced, the playing of the video image does not influence the playing of other parts of the video, and only the playing of the video content in the target area is covered.
2. The method of claim 1, wherein determining the area to be zoomed of the video source being played according to the first initial touch signal and the second initial touch signal comprises:
determining a first coordinate corresponding to the first initial touch signal on a resolution coordinate system of the touch screen and a second coordinate corresponding to the second initial touch signal on the resolution coordinate system of the touch screen;
converting the first coordinate to a third coordinate on a coordinate system of the video source and converting the second coordinate to a fourth coordinate on the coordinate system of the video source;
and taking the third coordinate and the fourth coordinate as two vertexes of a first rectangular area, and taking the first rectangular area as the area to be zoomed.
3. The method of claim 2, wherein drawing the video image in the region to be zoomed to the target region for playing comprises:
determining a fifth coordinate corresponding to the first ending touch signal on a resolution coordinate system of the touch screen and a sixth coordinate corresponding to the second ending touch signal on the resolution coordinate system of the touch screen;
determining a second rectangular area by taking the fifth coordinate and the sixth coordinate as two vertexes;
and mapping the vertex coordinates of the first rectangular area to the vertex coordinates of the second rectangular area, and drawing the video image of the first rectangular area in the second rectangular area.
4. The method of claim 1, wherein after receiving the first sliding signal and the second sliding signal, the method further comprises:
determining whether the video image of the area to be zoomed is enlarged or reduced according to the sliding directions of the first sliding signal and the second sliding signal, wherein if the sliding direction of the first sliding signal is opposite to the sliding direction of the second sliding signal, the video image is determined to be reduced; the sliding direction of the first sliding signal is opposite to that of the second sliding signal, and amplification is determined; or,
determining whether the video image of the area to be zoomed is zoomed in or zoomed out according to the sliding distance of the first sliding signal and the second sliding signal, wherein if the distance between the coordinate corresponding to the first initial touch signal and the coordinate corresponding to the second initial touch signal is larger than the distance between the coordinate corresponding to the first ending touch signal and the coordinate corresponding to the second ending touch signal, the zoom-out is determined; and if the distance between the coordinate corresponding to the first initial touch signal and the coordinate corresponding to the second initial touch signal is smaller than the distance between the coordinate corresponding to the first end touch signal and the coordinate corresponding to the second end touch signal, determining to be amplification.
5. The method of claim 1, further comprising:
if the sliding directions of the first sliding signal and the second sliding signal are the same direction, determining that the operation on the area to be zoomed is moving;
calculating the motion vector coordinate of the area to be zoomed according to the first sliding signal and the second sliding signal;
adding the vertex coordinates of the area to be zoomed to the movement vector coordinates to obtain vertex coordinates of the moved area so as to determine the moved area;
and drawing the video image in the area to be zoomed in the moved area.
6. A video image processing apparatus characterized by comprising:
the touch screen comprises a receiving unit, a first touch unit and a second touch unit, wherein the receiving unit is used for receiving a first sliding signal and a second sliding signal, the first sliding signal and the second sliding signal are sliding signals of two fingers of a user on the touch screen respectively, the first sliding signal comprises a first initial touch signal and a first end touch signal, and the second sliding signal comprises a second initial touch signal and a second end touch signal;
the first determining unit is used for determining a region to be zoomed of a video source which is playing according to the first initial touch signal and the second initial touch signal;
a second determining unit, configured to determine, according to the first end touch signal and the second end touch signal, a target area of the to-be-zoomed area after zooming processing is performed; and
and the playing unit is used for drawing the video image in the area to be zoomed to the target area for playing, so that after the local part of the video image is amplified or reduced, the playing of the video image does not influence the playing of other part of contents of the video, and only covers the playing of the video content in the target area.
7. The apparatus according to claim 6, wherein the first determining unit comprises:
the first determining module is used for determining a first coordinate corresponding to the first initial touch signal on a resolution coordinate system of the touch screen and a second coordinate corresponding to the second initial touch signal on the resolution coordinate system of the touch screen;
the conversion module is used for converting the first coordinate into a third coordinate on a coordinate system of the video source and converting the second coordinate into a fourth coordinate on the coordinate system of the video source;
and the second determining module is used for taking the third coordinate and the fourth coordinate as two vertexes of a first rectangular area and taking the first rectangular area as the area to be zoomed.
8. The apparatus of claim 7, wherein the playback unit comprises:
a third determining module, configured to determine a fifth coordinate corresponding to the first end touch signal in a resolution coordinate system of the touch screen, and a sixth coordinate corresponding to the second end touch signal in the resolution coordinate system of the touch screen;
a fourth determining module, configured to determine a second rectangular area by using the fifth coordinate and the sixth coordinate as two vertices;
and the mapping module is used for mapping the vertex coordinates of the first rectangular area to the vertex coordinates of the second rectangular area and drawing the video image of the first rectangular area in the second rectangular area.
9. The apparatus of claim 6, further comprising:
a third determining unit, configured to determine whether a video image of the area to be zoomed is enlarged or reduced according to sliding directions of a first sliding signal and a second sliding signal after receiving the first sliding signal and the second sliding signal, where the sliding direction of the first sliding signal and the sliding direction of the second sliding signal are opposite, and then the video image is determined to be reduced; the sliding direction of the first sliding signal is opposite to that of the second sliding signal, and amplification is determined; or,
a fourth determining unit, configured to determine whether a video image of the area to be zoomed is zoomed in or out according to a sliding distance of the first sliding signal and the second sliding signal, wherein if a distance between a coordinate corresponding to the first initial touch signal and a coordinate corresponding to the second initial touch signal is greater than a distance between a coordinate corresponding to the first end touch signal and a coordinate corresponding to the second end touch signal, it is determined to be zoomed out; and if the distance between the coordinate corresponding to the first initial touch signal and the coordinate corresponding to the second initial touch signal is smaller than the distance between the coordinate corresponding to the first end touch signal and the coordinate corresponding to the second end touch signal, determining to be amplification.
10. The apparatus of claim 6, further comprising:
a fifth determining unit, configured to determine that the operation on the region to be zoomed is moving if the sliding directions of the first sliding signal and the second sliding signal are the same direction;
the first calculation unit is used for calculating the motion vector coordinates of the area to be zoomed according to the first sliding signal and the second sliding signal;
the second calculation unit is used for adding the vertex coordinates of the area to be zoomed with the movement vector coordinates to obtain vertex coordinates of the moved area so as to determine the moved area;
the playing unit is further used for drawing the video image in the area to be zoomed in the moved area.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610550261.XA CN106131628B (en) | 2016-07-13 | 2016-07-13 | A kind of method of video image processing and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610550261.XA CN106131628B (en) | 2016-07-13 | 2016-07-13 | A kind of method of video image processing and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106131628A CN106131628A (en) | 2016-11-16 |
CN106131628B true CN106131628B (en) | 2019-06-04 |
Family
ID=57283260
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610550261.XA Active CN106131628B (en) | 2016-07-13 | 2016-07-13 | A kind of method of video image processing and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106131628B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110694270A (en) * | 2019-10-17 | 2020-01-17 | 腾讯科技(深圳)有限公司 | Video stream display method, device and system |
CN110944186B (en) * | 2019-12-10 | 2022-02-01 | 杭州当虹科技股份有限公司 | High-quality viewing method for local area of video |
CN111652799A (en) * | 2020-04-14 | 2020-09-11 | 北京奇艺世纪科技有限公司 | Image processing method and device, electronic equipment and readable storage medium |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
AU2006101096B4 (en) * | 2005-12-30 | 2010-07-08 | Apple Inc. | Portable electronic device with multi-touch input |
US8736561B2 (en) * | 2010-01-06 | 2014-05-27 | Apple Inc. | Device, method, and graphical user interface with content display modes and display rotation heuristics |
US20120092381A1 (en) * | 2010-10-19 | 2012-04-19 | Microsoft Corporation | Snapping User Interface Elements Based On Touch Input |
US9933935B2 (en) * | 2011-08-26 | 2018-04-03 | Apple Inc. | Device, method, and graphical user interface for editing videos |
EP2759921B1 (en) * | 2013-01-25 | 2020-09-23 | Morpho, Inc. | Image display apparatus, image displaying method and program |
-
2016
- 2016-07-13 CN CN201610550261.XA patent/CN106131628B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN106131628A (en) | 2016-11-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108363535B (en) | Picture display method and device, storage medium, processor and terminal | |
US10248216B2 (en) | Method for operating terminal device with gesture and device | |
US9240070B2 (en) | Methods and systems for viewing dynamic high-resolution 3D imagery over a network | |
CN110100251B (en) | Apparatus, method, and computer-readable storage medium for processing documents | |
US20150222814A1 (en) | Image Acquisition Method and Apparatus | |
US20140071068A1 (en) | Constant speed display method of mobile device | |
US9826276B2 (en) | Method and computing device for performing virtual camera functions during playback of media content | |
CN102890816B (en) | Video image zooming disposal route and video image zooming treating apparatus | |
US8965051B2 (en) | Method and apparatus for providing hand detection | |
CN104394422A (en) | Video segmentation point acquisition method and device | |
CN102890603A (en) | Video image processing method and video image processing device | |
US20230362328A1 (en) | Video frame insertion method and apparatus, and electronic device | |
CN109743566A (en) | A kind of method and apparatus of the video format of VR for identification | |
CN115134649A (en) | Method and system for presenting interactive elements within video content | |
CN106131628B (en) | A kind of method of video image processing and device | |
CN112965780A (en) | Image display method, apparatus, device and medium | |
WO2023160617A9 (en) | Video frame interpolation processing method, video frame interpolation processing device, and readable storage medium | |
CN109324736A (en) | The exchange method and device of partial enlargement picture | |
WO2017088228A1 (en) | Picture zooming method and apparatus | |
JP2009246917A (en) | Video display device, and video processing apparatus | |
CN112363787A (en) | Image processing method and device and electronic equipment | |
CN109739403B (en) | Method and apparatus for processing information | |
CN105094614B (en) | Method for displaying image and device | |
CN112995401A (en) | Control display method, device, equipment and medium | |
WO2024174971A1 (en) | Video processing method and apparatus, and device and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |