CN112988101B - Image processing method and device, nonvolatile storage medium and processor - Google Patents

Image processing method and device, nonvolatile storage medium and processor Download PDF

Info

Publication number
CN112988101B
CN112988101B CN202110425014.8A CN202110425014A CN112988101B CN 112988101 B CN112988101 B CN 112988101B CN 202110425014 A CN202110425014 A CN 202110425014A CN 112988101 B CN112988101 B CN 112988101B
Authority
CN
China
Prior art keywords
template
layer
target media
picture
media picture
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110425014.8A
Other languages
Chinese (zh)
Other versions
CN112988101A (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.)
Xian Novastar Electronic Technology Co Ltd
Original Assignee
Xian Novastar Electronic 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 Xian Novastar Electronic Technology Co Ltd filed Critical Xian Novastar Electronic Technology Co Ltd
Priority to CN202110425014.8A priority Critical patent/CN112988101B/en
Publication of CN112988101A publication Critical patent/CN112988101A/en
Application granted granted Critical
Publication of CN112988101B publication Critical patent/CN112988101B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • G06F3/1407General aspects irrespective of display type, e.g. determination of decimal point position, display with fixed or driving decimal point, suppression of non-significant zeros

Abstract

The application discloses an image processing method and device, a nonvolatile storage medium and a processor. Wherein the method comprises the following steps: determining a layer to be edited, wherein the layer is used for displaying a media picture; determining to select a target media picture in the layer by using a first template, wherein the first template is used for selecting the media picture in the layer; mapping the target media picture to a second template; and displaying the target media picture in any area in the layer through the second template. The method and the device solve the technical problems that the selected image layer picture and the output area are mapped to be directly output and displayed, the picture of any area except the output area cannot be output after being selected, the operation flexibility is poor, and the use experience of a user is affected.

Description

Image processing method and device, nonvolatile storage medium and processor
Technical Field
The present invention relates to the field of image processing, and in particular, to an image processing method and apparatus, a nonvolatile storage medium, and a processor.
Background
The existing image processing method is to select a picture on an output area, and then process the selected picture and output the processed picture. Fig. 1a is a schematic diagram of a conventional image processing method, as shown in fig. 1a, a black background area is an output area, a picture is placed on the output area, the whole output area is not fully paved on the picture, and a transparent frame is a selected area. Fig. 1b is a schematic diagram of the image processing method shown in fig. 1a after selecting a frame for outputting.
In the existing image processing method, the selected layer picture is mapped with the output area to be directly output and displayed, and only the picture on the output area can be selected, and the picture which is not on the output area cannot be selected, namely, the picture outside the output area cannot be selected and then output. The operation flexibility is poor, and the use experience of a user is affected.
In view of the above problems, no effective solution has been proposed at present.
Disclosure of Invention
The embodiment of the application provides an image processing method and device, a nonvolatile storage medium and a processor, which at least solve the technical problems that the selected image layer picture and an output area are mapped to be directly output and displayed, the picture of any area except the output area cannot be output after being selected, the operation flexibility is poor, and the use experience of a user is affected in the existing image processing method.
According to an aspect of an embodiment of the present application, there is provided a method for processing an image, including: determining a layer to be edited, wherein the layer is used for displaying a media picture; selecting a target media picture in the picture layer by using a first template, wherein the first template is used for selecting the media picture in the picture layer; mapping the target media picture to a second template; and displaying the target media picture in any area in the layer through the second template.
Optionally, selecting the target media picture in the layer using the first template includes: determining layer parameters of the layer; determining the positions of the layers and the first template according to the layer parameters of the layers and the template parameters of the first template; and determining the target media picture according to the position of the first template relative to the layer and the intersection area of the first template and the layer.
Optionally, the layer parameters include vertex coordinates of the layer and width-height information of the layer, the template parameters include vertex coordinates of the first template and width-height information of the first template, and determining the position of the first template relative to the layer according to the layer parameters of the layer and the template parameters of the first template includes: determining the vertex coordinates of the first template relative to the layer according to the vertex coordinates of the first template and the vertex coordinates of the layer; determining a target media picture according to the position of the first template relative to the layer and the intersection area of the first template and the layer, comprising: taking the vertex coordinates of the first template relative to the layer as the vertex coordinates of the target media picture; the width and height information of the intersection area is used as the width and height information of the target media picture.
Optionally, mapping the target media picture to the second template includes: determining the width proportion and the height proportion of the second template and the first template respectively; if the width proportion and the height proportion are 1, mapping the target media picture to the second template according to the vertex coordinates of the target media picture and the width and height information of the target media picture; and if the width proportion or the height proportion is not 1, mapping the target media picture to the second template according to the vertex coordinates of the target media picture and the width proportion and the height proportion.
Optionally, mapping the target media picture to the second template in terms of a width scale and a height scale includes: multiplying the width information of the target media picture by the width proportion to obtain the width information of the target media picture after the target media picture is mapped to the second template; and multiplying the height information of the target media picture by the height proportion to obtain the height information of the target media picture after the target media picture is mapped to the second template.
Optionally, mapping the target media picture to the second template further comprises: determining the rotation angle of the layer and the rotation angle of the first template; determining the relative angle between the first template and the layer according to the rotation angle of the layer and the rotation angle of the first template; determining a rotation angle of the second template, and taking the difference between the rotation angle and the relative angle of the second template as a target rotation angle after the target media picture is mapped to the second template; and mapping the target media picture to the second template according to the target rotation angle.
Optionally, the first template and the second template are located in the same layer, and the number is the same, and the number is one or more.
Optionally, before selecting the target media frame in the layer by using the first template, the method further includes: setting template parameters, rotation angles and shapes of the first template and the second template respectively, wherein the shapes comprise a plurality of preset shapes and user-defined shapes.
Optionally, displaying the target media picture through the second template in any area of the layer includes: setting the position of the second template; and displaying the target media picture in the layer according to the rotation angle and the position of the second template.
According to another aspect of the embodiments of the present application, there is also provided an image processing method, including: determining a layer to be edited, wherein the layer is used for displaying a media picture; selecting a plurality of target media pictures in the layers by using a plurality of templates, wherein each template is respectively positioned in different layers or the same layer; mapping the plurality of target media pictures to a target template synthesized by a plurality of templates; and displaying a plurality of target media pictures through the target template.
Optionally, displaying the plurality of target media frames through the target template includes: setting the transparency of each template and the target template; and overlapping and displaying a plurality of target media pictures according to the transparency.
According to another aspect of the embodiments of the present application, there is also provided an image processing apparatus, including: the system comprises a determining module, a editing module and a display module, wherein the determining module is used for determining a layer to be edited, and the layer is used for displaying a media picture; the processing module is used for selecting a target media picture in the image layer by utilizing a first template, wherein the first template is used for selecting the media picture in the image layer; a mapping module for mapping the target media picture to a second template; and the display module is used for displaying the target media picture in any area in the layer through the second template.
According to still another aspect of the embodiments of the present application, there is also provided a nonvolatile storage medium including a stored program, wherein the device in which the nonvolatile storage medium is controlled to execute the above image processing method when the program runs.
According to still another aspect of the embodiments of the present application, there is also provided a processor for executing a program stored in a memory, wherein the program executes the above image processing method.
In the embodiment of the application, determining a layer to be edited, wherein the layer is used for displaying a media picture; selecting a target media picture in the picture layer by using a first template, wherein the first template is used for selecting the media picture in the picture layer; mapping the target media picture to a second template; the method comprises the steps of displaying a target media picture in any region of a picture layer through a second template, selecting and outputting the picture on the picture layer through the template, and outputting and displaying the picture, wherein the template comprises two parts of contents, one part of the contents is used for selecting the picture, the other part of the contents is used for outputting the selected picture, the purpose of selecting the picture in any region of the picture layer is achieved, and then the selected picture is output, so that the technical effect of improving the flexibility of user operation is achieved, the technical problem that the existing image processing method is solved, the selected picture of the picture layer and the output region are mapped to be directly output and displayed, the picture in any region except the output region cannot be output after being selected, the operation flexibility is poor, and the user experience technical problem is affected.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute an undue limitation to the application. In the drawings:
FIG. 1a is a schematic diagram of a prior art image processing method;
FIG. 1b is a schematic diagram of an image processing method shown in FIG. 1a after selecting a frame for outputting;
FIG. 2 is a flow chart of a method of processing an image according to an embodiment of the present application;
FIG. 3a is a schematic diagram of adding templates on a layer according to an embodiment of the present application;
FIG. 3b is a schematic diagram of mapping a frame selected by a first template to a second template according to an embodiment of the present application;
FIG. 4a is a schematic diagram of selecting layers using templates according to an embodiment of the present application;
FIG. 4b is a schematic diagram of an effect of selecting a layer using templates according to an embodiment of the present application;
FIG. 5 is a flow chart of another image processing method according to an embodiment of the present application;
FIG. 6a is an effect diagram of selecting layers using a composite template according to an embodiment of the present application;
FIG. 6b is an effect diagram of selecting a layer using a composite template according to an embodiment of the present application;
fig. 7 is a block diagram of a structure of an image processing apparatus according to an embodiment of the present application.
Detailed Description
In order to make the present application solution better understood by those skilled in the art, the following description will be made in detail and with reference to the accompanying drawings in the embodiments of the present application, it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that embodiments of the present application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to the embodiments of the present application, there is provided a method embodiment of a method for processing an image, it should be noted that the steps illustrated in the flowchart of the drawings may be performed in a computer system such as a set of computer executable instructions, and that although a logical order is illustrated in the flowchart, in some cases, the steps illustrated or described may be performed in an order different from that herein.
Aiming at the problem that the prior art can not realize the selection of any region of the layer, the invention provides a new solution. The invention introduces the concept of a template, and the pictures on the layer are output and displayed after being mapped through template selection and output, wherein the template comprises two parts of contents, one part is used for selecting the pictures, and the other part is used for outputting the selected pictures.
The whole idea is as follows: and displaying an original picture on the picture layer, wherein the first template is used for selecting the picture on the picture layer, and selecting the picture of any area of the original picture by modifying the template parameters of the first template. And mapping the picture selected by the first template to a second template, and outputting and displaying at any position by modifying template parameters of the second template.
The following is a detailed description of the above method:
fig. 2 is a flowchart of a method for processing an image according to an embodiment of the present application, as shown in fig. 2, the method includes the steps of:
step S202, determining a layer to be edited, wherein the layer is used for displaying a media picture;
step S204, selecting a target media picture in the image layer by using a first template, wherein the first template is used for selecting the media picture in the image layer;
step S206, mapping the target media picture to a second template;
step S208, displaying the target media picture through the second template in any area in the layer.
Through the steps, the pictures on the picture layer are selected and output through different templates and are mapped to be output and displayed, wherein the templates comprise two parts of contents, one part of the contents is used for selecting the pictures, the other part of the contents is used for outputting the selected pictures, the purposes of selecting the pictures in any area on the picture layer and then outputting the selected pictures are achieved, and therefore the technical effect of improving the flexibility of user operation is achieved.
According to an alternative embodiment of the present application, step S204 is implemented by: determining layer parameters of the layer; determining the positions of the layers and the first template according to the layer parameters of the layers and the template parameters of the first template; and determining the target media picture according to the position of the first template relative to the layer and the intersection area of the first template and the layer.
According to another optional embodiment of the present application, the layer parameters include vertex coordinates of the layer and width-height information of the layer, the template parameters include vertex coordinates of the first template and width-height information of the first template, and determining the position of the first template relative to the layer according to the layer parameters of the layer and the template parameters of the first template includes: determining the vertex coordinates of the first template relative to the layer according to the vertex coordinates of the first template and the vertex coordinates of the layer; determining a target media picture according to the position of the first template relative to the layer and the intersection area of the first template and the layer, comprising: taking the vertex coordinates of the first template relative to the layer as the vertex coordinates of the target media picture; the width and height information of the intersection area is used as the width and height information of the target media picture.
Assuming that the layer parameters of the layer are (x 1, y1, layerWidth, layerHeight), the template parameters of the first template are (x 2, y2, w1, h 1). The vertex coordinates of the first template with respect to the layer are (x 2-x1, y2-y 1), the size of the intersection area between the layer and the first template is (interwtw, interthh), and the parameters of the target media frame selected by the first template may be expressed as (x 2-x1, y2-y1, interwtw, interthh). The size of interwtw and interh may be calculated by calling an existing interface.
Note that x1 and y1 are vertex coordinates of the layer, and layerWidth and layerHeight are width information of the layer in the horizontal direction and height information of the layer in the vertical direction, respectively. X2, y2 are the vertex coordinates of the first template, and w1, h1 are the width information of the first template in the horizontal direction and the height information of the first template in the vertical direction, respectively.
In some optional embodiments of the present application, when step S206 is performed, a width ratio and a height ratio of the second template and the first template are determined, respectively; if the width proportion and the height proportion are 1, mapping the target media picture to the second template according to the vertex coordinates of the target media picture and the width and height information of the target media picture; and if the width proportion or the height proportion is not 1, mapping the target media picture to the second template according to the vertex coordinates of the target media picture and the width proportion and the height proportion.
In further alternative embodiments of the present application, mapping the target media picture to the second template in terms of a width scale and a height scale includes: multiplying the width information of the target media picture by the width proportion to obtain the width information of the target media picture after the target media picture is mapped to the second template; and multiplying the height information of the target media picture by the height proportion to obtain the height information of the target media picture after the target media picture is mapped to the second template.
Fig. 3a is a schematic diagram of adding templates on a layer, and as shown in fig. 3a, adding templates A1 and A2 on a layer a, respectively, generates a first template and a second template according to an embodiment of the present application. The positions, the sizes and the angles of the first templates A1 and the first templates A2 are adjusted according to the requirements, so that the first templates A1 and the first templates A2 can select the pictures of the required parts on the image layer. The added template may be shaped, here rectangular as an example.
Fig. 3b is a schematic diagram of mapping a frame selected by a first template to a second template, and as shown in fig. 3b, the frame content selected by the first template A1 is displayed on the second template A1, and the frame content selected by the first template A2 is displayed on the second template A2 according to an embodiment of the present application.
Assuming that the width and height of the first template are W1 and H1, respectively, and the width and height of the second template are W2 and H2, respectively, the following relationship exists between the first template and the second template:
horizontal wratio=w2/W1
Vertical hratio=h2/H1
Where wratio is the horizontal ratio and hratio is the vertical ratio.
Mapping the picture content selected by the first template to the second template for output, wherein the specific mapping process is as follows:
if the ratio of the width and height information of the second template to the width and height information of the first template is 1:1, the picture selected by the first template can be directly mapped to the second template.
If the ratio of the width and height information of the second template to the width and height information of the first template is not 1:1, the picture selected by the first template is required to be mapped to the second template according to the corresponding ratio value, and the specific mapping method is as follows:
the parameters of the target media picture selected by the first template are (x 2-x1, y2-y1, intersetw, interseth), and the picture mapped to the second template is (x, y, w, h) through horizontal and vertical scaling. Wherein, there is the following relation between the parameters of the picture mapped to the second template and the parameters of the target media picture selected by the first template:
x=(x2–x1)*wratio;
y=(y2–y1)*hratio;
w=wratio*interestW;
h=hratio*interestH;
wratio is the ratio of the width information of the second template to the width information of the first template, and hratio is the ratio of the width information of the second template to the height information of the first template.
In some optional embodiments of the present application, when performing step S206, it is further required to determine the rotation angle of the layer and the rotation angle of the first template; determining the relative angle between the first template and the layer according to the rotation angle of the layer and the rotation angle of the first template; determining a rotation angle of the second template, and taking the difference between the rotation angle and the relative angle of the second template as a target rotation angle after the target media picture is mapped to the second template; and mapping the target media picture to the second template according to the target rotation angle.
If the layer rotates by an angle A, the first template rotates by an angle B, and the rotation angle of the first template relative to the layer is B-A; and the second template rotates by an angle C, so that the angle of the output picture is C- (B-A).
According to an alternative embodiment of the present application, the first template and the second template are located on the same layer, and the number is one or more.
It will be appreciated that the first template and the second template are present in pairs, the same number. Under the default condition, one layer only has one template (a first template and a second template), and more templates can be added for the layer according to the needs of a user, so that the editing of a complex scene is solved.
According to another alternative embodiment of the present application, before executing step S204, the template parameters, rotation angles, and shapes of the first template and the second template need to be set, respectively, and the shapes include a plurality of preset shapes and user-defined shapes.
The shapes of the first template and the second template may be rectangular, or may be other special shapes (circular, elliptical, five-pointed star, etc.). The template parameters of the templates are adjustable, and the template shape is customized by modifying the template parameters.
By the method, the technical effect of selecting pictures in any size, any angle and any shape in any region of the layer by using the first template can be realized.
In other alternative embodiments of the present application, step S208 is implemented by the following method: setting the position of the second template; and displaying the target media picture in the layer according to the rotation angle and the position of the second template.
The template parameters of the first template and the template parameters of the second template can be modified, the creative scene is realized, and the flexibility of scene editing is improved.
The above method is described below with reference to specific examples:
FIG. 4a is a schematic diagram of selecting a layer using templates according to an embodiment of the present application, where both the first template and the second template may be independently edited, as shown in FIG. 4 a. The first template area on the underside of fig. 4a shows the layer and the first template. The first template is used for selecting the picture on the picture layer, and the first template can select the picture in any area of the picture layer and any angle with any size. And the second template area on the upper side of fig. 4a displays all the outputs and the second template, and outputs the picture when the second template intersects with the outputs, wherein the second template supports rotation and scaling, namely, the selected picture can be translated, rotated and scaled and then output. Under the default condition, one layer has only one template, more templates can be added for the layer according to the needs of a user, and the editing of a complex scene is solved. The templates support special-shaped templates and custom shape templates.
Fig. 4b is a schematic diagram of an effect of selecting a layer by using templates according to an embodiment of the present application, as shown in fig. 4b, 5 templates are added to layer a, which are a first template/second template A1, a first template/second template A2, a first template/second template A3, a first template/second template A4, and a first template/second template A5, respectively. The upper half of fig. 4b is a view of all the first templates used for selecting different areas of the original view, and the lower half of fig. 4b is an output view of all the selected views, wherein the second template A1 is rotated 45 degrees, the second template A2 is rotated 45 degrees in the opposite direction, and the second template A3 is rotated 90 degrees and then output. It can be seen from this schematic diagram that editing of complex scenes can be achieved by modifying the template parameters (including but not limited to position, size, angle) of the first template and the second template. The user can modify the template parameters of the first template and the template parameters of the second template, thereby realizing creative scenes and improving the flexibility of scene editing. The user can select any area of the original picture according to the needs of the user.
Fig. 5 is a flowchart of another image processing method according to an embodiment of the present application, as shown in fig. 5, including:
step S502, determining a layer to be edited, wherein the layer is used for displaying a media picture;
step S504, selecting a plurality of target media pictures in the layers by using a plurality of templates, wherein each template is respectively positioned in different layers or the same layer;
step S506, mapping the plurality of target media pictures to target templates synthesized by the plurality of templates;
step S508, displaying a plurality of target media pictures through the target template.
The method provided in step S502 to step S508 introduces the concept of a composite template based on the method described in fig. 2, and is used for outputting the pictures selected on different layers in an overlapping manner. The composite template provides convenience for editing under specific scenes. The composite template can output the selected pictures on the same layer in an overlapping way, and can output the selected pictures on different layers in an overlapping way.
It should be noted that, the preferred implementation manner of the embodiment shown in fig. 5 may refer to the preferred implementation manner of the embodiment shown in fig. 2, and will not be described herein.
Fig. 6a is an effect diagram of selecting a layer by using a composite template according to an embodiment of the present application, as shown in fig. 6a, specifically including the following steps:
(1) Adding a synthetic template A, wherein templates A1 and B1 are used for synthesizing the template A, and respectively generating a corresponding synthetic sub-template a-A1 and a corresponding synthetic sub-paste template A-B1;
(2) The synthesis sub-template A-A1 is used for selecting the picture of any area on the layer A, and the synthesis sub-template A-B1 is used for selecting the picture of any area on the layer B;
(3) The pictures selected by the synthesis sub-templates A-A1 are output through the synthesis template A, and the pictures selected by the synthesis sub-templates A-B1 are mapped to the synthesis template A for output. The mapping principle of the sub-templates and the composite templates is the same as that of the first template and the second template in fig. 3 b.
According to an alternative embodiment of the present application, step S506 is implemented by the following method: setting the transparency of each template and the target template; and overlapping and displaying a plurality of target media pictures according to the transparency.
Fig. 6b is an effect diagram of selecting a layer by using a composite template according to an embodiment of the present application, and as shown in fig. 6b, a multi-picture overlapping output effect is obtained by adjusting the transparency of the composite sub-template and the composite template.
The method provided by the invention can be used in various activities (conference, company annual meeting, singing meeting, evening meeting and the like), can meet the requirements of middle-low-end activities, and is also suitable for middle-high-end markets in complex scenes. The output is extracted by extracting the original picture or the local picture of interest therein, wherein the profile template outputs the picture in an arbitrary shape. The device is suitable for the needs of small and medium-sized activities and can be used for complex activities and complex scenes. Meanwhile, the complex activities are arranged for the user, so that convenience is brought; the scene can be customized by using the templates according to the needs, and more flexibility is provided for the user.
Fig. 7 is a block diagram of an image processing apparatus according to an embodiment of the present application, as shown in fig. 7, including:
a determining module 70, configured to determine a layer to be edited, where the layer is used to display a media picture;
a processing module 72, configured to select a target media picture in the layer by using a first template, where the first template is used to select a media picture in the layer;
a mapping module 74 for mapping the target media picture to a second template;
a display module 76 for displaying the target media picture through the second template in any area in the layer.
It should be noted that, the preferred implementation manner of the embodiment shown in fig. 7 may refer to the preferred implementation manner of the embodiment shown in fig. 2, and will not be described herein.
The embodiment of the application also provides a nonvolatile storage medium, which comprises a stored program, wherein the processing method of the image is controlled to be executed by the equipment where the nonvolatile storage medium is located when the program runs.
The above-described nonvolatile storage medium is used to store a program that performs the following functions: determining a layer to be edited, wherein the layer is used for displaying a media picture; selecting a target media picture in the picture layer by using a first template, wherein the first template is used for selecting the media picture in the picture layer; mapping the target media picture to a second template; and displaying the target media picture in any area in the layer through the second template. Or (b)
Determining a layer to be edited, wherein the layer is used for displaying a media picture; selecting a plurality of target media pictures in the layers by using a plurality of templates, wherein each template is respectively positioned in different layers or the same layer; mapping the plurality of target media pictures to a target template synthesized by a plurality of templates; and displaying a plurality of target media pictures through the target template.
The embodiment of the application also provides a processor, which is used for running the program stored in the memory, wherein the program runs to execute the image processing method.
The processor is used for processing a program for executing the following functions: determining a layer to be edited, wherein the layer is used for displaying a media picture; selecting a target media picture in the picture layer by using a first template, wherein the first template is used for selecting the media picture in the picture layer; mapping the target media picture to a second template; and displaying the target media picture in any area in the layer through the second template. Or (b)
Determining a layer to be edited, wherein the layer is used for displaying a media picture; selecting a plurality of target media pictures in the layers by using a plurality of templates, wherein each template is respectively positioned in different layers or the same layer; mapping the plurality of target media pictures to a target template synthesized by a plurality of templates; and displaying a plurality of target media pictures through the target template.
The foregoing embodiment numbers of the present application are merely for describing, and do not represent advantages or disadvantages of the embodiments.
In the foregoing embodiments of the present application, the descriptions of the embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed technology content may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and the division of the units, for example, may be a logic function division, and may be implemented in another manner, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be essentially or a part contributing to the related art or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely a preferred embodiment of the present application and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present application and are intended to be comprehended within the scope of the present application.

Claims (11)

1. A method of processing an image, comprising:
determining a layer to be edited, wherein the layer is used for displaying a media picture;
selecting a target media picture in the picture layer by using a first template, wherein the first template is used for selecting the media picture in the picture layer;
mapping the target media picture to a second template;
mapping the target media picture to a second template, comprising: determining a width ratio and a height ratio of the second template and the first template respectively; if the width proportion and the height proportion are both 1, mapping the target media picture to the second template according to the width and height information of the target media picture according to the vertex coordinates of the target media picture; if the width ratio or the height ratio is not 1, mapping the target media picture to the second template according to the width ratio and the height ratio according to the vertex coordinates of the target media picture;
and displaying the target media picture in any area in the layer through the second template.
2. The method of claim 1, wherein selecting a target media picture in the layer using a first template comprises:
determining layer parameters of the layer;
determining the position of the first template relative to the layer according to the layer parameters of the layer and the template parameters of the first template;
and determining the target media picture according to the position of the first template relative to the layer and the intersection area of the first template and the layer.
3. The processing method of claim 2, wherein the layer parameters include vertex coordinates of the layer and width-height information of the layer, the template parameters include vertex coordinates of the first template and width-height information of the first template,
determining the position of the first template relative to the layer according to the layer parameters of the layer and the template parameters of the first template comprises the following steps: determining the vertex coordinates of the first template relative to the layer according to the vertex coordinates of the first template and the vertex coordinates of the layer;
determining the target media picture according to the position of the first template relative to the layer and the intersection area of the first template and the layer comprises: taking the vertex coordinates of the first template relative to the layer as the vertex coordinates of the target media picture; and taking the width and height information of the intersection area as the width and height information of the target media picture.
4. The method of claim 1, wherein mapping the target media picture to the second template in the width scale and the height scale comprises:
multiplying the width information of the target media picture by the width proportion to obtain the width information of the target media picture after the target media picture is mapped to the second template;
and multiplying the height information of the target media picture by the height proportion to obtain the height information of the target media picture after the target media picture is mapped to the second template.
5. The method of any one of claims 1 to 4, wherein mapping the target media picture to a second template further comprises:
determining a rotation angle of the layer and a rotation angle of the first template;
determining the relative angle between the first template and the layer according to the rotation angle of the layer and the rotation angle of the first template;
determining a rotation angle of the second template, and taking the difference between the rotation angle of the second template and the relative angle as a target rotation angle after the target media picture is mapped to the second template;
and mapping the target media picture to the second template according to the target rotation angle.
6. The method of claim 1, wherein displaying the target media picture through the second template at any region of the layer comprises:
setting the position of the second template;
and displaying the target media picture in the layer according to the rotation angle and the position of the second template.
7. A method of processing an image, comprising:
determining a layer to be edited, wherein the layer is used for displaying a media picture;
selecting a plurality of target media pictures in the layers by using a plurality of templates, wherein each template is respectively positioned on different layers or the same layer;
mapping the plurality of target media pictures to a target template synthesized by the plurality of templates;
mapping the plurality of target media pictures to a target template synthesized from the plurality of templates, comprising: determining a width ratio and a height ratio of the target template and each template of the plurality of templates respectively; if the width proportion and the height proportion are both 1, mapping the target media picture to the target template according to the width and height information of the target media picture according to the vertex coordinates of the target media picture; if the width ratio or the height ratio is not 1, mapping the target media picture to the target template according to the width ratio and the height ratio according to the vertex coordinates of the target media picture;
and displaying the plurality of target media pictures through the target template.
8. The method of claim 7, wherein displaying the plurality of target media frames through the target template comprises:
setting the transparency of each template and the target template;
and displaying the plurality of target media pictures in an overlapping manner according to the transparency.
9. An image processing apparatus, comprising:
the system comprises a determining module, a editing module and a display module, wherein the determining module is used for determining a layer to be edited, and the layer is used for displaying a media picture;
the processing module is used for selecting a target media picture in the layer by utilizing a first template, wherein the first template is used for selecting the media picture in the layer;
a mapping module for mapping the target media picture to a second template;
the mapping module is further used for respectively determining the width proportion and the height proportion of the second template and the first template; if the width proportion and the height proportion are both 1, mapping the target media picture to the second template according to the width and height information of the target media picture according to the vertex coordinates of the target media picture; if the width ratio or the height ratio is not 1, mapping the target media picture to the second template according to the width ratio and the height ratio according to the vertex coordinates of the target media picture;
and the display module is used for displaying the target media picture in any area in the layer through the second template.
10. A non-volatile storage medium, characterized in that the non-volatile storage medium comprises a stored program, wherein the program, when run, controls a device in which the non-volatile storage medium is located to perform the method of processing an image according to any one of claims 1 to 8.
11. A processor for executing a program stored in a memory, wherein the program is executed to perform the image processing method according to any one of claims 1 to 8.
CN202110425014.8A 2021-04-20 2021-04-20 Image processing method and device, nonvolatile storage medium and processor Active CN112988101B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110425014.8A CN112988101B (en) 2021-04-20 2021-04-20 Image processing method and device, nonvolatile storage medium and processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110425014.8A CN112988101B (en) 2021-04-20 2021-04-20 Image processing method and device, nonvolatile storage medium and processor

Publications (2)

Publication Number Publication Date
CN112988101A CN112988101A (en) 2021-06-18
CN112988101B true CN112988101B (en) 2023-07-21

Family

ID=76341295

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110425014.8A Active CN112988101B (en) 2021-04-20 2021-04-20 Image processing method and device, nonvolatile storage medium and processor

Country Status (1)

Country Link
CN (1) CN112988101B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109309861A (en) * 2018-10-30 2019-02-05 广州虎牙科技有限公司 A kind of media processing method, device, terminal device and storage medium

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU2003902954A0 (en) * 2003-06-12 2003-06-26 Canon Information Systems Research Australia Pty Ltd Geometric space decoration in a graphical design system
CN105677131A (en) * 2014-11-21 2016-06-15 中兴通讯股份有限公司 Screenshot image output method and device
CN105225197A (en) * 2015-09-14 2016-01-06 北京金山安全软件有限公司 Picture clipping method and device
CN110708589B (en) * 2017-11-30 2021-08-17 腾讯科技(深圳)有限公司 Information sharing method and device, storage medium and electronic device
CN109508162B (en) * 2018-10-12 2021-08-13 福建星网视易信息系统有限公司 Screen projection display method, system and storage medium
CN110688506A (en) * 2019-09-30 2020-01-14 北京金山安全软件有限公司 Template generation method and device, electronic equipment and storage medium
CN110865758B (en) * 2019-10-29 2022-02-22 维沃移动通信有限公司 Display method and electronic equipment
CN111612838A (en) * 2020-05-29 2020-09-01 杭州海康威视数字技术股份有限公司 Image acquisition method and device and electronic equipment
CN112286477B (en) * 2020-11-16 2023-12-08 Oppo广东移动通信有限公司 Screen projection display method and related product
CN112379815A (en) * 2020-12-07 2021-02-19 腾讯科技(深圳)有限公司 Image capturing method and device, storage medium and electronic equipment

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109309861A (en) * 2018-10-30 2019-02-05 广州虎牙科技有限公司 A kind of media processing method, device, terminal device and storage medium

Also Published As

Publication number Publication date
CN112988101A (en) 2021-06-18

Similar Documents

Publication Publication Date Title
CN110287368B (en) Short video template design drawing generation device and short video template generation method
EP1854282B1 (en) Method and system for spatio-temporal video warping
Krähenbühl et al. A system for retargeting of streaming video
US7463766B2 (en) Texturing method and apparatus
US8281281B1 (en) Setting level of detail transition points
Nomura et al. Scene collages and flexible camera arrays
CN103718540B (en) Method, user terminal and computer readable recording medium storing program for performing for generating panoramic picture
CN102005059B (en) Image processing apparatus and image processing method
US20080246757A1 (en) 3D Image Generation and Display System
CN101551904B (en) Image synthesis method and apparatus based on mixed gradient field and mixed boundary condition
WO2021135320A1 (en) Video generation method and apparatus, and computer system
Shao et al. QoE-guided warping for stereoscopic image retargeting
CN111161392B (en) Video generation method and device and computer system
JP2005293577A (en) Method, device, and program for generating high-condensation visual summary of vide area
Yan et al. Stereoscopic image stitching based on a hybrid warping model
CN112288665A (en) Image fusion method and device, storage medium and electronic equipment
US11854111B2 (en) Systems and methods of providing enhanced product visualization on a graphical display
US9235575B1 (en) Systems and methods using a slideshow generator
Han et al. Optimal multiple-seams search for image resizing with smoothness and shape prior
Chang et al. Panoramic human structure maintenance based on invariant features of video frames
CN112988101B (en) Image processing method and device, nonvolatile storage medium and processor
US20220270260A1 (en) Video segmentation method and apparatus, electronic device, and computer-readable storage medium
JP5857606B2 (en) Depth production support apparatus, depth production support method, and program
Bonneel et al. Proxy-guided texture synthesis for rendering natural scenes
Arpa et al. Perceptual 3D rendering based on principles of analytical cubism

Legal Events

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