CN111930979A - Image processing method, device, equipment and storage medium - Google Patents

Image processing method, device, equipment and storage medium Download PDF

Info

Publication number
CN111930979A
CN111930979A CN202010746790.3A CN202010746790A CN111930979A CN 111930979 A CN111930979 A CN 111930979A CN 202010746790 A CN202010746790 A CN 202010746790A CN 111930979 A CN111930979 A CN 111930979A
Authority
CN
China
Prior art keywords
image
original image
transformation
original
processing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010746790.3A
Other languages
Chinese (zh)
Inventor
许英俊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Huaduo Network Technology Co Ltd
Original Assignee
Guangzhou Huaduo Network 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 Guangzhou Huaduo Network Technology Co Ltd filed Critical Guangzhou Huaduo Network Technology Co Ltd
Priority to CN202010746790.3A priority Critical patent/CN111930979A/en
Publication of CN111930979A publication Critical patent/CN111930979A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/51Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/53Querying
    • G06F16/538Presentation of query results
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/54Browsing; Visualisation therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/04Context-preserving transformations, e.g. by using an importance map

Landscapes

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

Abstract

The method comprises the steps of obtaining an original image to be processed, correspondingly processing the original image according to an input first image processing operation, and displaying a processed real-time effect graph; acquiring a target real-time effect image confirmed by a user from the real-time effect image, and calculating a transformation parameter of the target real-time effect image relative to an original image; and receiving a second image processing operation performed on the original image, acquiring a transformation parameter corresponding to the original image, performing corresponding transformation processing on the original image according to the transformation parameter, and executing corresponding processing of the second image processing operation. According to the technical scheme, the user can perform one-time transformation processing on the selected original image according to the transformation parameters obtained by the pre-transformation processing, and the problems that the operation process is complicated and the storage space is occupied because the user repeatedly transforms the original image to obtain a new image are solved.

Description

Image processing method, device, equipment and storage medium
Technical Field
The present application relates to the field of image processing, and in particular, to an image processing method, apparatus, device, and storage medium.
Background
With the development of computer technology and multimedia technology, people are exposed to increasingly rich multimedia resources. People can shoot photos or download images and the like by using terminal equipment such as a mobile phone, a tablet personal computer and the like, and the images are stored in the electronic album, so that the electronic album is convenient for subsequent use, viewing or secondary production and the like.
Before an electronic photo album or video is generated by using a plurality of images, the images need to be processed, such as operations of classifying, sorting, cutting, repairing, adding stickers and special effects, and the processed images are stored. In the processing process, a user can only process a single image and then save the single image to generate a new image after the processing, then jump to a new interface to process other images, save the new image after editing, and then continue the processing of subsequent images.
However, in such a processing method, if the user is not satisfied with the effect of the processed new image, the user cannot perform the operation again on the new image, and only edits the original image again and then saves the image to generate another new image, which is troublesome in the operation process, and wastes resources because the memory and the storage space are occupied when generating a plurality of useless new images.
Disclosure of Invention
The present application aims to solve at least one of the above technical drawbacks, and in particular, to solve the problem that processing of multiple images is cumbersome and is prone to waste of storage space resources.
In a first aspect, an embodiment of the present application provides an image processing method, including the following steps:
acquiring an original image to be processed, performing corresponding processing on the original image according to an input first image processing operation, and displaying a processed real-time effect graph;
acquiring a target real-time effect image confirmed by a user from the real-time effect image, and calculating a transformation parameter of the target real-time effect image relative to the original image;
receiving a second image processing operation performed on the original image, acquiring a transformation parameter corresponding to the original image, performing corresponding transformation processing on the original image according to the transformation parameter, and executing corresponding processing of the second image processing operation.
In an embodiment, before the step of obtaining the transformation parameter corresponding to the original image, the method further includes;
establishing a corresponding relation between the original image and the target transformation parameter to obtain a transformation parameter index corresponding to the original image, and storing the transformation parameter index;
the step of obtaining the transformation parameters corresponding to the original image comprises:
when receiving a second image processing operation on the original image, acquiring a transformation parameter index of the original image;
and acquiring a transformation parameter corresponding to the second image processing operation according to the transformation parameter index.
In an embodiment, the step of performing corresponding processing on the original image according to the input first image processing operation includes:
establishing a contrast layer matched with the size of the original image;
acquiring a first image processing operation executed on the original image, performing corresponding transformation on the original image on the comparison image layer, and recording transformation parameters corresponding to the transformation; and the size of the contrast layer is consistent with that of the original image.
In an embodiment, the first image processing operation comprises: at least one of image cropping, image scaling, image color transformation, image rotation, image filters, image special effects, image beauty, image sticker text, and image insertion background music;
the second image processing operation includes at least one of image synthesis, image superimposition, image stitching, image cropping, and image transformation.
In an embodiment, the step of obtaining a transformation parameter corresponding to the original image, and performing corresponding transformation processing on the original image according to the transformation parameter to perform corresponding processing of the second image processing operation includes:
acquiring a transformation parameter index of the original image, and inquiring to obtain a transformation parameter corresponding to the original image according to the transformation parameter index;
and performing corresponding image transformation processing on the original image according to the transformation parameters to execute corresponding processing of the second image processing operation.
In an embodiment, the step of performing the corresponding image transformation processing on the original image according to the transformation parameters to perform the corresponding processing of the second image processing operation includes:
continuously carrying out corresponding transformation processing on the original images corresponding to the transformation parameters according to the transformation parameters to obtain synthetic images corresponding to the original images;
and adding the synthetic image to a preset position of a preset synthetic template for synthesis.
In an embodiment, the step of establishing the correspondence between the original image and the target transformation parameter includes:
acquiring an MD5 value of the original image or a target real-time effect image corresponding to the original image, and generating an image identifier of the original image;
and establishing a corresponding relation between the image identification and the target transformation parameter.
In a second aspect, an embodiment of the present application further provides an image processing apparatus, including:
the effect display module is used for acquiring an original image to be processed, correspondingly processing the original image according to an input first image processing operation and displaying a processed real-time effect image;
the parameter calculation module is used for acquiring a target real-time effect image confirmed by a user from the real-time effect image and calculating the transformation parameters of the target real-time effect image relative to the original image;
and the processing execution module is used for receiving a second image processing operation performed on the original image, acquiring a transformation parameter corresponding to the original image, performing corresponding transformation processing on the original image according to the transformation parameter and executing corresponding processing of the second image processing operation.
In a third aspect, an embodiment of the present application further provides a computer device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and when the processor executes the computer program, the processor implements the steps of the image processing method according to the first aspect.
In a fourth aspect, embodiments of the present application further provide a storage medium containing computer-executable instructions for performing the steps of the image processing method according to the first aspect when executed by a computer processor.
According to the image processing method, the image processing device, the image processing equipment and the storage medium provided by the embodiment, the original image to be processed is obtained, the original image is correspondingly processed according to the input first image processing operation, and the processed real-time effect graph is displayed; acquiring a target real-time effect image confirmed by a user from the real-time effect image, and calculating a transformation parameter of the target real-time effect image relative to an original image; the method comprises the steps of receiving second image processing operation performed on an original image, obtaining a transformation parameter corresponding to the original image, performing corresponding transformation processing on the original image according to the transformation parameter and executing corresponding processing of the second image processing operation, so that a user can perform one-time transformation processing on the selected original image according to the transformation parameter obtained by the pre-transformation processing, and the problems of complicated operation process and storage space occupation caused by the fact that the user repeatedly transforms the original image to obtain a new image are solved.
In the technical scheme, a user firstly preprocesses an original image to be synthesized to obtain a satisfactory target real-time effect image, then stores the transformation parameters corresponding to the target real-time effect image, and then releases the original image without storing the preprocessed image, so that the image redundancy is not caused, and the occupation of storage space resources is avoided.
Additional aspects and advantages of the present application will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the present application.
Drawings
The foregoing and/or additional aspects and advantages of the present application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
FIG. 1 is a flow diagram of an image processing method provided by an embodiment;
FIG. 2 is a schematic illustration of an interface for selecting an original image from a gallery;
FIG. 3 is a schematic diagram of an interface for editing an original image;
FIG. 4 is a schematic interface diagram based on the target real-time effects graph of FIG. 3;
FIG. 5 is a schematic view of another interface for editing an original image;
FIG. 6 is a schematic diagram of an interface based on the target real-time effects graph of FIG. 5;
FIG. 7 is a schematic view of an interface for effects presented by image processing;
fig. 8 is a schematic structural diagram of an image processing apparatus according to an embodiment.
Detailed Description
Reference will now be made in detail to embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are exemplary only for the purpose of explaining the present application and are not to be construed as limiting the present application.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. As used herein, the term "and/or" includes all or any element and all combinations of one or more of the associated listed items.
It will be understood by those within the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
Fig. 1 is a flowchart of an image processing method according to an embodiment, where the image processing method is applicable to an image processing device, such as a client, and the client may be a portable device, such as a smart phone, a smart camera, a palm computer, a tablet computer, an electronic book, and a notebook computer, and may have functions of taking a picture, processing an image, and so on, so as to implement image processing.
Specifically, the image processing method may include the steps of:
and S110, acquiring an original image to be processed, correspondingly processing the original image according to the input first image processing operation, and displaying a processed real-time effect diagram.
In this embodiment, one to-be-processed original image may be acquired, or a plurality of to-be-processed original images may be acquired simultaneously.
For example, after the user selects the original images to be processed, each original image to be processed is previewed. On the original image, the user inputs a first image processing operation on the original image to perform corresponding original transformation processing on the original image, the first image processing operation comprising: at least one of image cropping, image scaling, image color transformation, image rotation, image filters, image special effects, image beauty, image sticker text, and image insertion background music. The image cutting means partially cutting an original image to delete a partial area, the image zooming means enlarging or reducing the original image, the image color conversion means changing the color of a partial or whole area of the original image, the image rotation means rotating the original image to change a presentation angle, the image filter means adding a special effect of the filter to the original image, the image special effect means adding a static or dynamic image, the image beauty means whitening, large eye, skin grinding, spot removing and other beautification processing to people in the original image, the image sticker text means adding decorations such as sticker paper and text to the original image, and the image inserting background music means adding background music to the original image.
The client performs corresponding processing on the original image according to a first image processing operation input by a user, and displays a processed real-time effect image in a preview mode. And presenting an image effect presented after the original image is subjected to corresponding first image processing operation in the real-time effect image.
And S120, acquiring a target real-time effect image confirmed by the user from the real-time effect image, and calculating a transformation parameter of the target real-time effect image relative to the original image.
In this embodiment, there may be one or more real-time effect maps. Taking the first image processing operation as image scaling as an example, the client acquires image scaling input by the user for multiple times, corresponding real-time effect graphs are displayed on a display interface of the client in real time, the user can view the real-time effect graphs under different image scaling scales through key operations of the previous step and the next step or operations of left sliding, right sliding and the like, and each real-time effect graph corresponds to a conversion parameter. Meanwhile, the target real-time effect graphs corresponding to different original images can be checked in a page turning or switching mode.
The user selects one of the real-time effect graphs as a target real-time effect graph, compares the difference between the target real-time effect graph and the original image, and calculates to obtain the transformation parameters of the target real-time effect graph relative to the original image, wherein the transformation parameters comprise: cutting region position information, scaling, color transformation information, rotation angle and rotation direction, filter type, special effect type, beauty value, sticker text content, music information and the like.
S130, receiving a second image processing operation performed on the original image, acquiring a transformation parameter corresponding to the original image, performing corresponding transformation processing on the original image according to the transformation parameter, and executing corresponding processing of the second image processing operation.
In the present embodiment, the second image processing operation includes image synthesis, image superimposition, image stitching, image cropping, and image transformation. The image synthesis refers to synthesizing a plurality of images, the image superposition refers to superposing the plurality of images on different layers, splicing the images, splicing the different images through adjacent pictures, the image cutting refers to scaling and cutting the plurality of images at one time, and the image transformation refers to transformation of parameters such as color, angle, brightness, contrast, saturation and the like. Of course, the second image processing operation may also include other operations related to image processing, which are not illustrated herein.
The client receives a second image processing operation which is input by a user and is carried out on the original images, judges whether each original image is subjected to pre-transformation processing of the user, if so, obtains transformation parameters corresponding to the pre-transformed original images, carries out corresponding transformation processing on the original images according to the transformation parameters to obtain a synthesized image of the original images after transformation, if the original images are not subjected to the pre-transformation processing of the user, directly obtains the original images, and executes the second image processing operation by utilizing the synthesized image and the original images which are not subjected to the pre-transformation processing, such as bonding into an electronic album and the like.
In the image processing method provided by the embodiment, an original image to be processed is obtained, the original image is correspondingly processed according to an input first image processing operation, and a processed real-time effect graph is displayed; acquiring a target real-time effect image confirmed by a user from the real-time effect image, and calculating a transformation parameter of the target real-time effect image relative to an original image; the method comprises the steps of receiving second image processing operation performed on an original image, obtaining conversion parameters corresponding to the original image, performing corresponding conversion processing on the original image according to the conversion parameters and executing corresponding processing of the second image processing operation to realize continuous or simultaneous synthesis after conversion operation is performed on a plurality of original images, so that a user can perform one-time conversion processing on a selected original image according to the conversion parameters obtained by the conversion processing in advance, and the problems of complicated operation process and storage space occupation caused by repeated conversion of the original image by the user to obtain a new image are solved.
In this embodiment, a user first preprocesses an original image to be synthesized to obtain a satisfactory target real-time effect image, then stores a transformation parameter corresponding to the target real-time effect image, and then releases the original image without storing the preprocessed image, so that redundancy of the image is not caused, and occupation of storage space resources is avoided.
And after the user carries out pre-transformation processing on one of the original images, storing the corresponding target transformation parameters, switching to the other original image, carrying out pre-transformation processing on the other original image to obtain the corresponding target transformation parameters, storing the target transformation parameters, and repeating the steps until the user carries out pre-transformation processing on a plurality of original images needing to be synthesized into the electronic album. After the pre-conversion processing is finished, a plurality of original images used for synthesizing the electronic photo album are uploaded once again, conversion processing is carried out, and the electronic photo album is synthesized, so that the resource consumption of uploading the images is reduced, and the image redundancy and the storage space waste caused by that a user modifies the effect of the original images again to generate new images for a plurality of times are reduced.
In an embodiment, before the obtaining of the transformation parameter corresponding to the original image in step S130, the method further includes;
s130a, establishing the corresponding relation between the original image and the target transformation parameter, obtaining the transformation parameter index corresponding to the original image, and storing the transformation parameter index.
And establishing a corresponding relation between the original images and the target transformation parameters so as to find the target transformation parameters corresponding to each original image to transform the original images. In this embodiment, the corresponding relationship between the original image and the target transformation parameter is established by means of an index, and the target transformation parameter corresponding to the original image can be found by means of the transformation parameter index.
In an embodiment, the establishing of the corresponding relationship between the original image and the target transformation parameter in step S130a can be implemented by:
and acquiring the MD5 value of the original image or a target real-time effect image corresponding to the original image, generating an image identifier of the original image, and establishing a corresponding relation between the image identifier and the target transformation parameter.
In this embodiment, by establishing a corresponding relationship between the image identifier of the original image and the target transformation parameter, the image identifier may be obtained in the following manner: calculating an MD5 value of the original image, and taking the MD5 value as an image identifier; or acquiring a generation time stamp of the target real-time effect image, and obtaining the image identification by using the generation time stamp.
Furthermore, a corresponding relation is established between the image identification and the target conversion parameter, and the corresponding relation is stored in an index mode, so that a conversion parameter index corresponding to the original image is obtained.
In this embodiment, a user performs conversion processing on an original image in advance, stores a conversion parameter corresponding to a target real-time effect image selected in the conversion processing process, and adds a corresponding identifier to the original image, where the identifier may be an index value or other identifiers to mark that the original image is subjected to image conversion processing in advance, and then releases the target real-time effect image of the original image without storing the target real-time effect image.
In this embodiment, a user first pre-processes an original picture that needs to be subjected to transformation processing such as scaling and the like to obtain a satisfactory target real-time effect picture, then stores transformation parameters corresponding to the target real-time effect picture, and then releases the original picture without storing the transformed picture for many times.
It should be noted that the original picture is preprocessed and the related transformation parameters are stored, so that the corresponding original picture is directly transformed according to the transformation parameters during subsequent formal processing, manual one-step operation is not needed, simplicity and rapidness are achieved, and the transformation parameters are convenient to update. The zoom operation mentioned in the above embodiments is only an exemplary explanation, and the present technical solution may also be applied to other image processing operations such as word processing, special effect processing, and sticker processing.
Further, the step S130 of obtaining the transformation parameter corresponding to the original image may include the following steps:
s1301, when a second image processing operation on the original image is received, a transformation parameter index of the original image is obtained.
In this embodiment, the original image is analyzed to obtain the transformation parameter index carried by the original image.
S1302, obtaining the transformation parameter corresponding to the second image processing operation according to the transformation parameter index.
And determining whether the original image is subjected to pre-processing according to an index value corresponding to the conversion parameter index, if the index value is a default value, the original image is not subjected to the pre-conversion processing by a user, if the index value is other numerical values, the original image is subjected to the pre-conversion processing by the user, and further inquiring a target conversion parameter of a target real-time effect image corresponding to the pre-conversion processing by the user corresponding to the original image.
In an embodiment, the performing corresponding processing on the original image according to the input first image processing operation in step S110 may include the following steps:
s1101, establishing a contrast layer matched with the size of the original image.
Optionally, a contrast layer is established on the bottom layer of the original image, or a contrast layer is established on the upper layer of the original image, and the contrast image is a transparent layer.
The size of the comparison layer has a fixed proportional relation with the size of the original image, preferably, the size of the comparison layer is consistent with the size and the position of the original image, and the size and the position of the comparison image under the transformation operation are kept unchanged, so that the transformation parameters of the original image under the transformation operation can be conveniently compared.
S1102, acquiring a first image processing operation executed on the original image, and performing corresponding transformation on the original image on the comparison image layer; and the size of the contrast layer is consistent with that of the original image.
In this embodiment, the original image is transformed correspondingly on the comparison image, and a real-time effect image presented when the first image processing operation is executed by the original image is displayed in real time on a display interface, so that the user can view the effect of the first image processing operation in real time. Further, comparing the comparison layer with the original image after the first image processing operation facilitates recording of the transformation parameter corresponding to the first image processing operation in the comparison layer, for example, the scaling processing is performed on the original image, and the comparison layer is compared with the scaled original image, which facilitates obtaining of the scaling parameter of the original image. For another example, when a sticker character is added, the comparison layer is compared with the original image to which the sticker character is added, and information such as the position and the character content of the sticker character is obtained.
In an embodiment, the step S130 of obtaining the transformation parameter corresponding to the original image, and performing the corresponding transformation processing on the original image according to the transformation parameter to perform the corresponding processing of the second image processing operation includes:
and S1303, obtaining a transformation parameter index of the original image, and inquiring to obtain a transformation parameter corresponding to the original image according to the transformation parameter index.
In this embodiment, the original image is analyzed to obtain the transformation parameter index carried by the original image. And determining whether the original image is subjected to pre-processing according to an index value corresponding to the conversion parameter index, if the index value is a default value, the original image is not subjected to the pre-conversion processing by a user, if the index value is other numerical values, the original image is subjected to the pre-conversion processing by the user, and further inquiring a target conversion parameter of a target real-time effect image corresponding to the pre-conversion processing by the user corresponding to the original image.
And S1304, performing corresponding image transformation processing on the original image according to the transformation parameters to execute corresponding processing of the second image processing operation.
And performing corresponding conversion processing on the selected original images one by one or simultaneously according to corresponding conversion parameters, such as cutting, character adding, sticker adding, filter adding and the like, performing second image processing operation on each converted original image, and synthesizing the converted original images on the same picture or preparing a small video and the like.
Further, in an embodiment, the step S1304 performs corresponding image transformation processing on the original image according to the transformation parameters to perform corresponding processing of the second image processing operation, and may include the following steps:
s401, respectively carrying out corresponding transformation processing on the original images according to the corresponding transformation parameters to obtain synthetic images corresponding to the original images.
The client receives the synthesis processing operation, triggers the synthesis instruction, detects whether the selected original image corresponds to the transformation parameter, optionally, each original image is marked with a parameter value, if the parameter value is a preset reference value, no change occurs, it indicates that the original image does not have the corresponding transformation parameter, and if the parameter value is not the preset reference value, it indicates that the original image corresponds to the transformation parameter.
And after determining that the original image corresponds to the transformation parameters, acquiring corresponding target transformation parameters of the original image, wherein the target transformation parameters are the transformation parameters corresponding to the transformation of the original image. Optionally, a first original image is obtained, and a first composite image is obtained after the first original image is transformed according to the corresponding target transformation parameter; and after the first synthetic image is obtained, automatically obtaining a second original image, carrying out conversion processing on the second original image according to the corresponding target conversion parameters to obtain a second synthetic image, and repeating the steps until all the original images are subjected to corresponding conversion processing according to the corresponding target conversion parameters to obtain a corresponding synthetic image.
S402, adding the synthetic image to a preset position of a preset synthetic template for synthesis.
And adding a synthetic image obtained after the original image is transformed to a preset synthetic template, wherein the synthetic template is a template selected by a user in advance or a default template of a system, and synthesizing the synthetic image and the synthetic template to obtain a transformed image or video.
For a more clear illustration of the solution, the following is exemplified:
in an embodiment, the first image processing operation is image pasting, i.e. the effect of pasting a sticker is presented in the original image:
the user selects the paster, the operation of the paster is to cover a layer of comparison layer of the paster on the upper layer of the current original image, the user can operate the operations of rotating and zooming the paster, but the width, height and position of the paster can not exceed the size of the bearing size of the whole original image. At this time, the sticker is equivalent to the same feeling attached to the original image, and the client can record the information such as the position, the scaling size and the like of the current sticker to obtain the target transformation parameter corresponding to the original image so as to be convenient for obtaining when the second image processing operation is executed in the subsequent synthesis.
In one embodiment, the first image processing operation is image text, i.e. the effect of adding text is presented in the original image:
the user adds text on the original image: when the user selects the text, the sticker of the text has two conditions, one is the text which is written by default and the other is the text which is written by the user through an input method, after the user selects the text or inputs the text, the client cuts the contrast layer into pictures through the area contrast layer (View) displayed by the text, the pictures are delivered to the sticker for processing, namely, the text is converted into the pictures, and the text is treated as the sticker. At this time, the file and the sticker are overlapped in sequence, and when the user clicks which special effect, the topmost sticker is preferentially selected for operation.
In an embodiment, the first image processing operation is a picture frame, i.e. the effect of adding a picture frame is presented in the original image:
the user adds the original image into the photo frame for processing: the user selects the photo frame, the photo frame can frame the photo of the user, and the user can drag the photo by using fingers at the moment. The special effect of the photo frame is the same as the special effect, the photo frame is delivered to the picture processor to generate a hollowing special effect which is attached to an original image, and the photo frame is coexisted with the special effect and the filter, so that the photo frame and the filter can mutually influence each other. The realization mode of the interactive mode of the photo frame is as follows: covering a layer of contrast layer (View) on the upper layer of the original image, at the moment, dragging the View on the upper layer by a user, transmitting the parameters to a picture processor on the bottom layer to obtain target transformation parameters corresponding to the original image, and processing the current special effect position by the picture processor all the time to cause that the picture position at the bottom can be moved and the required content is placed in the hollowed picture frame.
In an embodiment, the first image processing operation is to add background music, i.e. the effect of playing the background music when rendering the original image:
and the user selects background music, at the moment, the client starts the player, plays the music in the background, at the moment, records the parameters of the music, and obtains the target transformation parameters corresponding to the original image.
When a user inputs a second image processing operation, if the user triggers a 'Done' button, the client acquires all the transformation parameters operated before, and transmits a special effect parameter, a beauty parameter, a filter parameter, a sticker parameter, a text parameter and a photo frame parameter to the picture synthesizer, at the moment, a special effect image edited and processed by the transformation parameters is synthesized and stored locally, and meanwhile, inserted background music is played when the special effect image is browsed.
For the purpose of illustrating the concepts of the present application, reference is made to the following drawings and examples.
Fig. 2 is a schematic diagram of an interface for selecting an original image from a gallery, and as shown in fig. 2, a user enters the gallery, selects a plurality of original images to be processed from the gallery, and when an original image is not selected, a circle at the upper right corner is not marked, and when an original image is selected, a circle at the upper right corner is marked and marked as a selected sequence number. If the original image 1 is the first selected original image, the original image 5 is the second selected original image, and the original image 10 is the third selected original image.
Fig. 3 is a schematic diagram of an interface for editing an original image, as shown in fig. 3, an original image selected by a user is obtained, a thumbnail of the original image is presented below the interface, the user switches to view different selected original images by sliding left and right, the current original image is presented in the upper half of the interface, as shown in fig. 3, the original image 1 is presented, an "edit" button is provided at a set position (e.g., upper right corner) of the interface, so that the current original image is in an editable state, the current original image can be edited, that is, a first image processing operation, such as zooming, text adding, pasting, filtering, beauty treatment and the like, is input, as shown in fig. 3, the user performs an enlarging operation by sliding back and back with two fingers, and enlarges the original image 3.
After clicking the 'edit' key, a 'save' key is presented at the set position. Fig. 4 is an interface schematic diagram based on the target real-time effect diagram of fig. 3, and after the user finishes editing, the user clicks a "save" button, that is, the conversion parameter corresponding to the presented effect of the current original image is saved. And after the user saves the file, converting the save key into an edit key, and when the user continues editing, clicking the edit key again to repeat the operation. And repeating the steps until the user finishes editing the selected original image needing to be edited, and when the user does not need to edit the original image, directly switching to the next original image.
Fig. 5 is a schematic view of another interface for editing an original image, and as shown in fig. 5, the display interface switches to display the original image 5 to edit (pre-transform) the original image 5, and fig. 6 is a schematic view of an interface based on the target real-time effect diagram of fig. 5, after a user adds a sticker "pig blowing over oO" on the original image 5 and clicks "save", a transformation parameter corresponding to the target real-time effect diagram shown in fig. 6 is saved.
Fig. 7 is a schematic interface diagram of the effect presented by image processing, and as shown in fig. 3 and fig. 5, in a non-editing state, the display interface is presented with a composition key, which may be a "Done" key, or an "ok" key, or a "one-key composition" key, to trigger a second image processing operation to process the selected original image at one time. And when the user finishes editing the selected original image and stores the corresponding transformation parameters, clicking a 'one-key synthesis' key to obtain the original image and the corresponding transformation parameters, synthesizing the original image after transforming, and presenting the final synthesis effect on an interface. As shown in fig. 7, the original image 1, the original image 5 and the original image 11 are transformed according to the transformation parameters, for example, the original image 1 is enlarged, the sticker is added to the original image 5, the original image 11 is not transformed (the transformation parameters of the original image 11 are maintained), the transformed original image 1, the original image 5 and the original image 11 are combined into the same picture according to a preset template for displaying, and "save" is clicked to save the combined image.
The following describes in detail a related embodiment of the image processing apparatus.
Fig. 8 is a schematic structural diagram of an image processing apparatus according to an embodiment, where the image processing apparatus is executable in an image processing device.
Specifically, as shown in fig. 8, the image processing apparatus 100 includes: an effect presentation module 110, a parameter calculation module 120, and a process execution module 130.
The effect display module 110 is configured to obtain an original image to be processed, perform corresponding processing on the original image according to an input first image processing operation, and display a processed real-time effect map;
a parameter calculating module 120, configured to obtain a target real-time effect graph confirmed by a user from the real-time effect graph, and calculate a transformation parameter of the target real-time effect graph relative to the original image;
the processing execution module 130 is configured to receive a second image processing operation performed on the original image, obtain a transformation parameter corresponding to the original image, perform corresponding transformation processing on the original image according to the transformation parameter, and execute corresponding processing of the second image processing operation.
The image processing device provided by the embodiment realizes that the user can perform one-time transformation processing on the selected original image according to the transformation parameters obtained by the pre-transformation processing, and solves the problems of complicated operation process and storage space occupation caused by repeatedly transforming the original image to obtain a new image by the user.
In an embodiment, the image processing apparatus 100 further includes; the index establishing module is used for establishing the corresponding relation between the original image and the target transformation parameter to obtain a transformation parameter index corresponding to the original image and storing the transformation parameter index;
the process execution module 130 includes: an index acquisition unit and a parameter acquisition unit;
an index acquisition unit configured to acquire a transformation parameter index of the original image when a second image processing operation on the original image is received;
and the parameter acquisition unit is used for acquiring the transformation parameters corresponding to the second image processing operation according to the transformation parameter indexes.
In one embodiment, the effect display module 110 includes: the image layer establishing unit and the parameter recording unit;
the layer establishing unit is used for establishing a comparison layer matched with the size of the original image;
the parameter recording unit is used for acquiring a first image processing operation executed on the original image, performing corresponding transformation on the original image on the comparison image layer, and recording a transformation parameter corresponding to the transformation; and the size of the contrast layer is consistent with that of the original image.
In an embodiment, the first image processing operation comprises: at least one of image cropping, image scaling, image color transformation, image rotation, image filters, image special effects, image beauty, image sticker text, and image insertion background music;
the second image processing operation includes at least one of image synthesis, image superimposition, image stitching, image cropping, and image transformation.
In one embodiment, the process execution module 130 includes: a parameter query unit and a processing execution unit;
the parameter query unit is used for acquiring a transformation parameter index of the original image and querying according to the transformation parameter index to obtain a transformation parameter corresponding to the original image;
and the processing execution unit is used for carrying out corresponding image transformation processing on the original image according to the transformation parameters so as to execute corresponding processing of the second image processing operation.
In one embodiment, a process execution unit includes: a composite image obtaining subunit and a composite subunit;
a synthesized image obtaining subunit, configured to perform corresponding transformation processing on the original images corresponding to the transformation parameters respectively according to the transformation parameters, so as to obtain synthesized images corresponding to the original images;
and the synthesis subunit is used for adding the synthesis image to a preset position of a preset synthesis template for synthesis.
In one embodiment, the index building module comprises: an image identifier generation unit and a corresponding relation establishment unit;
the image identification generating unit is used for acquiring an MD5 value of the original image or a target real-time effect image corresponding to the original image and generating an image identification of the original image;
and the corresponding relation establishing unit is used for establishing the corresponding relation between the image identification and the target transformation parameter.
The image processing apparatus according to the embodiment of the present disclosure can execute the image processing method provided by the embodiment of the present disclosure, and the implementation principle is similar, the actions executed by the modules in the image processing apparatus according to the embodiments of the present disclosure correspond to the steps in the image processing method according to the embodiments of the present disclosure, and for the detailed functional description of the modules in the image processing apparatus, reference may be specifically made to the description in the corresponding image processing method shown in the foregoing, and details are not repeated here.
An embodiment of the present invention further provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the image processing method in any of the above embodiments is implemented.
The computer device provided by the above has corresponding functions and advantages when executing the image processing method provided by any of the above embodiments.
An embodiment of the present invention provides a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform a method of image processing, comprising:
acquiring an original image to be processed, performing corresponding processing on the original image according to an input first image processing operation, and displaying a processed real-time effect graph;
acquiring a target real-time effect image confirmed by a user from the real-time effect image, and calculating a transformation parameter of the target real-time effect image relative to the original image;
receiving a second image processing operation performed on the original image, acquiring a transformation parameter corresponding to the original image, performing corresponding transformation processing on the original image according to the transformation parameter, and executing corresponding processing of the second image processing operation.
Of course, the storage medium containing the computer-executable instructions provided by the embodiments of the present invention is not limited to the operation of the image processing method described above, and has corresponding functions and advantages.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the image processing method according to any embodiment of the present invention.
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and may be performed in other orders unless explicitly stated herein. Moreover, at least a portion of the steps in the flow chart of the figure may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of other steps. The foregoing is only a partial embodiment of the present application, and it should be noted that, for those skilled in the art, several modifications and decorations can be made without departing from the principle of the present application, and these modifications and decorations should also be regarded as the protection scope of the present application.
The foregoing is only a partial embodiment of the present application, and it should be noted that, for those skilled in the art, several modifications and decorations can be made without departing from the principle of the present application, and these modifications and decorations should also be regarded as the protection scope of the present application.

Claims (10)

1. An image processing method, characterized by comprising the steps of:
acquiring an original image to be processed, performing corresponding processing on the original image according to an input first image processing operation, and displaying a processed real-time effect graph;
acquiring a target real-time effect image confirmed by a user from the real-time effect image, and calculating a transformation parameter of the target real-time effect image relative to the original image;
receiving a second image processing operation performed on the original image, acquiring a transformation parameter corresponding to the original image, performing corresponding transformation processing on the original image according to the transformation parameter, and executing corresponding processing of the second image processing operation.
2. The image processing method according to claim 1, wherein the step of obtaining the transformation parameters corresponding to the original image further comprises;
establishing a corresponding relation between the original image and the target transformation parameter to obtain a transformation parameter index corresponding to the original image, and storing the transformation parameter index;
the step of obtaining the transformation parameters corresponding to the original image comprises:
when receiving a second image processing operation on the original image, acquiring a transformation parameter index of the original image;
and acquiring a transformation parameter corresponding to the second image processing operation according to the transformation parameter index.
3. The method according to claim 1, wherein said step of performing corresponding processing on the original image according to the input first image processing operation comprises:
establishing a contrast layer matched with the size of the original image;
acquiring a first image processing operation executed on the original image, performing corresponding transformation on the original image on the comparison image layer, and recording transformation parameters corresponding to the transformation; and the size of the contrast layer is consistent with that of the original image.
4. The image processing method of claim 1, wherein the first image processing operation comprises: at least one of image cropping, image scaling, image color transformation, image rotation, image filters, image special effects, image beauty, image sticker text, and image insertion background music;
the second image processing operation includes at least one of image synthesis, image superimposition, image stitching, image cropping, and image transformation.
5. The image processing method according to claim 1, wherein the step of obtaining the transformation parameter corresponding to the original image, and performing the corresponding transformation processing on the original image according to the transformation parameter to perform the corresponding processing of the second image processing operation comprises:
acquiring a transformation parameter index of the original image, and inquiring to obtain a transformation parameter corresponding to the original image according to the transformation parameter index;
and performing corresponding image transformation processing on the original image according to the transformation parameters to execute corresponding processing of the second image processing operation.
6. The image processing method according to claim 5, wherein said step of performing the corresponding image transformation processing on the original image according to the transformation parameters to perform the corresponding processing of the second image processing operation comprises:
continuously carrying out corresponding transformation processing on the original images corresponding to the transformation parameters according to the transformation parameters to obtain synthetic images corresponding to the original images;
and adding the synthetic image to a preset position of a preset synthetic template for synthesis.
7. The image processing method according to claim 2, wherein the step of establishing the correspondence between the original image and the target transformation parameter comprises:
acquiring an MD5 value of the original image or a target real-time effect image corresponding to the original image, and generating an image identifier of the original image;
and establishing a corresponding relation between the image identification and the target transformation parameter.
8. An image processing apparatus characterized by comprising:
the effect display module is used for acquiring an original image to be processed, correspondingly processing the original image according to an input first image processing operation and displaying a processed real-time effect image;
the parameter calculation module is used for acquiring a target real-time effect image confirmed by a user from the real-time effect image and calculating the transformation parameters of the target real-time effect image relative to the original image;
and the processing execution module is used for receiving a second image processing operation performed on the original image, acquiring a transformation parameter corresponding to the original image, performing corresponding transformation processing on the original image according to the transformation parameter and executing corresponding processing of the second image processing operation.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the image processing method according to any of claims 1-7 are implemented by the processor when executing the program.
10. A storage medium containing computer-executable instructions for performing the steps of the image processing method according to any one of claims 1 to 7 when executed by a computer processor.
CN202010746790.3A 2020-07-29 2020-07-29 Image processing method, device, equipment and storage medium Pending CN111930979A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010746790.3A CN111930979A (en) 2020-07-29 2020-07-29 Image processing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010746790.3A CN111930979A (en) 2020-07-29 2020-07-29 Image processing method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111930979A true CN111930979A (en) 2020-11-13

Family

ID=73315356

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010746790.3A Pending CN111930979A (en) 2020-07-29 2020-07-29 Image processing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111930979A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114549303A (en) * 2022-01-14 2022-05-27 北京百度网讯科技有限公司 Image display method, image processing method, image display device, image processing equipment and storage medium
CN114972008A (en) * 2021-11-04 2022-08-30 华为技术有限公司 Coordinate restoration method and device and related equipment
CN114968040A (en) * 2022-05-19 2022-08-30 北京市商汤科技开发有限公司 Image processing method and device, electronic device and storage medium
CN115937050A (en) * 2023-03-02 2023-04-07 图兮数字科技(北京)有限公司 Image processing method, image processing device, electronic equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002112057A (en) * 2000-09-29 2002-04-12 Kyocera Corp Color image processing system
CN101539996A (en) * 2008-03-21 2009-09-23 夏普株式会社 Image processing method, image processing apparatus, image forming apparatus and storage medium
JP2010162802A (en) * 2009-01-16 2010-07-29 Ricoh Co Ltd Image processing apparatus, image processing method and computer program
JP2011070271A (en) * 2009-09-24 2011-04-07 Dainippon Printing Co Ltd Image processing apparatus and image processing method
JP2015069272A (en) * 2013-09-27 2015-04-13 大日本印刷株式会社 Image deformation device and image deformation method
CN109242768A (en) * 2018-10-29 2019-01-18 维沃移动通信有限公司 A kind of image processing method and terminal device
CN111093035A (en) * 2019-12-31 2020-05-01 维沃移动通信有限公司 Image processing method, electronic device, and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002112057A (en) * 2000-09-29 2002-04-12 Kyocera Corp Color image processing system
CN101539996A (en) * 2008-03-21 2009-09-23 夏普株式会社 Image processing method, image processing apparatus, image forming apparatus and storage medium
JP2010162802A (en) * 2009-01-16 2010-07-29 Ricoh Co Ltd Image processing apparatus, image processing method and computer program
JP2011070271A (en) * 2009-09-24 2011-04-07 Dainippon Printing Co Ltd Image processing apparatus and image processing method
JP2015069272A (en) * 2013-09-27 2015-04-13 大日本印刷株式会社 Image deformation device and image deformation method
CN109242768A (en) * 2018-10-29 2019-01-18 维沃移动通信有限公司 A kind of image processing method and terminal device
CN111093035A (en) * 2019-12-31 2020-05-01 维沃移动通信有限公司 Image processing method, electronic device, and storage medium

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114972008A (en) * 2021-11-04 2022-08-30 华为技术有限公司 Coordinate restoration method and device and related equipment
CN114549303A (en) * 2022-01-14 2022-05-27 北京百度网讯科技有限公司 Image display method, image processing method, image display device, image processing equipment and storage medium
CN114549303B (en) * 2022-01-14 2023-10-20 北京百度网讯科技有限公司 Image display method, image processing method, image display device, image processing apparatus, image display device, image processing program, and storage medium
CN114968040A (en) * 2022-05-19 2022-08-30 北京市商汤科技开发有限公司 Image processing method and device, electronic device and storage medium
CN115937050A (en) * 2023-03-02 2023-04-07 图兮数字科技(北京)有限公司 Image processing method, image processing device, electronic equipment and storage medium
CN115937050B (en) * 2023-03-02 2023-10-13 图兮数字科技(北京)有限公司 Image processing method, device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN111935504B (en) Video production method, device, equipment and storage medium
CN111930979A (en) Image processing method, device, equipment and storage medium
CN111935505B (en) Video cover generation method, device, equipment and storage medium
US8711228B2 (en) Collaborative image capture
JP2017503394A (en) VIDEO PROCESSING METHOD, VIDEO PROCESSING DEVICE, AND DISPLAY DEVICE
TW201539101A (en) Video processing device, video processing method, and video processing program
CN104581380A (en) Information processing method and mobile terminal
JP2009237702A (en) Album creating method, program and apparatus
US11450047B2 (en) Systems and methods for sharing image data edits
CN111526427B (en) Video generation method and device and electronic equipment
JPWO2018025402A1 (en) Image processing apparatus, image processing system, and program
CN113099287A (en) Video production method and device
CN114598819A (en) Video recording method and device and electronic equipment
CN106155508B (en) Information processing method and client
CN111951353A (en) Electronic album synthesis method, device, equipment and storage medium
US20130080896A1 (en) Editing system for producing personal videos
JP2005092464A (en) Information editing apparatus, information editing method, and program which makes computer perform its method
US9122923B2 (en) Image generation apparatus and control method
KR20040001300A (en) Image synthesizing and editing system and its method in panorama image of background
CN115904168A (en) Multi-device-based image material processing method and related device
CN115002555B (en) Theme making method, device and equipment applied to live broadcasting room
KR20050078100A (en) Methods for manufacturing moving cartoon and recording medium thereof
US20230137452A1 (en) Information processing device, inforamtion processing method, and program
WO2014042053A1 (en) Electronic book creation device, viewer device, electronic book system, and electronic book creation method
CN116700550A (en) Video processing method, electronic device, 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