CN110796601B - Image sticker layout method, apparatus, computer device, and readable storage medium - Google Patents

Image sticker layout method, apparatus, computer device, and readable storage medium Download PDF

Info

Publication number
CN110796601B
CN110796601B CN201911043838.8A CN201911043838A CN110796601B CN 110796601 B CN110796601 B CN 110796601B CN 201911043838 A CN201911043838 A CN 201911043838A CN 110796601 B CN110796601 B CN 110796601B
Authority
CN
China
Prior art keywords
image
sticker
constraint
target image
decal
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
CN201911043838.8A
Other languages
Chinese (zh)
Other versions
CN110796601A (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.)
Xiamen Meitu Technology Co Ltd
Original Assignee
Xiamen Meitu 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 Xiamen Meitu Technology Co Ltd filed Critical Xiamen Meitu Technology Co Ltd
Priority to CN201911043838.8A priority Critical patent/CN110796601B/en
Publication of CN110796601A publication Critical patent/CN110796601A/en
Application granted granted Critical
Publication of CN110796601B publication Critical patent/CN110796601B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G06T3/4038Image mosaicing, e.g. composing plane images from plane sub-images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2200/00Indexing scheme for image data processing or generation, in general
    • G06T2200/32Indexing scheme for image data processing or generation, in general involving image mosaicing
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The embodiment of the application provides an image sticker layout method, an image sticker layout device, computer equipment and a readable storage medium, wherein the image sticker layout method comprises the following steps: responding to the operation of selecting at least one target image sticker from a plurality of image stickers by a user, searching constraint rules of the target image stickers, and storing constraint rules corresponding to the image stickers in computer equipment; and placing the target image sticker to a corresponding position in the image to be processed according to the constraint rule of the target image sticker. Through the operation, the layout of the image sticker can be automatically completed without manual intervention, and the layout efficiency of the image sticker is improved.

Description

Image sticker layout method, apparatus, computer device, and readable storage medium
Technical Field
The present application relates to the field of image processing, and in particular, to an image decal layout method, apparatus, computer device, and readable storage medium.
Background
In image processing, layout typesetting of image stickers is an important link, and the process is usually that a user manually places the image stickers needing to be laid out at a position required in an image to be processed, while in the process of needing to paste a large number of image stickers to the image to be processed, each image sticker needs to be placed manually by the user, so that a large amount of time is consumed, and a large amount of repeated work is possible.
In view of this, it is a need for a person skilled in the art to improve the efficiency of image decal layout.
Disclosure of Invention
In order to overcome at least the above-mentioned shortcomings in the prior art, it is an object of the present application to provide an image decal layout method, apparatus, computer device and readable storage medium.
In a first aspect, an embodiment of the present application provides an image decal layout method, applied to a computer device, including:
responding to the operation of selecting at least one target image sticker from a plurality of image stickers by a user, searching constraint rules of the target image sticker, and storing constraint rules corresponding to the image stickers in the computer equipment;
and placing the target image sticker to a corresponding position in the image to be processed according to the constraint rule of the target image sticker.
In an alternative embodiment, the computer device stores categories of each image decal, and the searching constraint rules of the target image decal includes: searching the category of the target image sticker, and acquiring a constraint rule corresponding to the category as the constraint rule of the target image sticker according to the category of the target image sticker.
In an alternative embodiment, the constraint rule corresponding to the category of each image sticker includes a distance constraint and a layout gravity center constraint corresponding to the category of each image sticker.
In an alternative embodiment, the formula for calculating the distance constraint corresponding to each image decal category is:
C(p i ,p j )=Relu(||p i -p j ||-d)
wherein ,C(pi ,p j ) Constraint equation for image decal i and image decal j, p i For the position parameter, p, of the image decal i j The position parameter of the image sticker j is defined, and d is the constraint distance;
Figure BDA0002253588040000021
relu is a linear rectification function.
In an alternative embodiment, the formula for calculating the layout gravity center constraint corresponding to each image decal category is:
Figure BDA0002253588040000022
/>
wherein ,C(pi ,p j ,p k ) Constraint equations for image decal i, image decal j, and image decal k, p i For the position parameter, p, of the image decal i j For the position parameter, p, of the image decal j k Is an image stickerPosition parameter of k, p c For the position parameter of the image decal c, m i Area, m, of image decal i j Area, m, of image decal j k The area of the image sticker k is the constraint distance d;
Figure BDA0002253588040000031
Figure BDA0002253588040000032
relu is a linear rectification function.
In an alternative embodiment, the placing the target image decal to a corresponding position in the image to be processed according to the constraint rule of the target image decal includes:
according to the constraint rule of the target image sticker, calculating to obtain the constraint value of the target image sticker:
judging whether the constraint value is a preset constraint value, if so, placing the target image sticker to a preset corresponding position calculated according to the constraint value; if not, updating the constraint value of the target image sticker according to the constraint rule of the target image sticker until the updated constraint value of the target image sticker is a preset constraint value, and placing the target image sticker to a preset corresponding position calculated according to the updated constraint value.
In an optional embodiment, the placing the target image decal to a preset corresponding position calculated according to the constraint value includes:
calculating the update deviation amount of the target image sticker according to the constraint value;
and calculating and obtaining a preset corresponding position of the target image sticker according to the updated deviation amount.
In a second aspect, an embodiment of the present application provides an image sticker layout apparatus, applied to a computer device, the apparatus including:
the searching module is used for responding to the operation of selecting at least one target image sticker from a plurality of image stickers by a user, searching constraint rules of the target image stickers, and storing constraint rules corresponding to the image stickers in the computer equipment;
and the placement module is used for placing the target image sticker to the corresponding position in the image to be processed according to the constraint rule of the target image sticker.
In a third aspect, an embodiment of the present application provides a computer device, where the computer device is communicatively connected to a terminal device, and the computer device includes a processor and a nonvolatile memory storing computer instructions, where when the computer instructions are executed by the processor, the computer device executes the image sticker layout method according to any one of the foregoing embodiments.
In a fourth aspect, an embodiment of the present application provides a readable storage medium, where the readable storage medium includes a computer program, where the computer program controls a computer device where the readable storage medium is located to execute the image decal layout method according to any one of the foregoing embodiments.
Compared with the prior art, the application has the following beneficial effects:
through ingenious establishment of the corresponding relation between the image stickers and the constraint rules, after a user selects a required target image sticker from a plurality of image stickers, the selected target image sticker is automatically placed at the corresponding position of an image to be processed according to the constraint rules, manual operation is not needed in the layout process of the image stickers, and the layout efficiency of the image stickers is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered limiting the scope, and that other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic step flow diagram of an image sticker layout method according to an embodiment of the present application;
FIG. 2 is a flow chart illustrating the substep of step S201 in FIG. 1;
fig. 3 is a schematic block diagram of an image sticker layout apparatus provided in an embodiment of the present application;
fig. 4 is a block diagram of a computer device according to an embodiment of the present application.
Icon: 100-a computer device; 110-an image sticker layout device; 1101-look-up module; 1102-place the module; 111-memory; 112-a processor; 113-a communication unit.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. The components of the embodiments of the present application, which are generally described and illustrated in the figures herein, may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present application, as provided in the accompanying drawings, is not intended to limit the scope of the application, as claimed, but is merely representative of selected embodiments of the application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures.
Referring to fig. 1, fig. 1 is a flowchart illustrating steps of an image sticker layout method according to an embodiment of the present disclosure. The image decal layout method includes step S201 and step S202.
In step S201, in response to an operation of selecting at least one target image sticker from a plurality of image stickers by a user, constraint rules of the target image stickers are searched, and constraint rules corresponding to the image stickers are stored in the computer device.
And step S202, placing the target image sticker to a corresponding position in the image to be processed according to the constraint rule of the target image sticker.
In this embodiment, constraint rules corresponding to each image sticker may be stored in the computer device, and when a user selects a target image sticker that is desired to be placed in an image to be processed from a plurality of image stickers, the constraint rules corresponding to the target image sticker may be searched for, and then the target image sticker may be placed at a corresponding position determined by the constraint rules according to the constraint rules of the target image sticker. For example, the image to be processed may include a portrait image, the plurality of image patches may include a glasses patch, a beard patch, an english word patch, a cartoon image patch, and the like, the user wants to place the glasses patch and the beard patch in the image to be processed, and may select the glasses patch and the beard patch as target image patches, and may further search constraint rules corresponding to the glasses patch and constraint rules corresponding to the beard patch, respectively, after searching the corresponding constraint rules, may place the glasses patch at eyes (corresponding positions) of the portrait image and place the beard patch at positions (corresponding positions) between lips and noses of the portrait image according to the corresponding constraint rules.
On the basis of the foregoing, the present embodiment provides an example of searching for the constraint rule corresponding to the target image decal, referring specifically to fig. 2, fig. 2 is a schematic flow chart of the substeps of step S201 in fig. 1, and in this embodiment, step S201 may include substep S2011 and substep S2012.
And a substep S2011, searching for the category of the target image sticker.
Substep S2012, according to the category of the target image sticker, acquiring a constraint rule corresponding to the category as the constraint rule of the target image sticker.
Categories of image stickers may be stored in the computer device, for example, a glasses sticker and a beard sticker may be defined as facial decorative stickers, an english word sticker may be defined as a logo sticker, a cartoon character sticker may be defined as a directional doll sticker, and each category of image stickers has a corresponding constraint rule. The user can select the glasses sticker and the English text sticker as target image stickers, and the glasses sticker and the English text sticker are placed at corresponding positions, so that corresponding categories of the glasses sticker and the English text sticker, namely the face decoration sticker and the label sticker, can be searched first, and then constraint rules corresponding to the face decoration sticker and constraint rules of the label sticker are further obtained. It should be understood that multiple image decals may belong to the same category, as well as one image decal itself. For example, when there are few image stickers stored in the computer device, only three kinds of sticker images including a glasses sticker, a beard sticker and an english text sticker may be stored, and the three kinds of image stickers may not be further classified, but may be directly used as a class, that is, the glasses sticker, the beard sticker and the english text sticker may be directly defined as corresponding constraint rules, and when a user selects a target image sticker, the constraint rules of the target image sticker may be directly searched.
Further, the constraint rule corresponding to the category of each image sticker includes a distance constraint and a layout gravity center constraint corresponding to the category of each image sticker.
Further, the formula of the distance constraint corresponding to each type of the image decal is:
C(p i ,p j )=Relu(||p i -p j ||-d)
wherein ,C(pi ,p j ) Constraint equation for image decal i and image decal j, p i For the position parameter, p, of the image decal i j Is the position parameter of the image sticker j, d is the constraint distance,
Figure BDA0002253588040000081
relu is a linear rectification function.
Further, the formula of the layout gravity center constraint corresponding to each image sticker category is:
Figure BDA0002253588040000082
wherein ,C(pi ,p j ,p k ) Constraint equations for image decal i, image decal j, and image decal k, p i For the position parameter, p, of the image decal i j For the position parameter, p, of the image decal j k For the position parameter of the image decal k, p c For the position parameter of the image decal c, m i Area, m, of image decal i j Area, m, of image decal j k The area of the image decal k, d is the constraint distance,
Figure BDA0002253588040000083
/>
Figure BDA0002253588040000084
relu is a linear rectification function.
In the present embodiment, constraint rules for image decals may include distance constraint and layout gravity center constraint, wherein, regarding distance constraint, formula C (p i ,p j )=Relu(||p i -p j I-d) may define a distance constraint relationship between two image decals, e.g., p i For the position parameter of the image decal i, the image decal i may be a spectacle decal, p i Can be the initial position parameter of the glasses sticker, p j As the position parameter of the image sticker j, the image sticker j can be a beard sticker, p j The initial position parameter of the paper sticker can be used, and the linear rectification function Relu can be used for ensuring that the distance between the glasses paper sticker and the paper sticker does not exceed the set constraint distance d, and similarly, the glasses paper sticker and the paper sticker can be respectively subjected to distance constraint with other selected target image paper stickers according to the formula of the distance constraint.
With respect to clothThe local gravity center is constrained, the image sticker i can be a glasses sticker, and p i Can be the initial position parameter of the glasses sticker, m i The area of the glasses sticker can be the area of the glasses sticker, the image sticker j can be the beard sticker, and p j Can be the initial position parameter, m of the beard sticker j The area of the paper can be the area of the paper for the beard, the image paper k can be the paper for the English characters, and p k Can be the initial position parameter, m of the English character paster k The area of the English character sticker can be the area of the English character sticker, the image sticker c can be the cartoon image sticker, and the image sticker p can be the cartoon image sticker c Can be the position parameter of the cartoon image paster. Formula (VI)
Figure BDA0002253588040000091
The linear rectification function Relu in the method can be used for restraining the distance from the cartoon image sticker to the glasses sticker, the beard sticker and the English text sticker from exceeding the restraining distance d, and similarly, the glasses sticker, the beard sticker and the English text sticker can also respectively carry out the restraint of the layout gravity center with other selected target image stickers according to the formula of the layout gravity center restraint.
Further, the placing the target image sticker to a corresponding position in the image to be processed according to the constraint rule of the target image sticker includes:
and calculating the constraint value of the target image sticker according to the constraint rule of the target image sticker.
Judging whether the constraint value is a preset constraint value, if so, placing the target image sticker to a preset corresponding position calculated according to the constraint value; if not, updating the constraint value of the target image sticker according to the constraint rule of the target image sticker until the updated constraint value of the target image sticker is a preset constraint value.
On the basis of the above, the user can select a plurality of target image stickers, and constraint rules among the image stickers are mutually constrained, so that constraint rules of other target image stickers can be influenced every time constraint rules of a certain target image sticker are calculated. For example, when the distance constraint of the glasses sticker is calculated, the glasses sticker, the English text sticker and the cartoon image sticker are respectively constrained according to the distance constraint formula, when the layout gravity center constraint of the glasses sticker is calculated, the glasses sticker, the English text sticker and the cartoon image sticker are constrained according to the layout gravity center constraint formula, when the distance constraint of the glasses sticker is calculated, the glasses sticker, the English text sticker and the cartoon image sticker are respectively constrained according to the distance constraint formula, when the layout gravity center constraint of the glasses sticker, the English text sticker and the cartoon image sticker is calculated, the glasses sticker, the English text sticker and the cartoon image sticker are respectively constrained according to the distance constraint formula, and when the layout gravity center constraint of the glasses sticker is calculated, the glasses sticker, the English text sticker and the cartoon image sticker are constrained according to the layout gravity center constraint formula, and the English text sticker and the cartoon image sticker are identical. Therefore, when the target image stickers are constrained according to the corresponding constraint rules, the constraint values calculated according to the constraint formula C (x) are mutually referred to, so that the constraint of the target image stickers can be completed through one-time calculation instead of the constraint of the target image stickers, and the constraint is required to be continuously adjusted according to the mutual constraint of the target image stickers. In other implementations of the present embodiment, the placement position of the target image decal may be determined not only when the constraint value calculated according to the constraint formula is a preset constraint value, but also when the number of iterations of the calculation of the target image decal reaches the maximum number of iterations.
It should be noted that when the type of the target image sticker is a facial decorative sticker, such as a glasses sticker and a beard sticker, since the facial decorative sticker must be at the relevant position of the face in the portrait image, the position is not updated after the initial position is determined. And when the category of the target image decal is a tagline decal, the specific constraint performed by the aforementioned constraint formula may be: the tagline decals are required to form a local visual balance with the position of the portrait pattern at the four corners of the layout range of the face. When the category of the target image decal is a directional doll decal, the specific constraint by the aforementioned constraint formula may be: the face in the portrait image needs to be fixed in a certain distance from the face in the portrait image. In other implementations of the present embodiment, the image decals of different types may be constrained according to the constraint formulas to perform different effects, which is not limited herein.
On the basis, the embodiment provides an example of calculating the preset corresponding position of the target image sticker according to the constraint value, which can be realized by the following steps:
and calculating the updated deviation amount of the target image sticker according to the constraint value.
And calculating and obtaining a preset corresponding position of the target image sticker according to the updated deviation amount.
In the foregoing process, it can be known that the placement positions of the respective target image patches need to be updated iteratively, so Newton-Raphson method (Newton-Raphson method) can be used to obtain the updated deviation amount of the target image patches on the initial position parameters, and then the placement positions of the target image patches in the image to be processed can be determined. Specifically, the following formula can be referred to:
Figure BDA0002253588040000121
Figure BDA0002253588040000122
wherein, C (p+Deltap) is the constraint value of the image sticker, C (p) is the constraint equation of the image sticker,
Figure BDA0002253588040000123
p is an initial position parameter of the image sticker, Δp is an updated deviation amount of the image sticker, and m is an area of the image sticker.
The calculation result (i.e. constraint value) of C (p+Δp) can be set as a preset constraint value when the calculation result is 0, the calculated C (p+Δp) can be calculated according to the distance constraint formula and the layout gravity center constraint formula, when the calculation structure is 0, the constraint value reaches the preset constraint value, the calculation formula of the update deviation amount Δp of the image sticker can be obtained, and after the update deviation amount Δp is calculated, the calculation can be performed according to the update deviation amount Δp and the initial position parameter p of the image sticker so as to obtain the placement position of the target image sticker in the image to be processed. For example, the initial position parameter p of the image sticker may be a position (coordinate) of the target image sticker corresponding to the width and the height of the target image sticker on the image to be processed, and may be (1, 1) if the calculated update deviation Δp is (2, 3), and finally the placement position of the target image sticker on the image to be processed is (3, 4).
Referring to fig. 3, fig. 3 is a schematic block diagram illustrating a structure of an image sticker layout apparatus 110 according to an embodiment of the present application. The image decal layout apparatus 110 includes:
a searching module 1101, configured to search constraint rules of at least one target image decal in response to an operation of selecting the target image decal from a plurality of image decals by a user, where constraint rules corresponding to each image decal are stored in the computer device;
and the placement module 1102 is used for placing the target image sticker to a corresponding position in the image to be processed according to the constraint rule of the target image sticker.
Referring to fig. 4, fig. 4 is a block diagram illustrating a structure of a computer device 100 according to an embodiment of the present application. The computer apparatus 100 includes an image sticker layout device 110, a memory 111, a processor 112, and a communication unit 113.
The memory 111, the processor 112 and the communication unit 113 are electrically connected to each other directly or indirectly, so as to realize data transmission or interaction. For example, the components may be electrically connected to each other via one or more communication buses or signal lines. The image decal layout apparatus 110 includes at least one software function module that may be stored in the memory 111 in the form of software or firmware (firmware) or cured in an Operating System (OS) of the computer device 100. The processor 112 is configured to execute executable modules stored in the memory 111, such as software functional modules and computer programs included in the image decal layout device 110.
The Memory 111 may be, but is not limited to, a random access Memory (Random A ccess Memory, RAM), a Read Only Memory (ROM), a programmable Read Only Memory (Programmable Read-Only Memory, PROM), an erasable Read Only Memory (Erasable Programmable Read-Only Memory, EPROM), an electrically erasable Read Only Memory (Electric Erasable Programmable Read-Only Memory, EEPROM), etc. Wherein the memory 111 is used for storing programs or data.
The embodiment of the application provides a computer device 100, where the computer device 100 is in communication connection with a terminal device, the computer device 100 includes a processor and a nonvolatile memory storing computer instructions, and when the computer instructions are executed by the processor, the computer device 100 executes the image sticker layout method described above.
The embodiment of the application provides a readable storage medium, which comprises a computer program, and the computer program controls a computer device 100 where the readable storage medium is located to execute the image sticker layout method.
In summary, according to the image sticker layout method, device, computer equipment and readable storage medium provided by the embodiments of the present application, by setting the correspondence between each image sticker and the constraint rule, when a user selects a target image sticker to be laid out on an image to be processed from a plurality of image stickers, the target image sticker can be automatically laid out on a corresponding position of the image to be processed according to the constraint rule corresponding to the target image sticker, no manual operation is required in the layout process, and the layout efficiency is improved.
The foregoing is merely various embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily think about changes or substitutions within the technical scope of the present application, and the changes and substitutions are intended to be covered in the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (7)

1. An image decal layout method, for use with a computer device, the method comprising:
responding to the operation of selecting at least one target image sticker from a plurality of image stickers by a user, searching constraint rules of the target image sticker, and storing constraint rules corresponding to the image stickers in the computer equipment;
placing the target image sticker to a corresponding position in an image to be processed according to the constraint rule of the target image sticker;
wherein the computer device stores categories of each image sticker, and the searching constraint rules of the target image sticker comprises:
searching the category of the target image sticker, and acquiring a constraint rule corresponding to the category as the constraint rule of the target image sticker according to the category of the target image sticker, wherein the constraint rule corresponding to the category of each image sticker comprises a distance constraint and a layout gravity center constraint corresponding to the category of each image sticker;
the formula for calculating the distance constraint corresponding to each image sticker category is as follows:
Figure QLYQS_1
wherein ,
Figure QLYQS_4
for image decal->
Figure QLYQS_6
And image sticker->
Figure QLYQS_8
Constraint equation of->
Figure QLYQS_3
For image decal->
Figure QLYQS_5
Position parameter of->
Figure QLYQS_7
For image decal->
Figure QLYQS_9
Position parameter of->
Figure QLYQS_2
Is a constraint distance;
Figure QLYQS_10
,/>
Figure QLYQS_11
is a linear rectification function.
2. The method of claim 1, wherein the formula for calculating the layout center of gravity constraint for each image decal category is:
Figure QLYQS_12
wherein ,
Figure QLYQS_16
for image decal->
Figure QLYQS_17
Image sticker->
Figure QLYQS_22
And image sticker->
Figure QLYQS_18
Constraint equation of->
Figure QLYQS_20
For image decal->
Figure QLYQS_23
Position parameter of->
Figure QLYQS_28
For image decal->
Figure QLYQS_27
Position parameter of->
Figure QLYQS_31
For image decal->
Figure QLYQS_13
Position parameter of->
Figure QLYQS_24
For image decal->
Figure QLYQS_14
Position parameter of->
Figure QLYQS_21
For image decal->
Figure QLYQS_26
Area of->
Figure QLYQS_30
For image decal->
Figure QLYQS_15
Area of->
Figure QLYQS_19
For image decal->
Figure QLYQS_25
Area of->
Figure QLYQS_29
Is a constraint distance;
Figure QLYQS_32
,/>
Figure QLYQS_33
is a linear rectification function. />
3. The method according to any one of claims 1-2, wherein said placing the target image decal to a corresponding location in the image to be processed according to the constraint rules of the target image decal comprises:
calculating a constraint value of the target image sticker according to the constraint rule of the target image sticker;
judging whether the constraint value is a preset constraint value, if so, placing the target image sticker to a preset corresponding position calculated according to the constraint value; if not, updating the constraint value of the target image sticker according to the constraint rule of the target image sticker until the updated constraint value of the target image sticker is a preset constraint value, and placing the target image sticker to a preset corresponding position calculated according to the updated constraint value.
4. A method according to claim 3, wherein said placing the target image decal to a preset corresponding position calculated from the constraint value comprises:
calculating the update deviation amount of the target image sticker according to the constraint value;
and calculating and obtaining a preset corresponding position of the target image sticker according to the updated deviation amount.
5. An image decal layout apparatus for use with a computer device, said apparatus comprising:
the searching module is used for responding to the operation of selecting at least one target image sticker from a plurality of image stickers by a user, searching constraint rules of the target image stickers, and storing constraint rules corresponding to the image stickers in the computer equipment;
the placement module is used for placing the target image sticker to a corresponding position in the image to be processed according to the constraint rule of the target image sticker;
the searching module is specifically configured to: searching the category of the target image sticker, and acquiring a constraint rule corresponding to the category as the constraint rule of the target image sticker according to the category of the target image sticker, wherein the constraint rule corresponding to the category of each image sticker comprises a distance constraint and a layout gravity center constraint corresponding to the category of each image sticker;
the formula for calculating the distance constraint corresponding to each image sticker category is as follows:
Figure QLYQS_34
wherein ,
Figure QLYQS_36
for image decal->
Figure QLYQS_38
And image sticker->
Figure QLYQS_41
Constraint equation of->
Figure QLYQS_35
For image decal->
Figure QLYQS_39
Position parameter of->
Figure QLYQS_40
For image decal->
Figure QLYQS_42
Position parameter of->
Figure QLYQS_37
Is a constraint distance;
Figure QLYQS_43
,/>
Figure QLYQS_44
is a linear rectification function.
6. A computer device, wherein the computer device is communicatively connected to a terminal device, the computer device comprising a processor and a non-volatile memory storing computer instructions that, when executed by the processor, perform the image decal layout method of any one of claims 1-4.
7. A readable storage medium, characterized in that the readable storage medium comprises a computer program, which when run controls a computer device in which the readable storage medium is located to perform the image decal layout method according to any one of claims 1-4.
CN201911043838.8A 2019-10-30 2019-10-30 Image sticker layout method, apparatus, computer device, and readable storage medium Active CN110796601B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911043838.8A CN110796601B (en) 2019-10-30 2019-10-30 Image sticker layout method, apparatus, computer device, and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911043838.8A CN110796601B (en) 2019-10-30 2019-10-30 Image sticker layout method, apparatus, computer device, and readable storage medium

Publications (2)

Publication Number Publication Date
CN110796601A CN110796601A (en) 2020-02-14
CN110796601B true CN110796601B (en) 2023-04-28

Family

ID=69442025

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911043838.8A Active CN110796601B (en) 2019-10-30 2019-10-30 Image sticker layout method, apparatus, computer device, and readable storage medium

Country Status (1)

Country Link
CN (1) CN110796601B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113791721A (en) * 2021-08-31 2021-12-14 北京达佳互联信息技术有限公司 Picture processing method and device, electronic equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107633475A (en) * 2017-08-31 2018-01-26 努比亚技术有限公司 A kind of image processing method, terminal and computer-readable recording medium
CN110007999A (en) * 2019-04-15 2019-07-12 成都四方伟业软件股份有限公司 Page layout method, device and computer readable storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8711143B2 (en) * 2010-08-25 2014-04-29 Adobe Systems Incorporated System and method for interactive image-based modeling of curved surfaces using single-view and multi-view feature curves
US20180137660A1 (en) * 2016-11-11 2018-05-17 Microsoft Technology Licensing, Llc Responsive customized digital stickers

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107633475A (en) * 2017-08-31 2018-01-26 努比亚技术有限公司 A kind of image processing method, terminal and computer-readable recording medium
CN110007999A (en) * 2019-04-15 2019-07-12 成都四方伟业软件股份有限公司 Page layout method, device and computer readable storage medium

Also Published As

Publication number Publication date
CN110796601A (en) 2020-02-14

Similar Documents

Publication Publication Date Title
CN109885241B (en) Virtual keyboard generation method, server and computer readable storage medium
US20150294488A1 (en) Graph generating device, graph generating method and graph generating program
CN109753641B (en) Method and device for changing object position, electronic equipment and storage medium
JP2006268834A (en) Tool device for plc
CN110796601B (en) Image sticker layout method, apparatus, computer device, and readable storage medium
CN111984163A (en) Application icon display method and device and electronic equipment
CN105654460A (en) Point cloud splicing system and method
CN107203595A (en) A kind of method of the dynamic generation web interface based on flexible form
CN111814283B (en) Method and device for calculating engineering quantity of spray pipeline, storage medium and computer equipment
CN109683756B (en) Picture processing method and device, electronic equipment and storage medium
CN108460003B (en) Text data processing method and device
CN106970746B (en) Title bar setting method and device
CN106682275B (en) Load processing method and device for industrial factory building structure modeling
CN107704884A (en) Image tag processing method, image tag processing unit and electric terminal
CN113641284B (en) Regional plotting method and device of electronic map, electronic equipment and storage medium
CN116257236A (en) Page generation method, device, equipment and medium
JP6355909B2 (en) Inspection record apparatus and inspection record evaluation method
CN111598655A (en) Virtual garment size updating method and device, computer equipment and storage medium
CN112465117A (en) Contract generation model construction method, device, equipment and storage medium
US20070073757A1 (en) Method and arrangement for the visualisation of data
JP2017211908A (en) Layout drawing creation device
CN113434935A (en) Method and device for marking temporary dimension, computer equipment and readable storage medium
CN111291555A (en) Commodity specification identification method and device and computer readable storage medium
CN108415754A (en) Android UI adaptation methods and device
CN112154302A (en) Route planning method, control terminal and computer readable storage medium

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