CN111508036A - Image processing method, image processing apparatus, storage medium, and electronic apparatus - Google Patents

Image processing method, image processing apparatus, storage medium, and electronic apparatus Download PDF

Info

Publication number
CN111508036A
CN111508036A CN202010286333.0A CN202010286333A CN111508036A CN 111508036 A CN111508036 A CN 111508036A CN 202010286333 A CN202010286333 A CN 202010286333A CN 111508036 A CN111508036 A CN 111508036A
Authority
CN
China
Prior art keywords
image
material image
target
transparency
frame
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.)
Granted
Application number
CN202010286333.0A
Other languages
Chinese (zh)
Other versions
CN111508036B (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.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network 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 Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN202010286333.0A priority Critical patent/CN111508036B/en
Publication of CN111508036A publication Critical patent/CN111508036A/en
Application granted granted Critical
Publication of CN111508036B publication Critical patent/CN111508036B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/001Texturing; Colouring; Generation of texture or colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/60Editing figures and text; Combining figures or text
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20212Image combination
    • G06T2207/20221Image fusion; Image merging

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses an image processing method, an image processing device, a storage medium and an electronic device. The method comprises the following steps: acquiring a first material image to be processed, wherein the first material image is used for presenting an initial form of a target object; acquiring a second pixel image corresponding to the first material image, wherein the image frame number of the second pixel image is the same as that of the first material image, the second pixel image comprises at least two sections of material images with the same image frame number, and the transparency of target image frames in the at least two sections of material images is changed alternately; and superposing the first material image and the second material image to obtain a target image, wherein the target image presents a flickering form of a target object. By the method and the device, the technical effect of improving the efficiency of processing the image into the flicker form is achieved.

Description

Image processing method, image processing apparatus, storage medium, and electronic apparatus
Technical Field
The present invention relates to the field of image processing, and in particular, to an image processing method, an image processing apparatus, a storage medium, and an electronic apparatus.
Background
At present, when an image is processed to have an effect of a flicker shape, a region of the image which needs to flicker is generally divided by a mask in a graphics video processing software (AE), and then K frame processing of transparency and post processing of colors are performed to achieve the effect of the flicker shape of the image.
However, the above method is time-consuming in the manufacturing process, and the effect of the flicker pattern is that only the K-frame processing is performed in the AE, so that the effect of the manufactured flicker pattern is somewhat unnatural, and the efficiency of processing the image into the flicker pattern is low.
Aiming at the technical problem of low efficiency of processing the image into the flicker form in the prior art, no effective solution is provided at present.
Disclosure of Invention
The invention mainly aims to provide an image processing method, an image processing device, a storage medium and an electronic device, which at least solve the technical problem of low efficiency of processing an image into a flicker form.
In order to achieve the above object, according to an aspect of the present invention, there is provided an image processing method. The method can comprise the following steps: acquiring a first material image to be processed, wherein the first material image is used for presenting an initial form of a target object; acquiring a second pixel image corresponding to the first material image, wherein the image frame number of the second pixel image is the same as that of the first material image, the second pixel image comprises at least two sections of material images with the same image frame number, and the transparency of target image frames in the at least two sections of material images is changed alternately; and superposing the first material image and the second material image to obtain a target image, wherein the target image presents a flickering form of a target object.
Optionally, the superimposing the second material image and the first material image to obtain the target image includes: and superposing the layer where the second material image is located and the layer where the first material image is located to obtain a target image.
Optionally, the obtaining the target image by superimposing the layer where the second material image is located and the layer where the first material image is located includes: determining a layer where the first material image is located as a mask; superposing the layer where the second pixel image is located to the lower layer of the mask to obtain a superposed image, wherein the superposed image comprises image information corresponding to the target object; and in the superposed image, adjusting the image information corresponding to the target object to obtain a target image.
Optionally, adjusting image information corresponding to the target object to obtain the target image includes: determining at least one target color phase in the image information, wherein the at least one target color phase is used for generating display information of a flicker form; and adjusting the dominant hue parameter corresponding to at least one target color to obtain a target image, wherein the adjusted dominant hue parameter corresponding to each target color is alternately changed.
Optionally, acquiring a second material image corresponding to the first material image includes: acquiring an original material image for presenting a flicker form of a target object; the original material image is converted into a second material image.
Optionally, converting the raw material image into a second material image includes: and performing two-stage cyclic processing on the original material image to obtain a second material image, wherein the second material image comprises a first section material image and a second section material image which have the same image frame number, the transparency of a first image frame of the first section material image is the same as the transparency of a last image frame in the second section material image, and the transparency of the last image frame of the first section material image is the same as the transparency of the first image frame in the second section material image.
In order to achieve the above object, according to another aspect of the present invention, there is also provided an image processing apparatus. The apparatus may include: the device comprises a first acquisition unit, a second acquisition unit and a processing unit, wherein the first acquisition unit is used for acquiring a first material image to be processed, and the first material image is used for presenting an initial form of a target object; the second acquisition unit is used for acquiring a second pixel image corresponding to the first material image, wherein the second pixel image has the same image frame number as the first material image, the second pixel image comprises at least two sections of material images with the same image frame number, and the transparency of a target image frame in the at least two sections of material images is changed alternately; and the superposition unit is used for carrying out superposition processing on the first material image and the second material image to obtain a target image, wherein the target image presents a flickering form of the target object.
Optionally, the superimposing unit includes: and the superposition module is used for superposing the layer where the second material image is located and the layer where the first material image is located to obtain the target image.
According to the method and the device, a first material image to be processed is obtained, wherein the first material image is used for presenting the initial form of the target object; acquiring a second pixel image corresponding to the first material image, wherein the image frame number of the second pixel image is the same as that of the first material image, the second pixel image comprises at least two sections of material images with the same image frame number, and the transparency of target image frames in the at least two sections of material images is changed alternately; and superposing the first material image and the second material image to obtain a target image, wherein the target image presents a flickering form of a target object. That is to say, the characteristic of the flicker form of the second pixel image is utilized to superpose the second pixel image and the first material image which needs to be made into the flicker form effect to obtain the target image with the flicker form effect, so that the processes of transparency K frame processing and color post-processing of the image are avoided, the whole manufacturing links are few, the purpose of processing the image into the flicker form effect is achieved, the technical problem of low efficiency of processing the image into the flicker form is solved, and the technical effect of improving the efficiency of processing the image into the flicker form is further achieved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this application, illustrate embodiments of the invention and, together with the description, serve to explain the invention and not to limit the invention. In the drawings:
fig. 1 is a block diagram of a hardware configuration of a mobile terminal of an image processing method according to an embodiment of the present invention;
FIG. 2 is a flow chart of a method of image processing according to an embodiment of the present invention;
FIG. 3 is a schematic illustration of an image having the effect of a blinking pattern;
FIG. 4 is a schematic illustration of another image having the effect of a blinking pattern;
FIG. 5 is a schematic diagram of an image of source material with an effect of true flicker morphology, according to an embodiment of the present invention;
fig. 6 is a schematic diagram of parameter settings for performing an interruption process on an image of raw material according to an embodiment of the present invention;
fig. 7 is a schematic diagram of setting the transparency of two segments of material images according to an embodiment of the present invention;
FIG. 8 is a schematic diagram of multiple copies of several segments of the resulting loop material image, according to an embodiment of the present invention;
fig. 9 is a schematic diagram of superimposing a loop material image and a body material image according to an embodiment of the present invention;
fig. 10 is a schematic diagram of processing a raw material image into a loop material image in AE according to an embodiment of the present invention;
FIG. 11 is a schematic diagram of a method for implementing superposition of a loop material image and a body material image by masking according to an embodiment of the invention;
FIG. 12 is a schematic diagram of adjusting colors in a four color gradient in an overlaid image, according to an embodiment of the invention; and
fig. 13 is a schematic diagram of an image processing apparatus according to an embodiment of the present invention.
Detailed Description
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present invention will be described in detail below with reference to the embodiments with reference to the attached drawings.
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be used. 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.
The method provided by the embodiment of the application can be executed in a mobile terminal, a computer terminal or a similar operation device. Taking the mobile terminal as an example, fig. 1 is a block diagram of a hardware structure of the mobile terminal of an image processing method according to an embodiment of the present invention. As shown in fig. 1, the mobile terminal may include one or more (only one shown in fig. 1) processors 102 (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, and optionally may also include a transmission device 106 for communication functions and an input-output device 108. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration, and does not limit the structure of the mobile terminal. For example, the mobile terminal may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
The memory 104 can be used for storing computer programs, for example, software programs and modules of application software, such as a computer program corresponding to a data processing method in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the computer programs stored in the memory 104, so as to implement the method described above. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to the mobile terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a Network adapter (NIC) that can be connected to other Network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used to communicate with the internet in a wireless manner.
An image processing method operating in the mobile terminal is provided in the present embodiment, and fig. 2 is a flowchart of an image processing method according to an embodiment of the present invention. As shown in fig. 2, the process includes the following steps:
step S202, a first material image to be processed is obtained, wherein the first material image is used for presenting an initial form of a target object.
In the technical solution provided by step S202 of the present invention, the target object may be an object that needs to be processed in the first material image to have an effect of a blinking form, which may be an ice crystal blinking effect, a crystal blinking effect, an alternate blinking effect, and the like, and may simulate a light transformation in a real environment, and may be a character, a symbol, an image, and the like, without any limitation here.
The first material image of this embodiment is also a body material image including the target object, in which an initial form of the target object may be presented, and the initial form may be a non-blinking form.
In step S204, a second material image corresponding to the first material image is acquired.
In the technical solution provided in step S204 of the present invention, the image frame numbers of the second pixel image and the first material image are the same, and the second pixel image is a cyclic material image, that is, the second pixel image includes at least two segments of material images with the same image frame number, and the transparency of the target image frame in the at least two segments of material images changes alternately.
In this embodiment, the second material image is a material image that requires processing of the first material image so as to be in a blinking form. The second pixel image comprises at least two sections of material images with the same image frame number, the at least two sections of material images can have the same duration and can be positioned on different layers in image software, the transparency of the target image frame is changed alternately, and an alternate and circular flashing effect can be presented when the target image frame is played.
Optionally, the second material image is a two-segment cyclic material image, the first segment material image may be a 0 th frame to a 15 th frame, and the second segment material image may be a 0 th frame to a 15 th frame, where the first segment material image and the second segment material image may be obtained by performing an interruption process on an original material image having an effect of a real flickering form, and the second segment material image may be obtained by dragging an interrupted portion to an initial frame after the original material image is interrupted at the 15 th frame. Alternatively, the target image frame of this embodiment may be a 0 th frame, and the transparency is adjusted to 100 at the 0 th frame in the first section of the material image, and the transparency is adjusted to 0 at the 0 th frame in the second section of the material image; the target image frame may be the 15 th frame, and the transparency is adjusted to 0 at the 15 th frame in the first piece of material image and to 100 at the 15 th frame in the second piece of material image, so that the transparency of the target image frame alternates.
And step S206, overlapping the first material image and the second material image to obtain a target image, wherein the target image presents a flickering form of the target object.
In the technical solution provided in step S206 of the present invention, after the second pixel image corresponding to the first material image is acquired, the first material image and the second pixel image are subjected to superposition processing to obtain a target image, where the target image presents a flickering form of the target object.
In this embodiment, the second material image may be superimposed on the first material image to obtain a superimposed result, and further adjust color information related to the blinking form in the superimposed result to obtain a target image, where the target image represents the blinking form of the target object, that is, the target object has an effect of a real blinking form.
It should be noted that the method of this embodiment can be applied to image processing software, for example, AE image processing software or MAX image processing software, so as to improve the efficiency of processing the image into the flicker form in the image processing software.
In the related art, the area of the image that needs to present the flicker shape is usually marked out by a mask, and then K frame processing of transparency and post processing of color are performed to achieve the effect of the flicker shape, and the whole manufacturing process is time-consuming. In the embodiment, the method of the above steps S202 to S206 is adopted, and the characteristic of the flicker form of the second pixel image is utilized to superimpose the second pixel image and the first material image which needs to be made into the flicker form effect to obtain the target image with the flicker form effect, so that the processes of performing transparent K frame processing and color post-processing on the image are avoided, the whole manufacturing process is less, the purpose of processing the image into the effect with the flicker form is achieved, the technical problem of low efficiency of processing the image into the flicker form is solved, and the technical effect of improving the efficiency of processing the image into the flicker form is further achieved.
The above-described method of this embodiment is further described below.
As an alternative implementation, in step S206, superimposing the second material image and the first material image to obtain the target image includes: and superposing the layer where the second material image is located and the layer where the first material image is located to obtain a target image.
In this embodiment, when the second material image and the first material image are superimposed to obtain the target image, a layer where the second material image is located and a layer where the first material image is located may be determined, and the layer where the second material image is located and the layer where the first material image is located may be superimposed to obtain the target image with the effect of the blinking form.
As an optional implementation manner, the obtaining the target image by superimposing the layer where the second material image is located and the layer where the first material image is located includes: determining a layer where the first material image is located as a mask; superposing the layer where the second pixel image is located to the lower layer of the mask to obtain a superposed image, wherein the superposed image comprises image information corresponding to the target object; and in the superposed image, adjusting the image information to obtain a target image.
In this embodiment, the layer where the first material image is located, that is, the layer in the image processing software, needs to be processed into the layer with the effect of the blinking form, and the layer that needs to be processed into the layer with the effect of the blinking form is taken as a mask, and the mask can remove the image portion that does not need to be processed into the effect of the blinking form in the first material image, that is, the image portion corresponding to the target object that needs to be processed into the blinking form in the first material image is retained, for example, the first material image includes "happy", where "fast" is the image portion that needs to be processed into the effect of the blinking form, and "happy" is the image portion that does not need to be processed into the effect of the blinking form, and the image portion corresponding to "happy" can be removed, and the image portion corresponding to "fast" is retained.
Optionally, in this embodiment, the layer where the second pixel image is located is superimposed on the lower layer of the mask, that is, the layer where the second pixel image is located is superimposed on the lower surface of the mask, so as to obtain a superimposed image, where the superimposed image includes image information corresponding to the target object, for example, color information in a four-color gradient, and the image information may be further adjusted in the superimposed image, so as to obtain the target image with an effect of a blinking form.
As an optional implementation, adjusting the image information to obtain the target image includes: determining at least one target color phase in the image information, wherein the at least one target color phase is used for generating display information of a flicker form; and adjusting the dominant hue parameter corresponding to at least one target color to obtain a target image, wherein the adjusted dominant hue parameter corresponding to each target color is alternately changed.
In this embodiment, when the adjustment of the image information is implemented to obtain the target image, at least one target hue in the image information may be determined, where the at least one target hue may be the most common four hues for implementing a flicker shape in a four-color gradation, and the at least one target hue may be adjusted to adjust a dominant hue parameter corresponding to the at least one target color, for example, adjust a parameter of a K dominant hue, so as to generate an alternate color, so that the obtained target image may simulate a light transformation in a real environment.
As an alternative implementation, in step S204, acquiring a second material image corresponding to the first material image includes: acquiring an original material image for presenting a flicker form of a target object; the original material image is converted into a second material image.
In this embodiment, when acquiring the second material image corresponding to the first material image is implemented, a raw material image for presenting a flicker form of the target object may be acquired, and the raw material image is a piece of material having an effect of a real flicker form.
It should be noted that any image material having alternately blinking image information may be used as the raw material image, and for example, an image material having alternately blinking block-side black-and-white information may be used as the raw material image.
After the raw material image is obtained, the raw material image may be processed to be a cyclic material image, that is, the second pixel image is obtained. Alternatively, the embodiment may process the raw material images into a loop of material images according to the length of time for which the effect is made, which may be determined according to the requirements of each item, by importing the raw material images into image processing software (e.g., AE).
As an alternative embodiment, converting the raw material image into the second material image includes: and performing two-stage cyclic processing on the original material image to obtain a second material image, wherein the second material image comprises a first section material image and a second section material image which have the same image frame number, the transparency of a first image frame of the first section material image is the same as the transparency of a last image frame in the second section material image, and the transparency of the last image frame of the first section material image is the same as the transparency of the first image frame in the second section material image.
In this embodiment, when the original material image is converted into the second material image, the original material image may be subjected to two-stage loop processing to obtain the second material image, which is also a required material image that is required to be superimposed with the first material image.
The method of performing two-stage loop processing on the raw material image of this embodiment will be described below.
As an alternative example, in the case that the number of frames of the original material image is more than 2 times the number of frames of the required material image per segment, a target breaking position in the original material image may be determined based on the number of frames of the required material image per segment, and then the original material image is broken at the target breaking position, and the broken portion is dragged to the start frame, so as to obtain a first segment material image and a second segment material image including the same number of frames, where the first segment material image and the second segment material image are also the required material images per segment, and a portion of the original material image except the first segment material image and the second segment material image may be discarded. After the first section of material image and the second section of material image are obtained, the transparency of the two sections of material images can be set, alternatively, the target image frames may be a first image frame and a last image frame, the transparency of the first image frame of the first section material image and the transparency of the last image frame of the second section material image may be set to be the same, the transparency of the other image frames of the first section of material image except the first image frame and the last image frame can be not set, and the transparency of the other image frames of the second section of material image except the first image frame and the last image frame can be not set, so that the transparency of the target image frame of the two sections of material images is changed alternately.
For example, when the number of frames of the original material image is 35 frames and is more than 2 times the number of frames of the required 15 frames of each section of the material image, a target interrupt position in the original material image may be determined based on 15 frames, a 15 th frame of the original material image may be determined as a target interrupt position, the original material image is further interrupted at the 15 th frame, and the interrupted portion is dragged to the start frame, so as to obtain a first section of material image (0 th frame to 15 th frame) and a second section of material image (0 th frame to 15 th frame), which are also required sections of the material image, wherein the parts of the 35 frames of the original material image except the first section of material image and the second section of the material image may be omitted. After the first-stage material images (0 th frame to 15 th frame) and the second-stage material images (0 th frame to 15 th frame) are obtained, the transparency of the two sections of the material images may be set, the transparency of the first image frame of the first section of the material image and the transparency of the last image frame of the second section of the material image may be set to 100, the transparency of the last image frame of the first section of the material image and the transparency of the first image frame of the second section of the material image may be set to 0, the transparency of the other image frames except the first image frame and the last image frame of the first section of material image (the 0 th frame to the 15 th frame) can be not set, and the transparency of the other image frames except the first image frame and the last image frame of the second section of material image (the 0 th frame to the 15 th frame) can be not set, so that the transparency of the target image frame of the two sections of material images is changed alternately.
As another optional example, in the case that the image frame number of the original material image is less than 2 times the required image frame number of each section of material image, the original material image cannot be directly taken to perform the two-section loop processing, which requires processing the original material image first, and also uses the above-mentioned two-section loop processing method to process the original material image into two sections of loop materials including the same maximum image frame number, and can copy the loop materials until the image frame number of the copied loop materials is more than 2 times the required image frame number of each section of material image, and then interrupt the copied loop material image according to the frame number of each section of required material image to obtain the first section of material image and the second section of material image with the same image frame number, wherein the transparency of the first image frame of the first section of material image is the same as the transparency of the last image frame of the second section of material image, the transparency of the last image frame of the first section of material image is the same as the transparency of the first image frame in the second section of material image.
For example, assume that a second material image (cyclic material image) of 30 frames is needed, but the original material image has only 20 frames, and the number of frames of the original material image 20 frames is less than 2 times the number of frames of the required material image 30 frames per segment, and the original material image cannot be directly taken for two-segment cyclic processing, in which case, the original material image needs to be processed first, or the original material is processed into the cyclic material image with the maximum number of frames by using a two-segment cyclic method, and then the obtained cyclic material image is copied for a plurality of segments until the copied cyclic material image satisfies the number of frames of the required material image more than 2 times, and then the copied cyclic material image is interrupted according to the number of frames of the required material image 30 frames per segment to obtain a first segment material image and a second segment material image with the same number of frames, and the transparency of the first image frame of the first segment material image and the transparency of the last image frame of the second segment material image The transparency may be set to 100, and the transparency of the second image frame of the first section material image and the transparency of the first image frame of the second section material image may be set to 0.
It should be noted that, in the embodiment, the method for converting the original material image into the second material image and performing the two-segment loop processing on the original material image is only an example of the embodiment of the present invention, and does not represent that the method for converting the original material image into the second material image in the embodiment of the present invention is only a two-segment loop processing method, and any method that can process the original material image and make the original material image loop to obtain the second material image is within the scope of the embodiment, for example, a three-segment loop processing method, and details are not repeated here.
In the embodiment, the characteristic of the flicker form of the second pixel image is utilized to superpose the second pixel image and the first material image required to be made into the flicker form effect to obtain the target image with the flicker form effect, thereby achieving the purpose of processing the image into the effect with the twinkling shape, avoiding the processes of K frame processing of transparency and post processing of color of the image, greatly shortening the time of the manufacturing link, shortening the cost of outsourcing matching effect, and the effect of the fabricated flickering pattern is more natural than that of the related art, therefore, the texture of the effect of the flickering form is improved, the control degree of the effect of the final flickering form of the layer processing is higher, the technical problem that the efficiency of processing the image into the flickering form is low is solved, and the technical effect of improving the efficiency of processing the image into the flickering form is achieved.
The technical solution of the present invention will be described below with reference to preferred embodiments.
This embodiment can utilize a real material image with the effect of the flicker shape and then process the image into the effect with the more real flicker shape by AE post-synthesis.
The embodiment improves on a manufacturing method for manufacturing an effect of a flicker pattern by masking divided regions to further improve efficiency and universality of processing an image to have the flicker pattern.
In the related art, a region requiring flicker is divided by a mask in AE, and then, a K frame of transparency and post-processing of color are performed to realize a crystal effect. However, the main disadvantage of this method is that the manufacturing is time consuming, and the effect of the alternate blinking is only a K frame process within AE, so the resulting effect is somewhat unnatural.
Fig. 3 is a schematic illustration of an image having the effect of a blinking pattern. Fig. 4 is a schematic illustration of another image having the effect of a blinking pattern. As shown in fig. 3 and 4, the image with the flicker effect has alternating colors, and can simulate the light transformation in a real environment.
In order to improve the efficiency of processing an image into a flicker image, the embodiment first obtains a section of original volume image with an effect of a real flicker image, as shown in fig. 5, where fig. 5 is a schematic diagram of an original material image with an effect of a real flicker image according to an embodiment of the present invention, and the requirement of the embodiment on the original material image itself is not high, but only needs to satisfy a point, that is, black and white information of a block surface with alternate flicker.
This embodiment can import the raw material image into the AE, process the raw material image into a loop of material images according to the length of time the effect is done, which can be determined according to the requirements of each item).
Alternatively, the method of processing and cycling the raw material image in this embodiment may adopt a two-stage loop processing method, which can be divided into the following two cases.
In the first case, the following processing can be performed for the number of frames of the original material image more than 2 times the number of frames of the required material image.
Alternatively, this embodiment requires 15 frames of loop material images, and fig. 6 is a schematic diagram of parameter setting for performing an interruption process on the raw material images according to an embodiment of the present invention. As shown in fig. 6, the synthesis group name may be set to "presynthesize 15", the start frame to "00000", and the duration to "000015", that is, the position at which the interruption process of the original material image is to be performed may be set to 15 frames.
The method includes the steps of breaking an original material image at 15 frames, dragging the broken part to the starting frame to obtain a first section of material image (0 th frame to 15 th frame), setting transparency of two sections of material images (0 th frame to 15 th frame), and setting transparency of the two sections of material images, as shown in fig. 7, wherein fig. 7 is a schematic diagram for setting transparency of the two sections of material images according to an embodiment of the present invention, the transparency of the first section of material image is adjusted, the transparency can be adjusted to 100 at the 0 th frame of the first section of material image, the transparency can be adjusted to 0 at the 15 th frame, the transparency can be adjusted to 0 at the 0 th frame of the second section of material image, and the transparency can be adjusted to 100 at the 15 th frame.
In the case two, the following processing can be performed with respect to the number of image frames of the original material image being less than 2 times the number of image frames of the required material image.
Optionally, the embodiment requires 30 frames of cyclic material images, but the number of the original material images is only 20, and the number of the 20 frames is less than 2 times of the 30 frames, then the cyclic material images cannot be directly taken for two-stage cyclic processing, in this case, the original material images need to be processed first, or the original material images are processed into the cyclic material images with the maximum number of frames by using a two-stage cyclic processing method, and then the obtained cyclic material images are copied for several more segments, as shown in fig. 8, where fig. 8 is a schematic diagram of the obtained cyclic material images being copied for several more segments according to an embodiment of the present invention, for example, the obtained cyclic material images are copied to obtain 3 segments of cyclic material images in total, the copied cyclic material images satisfy more than 2 times of the number of the required image frames of each segment of the material images, the duration corresponding to each segment of the material images can be 00008, and then the copied cyclic material images are processed according to 30 frames of each segment of the required material images, and obtaining a first section of material image and a second section of material image with the same image frame number, wherein the transparency of a first image frame of the first section of material image and the transparency of a last image frame of the second section of material image can be set to be 100, and the transparency of a second image frame of the first section of material image and the transparency of a first image frame of the second section of material image can be set to be 0.
After obtaining the loop material image, the loop material image is superimposed with the body material image that needs to be made to have a blinking form, as shown in fig. 9, where fig. 9 is a schematic diagram of superimposing the loop material image and the body material image according to an embodiment of the present invention. As shown in fig. 9, the reference numeral 10 is used to identify a loop material image, and the reference numeral 11 is used to identify a body material image that needs to be made to have a flickering form, for example, a word, and the loop material image is superimposed on the body material image so that the word in the body material image shows the flickering form.
Fig. 10 is a schematic diagram of processing a raw material image into a loop material image in AE according to an embodiment of the present invention. As shown in fig. 10, the original material image is processed into a loop material image by a two-stage loop processing method in AE, in which the transparency of two-stage material images obtained by the two-stage loop processing method can be set, for example, the transparency of the material image of number 1 and the transparency of the material image of number 2.
Fig. 11 is a schematic diagram of a method for implementing superposition of a loop material image and a body material image through masking according to an embodiment of the invention. As shown in fig. 11, the image layer that needs to be processed into a flicker effect is taken as a mask, and then the loop material image is superimposed under the mask to obtain a superimposed image, wherein a part of the unnecessary body material image that does not need to be processed into a flicker effect is removed by the mask.
FIG. 12 is a schematic diagram of adjusting colors in a four-color gradient in an overlaid image, according to an embodiment of the invention. As shown in fig. 12, the superimposed image is toned, several hues that usually appear in the effect of the flicker form are determined, and after the hues are toned, the colors are changed alternately by adjusting parameters of the K dominant hue, and the determined hues are changed alternately by pulling the value K of the dominant hue to simulate the light change in the real environment.
In the embodiment, the characteristics of the flicker shape of the circulating material image are utilized to superpose the circulating material image and the body material image which needs to be made into the flicker shape effect to obtain the final image with the flicker shape effect, thereby achieving the purpose of processing the image into the effect with the twinkling shape, avoiding the processes of K frame processing of transparency and post processing of color of the image, greatly shortening the time of the manufacturing link, shortening the cost of outsourcing matching effect, and the effect of the fabricated flickering pattern is more natural than that of the related art, therefore, the texture of the effect of the flickering form is improved, the control degree of the effect of the final flickering form of the layer processing is higher, the technical problem that the efficiency of processing the image into the flickering form is low is solved, and the technical effect of improving the efficiency of processing the image into the flickering form is achieved.
It should be noted that the steps illustrated in the flowcharts of the figures 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 flowcharts, in some cases, the steps illustrated or described may be performed in an order different than presented herein.
The embodiment of the invention also provides an image processing device. It should be noted that the image processing apparatus of this embodiment can be used to execute the image processing method of the embodiment of the present invention.
Fig. 13 is a schematic diagram of an image processing apparatus according to an embodiment of the present invention. As shown in fig. 13, the image processing apparatus 130 may include: a first acquisition unit 131, a second acquisition unit 132, and a superimposition unit 133.
The first acquiring unit 131 is configured to acquire a first material image to be processed, where the first material image is used to present an initial form of a target object.
The second obtaining unit 132 is configured to obtain a second pixel image corresponding to the first material image, where the second pixel image has the same number of frames as the first material image, the second pixel image is a cyclic material image, the second pixel image includes at least two segments of material images having the same number of frames, and the transparency of a target image frame in the at least two segments of material images changes alternately.
The superimposing unit 133 is configured to perform superimposing processing on the first material image and the second material image to obtain a target image, where the target image shows a flickering form of the target object.
Optionally, the superimposing unit includes: and the superposition module is used for superposing the layer where the second material image is located and the layer where the first material image is located to obtain the target image.
Optionally, the superimposing module comprises: the determining submodule is used for determining the layer where the first material image is located as a mask; the superposition submodule is used for superposing the layer where the second pixel image is located to the lower layer of the mask to obtain a superposed image, wherein the superposed image comprises image information corresponding to the target object; and the adjusting submodule is used for adjusting the image information in the superposed image to obtain the target image.
Optionally, the adjusting sub-module is configured to adjust the image information to obtain the target image by: determining at least one target color phase in the image information, wherein the at least one target color phase is used for generating display information of a flicker form; and adjusting the dominant hue parameter corresponding to at least one target color to obtain a target image, wherein the adjusted dominant hue parameter corresponding to each target color is alternately changed.
Optionally, the second obtaining unit 132 includes: the acquisition module is used for acquiring an original material image which is used for presenting the flicker form of the target object; and the conversion module is used for converting the original material image into a second material image.
Optionally, the conversion module comprises: and the second-section cyclic processing module is used for carrying out second-section cyclic processing on the original material image to obtain a second material image, wherein the second material image comprises a first-section material image and a second-section material image which have the same image frame number, the transparency of a first image frame of the first-section material image is the same as that of a last image frame in the second-section material image, and the transparency of the last image frame of the first-section material image is the same as that of the first image frame in the second-section material image.
In this embodiment, a first material image to be processed is acquired by the first acquisition unit 131, where the first material image is used to present an initial form of a target object; acquiring a second pixel image corresponding to the first material image through a second acquiring unit 132, wherein the number of image frames of the second pixel image is the same as that of the first material image, and the second pixel image is a cyclic material image, that is, the second pixel image includes at least two sections of material images with the same number of image frames, and the transparency of a target image frame in the at least two sections of material images changes alternately; the first material image and the second material image are subjected to superposition processing by the superposition unit 133 to obtain a target image, wherein the target image presents a flickering form of the target object. That is to say, the present application utilizes the characteristic of the scintillation form of the second pixel image to superimpose the second pixel image and the first material image that needs to be made into the crystal scintillation effect to obtain the target image with the crystal scintillation effect, the number of manufacturing links is small, the efficiency of processing the image into the image with the scintillation form is improved, thereby the technical problem of low efficiency of processing the image into the image with the scintillation form is solved, and the technical effect of improving the efficiency of processing the image into the image with the scintillation form is achieved.
Embodiments of the present invention also provide a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
Optionally, in this embodiment, the storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. An image processing method, comprising:
acquiring a first material image to be processed, wherein the first material image is used for presenting an initial form of a target object;
acquiring a second pixel image corresponding to the first material image, wherein the image frame number of the second pixel image is the same as that of the first material image, the second pixel image comprises at least two sections of material images with the same image frame number, and the transparency of target image frames in the at least two sections of material images is changed alternately;
and superposing the first material image and the second material image to obtain a target image, wherein the target image presents a flickering form of the target object.
2. The method of claim 1, wherein superimposing the second material image and the first material image to obtain the target image comprises:
and superposing the layer where the second material image is located and the layer where the first material image is located to obtain the target image.
3. The method according to claim 2, wherein the obtaining the target image by superimposing the layer where the second material image is located and the layer where the first material image is located includes:
determining the layer where the first material image is located as a mask;
superposing the layer where the second pixel image is located to the lower layer of the mask to obtain a superposed image, wherein the superposed image comprises image information corresponding to the target object;
and in the superposed image, adjusting the image information to obtain the target image.
4. The method of claim 3, wherein adjusting the image information to obtain the target image comprises:
determining at least one target hue in the image information, wherein the at least one target hue is used for generating display information of the flicker morphology;
and adjusting the dominant hue parameter corresponding to the at least one target color to obtain the target image, wherein the adjusted dominant hue parameter corresponding to each target color is alternately changed.
5. The method of claim 1, wherein obtaining a second material image corresponding to the first material image comprises:
acquiring an original material image used for presenting the flickering form of the target object;
and converting the original material image into the second material image.
6. The method of claim 5, wherein converting the raw material image into the second material image comprises:
and performing two-stage cyclic processing on the original material image to obtain a second material image, wherein the second material image comprises a first section material image and a second section material image which have the same image frame number, the transparency of a first image frame of the first section material image is the same as the transparency of a last image frame in the second section material image, and the transparency of the last image frame of the first section material image is the same as the transparency of a first image frame in the second section material image.
7. An image processing apparatus characterized by comprising:
the device comprises a first acquisition unit, a second acquisition unit and a processing unit, wherein the first acquisition unit is used for acquiring a first material image to be processed, and the first material image is used for presenting an initial form of a target object;
the second acquisition unit is used for acquiring a second pixel image corresponding to the first material image, wherein the second pixel image has the same image frame number as the first material image, the second pixel image comprises at least two sections of material images with the same image frame number, and the transparency of target image frames in the at least two sections of material images is changed alternately;
and the superposition unit is used for carrying out superposition processing on the first material image and the second material image to obtain a target image, wherein the target image presents the flickering form of the target object.
8. The apparatus of claim 7, wherein the superimposing unit comprises:
and the superposition module is used for superposing the layer where the second material image is located and the layer where the first material image is located to obtain the target image.
9. A storage medium, in which a computer program is stored, wherein the computer program is arranged to perform the method of any of claims 1 to 6 when executed.
10. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, and wherein the processor is arranged to execute the computer program to perform the method of any of claims 1 to 6.
CN202010286333.0A 2020-04-13 2020-04-13 Image processing method, image processing device, storage medium and electronic device Active CN111508036B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010286333.0A CN111508036B (en) 2020-04-13 2020-04-13 Image processing method, image processing device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010286333.0A CN111508036B (en) 2020-04-13 2020-04-13 Image processing method, image processing device, storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN111508036A true CN111508036A (en) 2020-08-07
CN111508036B CN111508036B (en) 2024-03-22

Family

ID=71877558

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010286333.0A Active CN111508036B (en) 2020-04-13 2020-04-13 Image processing method, image processing device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN111508036B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011138649A2 (en) * 2010-05-04 2011-11-10 Vesalis Method of processing images for application of a colour
CN110033501A (en) * 2018-01-10 2019-07-19 武汉斗鱼网络科技有限公司 A kind of implementation method and electric terminal of animation
CN110917618A (en) * 2019-11-20 2020-03-27 腾讯科技(深圳)有限公司 Method, apparatus, device and medium for controlling virtual object in virtual environment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011138649A2 (en) * 2010-05-04 2011-11-10 Vesalis Method of processing images for application of a colour
CN110033501A (en) * 2018-01-10 2019-07-19 武汉斗鱼网络科技有限公司 A kind of implementation method and electric terminal of animation
CN110917618A (en) * 2019-11-20 2020-03-27 腾讯科技(深圳)有限公司 Method, apparatus, device and medium for controlling virtual object in virtual environment

Also Published As

Publication number Publication date
CN111508036B (en) 2024-03-22

Similar Documents

Publication Publication Date Title
CN113454680A (en) Image processor
CN110599554A (en) Method and device for identifying face skin color, storage medium and electronic device
US7697164B2 (en) Mutually different color conversion image processing device
US20190394438A1 (en) Image processing device, digital camera, and non-transitory computer-readable storage medium
WO2017143812A1 (en) Method and device for differentiating objects
CN111508036A (en) Image processing method, image processing apparatus, storage medium, and electronic apparatus
CN110704052B (en) Service platform color configuration method and device, storage medium and electronic device
US11544825B2 (en) Image processing apparatus, image processing system, and image processing method
CN106599176A (en) Image display method and apparatus
CN105551011A (en) Method and apparatus for setting dominant tone
JP2021114180A (en) Image processing device, image processing method, and program
CN105704363B (en) Image data processing method and device
CN111369431A (en) Image processing method and device, readable medium and electronic equipment
CN114900925B (en) Multi-primary color light control method and application thereof
CN111383289A (en) Image processing method, image processing device, terminal equipment and computer readable storage medium
US20090169103A1 (en) Method of correcting false-color pixel in digital image
CN109040598A (en) Image processing method, device, computer readable storage medium and electronic equipment
CN114816619A (en) Information processing method and electronic equipment
JP2019008564A (en) Multiplexed code, multiplexed code reader, multiplexed code reading method, and program
CN109087362B (en) System and method for determining dominant colors in images and non-transitory computer readable medium
JP6544004B2 (en) Color sample creating apparatus and color sample creating method, and image processing system using color sample
CN106887024A (en) The processing method and processing system of photo
JP6791299B2 (en) Color swatches, color swatch creation device and color swatch creation method, and image processing system using color swatches
CN113658055B (en) Color mapping method and device for digital image, electronic device and storage medium
CN117522742B (en) Image processing method, architecture, device and computer equipment

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