CN110688506A - Template generation method and device, electronic equipment and storage medium - Google Patents

Template generation method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN110688506A
CN110688506A CN201910943223.4A CN201910943223A CN110688506A CN 110688506 A CN110688506 A CN 110688506A CN 201910943223 A CN201910943223 A CN 201910943223A CN 110688506 A CN110688506 A CN 110688506A
Authority
CN
China
Prior art keywords
composition
template
target
partition
image
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.)
Pending
Application number
CN201910943223.4A
Other languages
Chinese (zh)
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 Lemi 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 CN201910943223.4A priority Critical patent/CN110688506A/en
Publication of CN110688506A publication Critical patent/CN110688506A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/51Indexing; Data structures therefor; Storage structures

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Processing Or Creating Images (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the invention discloses a template generation method and device, electronic equipment and a storage medium, relates to the technical field of computers, and can enrich templates and effectively improve user experience. The method comprises the following steps: acquiring composition elements according to a user instruction, wherein the composition elements comprise basic graphs and/or graph dividing lines; loading the composition elements into a preset background, and carrying out composition transformation on the composition elements according to a preset rule to generate a preparation template; and adjusting the prepared template according to the target size to generate an image template of the target size.

Description

Template generation method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a template generation method and apparatus, an electronic device, and a storage medium.
Background
Template application functionality is common in photo-like applications. By applying the templates, a user can quickly make photos with different templates, for example, when the user wants to cut the photos into stars, the user can apply one star template.
However, the existing application programs can only provide templates with fixed forms, and are low in richness and few in application scenes. When a user carries out template set on the photos and the videos, the number of the templates is small, the templates are lack of change, and the user experience is greatly reduced.
Disclosure of Invention
In view of this, embodiments of the present invention provide a template generation method, an apparatus, an electronic device, and a storage medium, which can enrich templates and effectively improve user experience.
In a first aspect, an embodiment of the present invention provides a template generating method, including: acquiring composition elements according to a user instruction, wherein the composition elements comprise basic graphs and/or graph dividing lines; loading the composition elements into a preset background, and carrying out composition transformation on the composition elements according to a preset rule to generate a preparation template; and adjusting the prepared template according to the target size to generate an image template of the target size.
Optionally, the obtaining of the composition element according to the user instruction includes: selecting one or more composition elements from alternative elements according to a user instruction; and/or drawing one or more of the composition elements according to a user instruction.
Optionally, the performing composition transformation on the composition element according to a preset rule to generate a preparation template includes: and carrying out composition transformation on the composition elements according to a user dragging instruction or a preset algorithm to generate one or more preparation templates.
Optionally, the performing composition transformation on the composition element includes adjusting at least one of the following of the composition element: number, size, aspect ratio, position, orientation, stacking level.
Optionally, the performing composition transformation on the composition element according to a preset rule to generate a preparation template includes: adjusting the position relation of the composition elements relative to the preset background so that the composition elements divide the preset background into at least two composition partitions; adjusting the partition outline of each composition partition so that each composition partition can extract and display a part of object content from the corresponding target object according to the partition outline of the composition partition; the target object comprises a target image or a target shading; the total number of target objects corresponding to each composition partition is greater than 1.
Optionally, the correspondence between the composition partition and the target object includes: one composition partition corresponds to one target object, and/or a plurality of composition partitions correspond to the same target object.
Optionally, after the composition partitions in the preparation template are adjusted according to the target size to generate the image template of the target size, the method further includes: applying the image template to a preset number of photos or videos; according to a user instruction, adjusting the object content of the target object captured by each composition partition to generate a target image; and sharing the target image to a network so that other users use the image template according to the template information carried in the target image.
In a second aspect, an embodiment of the present invention further provides a template generating apparatus, including: the system comprises an acquisition unit, a display unit and a control unit, wherein the acquisition unit is used for acquiring composition elements according to a user instruction, and the composition elements comprise basic graphs and/or graph dividing lines; the transformation unit is used for loading the composition elements into a preset background, and carrying out composition transformation on the composition elements according to a preset rule to generate a preparation template; and the generating unit is used for adjusting the prepared template according to the target size and generating an image template of the target size.
Optionally, the obtaining unit includes: the selection module is used for selecting one or more composition elements from alternative elements according to a user instruction; and/or the drawing module is used for drawing one or more composition elements according to a user instruction.
Optionally, the transformation unit is specifically configured to perform composition transformation on the composition elements according to a user dragging instruction or according to a preset algorithm, so as to generate one or more preparation templates.
Optionally, the composition transformation includes adjusting at least one of the following of the composition elements: number, size, aspect ratio, position, orientation, stacking level.
Optionally, the transformation unit includes: the first adjusting module is used for adjusting the position relation of the composition elements relative to the preset background so that the composition elements divide the preset background into at least two composition partitions; the second adjusting module is used for adjusting the partition outline of each composition partition so that each composition partition can extract and display a part of object content from the corresponding target object according to the partition outline of the composition partition; the target object comprises a target image or a target shading; the total number of target objects corresponding to each composition partition is greater than 1.
Optionally, the correspondence between the composition partition and the target object includes: one composition partition corresponds to one target object, and/or a plurality of composition partitions correspond to the same target object.
Optionally, the apparatus further comprises: the applying unit is used for applying the image templates to a preset number of photos or videos after adjusting the composition partitions in the preparation templates according to the target size and generating the image templates with the target size; an adjusting unit, configured to adjust, according to a user instruction, object content of the object captured by each composition partition, to generate an object image; and the sharing unit is used for sharing the target image to a network so that other users can use the image template according to the template information carried in the target image.
In a third aspect, an embodiment of the present invention further provides an electronic device, including: the device comprises a shell, a processor, a memory, a circuit board and a power circuit, wherein the circuit board is arranged in a space enclosed by the shell, and the processor and the memory are arranged on the circuit board; a power supply circuit for supplying power to each circuit or device of the electronic apparatus; the memory is used for storing executable program codes; the processor executes a program corresponding to the executable program code by reading the executable program code stored in the memory, and is used for executing any kind of template generation method of the application program provided by the embodiment of the invention.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium storing one or more programs, which are executable by one or more processors to implement any one of the template generation methods provided by the embodiments of the present invention.
The template generation method, the template generation device, the electronic device and the storage medium provided by the embodiment of the invention can acquire composition elements according to a user instruction, load the composition elements into a preset background, perform composition transformation on the composition elements according to a preset rule to generate a preparation template, and then adjust the preparation template according to a target size to generate an image template of the target size. Therefore, the user is allowed to participate in template making, a preparation template is generated in a preset background by using the basic graph and/or the graph dividing line, and the image template with the target size is finally generated, so that the template content is greatly enriched, and the user experience is effectively improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow chart of a template generation method provided by an embodiment of the invention;
FIG. 2 is a diagram illustrating an effect of a template generation process according to an embodiment of the present invention;
FIG. 3 is a diagram illustrating another effect of the template generation process according to an embodiment of the present invention;
FIG. 4 is a diagram illustrating another effect of the template generation process according to the embodiment of the present invention;
FIG. 5 is a diagram illustrating another effect of the template generation process according to the embodiment of the present invention;
FIG. 6 is a diagram illustrating yet another effect of the template generation process according to an embodiment of the present invention;
FIG. 7 is a diagram illustrating a mapping between composition zones and target objects according to an embodiment of the present invention;
FIG. 8 is another diagram illustrating the mapping between composition zones and target objects in an embodiment of the invention;
fig. 9 is a diagram illustrating a template application effect of 26 english letters generated by the template generation method according to the embodiment of the present invention;
FIG. 10 is a detailed flowchart of a template generation method according to an embodiment of the present invention;
FIG. 11 is a schematic diagram of a structure of an image template generated by the template generation method of the embodiment shown in FIG. 10;
FIG. 12 is a schematic structural diagram of a template generating apparatus according to an embodiment of the present invention;
fig. 13 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
Embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
It should be understood that the described embodiments are only some embodiments of the invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In a first aspect, embodiments of the present invention provide a template generation method, which can enrich templates and effectively improve user experience.
As shown in fig. 1, a template generating method provided by an embodiment of the present invention may include:
s11, obtaining composition elements according to a user instruction, wherein the composition elements comprise basic graphs and/or graph dividing lines;
alternatively, the basic pattern in the embodiment of the present invention may be a closed pattern surrounded by contour lines, such as a circle, a rectangle, five stars, a petal shape, and the like. The figure division line may refer to a line extending in various forms, such as a straight line, a curved line, a broken line, a double line, and the like.
Optionally, the composition elements may be based on multiple formats such as an SVG format, a PNG format, a JPG format, and the like, and may be 2D graphics or 3D graphics.
In this step, the user instruction may be implemented by clicking, dragging, and the like in the graphical user interface, or may be implemented by inputting corresponding parameters through a keyboard or in other manners, which is not limited in the embodiment of the present invention.
S12, loading the composition elements into a preset background, and carrying out composition transformation on the composition elements according to a preset rule to generate a preparation template;
optionally, the preset background is a carrier of the composition element, and the composition element may be moved and transformed in the preset background. The preset background may be in various shapes such as a rectangle, a circle, a triangle, an irregular figure, and the like, and the preset background may be in a single color, without a pattern, or a picture with a pattern, which is not limited in the embodiment of the present invention. After composition transformation, the composition elements and the preset background form a preparation template.
And S13, adjusting the prepared template according to the target size to generate the image template with the target size.
The preliminary template shows the basic structure and distribution of each composition element, and in order to enable the generated image template to adapt to screens and/or applications with various sizes, in this step, the size of the preliminary template can be adjusted, so as to obtain an image template suitable for the target size. Alternatively, the target size may be set according to an aspect ratio of a screen of the mobile terminal or an aspect ratio of an image presentation interface of the application program, and may be set to 4:3, 9:16, or the like, for example.
The template generation method provided by the embodiment of the invention can acquire composition elements according to a user instruction, load the composition elements into a preset background, perform composition transformation on the composition elements according to a preset rule to generate a preparation template, and then adjust the preparation template according to a target size to generate an image template of the target size. Therefore, the user is allowed to participate in template making, a preparation template is generated in a preset background by using the basic graph and/or the graph dividing line, and the image template with the target size is finally generated, so that the template content is greatly enriched, and the user experience is effectively improved.
Optionally, in an embodiment of the present invention, the obtaining of the composition element according to the user instruction in step S11 specifically includes: one or more of the composition elements are selected from the alternative elements according to a user instruction. For example, in one embodiment of the present invention, a plurality of candidate elements such as "triangle", "circle", "sector", "heart", letter "R", curve "," straight line "may be listed in the candidate box, and the user may select one or more elements therefrom, for example, select" sector "and" straight line ", thereby obtaining the composition element.
In another embodiment of the invention, the user may be allowed to manually input graphics to form the composition elements themselves, in addition to providing alternative elements to the user. For example, one or more composition elements may be outlined according to user instructions, e.g., a user may hand write a "good" to form a composition element.
It should be noted that, in the embodiment of the present invention, the selection of the composition element and the drawing of the composition element may be used alone or in combination, and the embodiment of the present invention does not limit this.
After obtaining the composition elements, the composition elements may be loaded into a preset background in step S12, and composition transformation is performed on the composition elements according to a preset rule to generate a preparation template.
Optionally, performing composition transformation on the composition elements according to a preset rule, and generating the preparation template may include:
adjusting the position relation of the composition elements relative to the preset background so that the composition elements divide the preset background into at least two composition partitions;
adjusting the partition outline of each composition partition so that each composition partition can extract and display a part of object content from the corresponding target object according to the partition outline of the composition partition; the target object comprises a target image or a target shading; the total number of target objects corresponding to each composition partition is greater than 1.
In this step, after the composition elements are loaded into the preset background, the composition elements may divide the preset background into a plurality of parts. In order to obtain a desired template effect, composition transformation can be performed on composition elements according to a preset rule, so that the dividing mode and the dividing effect of the composition elements on a preset background are changed. Each composition partition formed by the composition element and the preset background can show the object content of the corresponding target object.
Optionally, when the target object corresponding to one composition partition is the target image, the composition partition may become a window for displaying the target image, and the shape of the composition partition is the shape of the captured and displayed target image. For example, as shown in fig. 2, if the composition partition is "circular", the portion exposed in the "circular" window can be extracted from the corresponding target image (the circular shaded box in fig. 2), and the portion outside the "circular" window in the target image (the rectangular dashed box in fig. 2) is not shown. The target image in the embodiment of the invention may include various contents, such as videos, pictures and the like, which can be displayed and are required to be displayed by a user. The embodiments of the present invention are not limited thereto.
Optionally, when the target object corresponding to one composition partition is the target shading, the composition partition may be used as a frame of the target image, that is, the target shading is not content that the user originally wants to show, but may play a role in separating or decorating the show content, and thus may also be a target object.
In an embodiment of the invention, no matter whether the target object is a target image or a target shading, the total number of the target objects corresponding to all composition partitions is at least two (more than 1), so that the collocation and combination effects among different target objects can be embodied, and the user experience is effectively improved.
Specifically, performing composition transformation on the composition element according to a preset rule to generate a preparation template may include: and carrying out composition transformation on the composition elements according to a user dragging instruction or a preset algorithm to generate one or more preparation templates.
The composition transformation is carried out on the composition elements according to the user dragging instruction, so that the user can be allowed to exert the composition transformation to the maximum extent, and the personalized design of the user is embodied. And the composition elements are subjected to composition transformation according to a preset algorithm, so that artificial intelligence can be fully utilized to form various designs with various characteristics. Alternatively, the preset algorithm may include golden section of the background, compliance of the size and layout of each composition element with art perspective rules, and the like, for example.
Alternatively, one or more preparatory templates may be generated according to the composition transformation. For example, as shown in FIG. 3, in one embodiment of the present invention, 12 different preparation templates as shown in the figure can be derived based on the composition transformation of the composition elements "heart" and "straight line".
In particular, a composition transformation may include a series of operations performed on a composition element. For example, in one embodiment of the invention, composition transforming a composition element may include adjusting one or more of the following for the composition element: number, size, aspect ratio, position, orientation, stacking level.
Wherein the number refers to the number of each composition element in the preset background. For example, in the embodiment shown in fig. 3, there are 3 "hearts" in the preparation template, and there are 1 "hearts" in the preparation template, which can be realized by adjusting the number. The size refers to the area occupied by each composition element in the preset background. Optionally, in an embodiment of the present invention, each composition element may be scaled equally according to a user instruction. The aspect ratio refers to a ratio of a width to a height of each of the composition elements in the preset background. The position refers to a relative position where each composition element is located in a preset background. Orientation means that each of the composition elements changes its orientation with respect to the preset background by rotation in a plane, e.g. a different orientation of the letter "F" as shown in fig. 4. The overlay hierarchy refers to an overlay hierarchy of each composition element when a plurality of composition elements are partially overlapped with each other. When the form set is performed, the overlapping portion can only display the contents of the uppermost layer stacked. As shown in fig. 5, (a) is an original state of the composition element, (b) is an effect diagram of clockwise selecting the "heart shape" in (a) by 45 °, and (c) is an effect diagram of proportionally enlarging the "heart shape" in (a).
Specifically, in the preparation template formed by composition transformation, the composition element may divide the preset background into at least two composition partitions, where each composition partition is used to extract and display a part of object content from the corresponding target object according to its partition outline. The target object may include a target image or a target shading according to the type of the display content in the composition area. The target image is the main body of the show and the target shading is the decorative border.
As shown in FIG. 6, in one embodiment of the present invention, the preparation template includes 3 patterning sections, A1, A2, A3, respectively. Wherein, A1 is triangle, A2 is circle, and A3 is the rest of the preliminary template except A1 and A2. Then, a1 can be shown in a triangular form by extracting a portion from its corresponding target image B1, a2 can be shown in a circular form by extracting a portion from its corresponding target image B2, and A3 can be shown in a portion from its corresponding target image B3.
Alternatively, the target images B1, B2, B3 may be three target objects different from each other (as shown in fig. 7), or may be partially identical and partially different target objects (as shown in fig. 8), for example, the target images B1 and B2 are the same target object, and the target object B3 is another target object.
It should be noted that, in the embodiment of the present invention, the target objects corresponding to the plurality of composition partitions are the same, which means that the plurality of composition partitions correspond to one target object together, that is, when the target object is adjusted, the display portion of the target object in each composition partition is adjusted accordingly. And if each composition partition in a plurality of composition partitions individually corresponds to one target object, even if the specific content of the target objects is the same, the plurality of partitions correspond to different target objects, that is, when one target object is adjusted, the display content is correspondingly changed in only one composition partition, and the display parts in other composition partitions are not changed.
In an embodiment of the invention, the composition partition is used for retrieving and presenting a part of the content of the corresponding target object. Optionally, the correspondence between the composition partition and the target object may include: one composition section corresponds to one target object (e.g., B1, B2, B3 in fig. 7), and/or a plurality of composition sections correspond to the same target object (e.g., B1, B2 in fig. 8).
In order to avoid that the composition partitions display the same target object correspondingly, so that the image separation effect of the template is difficult to see, in an embodiment of the present invention, the total number of the target objects corresponding to each composition partition is greater than 1, that is, the sum of the target objects corresponding to each composition partition is at least 2, that is, the prepared template is at least used for screening and displaying two target objects, no matter the target images or the target shading.
For example, as shown in fig. 9, a template application effect diagram of 26 english letters generated by the template generation method according to the embodiment of the present invention is shown. Each English letter in the drawing is formed by one or more composition partitions and is used for capturing and displaying a target image, and the composition partitions corresponding to blank parts in the preset background are used for displaying a target shading to form a decoration. In this embodiment, each composition partition corresponding to each english letter shares one target image, and the composition partition corresponding to the blank portion shares one target shading (the target shading summarized in this embodiment is blank), that is, the sum of the target objects corresponding to each composition partition is 2.
After the preliminary template is generated in step S12, the preliminary template generated image template may be adjusted in step S13, for example, by adjusting the sizes of different composition sections in the preliminary template, for example, by enlarging composition section 01 by 1.2 times, and reducing composition section 02 by 0.9 times, or by performing the same adjustment for each composition section, for example, by changing each composition section to 1.5 times. Alternatively, the image template may have various sizes and display scales to accommodate various mobile terminals and applications.
Further, in an embodiment of the present invention, after the step S13 adjusts the preliminary template according to the target size, and generates the image template of the target size, the template generating method provided by the embodiment of the present invention may further include:
applying the image template to a preset number of photos or videos;
according to a user instruction, adjusting the object content of the target object captured by each composition partition to generate a target image;
and sharing the target image to a network so that other users use the image template according to the template information carried in the target image.
For example, in one embodiment of the present invention, an image template having 4 composition zones may be applied to 3 photos, wherein one composition zone is used to display a predetermined shading for decoration. And according to the dragging of the user to each photo, selecting a proper part in each photo to be displayed through the composition subarea, and sharing the photo to the network after a satisfactory effect is achieved. After other users on the network see the shared target image, the user can click the application template to apply the own photo or video to the template, so that the image template is convenient to popularize.
The template generation method provided by the embodiment of the present invention is described in detail below with reference to specific embodiments.
Fig. 10 is a flowchart of a template generating method according to an embodiment of the present invention, and fig. 11 is a schematic structural diagram of a generated image template. With reference to fig. 10 and fig. 11, a template generating method provided by an embodiment of the present invention may include:
s201, selecting a circular composition element C from the alternative elements according to a user instruction;
s202, loading the composition element C into a rectangular preset background;
s203, carrying out composition transformation on the composition element C according to a user instruction;
optionally, the composition transformation may specifically include: adjusting the quantity of the composition elements C to obtain composition elements C and composition elements D; respectively adjusting the positions of the composition elements C and D, and respectively arranging the composition elements C and D at the upper left corner and the lower right corner of a preset background; the size of the composition elements C and D is adjusted such that the radius of the composition element C is r1, and the radius of the composition element D is r2, etc.
The composition elements C and D divide the preset background into three composition partitions G1, G2, G3.
S204, adjusting the prepared template according to the target size to generate an image template of the target size;
for example, target dimensions include: 9:16, 3:2 and 5:7, the composition partitions in the preparation template can be adjusted according to each target size, so that the composition partitions can be scaled or cropped according to the target size, and the basic composition structure of the template can be maintained and the display requirement of the target size can be met.
S205, applying the generated image template with the target size of 5:7 to 2 photos P1 and P2 (not shown);
the photo P1 is displayed in the composition subarea G1, the photo P2 is displayed in the composition subarea G2, and the composition subarea G3 is filled with a preset ground tint for decoration.
S206, according to the user instruction, adjusting the display part of the photo P1 in the composition partition G1 and the display part of the photo P2 in the composition partition G2 to generate a target image;
for example, a human face is captured and displayed in G1, and a candle is captured and displayed in G2.
And S207, sharing the target image to a network, so that other users use the image template according to the template information carried in the target image.
In a second aspect, an embodiment of the present invention further provides a template generating apparatus, which can enrich templates and effectively improve user experience.
As shown in fig. 12, an embodiment of the present invention further provides a template generating apparatus, including:
an obtaining unit 31, configured to obtain a composition element according to a user instruction, where the composition element includes a basic pattern and/or a pattern dividing line;
the transformation unit 32 is configured to load the composition elements into a preset background, and perform composition transformation on the composition elements according to a preset rule to generate a preparation template;
a generating unit 33, configured to adjust the preliminary template according to a target size, and generate an image template of the target size.
The template generating device provided by the embodiment of the invention can acquire composition elements according to a user instruction, load the composition elements into a preset background, perform composition transformation on the composition elements according to a preset rule to generate a preparation template, and then adjust the preparation template according to a target size to generate an image template of the target size. Therefore, the user is allowed to participate in template making, a preparation template is generated in a preset background by using the basic graph and/or the graph dividing line, and the image template with the target size is finally generated, so that the template content is greatly enriched, and the user experience is effectively improved.
Optionally, the obtaining unit 31 may include:
the selection module is used for selecting one or more composition elements from alternative elements according to a user instruction;
and/or
And the drawing module is used for drawing one or more composition elements according to a user instruction.
Optionally, the transforming unit 32 may be specifically configured to perform composition transformation on the composition elements according to a user dragging instruction or according to a preset algorithm, so as to generate one or more of the preparation templates.
Optionally, the composition transformation includes adjusting at least one of the following of the composition elements: number, size, aspect ratio, position, orientation, stacking level.
Alternatively, the transforming unit 32 may include:
the first adjusting module is used for adjusting the position relation of the composition elements relative to the preset background so that the composition elements divide the preset background into at least two composition partitions;
the second adjusting module is used for adjusting the partition outline of each composition partition so that each composition partition can extract and display a part of object content from the corresponding target object according to the partition outline of the composition partition; the target object comprises a target image or a target shading; the total number of target objects corresponding to each composition partition is greater than 1.
Optionally, the correspondence between the composition partition and the target object includes: one composition partition corresponds to one target object, and/or a plurality of composition partitions correspond to the same target object.
Optionally, the template generating apparatus provided in the embodiment of the present invention may further include:
the applying unit is used for applying the image templates to a preset number of photos or videos after the prepared templates are adjusted according to the target size and the image templates with the target size are generated;
an adjusting unit, configured to adjust, according to a user instruction, object content of the object captured by each composition partition, to generate an object image;
and the sharing unit is used for sharing the target image to a network so that other users can use the image template according to the template information carried in the target image.
In a third aspect, embodiments of the present invention further provide an electronic device, which can enrich templates and effectively improve user experience.
As shown in fig. 13, an electronic device provided in an embodiment of the present invention may include: the device comprises a shell 51, a processor 52, a memory 53, a circuit board 54 and a power circuit 55, wherein the circuit board 54 is arranged inside a space enclosed by the shell 51, and the processor 52 and the memory 53 are arranged on the circuit board 54; a power supply circuit 55 for supplying power to each circuit or device of the electronic apparatus; the memory 53 is used to store executable program code; the processor 52 executes a program corresponding to the executable program code by reading the executable program code stored in the memory 53, for executing the template generating method provided in any of the foregoing embodiments.
For specific execution processes of the above steps by the processor 52 and further steps executed by the processor 52 by running the executable program code, reference may be made to the description of the foregoing embodiments, and details are not described herein again.
The above electronic devices exist in a variety of forms, including but not limited to:
(1) a mobile communication device: such devices are characterized by mobile communications capabilities and are primarily targeted at providing voice, data communications. Such terminals include: smart phones (e.g., iphones), multimedia phones, functional phones, and low-end phones, among others.
(2) Ultra mobile personal computer device: the equipment belongs to the category of personal computers, has calculation and processing functions and generally has the characteristic of mobile internet access. Such terminals include: PDA, MID, and UMPC devices, etc., such as ipads.
(3) A portable entertainment device: such devices can display and play multimedia content. This type of device comprises: audio, video players (e.g., ipods), handheld game consoles, electronic books, and smart toys and portable car navigation devices.
(4) A server: the device for providing the computing service comprises a processor, a hard disk, a memory, a system bus and the like, and the server is similar to a general computer architecture, but has higher requirements on processing capacity, stability, reliability, safety, expandability, manageability and the like because of the need of providing high-reliability service.
(5) And other electronic equipment with data interaction function.
Accordingly, an embodiment of the present invention further provides a computer-readable storage medium, where one or more programs are stored, and the one or more programs can be executed by one or more processors to implement any one of the template generating methods provided in the foregoing embodiments, so that corresponding technical effects can also be achieved, which have been described in detail above and are not described herein again.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments.
In particular, as for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
For convenience of description, the above devices are described separately in terms of functional division into various units/modules. Of course, the functionality of the units/modules may be implemented in one or more software and/or hardware implementations of the invention.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The above description is only for the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A template generation method, comprising:
acquiring composition elements according to a user instruction, wherein the composition elements comprise basic graphs and/or graph dividing lines;
loading the composition elements into a preset background, and carrying out composition transformation on the composition elements according to a preset rule to generate a preparation template;
and adjusting the prepared template according to the target size to generate an image template of the target size.
2. The method of claim 1, wherein the obtaining composition elements according to the user instruction comprises:
selecting one or more composition elements from alternative elements according to a user instruction;
and/or
And drawing one or more composition elements according to a user instruction.
3. The method according to claim 1, wherein the performing composition transformation on the composition elements according to the preset rule to generate the preparation template comprises:
and carrying out composition transformation on the composition elements according to a user dragging instruction or a preset algorithm to generate one or more preparation templates.
4. The method of claim 1, wherein said composition transforming said composition element comprises adjusting at least one of: number, size, aspect ratio, position, orientation, stacking level.
5. The method according to claim 1, wherein the performing composition transformation on the composition elements according to the preset rule to generate the preparation template comprises:
adjusting the position relation of the composition elements relative to the preset background so that the composition elements divide the preset background into at least two composition partitions;
adjusting the partition outline of each composition partition so that each composition partition can extract and display a part of object content from the corresponding target object according to the partition outline of the composition partition; the target object comprises a target image or a target shading; the total number of target objects corresponding to each composition partition is greater than 1.
6. The method according to claim 5, wherein the correspondence of the composition section to the target object includes: one composition partition corresponds to one target object, and/or a plurality of composition partitions correspond to the same target object.
7. The method of claim 5 or 6, wherein after the adjusting the preliminary template according to the target size generates the image template of the target size, the method further comprises:
applying the image template to a preset number of photos or videos;
according to a user instruction, adjusting the object content of the target object captured by each composition partition to generate a target image;
and sharing the target image to a network so that other users use the image template according to the template information carried in the target image.
8. A template generation apparatus, comprising:
the system comprises an acquisition unit, a display unit and a control unit, wherein the acquisition unit is used for acquiring composition elements according to a user instruction, and the composition elements comprise basic graphs and/or graph dividing lines;
the transformation unit is used for loading the composition elements into a preset background, and carrying out composition transformation on the composition elements according to a preset rule to generate a preparation template;
and the generating unit is used for adjusting the prepared template according to the target size and generating an image template of the target size.
9. The apparatus of claim 8, wherein the obtaining unit comprises:
the selection module is used for selecting one or more composition elements from alternative elements according to a user instruction;
and/or
And the drawing module is used for drawing one or more composition elements according to a user instruction.
10. The apparatus according to claim 8, wherein the transformation unit is specifically configured to perform composition transformation on the composition elements according to a user dragging instruction or according to a preset algorithm, so as to generate one or more of the preparation templates.
CN201910943223.4A 2019-09-30 2019-09-30 Template generation method and device, electronic equipment and storage medium Pending CN110688506A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910943223.4A CN110688506A (en) 2019-09-30 2019-09-30 Template generation method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910943223.4A CN110688506A (en) 2019-09-30 2019-09-30 Template generation method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN110688506A true CN110688506A (en) 2020-01-14

Family

ID=69111266

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910943223.4A Pending CN110688506A (en) 2019-09-30 2019-09-30 Template generation method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110688506A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112035204A (en) * 2020-08-28 2020-12-04 重庆可兰达科技有限公司 Wallpaper customization method, system, terminal and medium for android system
CN112988101A (en) * 2021-04-20 2021-06-18 西安诺瓦星云科技股份有限公司 Image processing method and device, nonvolatile storage medium and processor
CN113626632A (en) * 2021-07-30 2021-11-09 北京达佳互联信息技术有限公司 Display method and device of album material and electronic equipment
WO2022036917A1 (en) * 2020-08-21 2022-02-24 完美世界(重庆)互动科技有限公司 Interface adjustment method and apparatus, computer program, and computer readable medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050057576A1 (en) * 2003-06-12 2005-03-17 Canon Infor. Systems Research Australia Pty. Ltd. Geometric space decoration in graphical design system
CN104978445A (en) * 2014-04-04 2015-10-14 北京金山网络科技有限公司 Picture combining method and picture combining device
CN105608663A (en) * 2014-11-17 2016-05-25 深圳富泰宏精密工业有限公司 Picture composition method and picture composition system
US20180018800A1 (en) * 2015-03-30 2018-01-18 Alibaba Group Holding Limited Efficient image synthesis
US20180225851A1 (en) * 2017-02-09 2018-08-09 International Business Machines Corporation Personalized word cloud embedded emblem generation service

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050057576A1 (en) * 2003-06-12 2005-03-17 Canon Infor. Systems Research Australia Pty. Ltd. Geometric space decoration in graphical design system
CN104978445A (en) * 2014-04-04 2015-10-14 北京金山网络科技有限公司 Picture combining method and picture combining device
CN105608663A (en) * 2014-11-17 2016-05-25 深圳富泰宏精密工业有限公司 Picture composition method and picture composition system
US20180018800A1 (en) * 2015-03-30 2018-01-18 Alibaba Group Holding Limited Efficient image synthesis
US20180225851A1 (en) * 2017-02-09 2018-08-09 International Business Machines Corporation Personalized word cloud embedded emblem generation service

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022036917A1 (en) * 2020-08-21 2022-02-24 完美世界(重庆)互动科技有限公司 Interface adjustment method and apparatus, computer program, and computer readable medium
CN112035204A (en) * 2020-08-28 2020-12-04 重庆可兰达科技有限公司 Wallpaper customization method, system, terminal and medium for android system
CN112988101A (en) * 2021-04-20 2021-06-18 西安诺瓦星云科技股份有限公司 Image processing method and device, nonvolatile storage medium and processor
CN113626632A (en) * 2021-07-30 2021-11-09 北京达佳互联信息技术有限公司 Display method and device of album material and electronic equipment
CN113626632B (en) * 2021-07-30 2023-10-31 北京达佳互联信息技术有限公司 Album material display method and device and electronic equipment

Similar Documents

Publication Publication Date Title
CN110688506A (en) Template generation method and device, electronic equipment and storage medium
EP3279866B1 (en) Method and apparatus for generating synthetic picture
US10902684B2 (en) Multiple users dynamically editing a scene in a three-dimensional immersive environment
CN111803945B (en) Interface rendering method and device, electronic equipment and storage medium
US20140280054A1 (en) Visual Post Builder
CN111282277B (en) Special effect processing method, device and equipment and storage medium
US20120013640A1 (en) Graphical representation of events
CN112967367B (en) Water wave special effect generation method and device, storage medium and computer equipment
CN110322571B (en) Page processing method, device and medium
EP4170580A1 (en) Picture processing method and apparatus, device, and storage medium
US10120539B2 (en) Method and device for setting user interface
CN112445400A (en) Visual graph creating method, device, terminal and computer readable storage medium
CN111589111A (en) Image processing method, device, equipment and storage medium
CN112734900A (en) Baking method, baking device, baking equipment and computer-readable storage medium of shadow map
US20090002386A1 (en) Graphical Representation Creation Mechanism
WO2023173828A1 (en) Scene element processing method and apparatus, device, and medium
CN109499067B (en) Terrain texture drawing method and device, electronic equipment and storage medium
CN106201838A (en) Video download progress display packing and device
CN110705242A (en) Method and device for manufacturing slide template and electronic equipment
CN111161377A (en) Method and device for adding characters into picture, electronic equipment and storage medium
CN115713589A (en) Image generation method and device for virtual building group, storage medium and electronic device
CN109908576A (en) A kind of rendering method and device, electronic equipment, storage medium of information module
CN114708363A (en) Game live broadcast cover generation method and server
CN114742970A (en) Processing method of virtual three-dimensional model, nonvolatile storage medium and electronic device
US20180189251A1 (en) Automatic multi-lingual editing method for cartoon content

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20201201

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

Applicant after: Beijing LEMI Technology Co.,Ltd.

Address before: East District, 2nd floor, 33 Xiaoying West Road, Haidian District, Beijing 100085

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

RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200114