CN110618776B - Picture scaling method, device, equipment and storage medium - Google Patents

Picture scaling method, device, equipment and storage medium Download PDF

Info

Publication number
CN110618776B
CN110618776B CN201811594007.5A CN201811594007A CN110618776B CN 110618776 B CN110618776 B CN 110618776B CN 201811594007 A CN201811594007 A CN 201811594007A CN 110618776 B CN110618776 B CN 110618776B
Authority
CN
China
Prior art keywords
track
touch
point
sliding
picture
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
Application number
CN201811594007.5A
Other languages
Chinese (zh)
Other versions
CN110618776A (en
Inventor
不公告发明人
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Shiguang Renran Technology Co ltd
Original Assignee
Beijing Shiguang Renran Technology Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing Shiguang Renran Technology Co ltd filed Critical Beijing Shiguang Renran Technology Co ltd
Priority to CN201811594007.5A priority Critical patent/CN110618776B/en
Publication of CN110618776A publication Critical patent/CN110618776A/en
Application granted granted Critical
Publication of CN110618776B publication Critical patent/CN110618776B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04845Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range for image manipulation, e.g. dragging, rotation, expansion or change of colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction 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/0488Interaction 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

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the disclosure discloses a picture scaling method, a picture scaling device, picture scaling equipment and a storage medium. The method comprises the following steps: detecting touch operation acting on a current display picture; determining whether a touch track corresponding to the touch operation is an arc track with a single-point touch point as a circle center; and when the touch track is an arc track taking a single-point touch point as a circle center, performing zooming operation on the current display picture according to the touch track. The technical scheme of the embodiment of the disclosure solves the technical problems that the existing picture scaling scheme is easy to have picture exit, single-finger sliding operation and scaling operation do not have continuity and the like, and achieves the technical effect of completing the sliding operation and scaling operation of the picture based on the single-finger continuity.

Description

Picture scaling method, device, equipment and storage medium
Technical Field
The embodiment of the disclosure relates to the technical field of application program development, and in particular, to a method, a device, equipment and a storage medium for zooming a picture.
Background
At present, methods for zooming pictures displayed on an intelligent terminal device mainly include the following two methods:
one of the methods is as follows: and detecting a double-click operation acted on a displayed picture by a user, and executing a zooming operation on the picture after the double-click operation is detected.
The other method comprises the following steps: and detecting the sliding operation of the user on the double fingers on the displayed picture, and executing zooming operation on the picture according to the detected sliding operation of the double fingers.
The first solution has the disadvantage that the operation of double-clicking the picture is easily mistakenly detected as an exit operation when browsing the picture; the second scheme has the disadvantage that if the single-finger sliding operation is performed before the picture is zoomed through the two-finger sliding, that is, the picture is zoomed through the two-finger sliding operation after the single-finger sliding operation, the single-finger sliding and zooming actions are not continuous, and the operation convenience is not high.
Disclosure of Invention
The embodiment of the disclosure provides a picture scaling method, a picture scaling device, picture scaling equipment and a storage medium, which are used for optimizing an existing picture scaling scheme so as to realize that a single finger can continuously complete picture sliding and scaling operations.
In a first aspect, an embodiment of the present disclosure provides a method for scaling an image, which may include:
detecting touch operation acting on a current display picture;
determining whether a touch track corresponding to the touch operation is an arc track with a single-point touch point as a circle center;
and when the touch track is an arc track taking a single-point touch point as a circle center, performing zooming operation on the current display picture according to the touch track.
In the foregoing solution, optionally, determining whether the touch trajectory corresponding to the touch operation is an arc trajectory with a single-point touch point as a center of circle may include:
if the sliding touch operation of the screen is detected after the single-point touch operation of the screen is detected, sampling track points of the sliding track according to a set sampling interval to obtain at least three track points;
determining the curvature corresponding to the sliding track according to the coordinates of at least three track points;
and determining whether the sliding track is an arc track with the single-point touch point as the center of a circle according to the curvature.
In the foregoing scheme, optionally, performing a zoom operation on the current display picture according to the touch trajectory may include:
determining the direction of the sliding track according to the coordinates of at least three track points; the directions include a clockwise direction and a counterclockwise direction;
and executing zooming-in or zooming-out operation on the currently displayed picture according to the direction of the sliding track.
In the foregoing scheme, optionally, performing a zoom operation on the current display picture according to the touch trajectory may include:
determining a reduction factor by which a reduction operation is performed or a magnification factor by which a magnification operation is performed, according to the curvature;
and executing a reducing operation on the current display picture according to the reducing times or executing an amplifying operation on the current display picture according to the amplifying times.
In the foregoing scheme, optionally, before sampling the track points of the sliding track according to the set sampling interval, the method may further include: and judging whether the duration of the single-point touch operation exceeds a set threshold, if so, triggering follow-up operation of sampling the track points of the sliding track according to a set sampling interval.
In the foregoing scheme, optionally, the picture scaling method may further include: and if the duration of the single-point touch operation does not exceed the set threshold, sliding the currently displayed picture left and right.
In a second aspect, an embodiment of the present disclosure further provides a picture scaling device, where the device may include:
the touch operation detection module is used for detecting touch operation acting on the current display picture;
the touch track determining module is used for determining whether a touch track corresponding to the touch operation is an arc track with a single-point touch point as a circle center;
and the zooming operation executing module is used for executing zooming operation on the current display picture according to the touch track when the touch track is an arc track taking the single-point touch point as the circle center.
In the foregoing solution, optionally, the touch trajectory determining module may include:
the track point sampling unit is used for sampling track points of the sliding track according to a set sampling interval to obtain at least three track points if the sliding touch operation of the screen is detected after the single-point touch operation of the screen is detected;
the curvature determining unit is used for determining the curvature corresponding to the sliding track according to the coordinates of at least three track points;
and the sliding track determining unit is used for determining whether the sliding track is an arc track with a single-point touch point as a circle center according to the curvature.
In the foregoing solution, optionally, the scaling operation executing module may include:
the sliding track direction determining unit is used for determining the direction of the sliding track according to the coordinates of at least three track points; the directions include a clockwise direction and a counterclockwise direction;
and the zooming-in and zooming-out operation execution unit is used for executing zooming-in or zooming-out operation on the currently displayed picture according to the direction of the sliding track.
In the foregoing solution, optionally, the scaling operation executing module may include:
a magnification-reduction-factor determining unit for determining a reduction factor at which a reduction operation is performed or a magnification factor at which an enlargement operation is performed, based on the curvature;
and the zooming-in and zooming-out operation execution unit is used for executing zooming-out operation on the current display picture according to the zooming-out times or zooming-in operation on the current display picture according to the zooming-in times.
In the foregoing solution, optionally, the touch trajectory determining module may further include:
and the duration judging unit is used for judging whether the duration of the single-point touch operation exceeds a set threshold, and if so, triggering follow-up operation of sampling the track points of the sliding track according to a set sampling interval.
In the foregoing scheme, optionally, the duration determining unit may be further configured to slide the currently displayed picture left and right if the duration of the single-point touch operation does not exceed a set threshold.
In a third aspect, an embodiment of the present disclosure further provides a terminal device, which may include:
one or more processors;
a memory for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the picture scaling method provided by any embodiment of the present disclosure.
In a fourth aspect, the embodiments of the present disclosure further provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the picture scaling method provided in any of the embodiments of the present disclosure.
According to the technical scheme of the embodiment of the disclosure, a specific touch track corresponding to a touch operation can be determined by detecting the touch operation acting on a current display picture; when the touch track is determined to be an arc track with a single-point touch point as a circle center, the zooming operation of the picture can be realized. The technical scheme solves the technical problems that the existing picture scaling scheme is easy to exit pictures, single-finger sliding and the scaling operation does not have continuity and the like, and achieves the technical effect of finishing the sliding and scaling operation of the pictures based on the single-finger continuity.
Drawings
Fig. 1 is a flowchart of a method for scaling a picture according to a first embodiment of the disclosure;
fig. 2 is a flowchart of a picture scaling method in the second embodiment of the disclosure;
fig. 3 is a schematic diagram of track points in a picture scaling method in the second embodiment of the present disclosure;
fig. 4 is a block diagram of a picture scaling device in a third embodiment of the disclosure;
fig. 5 is a schematic structural diagram of a terminal device in a fourth embodiment of the present disclosure.
Detailed Description
The present disclosure is described in further detail below with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the disclosure and are not limiting of the disclosure. It should be further noted that, for the convenience of description, only some of the structures relevant to the present disclosure are shown in the drawings, not all of them.
In the following embodiments, optional features and examples are provided in each embodiment, and various features described in the embodiments may be combined to form a plurality of alternatives, and each numbered embodiment should not be regarded as only one technical solution.
Example one
Fig. 1 is a flowchart of a picture scaling method provided in a first embodiment of the disclosure. The embodiment can be applied to the situation of realizing picture scaling. The method can be executed by the picture scaling device provided by the embodiment of the disclosure, the device can be realized by software and/or hardware, and the device can be integrated on various user terminal devices or servers. Referring to fig. 1, the method of the embodiment of the present disclosure specifically includes the following steps:
s110, touch operation acting on the currently displayed picture is detected.
The current displayed picture may be a picture being displayed on the intelligent terminal device, the picture may be a picture stored on the terminal device or a picture being browsed based on a network, and the terminal device may be any device with a touch screen function, such as a mobile phone, a notebook, a tablet computer, and the like. The touch operation may be a click operation, a slide operation, a press operation, or the like, or may be a combination of any of the above touch operations. The implementation manner of detecting the touch operation performed by the user on the currently displayed picture may be determined by any prior art, and is not described herein again.
And S120, determining whether the touch track corresponding to the touch operation is an arc track with a single-point touch point as a circle center.
When a touch operation acting on the currently displayed picture is detected, a specific touch track corresponding to the touch operation can be determined. For example, when the touch operation is a click operation, the touch trajectory may be a point; when the touch operation is a sliding operation, the touch trajectory may be a straight line, an arc, or a combination of at least 2 arbitrary figures, etc.; when the touch operation is a combination of a click operation and a slide operation, the touch trajectory may be an arc trajectory with a single-point touch point as a center of circle. Then, when the touch trajectory is an arc trajectory having a single-point touch point as a circle center, the determining method may be to first determine whether the touch trajectory includes an arc trajectory and a single-point trajectory, and then determine whether the circle center of the arc trajectory is the single-point trajectory.
S130, when the touch track is an arc track with a single-point touch point as a circle center, performing zooming operation on the current display picture according to the touch track
When it is determined that the touch trajectory is an arc trajectory with a single-point touch point as a circle center, a preset function corresponding to the arc trajectory with the single-point touch point as the circle center may be implemented, and for example, an enlargement operation or a reduction operation may be performed on a currently displayed picture.
In order to better understand the specific implementation process of the above steps, the following describes an exemplary method for scaling an image according to this embodiment with reference to a specific example. The exemplary illustration is described from the perspective of user operation and the perspective of intelligent terminal response, respectively, for the same application scenario.
Illustratively, the description from the user operation perspective may be: when a user browses the pictures stored in the intelligent terminal, the currently displayed pictures can be slid by a single finger to realize the switching of the pictures. At this time, when the user browses a certain picture, and wants to view local details of the picture carefully or view the picture from an overall angle, the user can directly draw a single finger of a circular arc with the point of the finger as a center without leaving the picture by the finger, so that the zoom operation of the picture can be realized. For example, when a user draws a circular arc clockwise with a single finger, the picture can be enlarged; when the user draws an arc counterclockwise by a single finger, the picture can be reduced.
Then, the response angle of the smart terminal corresponding to the user operation angle may be: when detecting that a touch track corresponding to the touch operation of the user is a straight line, executing a picture switching function; when detecting that the touch track corresponding to the touch operation of the user is an arc track with a single-point touch point as a circle center, for example, when the direction of the arc track is clockwise, executing an image magnification operation; when the direction of the circular arc trajectory is counterclockwise, the image reduction operation is performed.
According to the technical scheme of the embodiment of the disclosure, a specific touch track corresponding to a touch operation can be determined by detecting the touch operation acting on a current display picture; when the touch track is determined to be an arc track with a single-point touch point as a circle center, the zooming operation of the picture can be realized. The technical scheme solves the technical problems that the existing picture scaling scheme is easy to exit pictures, single-finger sliding and the scaling operation does not have continuity and the like, and achieves the technical effect of finishing the sliding and scaling operation of the pictures based on the single-finger continuity.
Example two
Fig. 2 is a flowchart of a picture scaling method provided in the second embodiment of the disclosure. The present embodiment is optimized based on the first embodiment. In this embodiment, the "determining whether the touch trajectory corresponding to the touch operation is an arc trajectory with a single-point touch point as a center" is specifically optimized to "if the sliding touch operation on the screen is detected after the single-point touch operation on the screen is detected, sampling the track points of the sliding trajectory according to a set sampling interval to obtain at least three track points; determining the curvature corresponding to the sliding track according to the coordinates of at least three track points; and determining whether the sliding track is a circular arc track with the single-point touch point as the center of a circle according to the curvature. Correspondingly, as shown in fig. 2, the method of this embodiment may specifically include the following steps:
s210, touch operation acting on the currently displayed picture is detected.
S220, if the sliding touch operation of the screen is detected after the single-point touch operation of the screen is detected, sampling of track points is carried out on the sliding track according to a set sampling interval, and at least three track points are obtained.
The single-point touch operation may be an operation of touching the screen in a single-click manner each time, for example, a single-finger touch operation of a user each time; the sliding touch operation may be an operation of touching the screen in a sliding manner each time, for example, a touch of a single finger sliding each time the user.
After the single-point touch operation on the current display picture on the screen is detected and the sliding touch operation on the current display picture on the screen is detected, the sliding track corresponding to the sliding operation can be sampled according to the set sampling interval so as to obtain at least three track points. The set sampling interval may be sampling the sliding track based on a set time threshold, for example, sampling the sliding track every 0.05 seconds; it is also possible to sample the sliding trajectory based on a set distance threshold, for example, sampling the sliding trajectory every 100 pixel points in a direction parallel to the ground plane.
And S230, determining the curvature corresponding to the sliding track according to the coordinates of at least three track points.
The method for determining the curvature corresponding to the sliding track according to the coordinates of the at least three track points may be: taking three track points as an example, as shown in fig. 3, an X-Y axis coordinate system is established with a touch track corresponding to a single-point touch operation as a circle center, a direction parallel to a ground plane as an X axis, and a direction perpendicular to the ground plane as a Y axis; determining coordinates of three sampled track points, such as a (x1, y1), B (x2, y2), C (x3, y3), the coordinates of the center point (x0, y0) of the arc formed by the three track points may be:
Figure BDA0001920933770000081
Figure BDA0001920933770000091
the calculation formula of the coefficients a1 and a2 referred to in the above formula may be:
Figure BDA0001920933770000092
Figure BDA0001920933770000093
further, the radius R of the circular arc can be calculated according to the circle center (x0, y0) and the track point a (x1, y 1):
Figure BDA0001920933770000094
then, the curvature K is 1/R.
And S240, determining whether the sliding track is an arc track with a single-point touch point as a circle center according to the curvature.
The method for determining whether the touch trajectory is an arc trajectory may be: when the curvature calculated according to the track points is within a preset threshold range, the touch track can be considered to be an arc track. Further, after it is detected that the touch operation includes a single-point touch operation, it may be determined that the touch trajectory is an arc trajectory with a single-point touch point as a center of a circle.
And S250, when the touch track is an arc track taking a single-point touch point as a circle center, performing zooming operation on the currently displayed picture according to the touch track.
According to the technical scheme of the embodiment of the disclosure, when the sliding touch operation of the screen is detected after the single-point touch operation of the screen is detected, the track points of the sliding track are sampled according to the set sampling interval, and at least three track points are obtained; determining the curvature corresponding to the sliding track based on the coordinates of the track points; further, whether the sliding track is an arc track with a single-point touch point as a circle center can be determined according to the curvature. According to the technical scheme, whether the sliding track is the arc track with the single-point touch point as the circle center or not can be accurately judged based on at least three track points, in other words, whether the sliding track is matched with the zooming operation of the picture or not and whether the zooming operation of the picture needs to be executed or not can be accurately judged.
An optional technical solution, on the basis of the second embodiment, is to perform a zoom operation on a current display picture according to a touch trajectory, and specifically, the method may further include:
and determining the direction of the sliding track according to the coordinates of at least three track points, wherein the direction comprises a clockwise direction and a counterclockwise direction. The method for determining the direction of the sliding track according to the coordinates of the at least three track points may be: taking three track points as an example, vectors can be determined according to A (x1, y1), B (x2, y2) and C (x3, y3)
Figure BDA0001920933770000101
Sum vector
Figure BDA0001920933770000102
Then according to
Figure BDA0001920933770000103
And
Figure BDA0001920933770000104
result of the vector product operation of
Figure BDA0001920933770000105
The direction of the sliding trajectory can be determined, in particular:
Figure BDA0001920933770000106
when in use
Figure BDA0001920933770000107
When positive, the direction is counterclockwise; when in use
Figure BDA0001920933770000108
When negative, the direction is clockwise.
And executing zooming-in or zooming-out operation on the currently displayed picture according to the direction of the sliding track. Whether the zoom-in operation or the zoom-out operation is performed on the currently displayed picture may be determined according to a clockwise direction or a counterclockwise direction of the sliding track, and for example, the zoom-in operation may be performed on the currently displayed picture when the sliding track is in the clockwise direction, and the zoom-out operation may be performed on the currently displayed picture otherwise. Further, the zoom factor when performing the zoom operation may be a predefined factor threshold, for example, zooming in 1.5 times on the basis of the currently displayed picture, or zooming out 1/2, etc. The step setting has the advantage that whether the zooming-in operation or the zooming-out operation is performed on the current display picture can be determined according to the direction of the track point in the touch track.
An optional technical solution, on the basis of the second embodiment, is to perform a zoom operation on a current display picture according to a touch trajectory, and specifically, the method may further include:
a reduction factor for performing a reduction operation or a magnification factor for performing a magnification operation is determined according to the curvature. According to the curvature, a zoom factor when a zoom operation is performed on the current picture can be determined, and for example, the zoom factor can be equal to the curvature, in other words, the curvature is a reduction factor or a magnification factor; the scaling factor may also have a scaling relationship with the curvature, for example, the curvature is 2 times the scaling factor, the curvature is the square of the scaling factor, and the like, wherein the scaling factor includes a magnification factor and a reduction factor.
And executing a reducing operation on the current display picture according to the reducing times or executing an amplifying operation on the current display picture according to the amplifying times. The zoom operation may be performed on the current display picture based on the magnification, and the determination of the zoom-out operation or the zoom-in operation may be based on a preset rule, for example, the preset rule may be that the zoom-out operation is performed on the current display picture based on the zoom-out magnification, or that the zoom-in operation is performed on the current display picture based on the zoom-in magnification. The above steps are advantageous in that the reduction factor or the enlargement factor when the zooming operation is performed on the currently displayed picture can be determined according to the curvature.
On the basis of the above technical solution, before sampling the track points of the sliding track according to the set sampling interval, the image scaling method may further include: and judging whether the duration of the single-point touch operation exceeds a set threshold, if so, triggering follow-up operation of sampling the track points of the sliding track according to a set sampling interval. When it is detected that the user applies the single-point touch operation to the currently displayed picture and then detects that the user applies the sliding touch operation to the currently displayed picture, it is required to determine whether the duration of the single-point touch operation exceeds a set threshold, where the set threshold may be 0.5 second, 1 second, and the like. When the duration of the single-point touch operation exceeds a set threshold, it can be determined that the operation that the user needs to be executed by the intelligent terminal is a predefined picture scaling operation. Then, a subsequent series of operations of sampling the track points of the sliding track according to the set sampling interval may be performed to implement the scaling of the picture.
Optionally, when the duration of the single-point touch operation does not exceed the set threshold, it may be determined that the operation that the user needs to be performed by the intelligent terminal is only browsing, switching pictures, and the like, and the operation of scaling pictures does not need to be performed. Therefore, under the condition that the duration does not exceed the set threshold, the subsequent operation of sampling the track points of the sliding track according to the set sampling interval does not need to be executed, and the operation of sliding the current display picture left and right only needs to be executed. The step setting has the advantages that whether the user needs to zoom the picture or slide the picture left and right can be accurately distinguished, and the technical effect of barrier-free switching between the picture sliding function and the picture zooming function by a single finger is achieved.
EXAMPLE III
Fig. 4 is a block diagram of a picture scaling apparatus according to a third embodiment of the present disclosure, where the apparatus is configured to execute the picture scaling method according to any of the embodiments. The image scaling device and the image scaling method of the embodiments belong to the same inventive concept, and details that are not described in detail in the embodiments of the image scaling device may refer to the embodiments of the image scaling method. Referring to fig. 4, the apparatus may specifically include: a touch operation detection module 310, a touch trajectory determination module 320, and a zoom operation execution module 330.
The touch operation detection module 310 is configured to detect a touch operation applied to a currently displayed picture;
a touch trajectory determining module 320, configured to determine whether a touch trajectory corresponding to a touch operation is an arc trajectory with a single-point touch point as a center of circle;
the zooming operation executing module 330 is configured to execute a zooming operation on the currently displayed picture according to the touch trajectory when the touch trajectory is an arc trajectory with a single-point touch point as a center of a circle.
Optionally, the touch trajectory determining module 310 may specifically include:
the track point sampling unit is used for sampling track points of the sliding track according to a set sampling interval to obtain at least three track points if the sliding touch operation of the screen is detected after the single-point touch operation of the screen is detected;
the curvature determining unit is used for determining the curvature corresponding to the sliding track according to the coordinates of at least three track points;
and the sliding track determining unit is used for determining whether the sliding track is an arc track with a single-point touch point as a circle center according to the curvature.
Optionally, the scaling operation executing module 310 may specifically include:
the sliding track direction determining unit is used for determining the direction of the sliding track according to the coordinates of at least three track points; the directions include a clockwise direction and a counterclockwise direction;
and the zooming-in and zooming-out operation execution unit is used for executing zooming-in or zooming-out operation on the currently displayed picture according to the direction of the sliding track.
Optionally, the scaling operation executing module 310 may specifically include:
a magnification-reduction-factor determining unit for determining a reduction factor at which a reduction operation is performed or a magnification factor at which an enlargement operation is performed, based on the curvature;
and the zooming-in and zooming-out operation execution unit is used for executing zooming-out operation on the current display picture according to the zooming-out times or zooming-in operation on the current display picture according to the zooming-in times.
Optionally, the touch trajectory determining module 310 may further include:
and the duration judging unit is used for judging whether the duration of the single-point touch operation exceeds a set threshold, and if so, triggering follow-up operation of sampling the track points of the sliding track according to a set sampling interval.
Optionally, the duration determining unit may be further configured to slide the currently displayed picture left and right if the duration of the single-point touch operation does not exceed the set threshold.
In the image scaling device provided by the third embodiment of the present disclosure, through the mutual cooperation of the touch operation detection module and the touch trajectory determination module, a specific touch trajectory corresponding to the touch operation can be determined, and then the scaling operation of the image can be realized based on the scaling operation execution module. The device solves the technical problems that the existing picture scaling scheme is easy to cause picture exit, single-finger sliding and the scaling operation does not have continuity and the like, and achieves the technical effect of finishing the sliding and scaling operation of the picture based on the single-finger continuity.
The image zooming device provided by the embodiment of the disclosure can execute the image zooming method provided by any embodiment of the disclosure, and has corresponding functional modules and beneficial effects of the execution method.
It should be noted that, in the embodiment of the image scaling apparatus, the included units and modules are only divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only used for distinguishing one functional unit from another, and are not used for limiting the protection scope of the present disclosure.
Example four
Referring now to fig. 5, a block diagram of a terminal device 800 suitable for use in implementing embodiments of the present disclosure is shown. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The terminal device shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 5, the terminal device 800 may include a processing means (e.g., a central processing unit, a graphic processor, etc.) 801 that may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)802 or a program loaded from a storage means 808 into a Random Access Memory (RAM) 803. In the RAM 803, various programs and data necessary for the operation of the terminal apparatus 800 are also stored. The processing apparatus 801, the ROM 802, and the RAM 803 are connected to each other by a bus 804. An input/output (I/O) interface 805 is also connected to bus 804.
Generally, the following devices may be connected to the I/O interface 805: input devices 806 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 807 including, for example, a Liquid Crystal Display (LCD), speakers, vibrators, and the like; storage 808 including, for example, magnetic tape, hard disk, etc.; and a communication device 809. The communication means 809 may allow the terminal apparatus 800 to perform wireless or wired communication with other apparatuses to exchange data. While fig. 5 illustrates a terminal apparatus 800 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
EXAMPLE five
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer storage medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication means 809, or installed from the storage means 808, or installed from the ROM 802. The computer program, when executed by the processing apparatus 801, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer storage media described above in this disclosure can be computer readable signal media or computer readable storage media or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer storage medium that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer storage medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer storage medium may be contained in the terminal device; or may exist separately without being assembled into the terminal device.
The computer storage medium carries one or more programs that, when executed by the terminal device, cause the terminal device to: detecting touch operation acting on a current display picture; determining whether a touch track corresponding to the touch operation is an arc track with a single-point touch point as a circle center; and when the touch track is an arc track taking a single-point touch point as a circle center, performing zooming operation on the current display picture according to the touch track.
Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present disclosure may be implemented by software or hardware. Here, the name of the module does not constitute a limitation to the module itself in some cases, and for example, the touch operation detection module may also be described as a "module that detects a touch operation applied to a currently displayed picture".
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.

Claims (8)

1. A picture scaling method, comprising:
detecting touch operation acting on a current display picture;
if sliding touch operation on the screen with a single-point touch point corresponding to the single-point touch operation as a starting point is detected after the single-point touch operation on the screen is detected, sampling track points of a sliding track according to a set sampling interval to obtain at least three track points, wherein the single-point touch operation and the sliding touch operation are continuously completed by a touch object;
determining the curvature corresponding to the sliding track according to the coordinates of the at least three track points;
judging whether the sliding track is an arc track according to whether the curvature is within a preset threshold range, and determining whether the touch track is an arc track with a single-point touch point as a circle center according to a judgment result and whether the sliding touch operation comprises the single-point touch operation;
and when the touch track is an arc track with a single-point touch point as a circle center, performing zooming operation on the currently displayed picture according to the touch track.
2. The method of claim 1, wherein performing a zoom operation on the currently displayed picture according to the touch trajectory comprises:
determining the direction of the sliding track according to the coordinates of the at least three track points; the directions include a clockwise direction and a counterclockwise direction;
and executing zooming-in or zooming-out operation on the currently displayed picture according to the direction of the sliding track.
3. The method of claim 1, wherein performing a zoom operation on the currently displayed picture according to the touch trajectory comprises:
determining a reduction factor for performing a reduction operation or a magnification factor for a magnification operation according to the curvature;
and executing a reducing operation on the current display picture according to the reducing times or executing an amplifying operation on the current display picture according to the amplifying times.
4. The method of claim 1, wherein before sampling the trace points of the sliding trajectory at the set sampling interval, the method further comprises:
and judging whether the duration of the single-point touch operation exceeds a set threshold, if so, triggering follow-up operation of sampling track points of the sliding track according to a set sampling interval.
5. The method of claim 4, further comprising: and if the duration of the single-point touch operation does not exceed a set threshold, sliding the currently displayed picture left and right.
6. A picture scaling apparatus, comprising:
the touch operation detection module is used for detecting touch operation acting on the current display picture;
a touch track determining module, configured to determine whether a touch track corresponding to the touch operation is an arc track with a single-point touch point as a circle center;
the zooming operation execution module is used for executing zooming operation on the current display picture according to the touch track when the touch track is an arc track taking a single-point touch point as a circle center;
wherein the touch trajectory determination module includes:
the device comprises a track point sampling unit, a track point sampling unit and a control unit, wherein the track point sampling unit is used for sampling track points of a sliding track according to a set sampling interval to obtain at least three track points if sliding touch operation on a screen is detected by taking a single-point touch point corresponding to the single-point touch operation as a starting point after the single-point touch operation on the screen is detected, and the single-point touch operation and the sliding touch operation are continuously finished by a touch object; the curvature determining unit is used for determining the curvature corresponding to the sliding track according to the coordinates of the at least three track points; and the sliding track determining unit is used for judging whether the touch track is an arc track according to whether the curvature is within a preset threshold range, and determining whether the touch track is the arc track with a single-point touch point as a circle center according to a judgment result and whether the sliding touch operation comprises the single-point touch operation.
7. A terminal device, characterized in that the terminal device comprises:
one or more processors;
a memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the picture scaling method as claimed in any one of claims 1-5.
8. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a picture scaling method as claimed in any one of claims 1 to 5.
CN201811594007.5A 2018-12-25 2018-12-25 Picture scaling method, device, equipment and storage medium Active CN110618776B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811594007.5A CN110618776B (en) 2018-12-25 2018-12-25 Picture scaling method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811594007.5A CN110618776B (en) 2018-12-25 2018-12-25 Picture scaling method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110618776A CN110618776A (en) 2019-12-27
CN110618776B true CN110618776B (en) 2021-08-03

Family

ID=68920019

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811594007.5A Active CN110618776B (en) 2018-12-25 2018-12-25 Picture scaling method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110618776B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111367449A (en) * 2020-02-28 2020-07-03 深圳市腾讯信息技术有限公司 Picture processing method and device, computer equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009084809A1 (en) * 2007-12-27 2009-07-09 Nhn Corporation Apparatus and method for controlling screen by using touch screen
CN101923438A (en) * 2010-09-02 2010-12-22 宇龙计算机通信科技(深圳)有限公司 Image display control method, device and mobile terminal
CN102591521A (en) * 2011-01-11 2012-07-18 富士康(昆山)电脑接插件有限公司 Touch screen device and manufacturing method of the same

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3309670B1 (en) * 2015-12-15 2021-09-08 Huawei Technologies Co., Ltd. Method for responding to operation track and operation track response apparatus
CN107734183A (en) * 2017-10-31 2018-02-23 惠州Tcl移动通信有限公司 A kind of method, storage medium and the mobile terminal of one-handed performance mobile terminal

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009084809A1 (en) * 2007-12-27 2009-07-09 Nhn Corporation Apparatus and method for controlling screen by using touch screen
CN101923438A (en) * 2010-09-02 2010-12-22 宇龙计算机通信科技(深圳)有限公司 Image display control method, device and mobile terminal
CN102591521A (en) * 2011-01-11 2012-07-18 富士康(昆山)电脑接插件有限公司 Touch screen device and manufacturing method of the same

Also Published As

Publication number Publication date
CN110618776A (en) 2019-12-27

Similar Documents

Publication Publication Date Title
WO2020253453A1 (en) Image switching method and apparatus, and electronic device and storage medium
JP7181375B2 (en) Target object motion recognition method, device and electronic device
CN111641797B (en) Video call interface display control method and device, storage medium and equipment
CN111291244B (en) House source information display method, device, terminal and storage medium
CN111190520A (en) Menu item selection method and device, readable medium and electronic equipment
US20220398011A1 (en) Target object display method and apparatus, electronic device and non-transitory computer-readable medium
EP2778880A2 (en) Method for controlling display function and an electronic device thereof
CN113721807B (en) Information display method and device, electronic equipment and storage medium
CN111459364A (en) Icon updating method and device and electronic equipment
CN110618776B (en) Picture scaling method, device, equipment and storage medium
US20230276079A1 (en) Live streaming room page jump method and apparatus, live streaming room page return method and apparatus, and electronic device
US20230251777A1 (en) Target object display method and apparatus, electronic device and non-transitory computer-readable medium
CN112181571A (en) Floating window display method, device, terminal and storage medium
CN113204299B (en) Display method, display device, electronic equipment and storage medium
US8694509B2 (en) Method and apparatus for managing for handwritten memo data
CN112764629B (en) Augmented reality interface display method, device, equipment and computer readable medium
CN111258582B (en) Window rendering method and device, computer equipment and storage medium
WO2021068964A1 (en) Window arrangement method and device, terminal and storage medium
CN111290692B (en) Picture display method and device, electronic equipment and computer readable medium
CN113253874A (en) Display device control method, device, terminal and storage medium
CN110807164B (en) Automatic image area adjusting method and device, electronic equipment and computer readable storage medium
CN111263084B (en) Video-based gesture jitter detection method, device, terminal and medium
WO2021185047A1 (en) Sticker processing method and apparatus
CN111338827B (en) Method and device for pasting form data and electronic equipment
WO2023025181A1 (en) Image recognition method and apparatus, and electronic device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant