CN108428213B - Image collage method, device, electronic equipment and medium - Google Patents

Image collage method, device, electronic equipment and medium Download PDF

Info

Publication number
CN108428213B
CN108428213B CN201810277608.7A CN201810277608A CN108428213B CN 108428213 B CN108428213 B CN 108428213B CN 201810277608 A CN201810277608 A CN 201810277608A CN 108428213 B CN108428213 B CN 108428213B
Authority
CN
China
Prior art keywords
collage
layout
image
content
area
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
CN201810277608.7A
Other languages
Chinese (zh)
Other versions
CN108428213A (en
Inventor
林可欣
林志丰
张启峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jupiter Technology Co ltd
Original Assignee
Beijing Lemi Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Lemi Technology Co ltd filed Critical Beijing Lemi Technology Co ltd
Priority to CN201810277608.7A priority Critical patent/CN108428213B/en
Publication of CN108428213A publication Critical patent/CN108428213A/en
Application granted granted Critical
Publication of CN108428213B publication Critical patent/CN108428213B/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 transformation in the plane of the image
    • G06T3/40Scaling the whole image or part thereof
    • G06T3/4038Scaling the whole image or part thereof for image mosaicing, i.e. plane images composed of plane sub-images

Abstract

The embodiment of the invention provides an image collage method, an image collage device, electronic equipment and a medium, and relates to the technical field of computers, wherein the method comprises the following steps: selecting a collage layout from the collage layout set to form a collage layout subset; selecting a target collage layout from the collage layout subset to collage the image to be collaged; continuously acquiring an instant image acquired by a lens of the electronic equipment; respectively taking each instant image as an image to be collaged, and collaging the images according to a preset collaging mode aiming at each display item in the target collage layout to obtain a collage image of each frame of instant image; when the target collage layout is utilized to collage the collage image to reach the preset time length, the target collage layout is updated to be another collage layout in the collage layout set. Compared with the prior art, the scheme provided by the embodiment of the invention can obtain the collage result with different collage styles and layout selection sequences when image collage is carried out each time, thereby attracting the use of users.

Description

Image collage method, device, electronic equipment and medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to an image collage method, an image collage apparatus, an electronic device, and a medium.
Background
In daily life, a user often uses an electronic device such as a mobile phone or a tablet computer to take a picture or record a video, and in order to improve the interest of the obtained picture or video, the user often wants to take the picture or video subjected to collage processing.
In the prior art, when an electronic device is used to tile an instant image to obtain a photo or a video obtained through the tile processing, after a camera of the electronic device captures each frame of the instant image, the electronic device selects a tile layout from a plurality of existing tile layouts according to a preset tile layout selection sequence, and then performs image tile processing on each frame of the instant image according to the selected tile layout to generate a tile image.
However, when the image collage processing is implemented in the above manner, because the selectable collage layout and the selection order of the collage layouts are fixed, when the electronic device uses the collage layout to collage the instant image, so as to obtain a photo or a video, the collage layout and the selection order of the collage layout used each time are fixed, which results in a single style and low interest of the obtained photo or video obtained through the collage processing.
Disclosure of Invention
An object of embodiments of the present invention is to provide an image collage method, an apparatus, an electronic device, and a medium, so as to obtain collage results with different collage styles and different layout selection sequences each time image collage is performed, thereby improving the diversity and interest of photos or videos obtained through collage processing.
The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides an image collage method, which is applied to an electronic device, and the method includes:
selecting a collage layout from the collage layout set to form a collage layout subset; wherein a collage layout comprises at least one presentation item, the presentation item comprising: the information of the first area, the information of the second area and the collage mode of the collage content, the first area is as follows: an area in the collage layout for filling collage content, the second area being: the region is used for filling the collage content in the first region and corresponds to the collage content in the image to be collaged;
selecting one collage layout for collage processing of the image to be collaged from the collage layout subsets as a target collage layout;
continuously acquiring an instant image acquired by a lens of the electronic equipment;
respectively taking each acquired frame of instant image as an image to be collaged, collaging the image according to a preset collage mode aiming at each display item in the target collage layout, and acquiring the collage image of each frame of instant image, wherein the preset collage mode is as follows: for a display item, intercepting the collage content from the instant image according to the information of the second area, and filling the intercepted collage content into a first area indicated by the information of the first area in a collage mode;
and when the target collage layout is used for collage processing to reach the preset time length, reselecting a collage layout different from the target collage layout from the collage layout subset, and taking the reselected collage layout as a target collage board.
In one implementation, selecting a collage layout from a set of collage layouts to form a subset of collage layouts includes:
obtaining a recommendation index of each collage layout in the collage layout set;
and selecting the collage layout with the recommendation index higher than a preset threshold value from the collage layout set to form a collage layout subset.
In one implementation, the obtaining a recommendation index for each collage layout in the set of collage layouts includes:
obtaining a recommendation index for each collage layout in the collage layout set determined in the following manner:
obtaining the score of the collage layout on each preset scoring item;
and performing weighted calculation on the weight of each preset scoring item and the score of the collage layout on each preset scoring item, and determining a calculation result as a recommendation index of the collage layout.
In one implementation, the scoring term includes at least one of:
whether the collage layout meets the festival activity recommendation requirement;
whether a collage layout has been selected for forming a collage layout set;
whether the collage layout is selected for collage processing of the image to be collaged;
whether other collage layouts in the layout types to which the collage layout belongs are selected for collage processing of the image to be collaged.
In one implementation, the collage-wise filling the intercepted collage content to a first area indicated by the information of the first area includes:
beautifying the intercepted collage content;
and filling the beautified collage content to the first area indicated by the information of the first area in a collage mode.
In one implementation, the image collaging according to a preset collage mode for each display item in the target collage layout to obtain a collage image of each frame of instant video includes:
according to the preset collage sequence corresponding to the target collage layout and the following modes, filling collage content in a first region indicated by information of a first region included by each display item of the target collage layout, and obtaining a collage image of each frame of instant image, wherein the collage sequence is used for representing the sequence of filling the collage content in the first region indicated by the information of the first region included by each display item of the target collage layout:
intercepting collage content from the instant image according to information of a second area included in the display item;
judging whether an approach animation mode of collage content in a first area indicated by first area information included in the display item is defined;
if so, filling the intercepted collage content into a first area indicated by the information of the first area included in the display item in a collage mode included in the display item and the approach animation mode.
In one implementation, after selecting one of the subset of collage layouts for collaging an image to be collaged, the method further includes:
and recording the use record of the target collage layout.
In a second aspect, an embodiment of the present invention provides an image collage apparatus, applied to an electronic device, where the apparatus includes:
a set generation module for selecting a collage layout from the collage layout set to form a collage layout subset; wherein a collage layout comprises at least one presentation item, the presentation item comprising: the information of the first area, the information of the second area and the collage mode of the collage content, the first area is as follows: an area in the collage layout for filling collage content, the second area being: the region is used for filling the collage content in the first region and corresponds to the collage content in the image to be collaged;
a layout selection module, configured to select a collage layout for collage processing of an image to be collaged from the collage layout subsets as a target collage layout;
the image acquisition module is used for continuously acquiring the instant image acquired by the lens of the electronic equipment;
an image obtaining module, configured to use each obtained frame of instant image as an image to be collaged, collage the image according to a preset collage manner for each display item in the target collage layout, and obtain a collage image of each frame of instant image, where the preset collage manner is: for a display item, intercepting the collage content from the instant image according to the information of the second area, and filling the intercepted collage content into a first area indicated by the information of the first area in a collage mode;
and the layout switching module is used for reselecting a collage layout different from the target collage layout from the collage layout subset when the target collage layout is used for collage processing to reach the preset time length, and taking the reselected collage layout as the target collage layout.
In one implementation, the set generation module includes:
an index obtaining submodule, configured to obtain a recommendation index of each collage layout in the collage layout set;
and the set generation submodule is used for selecting the collage layout with the recommendation index higher than a preset threshold value from the collage layout set to form a collage layout subset.
In one implementation, the index obtaining sub-module is specifically configured to: obtaining a recommendation index of each collage layout in the collage layout set;
the index obtaining submodule comprises:
the score obtaining unit is used for obtaining the score of the collage layout on each preset scoring item;
and the index obtaining unit is used for performing weighted calculation on the weight of each preset scoring item and the score of the collage layout on each preset scoring item, and determining the calculation result as the recommendation index of the collage layout.
In one implementation, the scoring term includes at least one of:
whether the collage layout meets the festival activity recommendation requirement;
whether a collage layout has been selected for forming a collage layout set;
whether the collage layout is selected for collage processing of the image to be collaged;
whether other collage layouts in the layout types to which the collage layout belongs are selected for collage processing of the image to be collaged.
In one implementation, the image obtaining module includes:
the image beautifying submodule is used for beautifying the intercepted collage content;
and the image collage sub-module is used for filling the beautified collage content into the first area indicated by the information of the first area in a collage mode.
In one implementation, the image obtaining module is specifically configured to:
according to the preset collage sequence corresponding to the target collage layout and the following modes, filling collage content in a first region indicated by information of a first region included by each display item of the target collage layout, and obtaining a collage image of each frame of instant image, wherein the collage sequence is used for representing the sequence of filling the collage content in the first region indicated by the information of the first region included by each display item of the target collage layout:
the image acquisition module comprises:
the content intercepting submodule is used for intercepting the collage content from the instant image according to the information of the second area included in the display item;
the animation judgment submodule is used for judging whether an approach animation mode of collage content in a first area indicated by first area information included in the display item is defined, and if so, the content collage submodule is triggered;
and the content collage sub-module is used for filling the intercepted collage content into a first area indicated by the information of the first area included in the display item in a collage mode included in the display item and the approach animation mode.
In one implementation, after the layout selection module, the method further includes:
and the layout recording module is used for recording the use record of the target collage layout.
In a third aspect, an embodiment of the present invention provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor and the communication interface complete communication between the memory and the processor through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing the steps of the image collage method when executing the program stored in the memory.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, in which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the image collage method.
In a fifth aspect, the embodiment of the present invention further provides an application program, where the application program is configured to execute the image collage method steps described above when running.
It can be seen from the above that, by applying the scheme provided by the embodiment of the present invention, a new collage layout subset is obtained each time an image is collaged, and because the collage layout subsets may have different styles and selection orders of the collage layouts, the collage layout styles and selection orders used each time an image is collaged may be different, so that the collage results obtained each time have great differences, thereby obtaining more abundant and various collage results and increasing the interestingness of the collage results.
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 schematic flow chart of a first image collage method according to an embodiment of the present invention.
Fig. 2 is a flowchart illustrating a second image collage method according to an embodiment of the present invention.
Fig. 3 is a schematic structural diagram of a first image collage device according to an embodiment of the present invention.
Fig. 4 is a schematic structural diagram of a second image collage apparatus according to an embodiment of the present invention.
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
FIG. 6 is the target collage layout of example 2.
Fig. 7 is a live image obtained in example 2.
Fig. 8 is the collage content of the collage in the first region indicated by the information of the first region which shows that item P1 is included in example 2.
Fig. 9 is the collage content of the collage in the first region indicated by the information of the first region which shows that item P2 is included in example 2.
Fig. 10 is a collage image of the live video shown in fig. 7 obtained in example 2.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the 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.
When the prior art is applied to realize image collage processing, because the selectable collage layout and the selection sequence of the collage layout are fixed, the electronic equipment collage the instant images by using the collage layout, so that when a photo or a video is obtained, the collage layout and the selection sequence of the collage layout used each time are fixed, and the obtained photo or video obtained by collage processing has single style and low interest.
In order to solve the problems in the prior art, an embodiment of the present invention provides an image collage processing method, which is applied to an electronic device, and includes:
selecting a collage layout from the collage layout set to form a collage layout subset; wherein a collage layout comprises at least one presentation item, the presentation item comprising: the information of the first area, the information of the second area and the collage mode of the collage content, the first area is as follows: an area in the collage layout for filling collage content, the second area being: the region is used for filling the collage content in the first region and corresponds to the collage content in the image to be collaged;
selecting one collage layout for collage processing of the image to be collaged from the collage layout subsets as a target collage layout;
continuously acquiring an instant image acquired by a lens of the electronic equipment;
respectively taking each acquired frame of instant image as an image to be collaged, collaging the image according to a preset collage mode aiming at each display item in the target collage layout, and acquiring the collage image of each frame of instant image, wherein the preset collage mode is as follows: for a display item, intercepting the collage content from the instant image according to the information of the second area, and filling the intercepted collage content into a first area indicated by the information of the first area in a collage mode;
and when the target collage layout is used for collage processing to reach the preset time length, reselecting a collage layout different from the target collage layout from the collage layout subset, and taking the reselected collage layout as a target collage board.
It can be seen from the above that, by applying the scheme provided by the embodiment of the present invention, a new collage layout subset is obtained each time an image is collaged, and because the collage layout subsets may have different styles and selection orders of the collage layouts, the collage layout styles and selection orders used each time an image is collaged may be different, so that the collage results obtained each time have great differences, thereby obtaining more abundant and various collage results and increasing the interestingness of the collage results.
As shown in fig. 1, a schematic flow chart of a first image collage method provided in an embodiment of the present invention is applied to an electronic device, and the method includes:
s101: selecting a collage layout from the collage layout set to form a collage layout subset;
wherein a collage layout comprises at least one presentation item, the presentation item comprising: the information of the first area, the information of the second area and the collage mode of the collage content, the first area is as follows: an area in the collage layout for filling collage content, the second area being: the region is used for filling the collage content in the first region and corresponds to the collage content in the image to be collaged;
the collage content may be understood as: and filling the contents to the collage layout.
Specifically, the information of the first area may be information indicating a position and a size of the first area in the collage layout, and for example, the position and the size of the first area may be represented by coordinates by establishing a coordinate system in the collage layout; the information of the second area may be information indicating the position and size of the second area in the image to be collaged, and for example, the position and size of the second area may be expressed in coordinates by establishing a coordinate system in the image to be collaged; the coordinate system in the collage layout and the coordinate system in the image to be collaged may be the same or different.
The collage content is the content in the second area intercepted in the image to be collaged according to the information of the second area, and the shape, the size and the image content of the collage content are the same as those of the second area.
In one implementation, the first region and the second region have the same shape and size, and in this implementation, the collage manner of the collage content is as follows: filling the collage content into the collage layout according to the shape and size of the collage content when the collage content is intercepted;
in another implementation, the shape and/or size of the first region is different from that of the second region, and in this implementation, the collage manner of the collage content is as follows: and changing the shape and/or size of the collage content into the shape and/or size of the first area when the collage content is cut, and filling the collage layout according to the shape and size of the first area.
The collage mode may be a mode of directly filling, or a mode of filling in a zooming mode, that is, firstly, the collage content is amplified or reduced, and then the processed content is collaged.
S102: selecting one collage layout for collage processing of the image to be collaged from the collage layout subsets as a target collage layout;
when the target collage layout is selected from the collage layout set, the selection can be performed in a random selection mode, or the selection can be performed in a certain order, for example, the selection is performed in the order of the collage layout identifications from large to small, and the like.
S103: continuously acquiring an instant image acquired by a lens of the electronic equipment;
when the electronic device takes a picture or a video, the lens of the electronic device continuously acquires an instant image, and the acquisition process can be continued until a picture taking button of the electronic device is pressed or a video taking button of the electronic device is pressed.
S104: respectively taking each acquired frame of instant image as an image to be collaged, and collaging the image according to a preset collaging mode aiming at each display item in the target collage layout to obtain a collage image of each frame of instant image;
wherein, the preset splicing mode is as follows: and for a display item, cutting out the collage content from the instant image according to the information of the second area, and filling the cut collage content into the first area indicated by the information of the first area in a collage mode.
S105: when the target collage layout is used for collage processing and reaches a preset time length, a collage layout different from the target collage layout is reselected from the collage layout subset, and the reselected collage layout is used as the target collage layout.
The method comprises the steps of selecting a collage layout different from a target collage layout, wherein the method comprises the steps of selecting a collage layout different from the target collage layout, selecting a next collage layout according to the sequence of the collage layouts in the collage layout set, and randomly selecting another collage layout in the collage layout set.
In the above S105, after the target collage layout is updated to a collage layout different from the current target collage layout newly selected from the subset of collage layouts, the electronic device will continue to continuously obtain the instant image acquired by the camera, and use each subsequently acquired frame of instant image as a new collage image to be collaged, use the updated target collage layout to collage the new collage image, that is, after the newly selected collage layout is used as the target collage layout in the above S105, return to the step of executing the above S103 to continuously acquire the instant image acquired by the lens of the electronic device, and then repeat the above S104 to obtain the collage image of each new frame of instant image until the whole image collage process is finished.
When the electronic device takes a picture or a video, the lens of the electronic device continuously acquires an instant image, and the acquisition process can be continued until a picture taking button of the electronic device is pressed or a video taking button of the electronic device is pressed.
In one implementation, the image processing method may capture a collage image of a live video as a photo when a photo capture button of the electronic device is pressed, and end the image collage method.
In another implementation, the image processing method may start recording a video after the video capture button is pressed, then end video capture when the video capture button is pressed again, and end the image collage method.
In another implementation, after the photo or video is shot, the image collage method is not ended, but is ended after an end instruction sent by a user is received.
It can be seen from the above that, by applying the scheme provided by the embodiment of the present invention, a new collage layout subset is obtained each time an image is collaged, and because the collage layout subsets may have different styles and selection orders of the collage layouts, the collage layout styles and selection orders used each time an image is collaged may be different, so that the collage results obtained each time have great differences, thereby obtaining more abundant and various collage results and increasing the interestingness of the collage results.
In one implementation, the selecting a collage layout from the collage layout set in S101 to form the collage layout subset may include:
s1011: obtaining a recommendation index of each collage layout in the collage layout set;
in one implementation, a recommendation index for each collage layout in the set of collage layouts determined in the following manner may be obtained:
S101A: obtaining the score of the collage layout on each preset scoring item;
wherein, the preset score items can be understood as: the preset items for evaluating the collage layout can be different according to the information of different classifications of the collage layout.
In one implementation, the preset scoring item may include at least one of the following items:
whether the collage layout meets the festival activity recommendation requirement; whether a collage layout has been selected for forming a collage layout set; whether the collage layout is selected for collage processing of the image to be collaged; whether other collage layouts in the layout types to which the collage layout belongs are selected for collage processing of the image to be collaged.
The present application is described by way of example only, and the preset score is not limited thereto.
S101B: and performing weighted calculation on the weight of each preset scoring item and the score of the collage layout on each preset scoring item, and determining the calculation result as the recommendation index of the collage layout.
In order to better understand the method for determining the recommendation index of the collage layout, the following description is made by example 1:
example 1:
assuming that the recommendation index of the collage layout is represented by F, and when the preset scoring items are the following four items respectively, the score and the weight of each preset scoring item under different conditions are respectively:
preset score item 1: whether the collage layout meets the festival activity recommendation requirement
The collage layout meets the festival activity recommendation requirement, and the score is 1;
the collage layout part meets the festival activity recommendation requirement and has a score of 0.5;
the collage layout does not meet the festival activity recommendation requirement, and the score is 0;
the weight is: 50 percent.
Preset score item 2: whether a collage layout has been selected for forming a collage layout set;
collage layouts have been selected for forming a set of collage layouts with a score of 1;
collage layouts have not been selected for forming a collage layout set, scoring 0;
the weight is: 20 percent;
preset score item 3: whether the collage layout is selected for collage processing of the image to be collaged;
the collage layout is selected for collage processing of the image to be collaged, and the score is 1;
the collage layout is not selected for collage processing of the image to be collaged, and the score is 0;
the weight is: 20 percent;
preset score item 4: whether other collage layouts in the layout types to which the collage layouts belong are selected are used for collage processing of the images to be collaged;
other collage layouts in the layout types to which the collage layouts belong are selected for collage processing of the images to be collaged, and the score is 1;
other collage layouts in the layout types to which the collage layouts belong are not selected for collage processing of the images to be collaged, and the score is 0;
the weight is: 10 percent.
If the scores of the collage layout X in the collage layout set for the four scoring items are 1 score, 0 score, 1 score and 1 score, respectively, the recommendation index F is 1 × 50% +0 × 20% +1 × 10% + 0.8;
if the scores of the collage layout Y in the collage layout set for the four scoring items are 0 score, 1 score and 1 score, respectively, the recommendation index F is 0 × 50% +1 × 20% +1 × 10% + 0.5;
by analogy, the recommendation index of each collage layout in the collage layout set can be obtained.
S1012: and selecting the collage layout with the recommendation index higher than a preset threshold value from the collage layout set to form a collage layout subset.
The preset threshold value can be preset by the electronic equipment, and the preset threshold values used when the collage layout set is formed every time are the same; or temporarily set when the collage layout subsets need to be formed, and the preset threshold values used each time the collage layout subsets are formed may be the same or different.
The arrangement sequence of all collage layouts in the collage layout subset can be arranged from high to low according to the recommendation index; or may be arranged from low to high according to the recommendation index; but may also be arranged randomly.
In another implementation manner, the selecting a collage layout from the collage layout set in S101 to form the collage layout subset may include:
s1013: obtaining a recommendation index of each collage layout in the collage layout set;
s1014: obtaining the number of collage layouts in a preset collage layout subset, and assuming that the number is N;
s1015: and arranging the recommendation indexes in a high-to-low order to obtain the collage layouts arranged at the top N positions to form a collage layout subset.
In one implementation, the collage filling the cut-out collage content into the first area indicated by the information of the first area in the S104 in a collage manner may include:
s1041: beautifying the intercepted collage content;
for example: background colors can be added to the collage content, a collage can be added to the collage content, the collage content can be processed by using a filter function, and other modes for beautifying the collage content can be adopted.
S1042: and collaging the beautified collage content to a first area indicated by the information of the first area in a collage mode.
In the implementation mode, the captured collage content is beautified, so that the obtained collage image is more attractive and interesting.
In another implementation manner, the image collaging performed in the S104 according to a preset collage manner for each display item in the target collage layout to obtain a collage image of each frame of instant image may include:
obtaining the tile content of each frame of live image in the first area indicated by the information of the first area included in each display item of the target tile layout according to the preset tile sequence corresponding to the target tile layout and the following steps S104A-S104C
Wherein, the collage order is used for representing the order of collage contents in the first area indicated by the information of the first area included in each display item of the target collage layout:
S104A: intercepting collage content from the instant image according to information of a second area included in the display item;
S104B: judging whether the approach animation mode of the collage content in the first area indicated by the first area information included in the display item is defined, if so, executing S104C;
wherein, the approach animation mode is as follows: when the collage content is filled into the first region indicated by the first region information included in the presentation item, the collage content may be filled into the first region with an erased animation effect, may be filled into the first region with an animation effect of a louver, or may be filled into the first region with an in-flight animation effect, for example.
S104C: and filling the intercepted collage content into a first area indicated by the information of the first area included in the display item in a collage mode and an approach animation mode included in the display item.
In one implementation, in step S104C, the start position coordinates of the approach animation mode are set in the coordinate system of the target collage layout, then the collage content is shifted and gradually changed in size according to the position coordinates and the area size of the first area indicated by the information of the first area and the set start position coordinates of the approach animation mode, and the collage content is filled into the first area indicated by the information of the first area included in the display item according to the collage mode and the approach animation mode of the collage content included in the display item.
For example, assume that the origin of the target collage layout coordinate system is the upper left vertex of the target collage layout, the horizontal axis passing through the origin of coordinates is the X-axis of the coordinate system, the vertical axis is the Y-axis of the coordinate system, and the target collage layout is a rectangle formed by the upper left vertex and the lower right vertex having coordinates (0,0) and (720,1280), respectively.
A presentation item includes a first area information indicating the origin of a coordinate system, the starting position coordinates of the approach animation mode of the collage content in the first area are the origin of the coordinate system, and the information of the first area indicates the first area: and rectangles formed by the upper left vertex and the lower right vertex with the coordinates of (90,128) and (570,288), respectively, the collage mode of the collage content is collage according to the shape and the size of the second area, the approach animation mode is erasure, therefore, the collage content is continuously shifted and increased by adopting the erasure animation effect in the coordinate system of the target collage layout from the origin of the coordinate system until the collage content is shifted to the rectangular area formed by the upper left vertex and the lower right vertex with the coordinates of (90,128) and (570,288), respectively, and the rectangular area is filled by the increase, and the filling of the collage content in the target collage layout is further completed.
In the implementation mode, the collage content is collaged in an approach animation mode, so that the whole image collage processing process is dynamic, more vivid and interesting, and better attracts users to use.
In one implementation manner, in S104, for each display item in the target collage layout, the collage content is captured from the live image according to the information of the second area included in the display item, and the captured collage content is collaged to the first area indicated by the information of the first area included in the display item in the collage manner included in the display item, where:
according to the collage sequence, each time collage content is intercepted from the instant image according to the information of the second area included by one display item, the intercepted collage content is collaged to the first area indicated by the information of the first area included by the display item in a collage mode included by the display item, and after the collage content is collaged, the collage content is intercepted from the instant image according to the information of the second area included by the next display item.
In another time manner, in S104, for each display item in the target collage layout, the collage content is captured from the live image according to the information of the second area included in the display item, and the captured collage content is collaged to the first area indicated by the information of the first area included in the display item in the collage manner included in the display item, which may be:
and intercepting the collage content from the instant image according to the information of the second area included by all the display items, namely acquiring all the collage content to be collaged in the target collage layout, and then distributing and collaging all the intercepted collage content to the first area indicated by the information of the first area included by the corresponding display item in a collage mode included by the corresponding display item.
To better understand the image collage method described above, a process of forming a collage image that is instantaneously influenced in example 2 is specifically described below as an example:
example 2:
first, determining recommendation indexes of all collage layouts provided by the electronic equipment through a recommendation index determining method in example 1, and selecting 10 collage layouts with the highest recommendation indexes to form a collage layout set S (L1, L2, … … L10);
second, collage layout L1 is selected from the set S of collage layouts as the target collage layout, shown in FIG. 6 as selected target collage layout L1.
The upper left vertex of the target collage layout L1 is the origin of coordinates, the horizontal axis passing through the origin of coordinates is the X axis, the vertical axis is the Y axis, and the target collage layout L1 is a rectangle formed by the upper left vertex and the lower right vertex having coordinates (0,0) and (720,1280), respectively.
The target collage layout L1 includes three presentation items P1, P2 and P3.
And thirdly, acquiring an instant image acquired by a lens of the electronic device, wherein the instant image is an image to be collaged as shown in fig. 7.
The top left vertex of the live image is the origin of coordinates, the horizontal axis passing through the origin of coordinates is the X axis, the vertical axis is the Y axis, and the target collage layout L1 is a rectangle formed by the top left vertex and the bottom right vertex having coordinates (0,0) and (720,1280), respectively.
For the presentation item P1 included in the target collage layout L1:
the information of the first region included in the presentation item P1 indicates that the first region corresponds to the region in the target collage layout: a rectangle formed by the upper left vertex and the lower right vertex with coordinates (90,128) and (570,288), respectively, i.e., a rectangular region corresponding to P1 in fig. 6.
The information of the second area included in the presentation item P1 indicates that the corresponding area of the second area in the image to be collaged shown in fig. 7 is: the matrix formed by the upper left and lower right vertices with coordinates (144,384) and (576,544), respectively, is shown in fig. 8.
The display item P1 includes a collage mode: changing the shape and/or size of the collage content from the shape and/or size obtained by the interception into the shape and/or size of the first area, filling the collage layout according to the shape and size of the first area, and not defining the approach animation mode of the collage content in the first area;
for the presentation item P2 included in the target collage layout L1:
the information of the first region included in the presentation item P2 indicates that the first region corresponds to the region in the target collage layout: a rectangle formed by the upper left vertex and the lower right vertex with coordinates (90,430) and (330,670), respectively, i.e., a rectangular region corresponding to P2 in fig. 6.
The information of the second area included in the presentation item P2 indicates that the corresponding area of the second area in the image to be collaged shown in fig. 7 is: the rectangle formed by the upper left and lower right vertices with coordinates (144,384) and (360,600), respectively, as shown in fig. 9.
The display item P2 includes a collage mode: changing the shape and/or size of the collage content from the shape and/or size obtained by the interception into the shape and/or size of the first area, filling the collage layout according to the shape and size of the first area, and not defining the approach animation mode of the collage content in the first area;
for the presentation item P3 included in the target collage layout L1:
the information of the first region included in the presentation item P3 indicates that the first region corresponds to the region in the target collage layout: a rectangle formed by the upper left vertex and the lower right vertex with coordinates (480,770) and (615,1010), respectively, i.e., a rectangular region corresponding to P3 in fig. 6.
The information of the second area included in the presentation item P3 indicates that the corresponding area of the second area in the image to be collaged shown in fig. 7 is: the rectangle formed by the upper left vertex and the lower right vertex with coordinates (0,0) and (720,1280), respectively, fig. 7.
The display item P3 includes a collage mode: changing the shape and/or size of the collage content from the shape and/or size obtained by the interception into the shape and/or size of the first area, filling the collage layout according to the shape and size of the first area, and not defining the approach animation mode of the collage content in the first area; fourthly, the collage content is cut out from the image to be collaged according to the area corresponding to the second area indicated by the information of the second area included in the presentation items P1-P3, that is, fig. 8, 9 and 7 are cut out in fig. 7, and the cut-out fig. 9, 10 and 7 are taken as the collage content collaged in the first area indicated by the information of the first area included in the presentation items P1-P3, respectively.
Sixthly, the screenshot content, that is, the screenshot in fig. 8, 9, and 7, is filled into the first region indicated by the information of the first region included in the presentation items P1 to P3 according to the collage manner included in the presentation items P1 to P3, that is, the screenshot content, that is, the screenshot in fig. 8, 9, and 7 is filled into the rectangular regions corresponding to P1, P2, and P3 in fig. 6 according to the collage manner, so as to obtain a collage image, as shown in fig. 10.
In one implementation, as shown in fig. 2, a flowchart of a second image collage method provided in an embodiment of the present invention is applied to an electronic device, where the method further includes, after the step S102 of selecting one collage layout for collaging an image to be collaged from the collage layout subset, the step of:
s201: and recording the use record of the target collage layout.
In the implementation mode, the using condition of the collage layout is counted each time, and data reference is provided for forming the collage layout subset next time.
In addition, the above-described image collage method may be expanded to derive further derivations, as follows:
in one implementation, after obtaining a collage image of a certain instant image in the above S104, the electronic device may receive a photographing instruction from a user, and take the collage image as a photo. The photo has the format of the target collage layout used, wherein each presentation item includes a collage content presented in a first region indicated by information of the first region, the collage content being captured in the instant image according to information indicated by a second region included in the presentation item.
After the electronic equipment finishes the photographing instruction, the image collaging method can stop executing and confirm that image collaging is finished; and the process can be continued until receiving an end instruction sent by the user.
In another implementation manner, in the execution process of the image collage method, the electronic device may receive a video recording start instruction sent by a user, and when the video recording start instruction is executed, the electronic device may record a generation process of a collage image of each frame of instant image and a switching process of a target collage layout; then, the electronic device receives a video recording stop instruction sent by the user, and in response to the video recording stop instruction, the user obtains a recorded video, where the video includes a generation process of a collage image of each frame of the instant image, for example, a format of the collage image of each frame of the instant image, how collage content of the collage image of each frame of the instant image is collaged into the first area indicated by the information of the first area included in each display item, and a switching process of a target collage layout.
After the electronic equipment completes the video recording stopping instruction, the image collaging method can stop executing and confirm that image collaging is finished; and the process can be continued until receiving an end instruction sent by the user.
Corresponding to the first image collage method, as shown in fig. 3, a schematic structural diagram of a first image collage apparatus provided in an embodiment of the present invention is applied to an electronic device, and the apparatus includes:
a set generating module 310, configured to select a collage layout from the collage layout set, to form a collage layout subset;
wherein, a collage layout includes at least one presentation item, and the presentation item includes: the information of the first area, the information of the second area and the collage mode of the collage content, the first area is as follows: a region in the collage layout for filling collage content, the second region being: and filling the corresponding area of the collage content in the image to be collaged with the collage content in the first area.
A layout selection module 320, configured to select one collage layout for collage processing of the image to be collaged from the collage layout subsets as a target collage layout;
the image acquisition module 330 is configured to continuously acquire an instant image acquired by a lens of the electronic device;
an image obtaining module 340, configured to take each obtained frame of instant image as an image to be collaged, collage the image according to a preset collage manner for each display item in the target collage layout, and obtain a collage image of each frame of instant image;
wherein, the preset splicing mode is as follows: and for a display item, cutting out the collage content from the instant image according to the information of the second area, and filling the cut collage content into the first area indicated by the information of the first area in a collage mode.
A layout switching module 350, configured to reselect a collage layout different from the target collage layout from the subset of collage layouts when the target collage layout is used for collage processing to reach a preset duration, and use the reselected collage layout as a target collage layout.
It can be seen from the above that, by applying the scheme provided by the embodiment of the present invention, a new collage layout subset is obtained each time an image is collaged, and because the collage layout subsets may have different styles and selection orders of the collage layouts, the collage layout styles and selection orders used each time an image is collaged may be different, so that the collage results obtained each time have great differences, thereby obtaining more abundant and various collage results and increasing the interestingness of the collage results.
In one implementation, the set generation module 310 includes:
an index obtaining sub-module 3101, configured to obtain a recommended index for each collage layout in the collage layout set;
the set generating sub-module 3102 is configured to select a collage layout from the collage layout set, where the recommendation index is higher than a preset threshold, to form a subset of collage layouts.
In one implementation, the index obtaining sub-module 3101 is specifically configured to: obtaining a recommendation index of each collage layout in the collage layout set;
in this implementation, the index obtaining sub-module 3101 includes:
a score obtaining unit 310A, configured to obtain a score of the collage layout on each preset scoring item;
the index obtaining unit 310B is configured to perform weighted calculation on the weight of each preset scoring item and the score of the collage layout on each preset scoring item, and determine a calculation result as a recommendation index of the collage layout.
In one implementation, the scoring item includes at least one of:
whether the collage layout meets the festival activity recommendation requirement; whether a collage layout has been selected for forming a collage layout set; whether the collage layout is selected for collage processing of the image to be collaged; whether other collage layouts in the layout types to which the collage layout belongs are selected for collage processing of the image to be collaged.
In one implementation, the image acquisition module 340 includes:
an image beautification submodule 3401, configured to beautify the intercepted collage content;
and the image collage sub-module 3402 is used for filling the beautified collage content into the first area indicated by the information of the first area in a collage mode.
In the implementation mode, the captured collage content is beautified, so that the obtained collage image is more attractive and interesting.
In one implementation, the image obtaining module 340 is specifically configured to: filling collage content in a first area indicated by information of a first area included in each display item of a target collage layout according to a preset collage sequence corresponding to the target collage layout and the following mode, and obtaining a collage image of each frame of instant image;
and the collage sequence is used for expressing the sequence of filling collage content in the first area indicated by the information of the first area included in each display item of the target collage layout.
In this implementation, the image obtaining module 340 includes:
the content intercepting submodule 340A is configured to intercept collage content from the instant image according to information of the second area included in the presentation item;
the animation judgment sub-module 340B is configured to judge whether an approach animation mode of collage content in the first area indicated by the first area information included in the display item has been defined, and if so, trigger the content collage sub-module 340C;
and the content collage sub-module 340C is configured to fill the intercepted collage content into the first area indicated by the information of the first area included in the presentation item in a collage manner and an approach animation manner included in the presentation item.
In the implementation mode, the collage content is collaged in an approach animation mode, so that the whole image collage processing process is dynamic, more vivid and interesting, and better attracts users to use.
In an implementation manner, corresponding to the second image collage method, as shown in fig. 4, a schematic structural diagram of a second image collage apparatus provided in an embodiment of the present invention is applied to an electronic device, and the apparatus further includes, after the layout selection module 320:
and a layout recording module 410 for recording usage records of the target collage layout.
In the implementation mode, the using condition of the collage layout is counted each time, and data reference is provided for forming the collage layout subset next time.
An embodiment of the present invention further provides an electronic device, as shown in fig. 5, which includes a processor 510, a communication interface 520, a memory 530 and a communication bus 540, wherein the processor 510, the communication interface 520, and the memory 530 complete mutual communication through the communication bus 540,
a memory 530 for storing a computer program;
the processor 510 is configured to implement the steps of the image collage method provided by the embodiment of the present invention when executing the program stored in the memory 530.
Specifically, the image collage method includes:
selecting a collage layout from the collage layout set to form a collage layout subset; wherein, a collage layout includes at least one presentation item, and the presentation item includes: the information of the first area, the information of the second area and the collage mode of the collage content, the first area is as follows: a region in the collage layout for filling collage content, the second region being: the region is used for filling the collage content in the first region and corresponds to the collage content in the image to be collaged;
selecting one collage layout for collaging the image to be collaged from the collage layout subsets as a target collage layout;
continuously acquiring an instant image acquired by a lens of the electronic equipment;
respectively using each acquired frame of instant image as an image to be collaged, collaging the image according to a preset collage mode aiming at each display item in a target collage layout, and acquiring the collage image of each frame of instant image, wherein the preset collage mode is as follows: for a display item, intercepting the collage content from the instant image according to the information of the second area, and filling the intercepted collage content into a first area indicated by the information of the first area in a collage mode;
when the target collage layout is used for collage processing to reach a preset time length, a collage layout different from the target collage layout is reselected from the collage layout subset, and the reselected collage layout is used as the target collage layout.
It should be noted that other implementation manners of the image collaging method implemented by the processor 510 executing the program stored in the memory 530 are the same as the image collaging method embodiments provided in the foregoing method embodiment section, and are not described again here.
It can be seen that, with the adoption of the scheme provided by the embodiment of the invention, the electronic equipment can obtain a new collage layout subset every time when image collage is carried out, and because the styles and the selection sequences of the collage layouts contained in different collage layout subsets are possibly different, the styles and the selection sequences of the collage layouts used every time image collage are possibly different, so that collage results obtained every time have larger difference, and therefore, richer and diversified collage results can be obtained, and the interestingness of the collage results is increased.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
The embodiment of the invention also provides a computer readable storage medium, wherein a computer program is stored in the computer readable storage medium, and when the computer program is executed by a processor, the steps of the image collage method provided by the embodiment of the invention are realized.
Specifically, the image collage method includes:
selecting a collage layout from the collage layout set to form a collage layout subset; wherein, a collage layout includes at least one presentation item, and the presentation item includes: the information of the first area, the information of the second area and the collage mode of the collage content, the first area is as follows: a region in the collage layout for filling collage content, the second region being: the region is used for filling the collage content in the first region and corresponds to the collage content in the image to be collaged;
selecting one collage layout for collaging the image to be collaged from the collage layout subsets as a target collage layout;
continuously acquiring an instant image acquired by a lens of the electronic equipment;
respectively using each acquired frame of instant image as an image to be collaged, collaging the image according to a preset collage mode aiming at each display item in a target collage layout, and acquiring the collage image of each frame of instant image, wherein the preset collage mode is as follows: for a display item, intercepting the collage content from the instant image according to the information of the second area, and filling the intercepted collage content into a first area indicated by the information of the first area in a collage mode;
when the target collage layout is used for collage processing to reach a preset time length, a collage layout different from the target collage layout is reselected from the collage layout subset, and the reselected collage layout is used as the target collage layout.
It should be noted that other implementation manners of the image collage method implemented when the computer program is executed by the processor are the same as the image collage method embodiments provided in the foregoing method embodiment section, and are not described again here.
As can be seen from the above, according to the solution provided by the embodiment of the present invention, the processor executes the computer program stored in the computer-readable storage medium, and obtains a new collage layout subset each time an image is collaged, because the collage layout subsets may have different styles and selection orders of the collage layouts, the collage layout styles and the selection orders used in each image collage may be different, so that the collage results obtained each time have a large difference, thereby obtaining a relatively rich and diverse collage result, and increasing the interest of the collage result.
The embodiment of the invention also provides an application program, wherein the application program is used for executing the steps of the image collage method during running.
Specifically, the image collage method includes:
selecting a collage layout from the collage layout set to form a collage layout subset; wherein, a collage layout includes at least one presentation item, and the presentation item includes: the information of the first area, the information of the second area and the collage mode of the collage content, the first area is as follows: a region in the collage layout for filling collage content, the second region being: the region is used for filling the collage content in the first region and corresponds to the collage content in the image to be collaged;
selecting one collage layout for collaging the image to be collaged from the collage layout subsets as a target collage layout;
continuously acquiring an instant image acquired by a lens of the electronic equipment;
respectively using each acquired frame of instant image as an image to be collaged, collaging the image according to a preset collage mode aiming at each display item in a target collage layout, and acquiring the collage image of each frame of instant image, wherein the preset collage mode is as follows: for a display item, intercepting the collage content from the instant image according to the information of the second area, and filling the intercepted collage content into a first area indicated by the information of the first area in a collage mode;
when the target collage layout is used for collage processing to reach a preset time length, a collage layout different from the target collage layout is reselected from the collage layout subset, and the reselected collage layout is used as the target collage layout.
It should be noted that other implementation manners of the image collage method implemented when the application program runs are the same as the image collage method embodiments provided in the foregoing method embodiment section, and are not described herein again.
As can be seen from the above, by using the scheme provided by the embodiment of the present invention, a new collage layout subset is obtained each time an image is collaged by running the application program, and because the collage layout subsets may have different collage layout styles and selection orders, the collage layout styles and selection orders used each time an image is collaged may be different, so that the collage results obtained each time have large differences, thereby obtaining more abundant and various collage results and increasing the interestingness of the collage results.
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, the electronic device embodiment, the computer-readable storage medium embodiment, and the application program embodiment, since they are substantially similar to the method embodiment, the description is relatively simple, and the relevant points can be referred to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (16)

1. An image collage method applied to an electronic device, the method comprising:
selecting a collage layout from the collage layout set to form a collage layout subset; wherein a collage layout comprises at least one presentation item, the presentation item comprising: the information of the first area, the information of the second area and the collage mode of the collage content, the first area is as follows: an area in the collage layout for filling collage content, the second area being: the region is used for filling the collage content in the first region and corresponds to the collage content in the image to be collaged;
selecting one collage layout for collage processing of the image to be collaged from the collage layout subsets as a target collage layout;
continuously acquiring an instant image acquired by a lens of the electronic equipment;
respectively taking each acquired frame of instant image as an image to be collaged, collaging the image according to a preset collage mode aiming at each display item in the target collage layout, and acquiring the collage image of each frame of instant image, wherein the preset collage mode is as follows: for a display item, intercepting the collage content from the instant image according to the information of the second area, and filling the intercepted collage content into a first area indicated by the information of the first area in a collage mode;
and when the target collage layout is used for collage processing to reach the preset time length, reselecting a collage layout different from the target collage layout from the collage layout subset, and taking the reselected collage layout as a target collage board.
2. The method of claim 1, wherein selecting a collage layout from the set of collage layouts to form the subset of collage layouts comprises:
obtaining a recommendation index of each collage layout in the collage layout set;
and selecting the collage layout with the recommendation index higher than a preset threshold value from the collage layout set to form a collage layout subset.
3. The method of claim 2, wherein obtaining a recommendation index for each collage layout in the set of collage layouts comprises:
obtaining a recommendation index for each collage layout in the collage layout set determined in the following manner:
obtaining the score of the collage layout on each preset scoring item;
and performing weighted calculation on the weight of each preset scoring item and the score of the collage layout on each preset scoring item, and determining a calculation result as a recommendation index of the collage layout.
4. The method of claim 3, wherein the scoring term comprises at least one of:
whether the collage layout meets the festival activity recommendation requirement;
whether a collage layout has been selected for forming a collage layout set;
whether the collage layout is selected for collage processing of the image to be collaged;
whether other collage layouts in the layout types to which the collage layout belongs are selected for collage processing of the image to be collaged.
5. The method of claim 1, wherein the collage-wise filling the intercepted collage content to a first region indicated by the information of the first region comprises:
beautifying the intercepted collage content;
and filling the beautified collage content to the first area indicated by the information of the first area in a collage mode.
6. The method of claim 1, wherein the image collaging according to a preset collage mode for each display item in the target collage layout to obtain a collage image of each frame of live video comprises:
according to the preset collage sequence corresponding to the target collage layout and the following modes, filling collage content in a first region indicated by information of a first region included by each display item of the target collage layout, and obtaining a collage image of each frame of instant image, wherein the collage sequence is used for representing the sequence of filling the collage content in the first region indicated by the information of the first region included by each display item of the target collage layout:
intercepting collage content from the instant image according to information of a second area included in the display item;
judging whether an approach animation mode of collage content in a first area indicated by first area information included in the display item is defined;
if so, filling the intercepted collage content into a first area indicated by the information of the first area included in the display item in a collage mode included in the display item and the approach animation mode.
7. The method of claim 1, further comprising, after said selecting one of the subset of collage layouts for collaging an image to be collaged,:
and recording the use record of the target collage layout.
8. An image collage apparatus for use with an electronic device, the apparatus comprising:
a set generation module for selecting a collage layout from the collage layout set to form a collage layout subset; wherein a collage layout comprises at least one presentation item, the presentation item comprising: the information of the first area, the information of the second area and the collage mode of the collage content, the first area is as follows: an area in the collage layout for filling collage content, the second area being: the region is used for filling the collage content in the first region and corresponds to the collage content in the image to be collaged;
a layout selection module, configured to select a collage layout for collage processing of an image to be collaged from the collage layout subsets as a target collage layout;
the image acquisition module is used for continuously acquiring the instant image acquired by the lens of the electronic equipment;
an image obtaining module, configured to use each obtained frame of instant image as an image to be collaged, collage the image according to a preset collage manner for each display item in the target collage layout, and obtain a collage image of each frame of instant image, where the preset collage manner is: for a display item, intercepting the collage content from the instant image according to the information of the second area, and filling the intercepted collage content into a first area indicated by the information of the first area in a collage mode;
and the layout switching module is used for reselecting a collage layout different from the target collage layout from the collage layout subset when the target collage layout is used for collage processing to reach the preset time length, and taking the reselected collage layout as the target collage layout.
9. The apparatus of claim 8, wherein the set generation module comprises:
an index obtaining submodule, configured to obtain a recommendation index of each collage layout in the collage layout set;
and the set generation submodule is used for selecting the collage layout with the recommendation index higher than a preset threshold value from the collage layout set to form a collage layout subset.
10. The apparatus of claim 9, wherein the index acquisition sub-module is specifically configured to: obtaining a recommendation index of each collage layout in the collage layout set;
the index obtaining submodule comprises:
the score obtaining unit is used for obtaining the score of the collage layout on each preset scoring item;
and the index obtaining unit is used for performing weighted calculation on the weight of each preset scoring item and the score of the collage layout on each preset scoring item, and determining the calculation result as the recommendation index of the collage layout.
11. The apparatus of claim 10, wherein the scoring term comprises at least one of:
whether the collage layout meets the festival activity recommendation requirement;
whether a collage layout has been selected for forming a collage layout set;
whether the collage layout is selected for collage processing of the image to be collaged;
whether other collage layouts in the layout types to which the collage layout belongs are selected for collage processing of the image to be collaged.
12. The apparatus of claim 8, wherein the image acquisition module comprises:
the image beautifying submodule is used for beautifying the intercepted collage content;
and the image collage sub-module is used for filling the beautified collage content into the first area indicated by the information of the first area in a collage mode.
13. The apparatus of claim 8, wherein the image acquisition module is specifically configured to:
filling collage content in a first area indicated by information of a first area included in each display item of the target collage layout according to a preset collage sequence corresponding to the target collage layout and the following mode, and obtaining a collage image of each frame of instant image, wherein the collage sequence is used for representing the sequence of filling the collage content in the first area indicated by the information of the first area included in each display item of the target collage layout;
the image acquisition module comprises:
the content intercepting submodule is used for intercepting the collage content from the instant image according to the information of the second area included in the display item;
the animation judgment submodule is used for judging whether an approach animation mode of collage content in a first area indicated by first area information included in the display item is defined, and if so, the content collage submodule is triggered;
and the content collage sub-module is used for filling the intercepted collage content into a first area indicated by the information of the first area included in the display item in a collage mode included in the display item and the approach animation mode.
14. The apparatus of claim 8, further comprising, after the layout selection module:
and the layout recording module is used for recording the use record of the target collage layout.
15. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1 to 7 when executing a program stored in the memory.
16. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of claims 1 to 7.
CN201810277608.7A 2018-03-30 2018-03-30 Image collage method, device, electronic equipment and medium Active CN108428213B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810277608.7A CN108428213B (en) 2018-03-30 2018-03-30 Image collage method, device, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810277608.7A CN108428213B (en) 2018-03-30 2018-03-30 Image collage method, device, electronic equipment and medium

Publications (2)

Publication Number Publication Date
CN108428213A CN108428213A (en) 2018-08-21
CN108428213B true CN108428213B (en) 2022-02-25

Family

ID=63159614

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810277608.7A Active CN108428213B (en) 2018-03-30 2018-03-30 Image collage method, device, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN108428213B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103150753A (en) * 2013-03-22 2013-06-12 中国人民解放军63680部队 Wide-range high-precision matched digital channel three-dimensional visualization method
CN104616318A (en) * 2015-01-22 2015-05-13 重庆邮电大学 Moving object tracking method in video sequence image
CN106127676A (en) * 2016-06-17 2016-11-16 许之敏 A kind of quick intercepting and the method for the synthesis long sectional drawing of multi-screen

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8520979B2 (en) * 2008-08-19 2013-08-27 Digimarc Corporation Methods and systems for content processing
JP5936658B2 (en) * 2013-09-24 2016-06-22 富士フイルム株式会社 Image processing apparatus, image processing method, program, and recording medium
CN103984502B (en) * 2014-05-30 2017-09-29 天津三星通信技术研究有限公司 The method and portable terminal of a kind of screen printing content
CN104199841B (en) * 2014-08-06 2018-01-02 武汉图歌信息技术有限责任公司 A kind of picture generates animation and the video editing method synthesized with video segment splicing
US9838431B2 (en) * 2014-11-28 2017-12-05 International Business Machines Corporation Context-based cloud security assurance system
US20160328868A1 (en) * 2015-05-07 2016-11-10 Facebook, Inc. Systems and methods for generating and presenting publishable collections of related media content items
CN106355547A (en) * 2015-07-16 2017-01-25 北京金山安全软件有限公司 Layout editing method and device for combined pictures and mobile terminal
US10157638B2 (en) * 2016-06-24 2018-12-18 Google Llc Collage of interesting moments in a video
CN106204442A (en) * 2016-06-29 2016-12-07 北京金山安全软件有限公司 Picture splicing method and device and electronic equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103150753A (en) * 2013-03-22 2013-06-12 中国人民解放军63680部队 Wide-range high-precision matched digital channel three-dimensional visualization method
CN104616318A (en) * 2015-01-22 2015-05-13 重庆邮电大学 Moving object tracking method in video sequence image
CN106127676A (en) * 2016-06-17 2016-11-16 许之敏 A kind of quick intercepting and the method for the synthesis long sectional drawing of multi-screen

Also Published As

Publication number Publication date
CN108428213A (en) 2018-08-21

Similar Documents

Publication Publication Date Title
US11317139B2 (en) Control method and apparatus
CN109144649A (en) Display methods, device, terminal and the storage medium of icon
KR20140098009A (en) Method and system for creating a context based camera collage
KR102121905B1 (en) Method and apparatus for setting background of ui control, and terminal
CN111612873A (en) GIF picture generation method and device and electronic equipment
CN105549814B (en) Photographing method based on mobile terminal and mobile terminal
CN112714253B (en) Video recording method and device, electronic equipment and readable storage medium
CN113840049A (en) Image processing method, video flow scene switching method, device, equipment and medium
CN109379623A (en) Video content generation method, device, computer equipment and storage medium
CN104967778A (en) Focusing reminding method and terminal
CN112148405A (en) Desktop layout method and device and electronic equipment
CN104754223A (en) Method for generating thumbnail and shooting terminal
US10216381B2 (en) Image capture
CN109791703B (en) Generating three-dimensional user experience based on two-dimensional media content
CN114390197A (en) Shooting method and device, electronic equipment and readable storage medium
CN106354356A (en) Method and terminal for managing application icon
CN108428213B (en) Image collage method, device, electronic equipment and medium
CN112684963A (en) Screenshot method and device and electronic equipment
CN109558203B (en) Recent content display method, device, terminal and storage medium
CN112383708B (en) Shooting method and device, electronic equipment and readable storage medium
CN112367487B (en) Video recording method and electronic equipment
CN110888576A (en) Screenshot method and device
CN110533742B (en) Image color filling method, device, equipment and storage medium
CN113473012A (en) Virtualization processing method and device and electronic equipment
CN108898081B (en) Picture processing method and device, mobile 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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20201125

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: 100123 Building 8, Huitong Times Square, 1 South Road, Chaoyang District, Beijing.

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

GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20230810

Address after: 3870A, 3rd Floor, Building 4, Courtyard 49, Badachu Road, Shijingshan District, Beijing, 100144

Patentee after: Beijing Jupiter Technology Co.,Ltd.

Address before: 100123 room 115, area C, 1st floor, building 8, yard 1, yaojiayuan South Road, Chaoyang District, Beijing

Patentee before: Beijing LEMI Technology Co.,Ltd.