CN106325708B - Method, device and equipment for processing preset template of picture - Google Patents

Method, device and equipment for processing preset template of picture Download PDF

Info

Publication number
CN106325708B
CN106325708B CN201610712788.8A CN201610712788A CN106325708B CN 106325708 B CN106325708 B CN 106325708B CN 201610712788 A CN201610712788 A CN 201610712788A CN 106325708 B CN106325708 B CN 106325708B
Authority
CN
China
Prior art keywords
stretching
preset
preset direction
areas
shaking
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
CN201610712788.8A
Other languages
Chinese (zh)
Other versions
CN106325708A (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 Jupiter Technology Co ltd
Original Assignee
Beijing Kingsoft Internet Security Software 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 Kingsoft Internet Security Software Co Ltd filed Critical Beijing Kingsoft Internet Security Software Co Ltd
Priority to CN201610712788.8A priority Critical patent/CN106325708B/en
Publication of CN106325708A publication Critical patent/CN106325708A/en
Application granted granted Critical
Publication of CN106325708B publication Critical patent/CN106325708B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2203/00Indexing scheme relating to G06F3/00 - G06F3/048
    • G06F2203/048Indexing scheme relating to G06F3/048
    • G06F2203/04806Zoom, i.e. interaction techniques or interactors for controlling the zooming operation

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)
  • Image Analysis (AREA)

Abstract

The embodiment of the invention provides a picture processing method, a device and equipment, wherein the method comprises the following steps: acquiring a preset template, wherein the preset template comprises N areas, and N is an integer greater than 1; selecting M areas in the N areas, wherein M is an integer larger than 0 and smaller than N; detecting whether a shaking event in a preset direction occurs; stretching the M regions along the preset direction when a shaking event in the preset direction is detected. The template can be conveniently adjusted by the embodiment of the invention, and the individualized requirements of users are met.

Description

Method, device and equipment for processing preset template of picture
Technical Field
The invention relates to the technical field of picture processing, in particular to a picture processing method, a picture processing device and picture processing equipment.
Background
With the rapid development of information technology, electronic devices (such as mobile phones, tablet computers and the like) are used more and more commonly, and the functions of the electronic devices in life are stronger and stronger, so that a user can take pictures with the electronic devices, can download pictures from a network, and can even display different pictures in one template by adopting image processing software. However, the user cannot adjust the preset template, and generally, only the style of the template can be simply selected, so that the adjustment mode is single, and the personalized requirements of the user cannot be met.
Disclosure of Invention
The embodiment of the invention provides a picture processing method, a picture processing device and picture processing equipment, which can be used for stretching a template.
A first aspect of an embodiment of the present invention provides an image processing method, including:
acquiring a preset template, wherein the preset template comprises N areas, and N is an integer greater than 1;
selecting M areas in the N areas, wherein M is an integer larger than 0 and smaller than N;
detecting whether a shaking event in a preset direction occurs;
stretching the M regions along the preset direction when a shaking event in the preset direction is detected.
With reference to the first aspect of the embodiments of the present invention, in a first possible implementation manner of the first aspect, the detecting whether a shaking event in a preset direction occurs includes:
detecting whether the acceleration in the preset direction is larger than a first preset threshold value, and if so, determining that a shaking event in the preset direction is detected;
or,
detecting whether the shaking amplitude in the preset direction is larger than a second preset threshold value, and if so, determining that the shaking event in the preset direction is detected;
or,
and detecting whether the shaking frequency in the preset direction is greater than a third preset threshold value, and if so, determining that the shaking event in the preset direction is detected.
With reference to the first aspect of the present embodiments or the first possible implementation manner of the first aspect, in a second possible implementation manner of the first aspect, the stretching the M regions along the preset direction includes:
obtaining a shaking parameter of the shaking event;
and stretching the M areas along the preset direction according to the shaking parameters.
With reference to the first aspect of the embodiments of the present invention or the first possible implementation manner of the first aspect, in a third possible implementation manner of the first aspect, when a picture is included in a region i of the M regions, the region i is any one of the M regions,
the stretching the M regions along the preset direction includes:
stretching the area i along the preset direction, and stretching the picture, wherein the stretching ratio of the area i is consistent with that of the picture.
With reference to the first aspect of this embodiment or the first possible implementation manner of the first aspect, in a fourth possible implementation manner of the first aspect, after the stretching the M regions along the preset direction, the method further includes:
and detecting whether the stretching proportion of any one of the M areas reaches a fourth preset threshold value, if so, stopping stretching any one of the M areas.
With reference to the first aspect of the embodiment of the present invention or the first possible implementation manner of the first aspect, in a fifth possible implementation manner of the first aspect, the stretching the M regions along the preset direction includes:
and stretching the M areas along the preset direction on the premise of keeping the size of each of the M areas unchanged.
With reference to the first aspect of this embodiment or the first possible implementation manner of the first aspect, in a sixth possible implementation manner of the first aspect, after the stretching the M regions along the preset direction, the method further includes:
stretching the M regions along the opposite direction when a shaking event in the opposite direction of the preset direction is detected.
With reference to the first aspect of the embodiment of the present invention or the first possible implementation manner of the first aspect, in a seventh possible implementation manner of the first aspect, after the selecting M of the N regions and before the detecting whether a shaking event along a preset direction occurs, the method further includes:
acquiring identity information of a user;
and verifying the identity information, and when the identity information passes the verification, executing whether the detection is carried out to generate a shaking event along a preset direction.
A second aspect of the embodiments of the present invention provides an image processing apparatus, including:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a preset template, the preset template comprises N areas, and N is an integer greater than 1;
a selecting unit, configured to select M regions from the N regions, where M is an integer greater than 0 and smaller than N;
the detection unit is used for detecting whether a shaking event in a preset direction occurs or not;
and the stretching unit is used for stretching the M areas along the preset direction when the shaking event in the preset direction is detected.
With reference to the second aspect of the embodiment of the present invention, in a first possible implementation manner of the second aspect, the detection unit is specifically configured to:
detecting whether the acceleration in the preset direction is larger than a first preset threshold value, and if so, determining that a shaking event in the preset direction is detected;
or,
detecting whether the shaking amplitude in the preset direction is larger than a second preset threshold value, and if so, determining that the shaking event in the preset direction is detected;
or,
and detecting whether the shaking frequency in the preset direction is greater than a third preset threshold value, and if so, determining that the shaking event in the preset direction is detected.
In combination with the second human aspect or the first possible implementation manner of the second aspect of the embodiments of the invention, in a second possible implementation manner of the second aspect, the stretching unit includes:
the acquisition module is used for acquiring shaking parameters of the shaking event;
and the stretching module is used for stretching the M areas along the preset direction according to the shaking parameters.
With reference to the second human aspect or the first possible implementation manner of the second aspect of the embodiments of the present invention, in a third possible implementation manner of the second aspect, when a picture is included in a region i of the M regions, the region i is any one of the M regions,
the stretching unit is specifically configured to:
stretching the area i along the preset direction, and stretching the picture, wherein the stretching ratio of the area i is consistent with that of the picture.
With reference to the second human aspect or the first possible implementation manner of the second aspect of the embodiments of the present invention, in a fourth possible implementation manner of the second aspect, the detection unit is further configured to:
after the stretching unit stretches the M areas along the preset direction, whether the stretching proportion of any one of the M areas reaches a fourth preset threshold value is detected, and if yes, stretching of any one of the M areas is stopped.
With reference to the second human aspect of the example embodiments or the first possible implementation manner of the second aspect, in a fifth possible implementation manner of the second aspect, the stretching unit is specifically configured to:
and stretching the M areas along the preset direction on the premise of keeping the size of each of the M areas unchanged.
With reference to the second human aspect of the example embodiments or the first possible implementation manner of the second aspect, in a sixth possible implementation manner of the second aspect, the stretching unit is further configured to:
after the stretching unit stretches the M regions along the preset direction, stretching the M regions along the opposite direction when a shaking event in the opposite direction of the preset direction is detected.
With reference to the second person aspect or the first possible implementation manner of the second aspect of the embodiment of the present invention, in a seventh possible implementation manner of the second aspect, the obtaining unit is configured to obtain the identity information of the user after the selecting unit selects M areas of the N areas; the device further comprises:
and the verification unit is used for verifying the identity information, and when the identity information passes the verification, the detection unit is used for detecting whether a shaking event along a preset direction occurs or not.
A third aspect of the embodiments of the present invention provides an image processing apparatus, including: a processor, a memory, a communication interface, and a bus; the processor, the memory and the communication interface are connected through the bus and complete mutual communication; the memory stores executable program code; the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute a picture processing method; wherein the method comprises the following steps:
acquiring a preset template, wherein the preset template comprises N areas, and N is an integer greater than 1;
selecting M areas in the N areas, wherein M is an integer larger than 0 and smaller than N;
detecting whether a shaking event in a preset direction occurs;
stretching the M regions along the preset direction when a shaking event in the preset direction is detected.
A fourth aspect of the embodiments of the present invention provides a storage medium, where the storage medium is used to store an application program, and the application program is used to execute the picture processing method according to the embodiments of the present invention when running.
A fifth aspect of the embodiments of the present invention provides an application program, where the application program is configured to execute the picture processing method according to the embodiments of the present invention when the application program runs.
The embodiment of the invention has the following beneficial effects:
the method includes the steps of obtaining a preset template, wherein the preset template comprises N areas, N is an integer larger than 1, M areas in the N areas are selected, M is an integer larger than 0 and smaller than N, whether a shaking event in a preset direction occurs or not is detected, and when the shaking event in the preset direction is detected, the M areas are stretched along the preset direction. Therefore, when a shaking event is detected, the area selected by the user can be stretched, so that a personalized template is provided for the user, and the personalized requirements of the user are met.
Drawings
The embodiment of the invention provides a picture processing method, a picture processing device and picture processing equipment, which are used for conveniently adjusting a template and meeting the personalized requirements of users.
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flowchart of a picture processing method according to a first embodiment of the present invention;
FIG. 1a is a schematic diagram of a default template provided in an embodiment of the present invention;
fig. 1b is a schematic diagram of adjacent pictures in a preset template according to an embodiment of the present invention;
fig. 1c is a schematic diagram of adjacent pictures in a preset template according to an embodiment of the present invention;
fig. 1d is a schematic diagram of adjacent pictures in the preset template according to the embodiment of the present invention;
FIG. 1e is a schematic diagram of a preset direction according to an embodiment of the present invention;
FIG. 1f is a schematic view of a preset orientation provided by an embodiment of the present invention;
FIG. 1g is a schematic diagram of stretching a predetermined template based on a predetermined direction according to an embodiment of the present invention;
FIG. 1h is a schematic diagram of stretching a predetermined template based on a predetermined direction according to an embodiment of the present invention;
FIG. 1i is a schematic diagram of stretching a predetermined template based on a predetermined direction according to an embodiment of the present invention;
FIG. 1j is a schematic diagram of stretching a predetermined template based on a predetermined direction according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating a second embodiment of a method for processing an image according to an embodiment of the present invention;
fig. 3 is a schematic flowchart of a picture processing method according to a third embodiment of the present invention;
FIG. 4a is a schematic structural diagram of an image processing apparatus according to an embodiment of the present invention;
FIG. 4b is a schematic structural diagram of a picture processing apparatus according to another embodiment of the present invention;
fig. 5 is a schematic structural diagram of an embodiment of a picture processing device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, 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.
The terms "first," "second," "third," and "fourth," etc. in the description and claims of the invention and in the accompanying drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the invention. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
The Devices described in the embodiments of the present invention may include a smart Phone (e.g., an Android Phone, an iOS Phone, a Windows Phone, etc.), a tablet computer, a palm computer, a notebook computer, a mobile internet device (MID, mobile internet Devices), or a wearable device, which are examples, but not exhaustive, and include but are not limited to the above Devices.
Fig. 1 is a schematic flowchart illustrating a picture processing method according to a first embodiment of the present invention. The picture processing method described in this embodiment includes the following steps:
101. the method comprises the steps of obtaining a preset template, wherein the preset template comprises N areas, and N is an integer larger than 1.
The device in the implementation of the present invention may include a plurality of preset templates, where the preset templates may include N regions, N is an integer greater than 1, and each of the N regions may be configured with one picture. As shown in fig. 1a, 3 preset templates, namely a preset template a, a preset template b and a preset template c, are shown in fig. 1a, where the preset template a includes 2 regions (left region and right region), the preset template b includes 2 regions (upper region and lower region), and the preset template c includes 4 regions (upper left region, lower left region, upper right region and lower right region).
Optionally, the preset template may also be customized by the user, so that a personalized preset template may be obtained.
102. And selecting M areas in the N areas, wherein M is an integer which is larger than 0 and smaller than N.
The method includes selecting M regions from N regions, where M is an integer greater than 0 and less than N, and the M regions may be one region or multiple regions. The M regions may be adjacent regions or non-adjacent regions, and of course, some of the M regions may be adjacent regions.
M adjacent regions can be selected, wherein the adjacent regions mainly mean that the pictures are adjacent in the middle of the preset template. M is an integer greater than 1. As shown in fig. 1B, a and B are adjacent regions, B and C are adjacent regions, a and D are adjacent regions, and C and D are adjacent regions, as shown in fig. 1C, it can be seen that a and B are adjacent regions, F and E are adjacent regions, E and H are adjacent regions, as shown in fig. 1D, a and B, D are adjacent regions, B and A, C are adjacent regions, C and B, D are adjacent regions, and D and A, C are adjacent regions. The M selected pieces are adjacent areas.
103. Detecting whether a shaking event along a preset direction occurs.
The preset direction may be any direction, and the specific situation may depend on the actual situation, for example, fig. 1e includes two directions, where the a direction is the direction of the shaking event occurring to the left, and the b direction is the direction of the shaking event occurring to the right. As shown in fig. 1f, 4 directions may be included, where a is the direction of a shaking event occurring to the left, b is the direction of a shaking event occurring to the right, c is the direction of a shaking event occurring upward, and b is the direction of a shaking event occurring downward. Of course, not limited to this, in a specific application, the predetermined direction may also be a combined direction (i.e. a plurality of directions are combined together), for example, the predetermined direction may be a direction and then b direction, taking the direction in fig. 1f as an example.
Alternatively, the step 103 may be implemented in the following manner, including:
and detecting whether the acceleration in the preset direction is greater than a first preset threshold value, and if so, determining that the shaking event in the preset direction is detected. The first preset threshold is set by default of the system or by the user, and if the acceleration is smaller than or equal to the first preset threshold, the shaking event in the preset direction can be considered not to occur, so that the method is mainly used for preventing misoperation.
Alternatively, the step 103 may be implemented in the following manner, including:
and detecting whether the shaking amplitude in the preset direction is larger than a second preset threshold value, and if so, determining that the shaking event in the preset direction is detected. The second preset threshold is set by default of the system or by the user, and if the shaking amplitude is smaller than or equal to the second preset threshold, the shaking event in the preset direction is not considered to occur, and the second preset threshold is mainly used for preventing misoperation.
Alternatively, the step 103 may be implemented in the following manner, including:
and detecting whether the shaking frequency in the preset direction is greater than a third preset threshold value, and if so, determining that the shaking event in the preset direction is detected. The third preset threshold is set by default of the system or by the user, and if the shaking amplitude is smaller than or equal to the third preset threshold, the shaking event in the preset direction is not considered to occur, and the third preset threshold is mainly used for preventing misoperation.
104. Stretching the M areas along the preset direction when the shaking event in the preset direction is detected.
Wherein, when a shaking event in a preset direction is detected, the M regions may be stretched along the preset direction. Of course, if any one of the M regions includes a picture, the picture may be correspondingly stretched, and here, the corresponding meaning means that the stretching ratio of the picture is consistent with the stretching ratio of the region in the preset template where the picture is located. In the embodiment of the invention, the size of the area is changed, so that the picture is correspondingly stretched in order to better display the picture, so that the picture can be better displayed in the area where the picture is located.
For example, as shown in FIG. 1g, the left side is the preset template before the shaking event and the right side is the preset template after the shaking event. Assuming that the selected area is the area a, if a shaking event in the direction a occurs, it can be seen that the areas C and D remain unchanged, and the area a is stretched in the direction of reduction, of course, the area B is stretched in the direction a, where there are pictures in the original areas a and B, then the picture in the area a is reduced, the picture in the area B is enlarged, the reduction ratio of the picture in the area a is consistent with the reduction ratio of the area a, and the enlargement ratio of the picture in the area B is consistent with the enlargement ratio of the area B.
For another example, as shown in fig. 1h, the left side is the preset template before the shaking event, and the right side is the preset template after the shaking event. Assuming that the selected regions are a region a and a region D, if a shaking event occurs in the a direction, it can be seen that the A, D region is stretched in the shrinking direction, and of course, the B, C region is stretched in the a direction, where there is a picture in the original A, B, C, D, then the A, D picture is shrunk, the B, C picture is enlarged, the shrinking ratio of the picture in a (or D) is consistent with the shrinking ratio of the region a (D), and the enlarging ratio of the picture in b (c) is consistent with the enlarging ratio of the region b (c).
For another example, as shown in fig. 1i, the left side is the preset template before the shaking event, and the right side is the preset template after the shaking event. Assuming that the selected regions are a region a and a region C, if a shaking event occurs in the a direction, it can be seen that the a region is stretched in the reducing direction, the C region is stretched in the a direction (C region is enlarged), the B region is stretched in the a direction, and the D region is stretched in the a direction. B, C, here, there are pictures in original A, B, C, D, then A, D reduces the picture, B, C enlarges the picture, the picture reducing ratio in A (or D) is consistent with the area reducing ratio in A (D), and the picture enlarging ratio in B (C) is consistent with the area enlarging ratio in B (C).
Optionally, the stretching the M regions along the preset direction includes:
41) acquiring shaking parameters of the shaking event;
42) and stretching the M areas along the preset direction according to the shaking parameters.
Wherein the shake parameter of the shake event in step 41 may be at least one of: acceleration in a preset direction, shaking amplitude in the preset direction, shaking frequency in the preset direction, shaking times in the preset direction and the like. For example, the greater the acceleration in the preset direction, the greater the proportion of stretching in the preset direction. For another example, the greater the frequency of shaking in the predetermined direction, the greater the proportion of stretching in the predetermined direction. The ratio of stretching in the preset direction by the primary shaking is a, and the ratio of stretching in the preset direction by the secondary shaking is 2 a.
Optionally, the stretching the M regions along the preset direction is specifically as follows:
and stretching the M areas along the preset direction on the premise of keeping the size of each of the M areas unchanged.
For example, as shown in fig. 1j, as shown in the left diagram of fig. 1j, where the preset template includes 9 regions, assuming that the user selects region E, and the preset direction is the a direction, when a shaking event occurs in the a direction, the size of the E region remains unchanged, the whole E region is stretched in the a direction, and the effect after stretching is as shown in the right diagram of fig. 1j, it can be seen that the F region is reduced, the D region is expanded, and the A, B, C, G, H and I regions remain unchanged. Of course, if a picture is set in a certain region of the preset template, the picture in the region is correspondingly stretched and changed along with the stretching ratio of the region.
Further, after the step 104, the method further includes the following steps:
and detecting whether the stretching proportion of any one of the M areas reaches a fourth preset threshold value, if so, stopping stretching any one of the M areas.
And when the stretching proportion of any one of the M areas reaches a fourth preset threshold value, stopping stretching any one of the M areas. The fourth preset threshold may be set by default by the system or by the user.
In practical application, the embodiment described in fig. 1 is implemented, the preset template can be adjusted, the adjusted template can meet the requirements of users to a certain extent, meanwhile, the interestingness is achieved, when pictures are placed in different areas of the preset template, the size of the picture can be adjusted while the size of the area is adjusted, and therefore the personalized visual effect is provided. Therefore, the picture drawing device can facilitate the user to draw the picture, and can also obtain preset templates of different styles, thereby being more suitable for the psychology of the user.
Optionally, the formats of the pictures in each area of the preset template may be the same or different, and the sizes of the pictures may be the same or different
The method includes the steps of obtaining a preset template, wherein the preset template comprises N areas, N is an integer larger than 1, M areas in the N areas are selected, M is an integer larger than 0 and smaller than N, whether a shaking event in a preset direction occurs or not is detected, and when the shaking event in the preset direction is detected, the M areas are stretched along the preset direction. Therefore, when a shaking event is detected, the area selected by the user can be stretched, so that a personalized template is provided for the user, and the personalized requirements of the user are met.
In accordance with the above, please refer to fig. 2, which is a flowchart illustrating a second embodiment of a method for processing an image according to an embodiment of the present invention. The picture processing method described in this embodiment includes the following steps:
201. the method comprises the steps of obtaining a preset template, wherein the preset template comprises N areas, and N is an integer larger than 1.
202. And selecting M areas in the N areas, wherein M is an integer which is larger than 0 and smaller than N.
203. Whether a shaking event in a preset direction occurs is detected.
204. Stretching the M regions along the preset direction when a shaking event in the preset direction is detected.
205. Stretching the M regions along the opposite direction when a shaking event in the opposite direction of the preset direction is detected.
Alternatively, when a shaking event in a direction opposite to the preset direction is detected, the M regions may be stretched in the direction opposite to the preset direction.
Optionally, the stretching the M regions in the opposite direction includes the following steps:
2051) acquiring shaking parameters of the shaking event;
2052) and stretching the M regions in the opposite direction according to the shaking parameters.
Wherein the shake parameters of the shake event in step 2051 may be at least one of: acceleration in the opposite direction, shaking amplitude in the opposite direction, shaking frequency in the opposite direction, the number of shaking in the opposite direction, and the like. For example, the greater the acceleration in the reverse direction, the greater the proportion of stretching that occurs in the reverse direction. For example, the larger the frequency of shaking in the reverse direction, the larger the proportion of stretching in the reverse direction. The ratio of stretching in the reverse direction by primary shaking was a, and the ratio of stretching in the reverse direction by secondary shaking was 2 a.
Further, after step 205, the method further includes the following steps:
and detecting whether the stretching proportion of any one of the M areas reaches a fifth preset threshold value, if so, stopping stretching any one of the M areas.
And when the stretching proportion of any one of the M areas reaches a fifth preset threshold value, stopping stretching any one of the M areas. The fifth preset threshold may be set by default by the system or by the user.
Of course, the specific description of steps 201-204 in this embodiment can refer to steps 101-104 in the image processing method described in fig. 1.
In accordance with the above, please refer to fig. 3, which is a flowchart illustrating a third embodiment of a method for processing an image according to an embodiment of the present invention. The picture processing method described in this embodiment includes the following steps:
301. the method comprises the steps of obtaining a preset template, wherein the preset template comprises N areas, and N is an integer larger than 1.
302. And selecting M areas in the N areas, wherein M is an integer which is larger than 0 and smaller than N.
303. And acquiring the identity information of the user.
Wherein the identity information may be at least one of the following information: fingerprint information, iris information, authentication code information, password information, and the like.
304. And verifying the identity information.
When the identity information is fingerprint information, matching the fingerprint information with preset fingerprint information, and if the matching is successful, executing step 305; when the identity information is iris information, matching the iris information with preset iris information, and if the matching is successful, executing step 305; when the identity information is verification code information, matching the verification code information with preset verification code information, and if the matching is successful, executing step 305; when the identity information is password information, the password information may be matched with the preset password information, and if the matching is successful, step 305 is executed. Of course, step 305 may be performed only if the identity information is verified, thus enhancing the security of the user's implementation of the present invention.
Of course, if the identity information is verification code information, the verification code information may be sent to the device by the server, and step 305 may be executed when the verification code information is received by the device and the verification code information is authenticated. Its main application scenario may be similar to the member service function, namely: only members can enjoy the function.
305. And when the identity information passes the verification, detecting whether a shaking event in a preset direction occurs.
306. Stretching the M regions along the preset direction when a shaking event in the preset direction is detected.
Of course, the specific description of the steps 301-302 and 305-306 in this embodiment can refer to the step 101-104 in the picture processing method described in fig. 1.
In accordance with the foregoing, the following are apparatuses and devices for implementing the above-described image processing method, and specifically the following are:
please refer to fig. 4a, which is a schematic structural diagram of a picture processing apparatus according to a first embodiment of the present invention. The image processing apparatus described in this embodiment includes: the acquiring unit 401, the selecting unit 402, the detecting unit 403 and the stretching unit 404 are specifically as follows:
an obtaining unit 401, configured to obtain a preset template, where the preset template includes N regions, and N is an integer greater than 1;
a selecting unit 402, configured to select M regions from the N regions, where M is an integer greater than 0 and smaller than N;
a detecting unit 403 for detecting whether a shaking event in a preset direction occurs;
a stretching unit 404, configured to stretch the M regions along the preset direction when a shaking event in the preset direction is detected.
Optionally, the detecting unit 403 is specifically configured to:
detecting whether the acceleration in the preset direction is larger than a first preset threshold value, and if so, determining that a shaking event in the preset direction is detected;
or,
detecting whether the shaking amplitude in the preset direction is larger than a second preset threshold value, and if so, determining that the shaking event in the preset direction is detected;
or,
and detecting whether the shaking frequency in the preset direction is greater than a third preset threshold value, and if so, determining that the shaking event in the preset direction is detected.
Optionally, the stretching unit 404 includes:
an obtaining module (not shown) for obtaining a shaking parameter of the shaking event;
and a stretching module (not shown) for stretching the M regions along the preset direction according to the shaking parameters.
Optionally, when a picture is included in a region i of the M regions, the region i is any one of the M regions,
the stretching unit is specifically configured to:
stretching the area i along the preset direction, and stretching the picture, wherein the stretching ratio of the area i is consistent with that of the picture.
Optionally, the detecting unit 403 is further configured to:
after the stretching unit stretches the M areas along the preset direction, whether the stretching proportion of any one of the M areas reaches a fourth preset threshold value is detected, and if yes, stretching of any one of the M areas is stopped.
Optionally, the stretching unit is specifically configured to:
and stretching the M areas along the preset direction on the premise of keeping the size of each of the M areas unchanged.
Optionally, the stretching unit 404 is further configured to:
after the stretching unit 404 stretches the M regions along the preset direction, stretching the M regions along the opposite direction when a shaking event in the opposite direction of the preset direction is detected.
Optionally, as shown in fig. 4b, the apparatus depicted in fig. 4a further comprises: the verification unit 405 is specifically as follows:
the obtaining unit 401 is configured to obtain the identity information of the user after the selecting unit 402 selects M of the N regions;
the verification unit 405 verifies the identity information, and when the identity information passes the verification, the detection unit 403 detects whether a shaking event in a preset direction occurs.
The image processing device described in the embodiment of the present invention can obtain the preset template, where the preset template includes N regions, N is an integer greater than 1, M regions out of the N regions are selected, M is an integer greater than 0 and less than N, whether a shaking event in a preset direction occurs is detected, and when a shaking event in the preset direction is detected, the M regions are stretched along the preset direction. Therefore, when a shaking event is detected, the area selected by the user can be stretched, so that a personalized template is provided for the user, and the personalized requirements of the user are met.
Fig. 5 is a schematic structural diagram of a picture processing apparatus according to an embodiment of the present invention. The apparatus described in this embodiment includes: processor 1000, memory 2000, communication interface 3000, and bus 4000; the processor 1000, the memory 2000 and the communication interface 3000 are connected through the bus 4000 to complete communication therebetween; the memory 2000 stores executable program code; the processor 1000 runs a program corresponding to the executable program code by reading the executable program code stored in the memory 2000, so as to execute a picture processing method, which is as follows:
acquiring a preset template, wherein the preset template comprises N areas, and N is an integer greater than 1;
selecting M areas in the N areas, wherein M is an integer larger than 0 and smaller than N;
detecting whether a shaking event in a preset direction occurs;
stretching the M regions along the preset direction when a shaking event in the preset direction is detected.
Optionally, detecting whether a shaking event in a preset direction occurs comprises:
detecting whether the acceleration in the preset direction is larger than a first preset threshold value, and if so, determining that a shaking event in the preset direction is detected;
or,
detecting whether the shaking amplitude in the preset direction is larger than a second preset threshold value, and if so, determining that the shaking event in the preset direction is detected;
or,
and detecting whether the shaking frequency in the preset direction is greater than a third preset threshold value, and if so, determining that the shaking event in the preset direction is detected.
Optionally, stretching the M regions along the preset direction includes:
obtaining a shaking parameter of the shaking event;
and stretching the M areas along the preset direction according to the shaking parameters.
Optionally, when a picture is included in a region i of the M regions, the region i is any one of the M regions,
the stretching the M regions along the preset direction includes:
stretching the area i along the preset direction, and stretching the picture, wherein the stretching ratio of the area i is consistent with that of the picture.
Optionally, after the stretching the M regions along the preset direction, the method further includes:
and detecting whether the stretching proportion of any one of the M areas reaches a fourth preset threshold value, if so, stopping stretching any one of the M areas.
Optionally, the stretching the M regions along the preset direction includes:
and stretching the M areas along the preset direction on the premise of keeping the size of each of the M areas unchanged.
Optionally, after the stretching the M regions along the preset direction, the method further includes:
stretching the M regions along the opposite direction when a shaking event in the opposite direction of the preset direction is detected.
Optionally, after the selecting M of the N regions and before the detecting whether the shaking event along the preset direction occurs, the method further includes:
acquiring identity information of a user;
and verifying the identity information, and executing whether the detection is carried out to generate a shaking event in a preset direction when the identity information is verified to pass.
An embodiment of the present invention further provides a computer storage medium, where the computer storage medium may store a program, and when the program is executed, the program includes some or all of the steps of any one of the image processing methods described in the above method embodiments.
While the invention has been described in connection with various embodiments, other variations to the disclosed embodiments can be understood and effected by those skilled in the art in practicing the claimed invention, from a review of the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other elements or steps, and the word "a" or "an" does not exclude a plurality. A single processor or other unit may fulfill the functions of several items recited in the claims. The mere fact that certain measures are recited in mutually different dependent claims does not indicate that a combination of these measures cannot be used to advantage.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus (device), 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. A computer program stored/distributed on a suitable medium supplied together with or as part of other hardware, may also take other distributed forms, such as via the Internet or other wired or wireless telecommunication systems.
The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (devices) 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.
While the invention has been described in conjunction with specific features and embodiments thereof, it will be evident that various modifications and combinations can be made thereto without departing from the spirit and scope of the invention. Accordingly, the specification and figures are merely exemplary of the invention as defined in the appended claims and are intended to cover any and all modifications, variations, combinations, or equivalents within the scope of the invention. It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (17)

1. A processing method for a preset template of a picture is characterized by comprising the following steps:
acquiring a preset template, wherein the preset template comprises N areas, each area in the N areas can be provided with a picture, and N is an integer greater than 1;
selecting M areas in the N areas, wherein M is an integer larger than 0 and smaller than N;
detecting whether a shaking event in a preset direction occurs;
stretching the M regions along the preset direction when a shaking event in the preset direction is detected.
2. The method of claim 1, wherein the detecting whether a shaking event in a preset direction occurs comprises:
detecting whether the acceleration in the preset direction is larger than a first preset threshold value, and if so, determining that a shaking event in the preset direction is detected;
or,
detecting whether the shaking amplitude in the preset direction is larger than a second preset threshold value, and if so, determining that the shaking event in the preset direction is detected;
or,
and detecting whether the shaking frequency in the preset direction is greater than a third preset threshold value, and if so, determining that the shaking event in the preset direction is detected.
3. The method according to any one of claims 1 or 2, wherein said stretching said M zones along said preset direction comprises:
obtaining a shaking parameter of the shaking event;
and stretching the M areas along the preset direction according to the shaking parameters.
4. The method according to any one of claims 1 or 2, wherein when a picture is included in a region i of the M regions, the region i is any one of the M regions,
the stretching the M regions along the preset direction includes:
stretching the area i along the preset direction, and stretching the picture, wherein the stretching ratio of the area i is consistent with that of the picture.
5. The method according to any one of claims 1 or 2, wherein after said stretching said M zones along said preset direction, said method further comprises:
and detecting whether the stretching proportion of any one of the M areas reaches a fourth preset threshold value, if so, stopping stretching any one of the M areas.
6. The method according to any one of claims 1 or 2, wherein said stretching said M zones along said preset direction comprises:
and stretching the M areas along the preset direction on the premise of keeping the size of each of the M areas unchanged.
7. The method according to any one of claims 1 or 2, wherein after said stretching said M zones along said preset direction, said method further comprises:
stretching the M regions along the opposite direction when a shaking event in the opposite direction of the preset direction is detected.
8. The method according to any one of claims 1 or 2, wherein after said selecting M of said N regions and before said detecting whether a shaking event occurs along a preset direction, said method further comprises:
acquiring identity information of a user;
and verifying the identity information, and executing whether the detection is carried out to generate a shaking event in a preset direction when the identity information is verified to pass.
9. The utility model provides a processing apparatus of preset template of picture which characterized in that includes:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a preset template, the preset template comprises N areas, each area in the N areas can be provided with a picture, and N is an integer greater than 1;
a selecting unit, configured to select M regions from the N regions, where M is an integer greater than 0 and smaller than N;
the detection unit is used for detecting whether a shaking event in a preset direction occurs or not;
and the stretching unit is used for stretching the M areas along the preset direction when the shaking event in the preset direction is detected.
10. The apparatus according to claim 9, wherein the detection unit is specifically configured to:
detecting whether the acceleration in the preset direction is larger than a first preset threshold value, and if so, determining that a shaking event in the preset direction is detected;
or,
detecting whether the shaking amplitude in the preset direction is larger than a second preset threshold value, and if so, determining that the shaking event in the preset direction is detected;
or,
and detecting whether the shaking frequency in the preset direction is greater than a third preset threshold value, and if so, determining that the shaking event in the preset direction is detected.
11. The apparatus according to any one of claims 9 or 10, wherein the stretching unit comprises:
the acquisition module is used for acquiring shaking parameters of the shaking event;
and the stretching module is used for stretching the M areas along the preset direction according to the shaking parameters.
12. The apparatus according to any one of claims 9 or 10, wherein when a picture is included in a region i of the M regions, the region i is any one of the M regions,
the stretching unit is specifically configured to:
stretching the area i along the preset direction, and stretching the picture, wherein the stretching ratio of the area i is consistent with that of the picture.
13. The apparatus according to any one of claims 9 or 10, wherein the detection unit is further configured to:
after the stretching unit stretches the M areas along the preset direction, whether the stretching proportion of any one of the M areas reaches a fourth preset threshold value is detected, and if yes, stretching of any one of the M areas is stopped.
14. The device according to any one of claims 9 or 10, characterized in that the stretching unit is particularly adapted to:
and stretching the M areas along the preset direction on the premise of keeping the size of each of the M areas unchanged.
15. The apparatus according to any one of claims 9 or 10, wherein the stretching unit is further configured to:
after the stretching unit stretches the M regions along the preset direction, stretching the M regions along the opposite direction when a shaking event in the opposite direction of the preset direction is detected.
16. The apparatus according to any one of claims 9 or 10, wherein the obtaining unit is configured to obtain the identity information of the user after the selecting unit selects M of the N regions; the device further comprises:
and the verification unit is used for verifying the identity information, and when the identity information passes the verification, the detection unit is used for detecting whether a shaking event in a preset direction occurs.
17. A processing device of a preset template of a picture is characterized by comprising: a processor, a memory, a communication interface, and a bus;
the processor, the memory and the communication interface are connected through the bus and complete mutual communication; the memory stores executable program code; the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute a processing method of a preset template of a picture; wherein the method comprises the following steps:
acquiring a preset template, wherein the preset template comprises N areas, each area in the N areas can be provided with a picture, and N is an integer greater than 1;
selecting M areas in the N areas, wherein M is an integer larger than 0 and smaller than N;
detecting whether a shaking event in a preset direction occurs;
stretching the M regions along the preset direction when a shaking event in the preset direction is detected.
CN201610712788.8A 2016-08-23 2016-08-23 Method, device and equipment for processing preset template of picture Active CN106325708B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610712788.8A CN106325708B (en) 2016-08-23 2016-08-23 Method, device and equipment for processing preset template of picture

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610712788.8A CN106325708B (en) 2016-08-23 2016-08-23 Method, device and equipment for processing preset template of picture

Publications (2)

Publication Number Publication Date
CN106325708A CN106325708A (en) 2017-01-11
CN106325708B true CN106325708B (en) 2019-08-23

Family

ID=57742380

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610712788.8A Active CN106325708B (en) 2016-08-23 2016-08-23 Method, device and equipment for processing preset template of picture

Country Status (1)

Country Link
CN (1) CN106325708B (en)

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8312387B2 (en) * 2009-08-10 2012-11-13 Microsoft Corporation Target element zoom
CN102053775A (en) * 2009-10-29 2011-05-11 鸿富锦精密工业(深圳)有限公司 Image display system and method thereof
US9483444B2 (en) * 2013-07-09 2016-11-01 Flipboard, Inc. Dynamic layout engine for a digital magazine
CN104519187B (en) * 2013-10-08 2018-07-24 腾讯科技(深圳)有限公司 The display control method and device of contact person
CN104978444B (en) * 2014-04-04 2018-01-12 北京猎豹网络科技有限公司 A kind of method and device of picture combination
CN104331860A (en) * 2014-11-24 2015-02-04 小米科技有限责任公司 Checking method and device for picture

Also Published As

Publication number Publication date
CN106325708A (en) 2017-01-11

Similar Documents

Publication Publication Date Title
CN105957530B (en) Voice control method and device and terminal equipment
CN105323065B (en) Security verification method and device
CN104205721B (en) The adaptive authentication method of context aware and device
CN109766759A (en) Emotion identification method and Related product
JP6792056B2 (en) Implementation of biometrics
WO2017185630A1 (en) Emotion recognition-based information recommendation method and apparatus, and electronic device
US20170053174A1 (en) Liveness detection apparatus and liveness detection method
US20160224853A1 (en) Systems and methods for real human face recognition
JP2018532188A (en) Image-based CAPTCHA challenge
CN105323066B (en) Identity verification method and device
CN104376247B (en) A kind of information processing method and electronic equipment
CN103886237A (en) Control method and system for electronic device with fingerprint sensor and touch screen
EP2728859A2 (en) Method of providing information-of-users' interest when video call is made, and electronic apparatus thereof
US20170228582A1 (en) Fingerprint authentication display device and authentication display method
CN105205379A (en) Control method and device for terminal application and terminal
CN103927471A (en) Authentication method and device
KR20130105355A (en) Authentication apparatus, control method of authentication apparatus, control program, and recording medium
CN109814964B (en) Interface display method, terminal equipment and computer readable storage medium
WO2018233716A1 (en) Terminal privacy protection method, terminal and computer-readable storage medium
CN106503537B (en) Verification method and device based on flexible display screen
KR20130082980A (en) User personalized recommendation system based on face-recognition
CN109215640A (en) Audio recognition method, intelligent terminal and computer readable storage medium
CN106921802B (en) Audio data playing method and device
CN111651749A (en) Method and device for finding account based on password, computer equipment and storage medium
CN106325708B (en) Method, device and equipment for processing preset template of picture

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20201120

Address after: Room 115, area C, 1 / F, building 8, yard 1, yaojiayuan South Road, Chaoyang District, Beijing

Patentee after: Beijing LEMI Technology Co.,Ltd.

Address before: 100085 Beijing City, Haidian District Road 33, two floor East Xiaoying

Patentee before: BEIJING KINGSOFT INTERNET SECURITY SOFTWARE Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20231009

Address after: 100000 3870A, 3rd Floor, Building 4, No. 49 Badachu Road, Shijingshan District, Beijing

Patentee after: Beijing Jupiter Technology Co.,Ltd.

Address before: Room 115, area C, 1 / F, building 8, yard 1, yaojiayuan South Road, Chaoyang District, Beijing

Patentee before: Beijing LEMI Technology Co.,Ltd.