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

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

Info

Publication number
CN111507896A
CN111507896A CN202010345263.1A CN202010345263A CN111507896A CN 111507896 A CN111507896 A CN 111507896A CN 202010345263 A CN202010345263 A CN 202010345263A CN 111507896 A CN111507896 A CN 111507896A
Authority
CN
China
Prior art keywords
processed
protection
image
protection area
liquefaction
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
CN202010345263.1A
Other languages
Chinese (zh)
Other versions
CN111507896B (en
Inventor
邹瑞波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance 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 Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202010345263.1A priority Critical patent/CN111507896B/en
Publication of CN111507896A publication Critical patent/CN111507896A/en
Application granted granted Critical
Publication of CN111507896B publication Critical patent/CN111507896B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/04Context-preserving transformations, e.g. by using an importance map

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Image Processing (AREA)

Abstract

The application relates to an image liquefaction processing method, device, equipment and storage medium. The method comprises the following steps: determining a protection mask of an image to be processed, covering a protection area of the image to be processed with the protection mask, and dividing the image to be processed into at least a protection area and a non-protection area; detecting liquefaction operation aiming at the non-protection area, and determining a position characteristic corresponding to the liquefaction operation; determining at least two pixel points to be processed according to the position characteristics of the liquefaction operation, and performing parallel computation to obtain operation results corresponding to the at least two pixel points to be processed after the liquefaction operation is performed; and judging whether the position characteristics corresponding to the pixel points to be processed represented by the operation results after the liquefaction operation is carried out fall into the protection area or not, and determining whether to execute the operation results or not based on the judgment results, so that the operation results can be prevented from crossing into the protection area, and a foundation is laid for efficiently realizing the liquefaction operation of the non-protection area.

Description

Image liquefaction processing method, device, equipment and storage medium
Technical Field
The present application relates to image processing technologies, and in particular, to an image liquefaction processing method, apparatus, device, and storage medium.
Background
In order to meet the requirements of users for repairing images, image processing software is provided with a liquefaction function so as to meet the requirements of users for carrying out shape adjustment such as contraction, push-pull, distortion and the like on local areas of images to be processed. In practical applications, the following scenarios often occur: the user need carry out liquefaction operation to some regions, but does not need the liquefaction operation to influence other regions, for example, the user carries out the liquefaction operation to cheek in the people's face of image to be handled to realize thin face effect, but does not want this liquefaction operation to influence the nose, based on this demand, protection mask comes to an end, utilizes protection mask can realize protecting the region that does not need to carry out the liquefaction operation, but the liquefaction operation of current use protection mask is consuming time longer, has reduced user experience.
Disclosure of Invention
In order to solve the problems, the invention provides an image liquefaction processing method, an image liquefaction processing device, image liquefaction processing equipment and a storage medium, so that liquefaction operation is completed in a parallel processing mode on the basis of protecting a protection area, so that on one hand, the liquefaction processing time is shortened, the efficiency is improved, and on the other hand, the user experience is improved.
In a first aspect, an embodiment of the present application provides an image liquefaction processing method, including:
determining a protection mask of an image to be processed, covering a protection area of the image to be processed with the protection mask, and dividing the image to be processed into at least a protection area and a non-protection area;
detecting liquefaction operation aiming at the non-protection area, and determining a position characteristic corresponding to the liquefaction operation;
determining at least two pixel points to be processed according to the position characteristics of the liquefaction operation, and performing parallel computation to obtain operation results corresponding to the at least two pixel points to be processed after the liquefaction operation is performed, wherein the operation results at least represent the position characteristics corresponding to the pixel points to be processed after the liquefaction operation is performed;
and judging whether the position characteristics corresponding to the pixel points to be processed represented by the operation results after the liquefaction operation is carried out fall into the protection area or not, and determining whether to execute the operation results or not based on the judgment results so as to avoid the operation results from crossing into the protection area.
In a specific embodiment, the parallel computing to obtain the operation result corresponding to the at least two to-be-processed pixel points after the liquefaction operation is performed includes:
and obtaining the offset corresponding to the pixel points to be processed in parallel, and obtaining the position characteristics corresponding to each pixel point to be processed in the at least two pixel points to be processed after the offset processing is carried out on the pixel point to be processed based on the offset corresponding to the pixel point to be processed.
In a specific embodiment, the method further comprises:
and after determining that the position characteristic corresponding to the pixel point to be processed represented by the operation result after the liquefaction operation is carried out falls into the protection region, reducing the offset corresponding to the pixel point to be processed, and judging whether the position characteristic corresponding to the pixel point to be processed after the offset is reduced falls into the protection region again.
In a specific embodiment, the method further comprises:
after determining that the position characteristics corresponding to the pixel points to be processed represented by the operation result after the liquefaction operation is carried out do not fall into the protection area, executing the operation result; alternatively, the first and second electrodes may be,
and after determining that the position characteristics corresponding to the pixel points to be processed represented by the operation result after the liquefaction operation is carried out fall into the protection area, shielding the operation result.
In a specific embodiment, the determining a protection mask for an image to be processed includes:
acquiring key point characteristics of an image to be processed, and forming a key point network capable of representing the key point characteristics of the image to be processed;
the method comprises the steps of obtaining key point characteristics of a protection area, generating a protection mask based on a key point network, enabling the generated protection mask to cover the protection area, and dividing an image to be processed into at least the protection area and a non-protection area.
In a specific embodiment, the method further comprises:
detecting copy operation aiming at the protection mask, and acquiring key point characteristics of a protection area corresponding to the protection mask;
and after the pasting operation aiming at the copying operation is detected, forming a new protection mask aiming at the new image to be processed based on the key point characteristics of the protection area corresponding to the protection mask and the key point network of the new image to be processed, wherein the new protection mask can cover the area, matched with the protection area corresponding to the protection mask, in the new image to be processed.
In a second aspect, an embodiment of the present application provides an image processing apparatus, including:
the device comprises a determining unit, a judging unit and a processing unit, wherein the determining unit is used for determining a protection mask of an image to be processed, the protection mask covers a protection area of the image to be processed, and the image to be processed is at least divided into the protection area and a non-protection area;
the detection unit is used for detecting liquefaction operation aiming at the non-protection area and determining a position characteristic corresponding to the liquefaction operation;
the calculation unit is used for determining at least two pixel points to be processed according to the position characteristics of the liquefaction operation, and performing parallel calculation to obtain operation results corresponding to the at least two pixel points to be processed after the liquefaction operation is performed, wherein the operation results at least represent the position characteristics corresponding to the pixel points to be processed after the liquefaction operation is performed;
and the processing unit is used for judging whether the position characteristics corresponding to the pixel points to be processed represented by the operation results after the liquefaction operation is carried out fall into the protection area or not, and determining whether to execute the operation results or not based on the judgment results so as to avoid the operation results from crossing into the protection area.
In a specific embodiment, the computing unit is further configured to:
and obtaining the offset corresponding to the pixel points to be processed in parallel, and obtaining the position characteristics corresponding to each pixel point to be processed in the at least two pixel points to be processed after the offset processing is carried out on the pixel point to be processed based on the offset corresponding to the pixel point to be processed.
In a specific embodiment, the processing unit is further configured to:
and after determining that the position characteristic corresponding to the pixel point to be processed represented by the operation result after the liquefaction operation is carried out falls into the protection region, reducing the offset corresponding to the pixel point to be processed, and judging whether the position characteristic corresponding to the pixel point to be processed after the offset is reduced falls into the protection region again.
In a specific embodiment, the processing unit is further configured to:
after determining that the position characteristics corresponding to the pixel points to be processed represented by the operation result after the liquefaction operation is carried out do not fall into the protection area, executing the operation result; alternatively, the first and second electrodes may be,
and after determining that the position characteristics corresponding to the pixel points to be processed represented by the operation result after the liquefaction operation is carried out fall into the protection area, shielding the operation result.
In a specific embodiment, the determining unit is further configured to:
acquiring key point characteristics of an image to be processed, and forming a key point network capable of representing the key point characteristics of the image to be processed;
the method comprises the steps of obtaining key point characteristics of a protection area, generating a protection mask based on a key point network, enabling the generated protection mask to cover the protection area, and dividing an image to be processed into at least the protection area and a non-protection area.
In a specific embodiment, the detecting unit is further configured to detect a copy operation for the protection mask, and obtain a key point feature of a protection area corresponding to the protection mask;
the processing unit is further configured to form a new protection mask for the new image to be processed based on the key point feature of the protection area corresponding to the protection mask and the key point network of the new image to be processed after detecting the paste operation for the copy operation, where the new protection mask can cover an area in the new image to be processed, where the area is matched with the protection area corresponding to the protection mask.
In a third aspect, an embodiment of the present application provides an image processing apparatus, including:
one or more processors;
a memory communicatively coupled to the one or more processors;
one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the methods described above.
In a fourth aspect, the present application provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the computer program implements the method described above.
Like this, because this application scheme can determine two at least pending pixel points based on the position characteristic of liquefaction operation, and the parallel processing pixel point is handled moreover, so, it is long when having reduced the liquefaction processing on the one hand, has improved liquefaction efficiency, and on the other hand has promoted user experience. Moreover, according to the scheme of the application, after the operation result of the pixel point to be processed after the liquefaction operation is obtained, the operation result is not directly executed, but whether the position characteristic corresponding to the pixel point to be processed represented by the operation result after the liquefaction operation is carried out falls into the protection area is judged, so that whether the operation result is executed or not is determined, and the operation result is prevented from crossing into the protection area; therefore, the image processing efficiency is improved on the basis of protecting the protection area.
Drawings
FIG. 1 is a schematic flow chart of an implementation of an image liquefaction processing method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an application scenario of the image liquefaction processing method according to the embodiment of the present application;
FIG. 3 is a schematic structural diagram of an image processing apparatus according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an image processing apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
In some of the flows described in the specification and claims of the present application and in the above-described figures, a number of operations are included that occur in a particular order, but it should be clearly understood that the flows may include more or less operations, and that the operations may be performed sequentially or in parallel.
Based on this, the embodiment of the application provides an image liquefaction processing method, device, equipment and storage medium; specifically, fig. 1 is a schematic flow chart of an implementation of an image liquefaction processing method according to an embodiment of the present invention, and as shown in fig. 1, the method includes:
step 101: the image processing device determines a protection mask of an image to be processed, the protection mask covers a protection area of the image to be processed, and the image to be processed is at least divided into the protection area and a non-protection area.
In one embodiment, the protection mask of the image to be processed can be determined by the following method, including: acquiring key point characteristics of an image to be processed, and forming a key point network capable of representing the key point characteristics of the image to be processed; the method comprises the steps of obtaining key point characteristics of a protection area, generating a protection mask based on a key point network, enabling the generated protection mask to cover the protection area, and dividing an image to be processed into at least the protection area and a non-protection area. That is to say, the protection mask in the present application is formed based on the key point features of the image to be processed, for example, for the face image, the face key points of the face image are first obtained, face key point interpolation processing is performed to obtain dense face grids (that is, a key point network), then key point features of a protection area, such as key point features of a nose, are determined, and then the protection mask covering the nose is generated based on the dense face grids, the protection mask is used to divide the face image into a protection area covered with the protection mask and a non-protection area not covered with the protection mask, so that the purpose of performing deformation adjustment on the part of the image to be processed and protecting the area not needing deformation is achieved.
In the scheme, the protection mask is formed based on the key point network of the image to be processed, so that the protection mask can be reused in other images to be processed without being independently set for different images to be processed, and therefore, the image processing efficiency is improved, and further the user experience is also improved. Specifically, the protection mask copy method includes: detecting copy operation aiming at the protection mask, and acquiring key point characteristics of a protection area corresponding to the protection mask; and after the pasting operation aiming at the copying operation is detected, forming a new protection mask aiming at the new image to be processed based on the key point characteristics of the protection area corresponding to the protection mask and the key point network of the new image to be processed, wherein the new protection mask can cover the area, matched with the protection area corresponding to the protection mask, in the new image to be processed. Continuing to take the face image as an example, after the protection mask-1 for the nose in the face image-1 is generated, copying operation can be performed, and the protection mask-1 for the face image-1 is pasted to the face image-2, at this time, because the protection mask-1 for the face image-1 is formed based on the key point feature of the nose, after the protection mask-2 is pasted to the face image-2, the protection mask-2 matched with the face image-2 can be generated based on the key point network of the face image-2, and the protection area corresponding to the protection mask-2 is the nose of the face image-2, so that the setting flow of the mask is simplified, the complex operation is avoided, and the user experience is further improved.
Step 102: and the image processing device detects the liquefaction operation aiming at the non-protection area and determines the position characteristic corresponding to the liquefaction operation.
In practical application, the liquefaction operation may specifically be a drag operation of the image processing application program under the liquefaction function; accordingly, the location characteristic of the liquefaction operation may be embodied as a start location and an end location of the liquefaction operation (hereinafter referred to as start location).
Step 103: the image processing device determines at least two pixel points to be processed according to the position characteristics of the liquefaction operation, and obtains an operation result corresponding to the at least two pixel points to be processed after the liquefaction operation is carried out on the at least two pixel points to be processed through parallel calculation, wherein the operation result at least represents the position characteristics corresponding to the pixel points to be processed after the liquefaction operation is carried out on the pixel points to be processed.
In practical application, the process of processing the pixels in parallel can be executed in a Graphics Processing Unit (GPU); for example, in a specific scenario, the image processing apparatus includes a GPU, and in this case, the GPU may be utilized to perform parallel computation, so as to improve the image processing efficiency.
In a specific embodiment, the parallel computing to obtain the operation result corresponding to the at least two to-be-processed pixel points after the liquefaction operation is performed includes: and obtaining the offset corresponding to the pixel points to be processed in parallel, and obtaining the position characteristics corresponding to each pixel point to be processed in the at least two pixel points to be processed after the offset processing is carried out on the pixel point to be processed based on the offset corresponding to the pixel point to be processed. Further, when it is determined that the position characteristic corresponding to the pixel point to be processed represented by the operation result after the liquefaction operation is performed falls into the protection region, the offset corresponding to the pixel point to be processed is reduced, and whether the position characteristic corresponding to the pixel point to be processed after the offset reduction falls into the protection region is judged again. Specifically, as shown in fig. 2, the GPU processes the to-be-processed pixel points in parallel to perform the liquefaction operation, and sets an offset (offset) for each to-be-processed pixel point; judging whether the corresponding position characteristics (such as the starting point position) of each pixel point to be processed after the pixel point to be processed is subjected to offset processing based on the offset corresponding to the pixel point to be processed per se falls into the protection region, if so, decreasing the offset, and judging whether the starting point position corresponding to the pixel point to be processed after decreasing again falls into the protection region. And if the pixel point to be processed does not fall into the protection area, executing offset on the pixel point to be processed to obtain a new starting point position of the pixel point to be processed, and thus realizing deformation adjustment of the image to be processed on the basis of protecting the protection area.
Step 104: and the image processing device judges whether the position characteristics corresponding to the pixel points to be processed represented by the operation results after the liquefaction operation is carried out fall into the protection area or not, and determines whether to execute the operation results or not based on the judgment results so as to avoid the operation results from crossing into the protection area.
In practical application, if it is determined that the position characteristic corresponding to the pixel point to be processed represented by the operation result after the liquefaction operation is performed does not fall into the protection area, the operation result is executed; alternatively, the first and second electrodes may be,
and if it is determined that the position characteristics corresponding to the pixel points to be processed represented by the operation results after the liquefaction operation is carried out fall into the protection area, shielding the operation results. Certainly, in a specific scenario, when it is determined that the pixel point falls into the protection area, the operation result is directly shielded, that is, the operation result is not executed for the pixel point to be processed which falls into the protection area after the liquefaction processing, so that the processing efficiency can be improved to the greatest extent. Or, in order to optimize the image processing effect, the liquefaction process may be optimized after determining that the pixel point falls into the protection region, for example, the offset is decreased progressively, and then it is determined whether the position feature obtained by the liquefaction operation after the offset is decreased progressively on the pixel point to be processed falls into the protection region again.
Like this, because this application scheme can determine two at least pending pixel points based on the position characteristic of liquefaction operation, and the parallel processing pixel point is handled moreover, so, it is long when having reduced the liquefaction processing on the one hand, has improved liquefaction efficiency, and on the other hand has promoted user experience. Moreover, according to the scheme of the application, after the operation result of the pixel point to be processed after the liquefaction operation is obtained, the operation result is not directly executed, but whether the position characteristic corresponding to the pixel point to be processed represented by the operation result after the liquefaction operation is carried out falls into the protection area is judged, so that whether the operation result is executed or not is determined, and the operation result is prevented from crossing into the protection area; therefore, the image processing efficiency is improved on the basis of protecting the protection area.
An embodiment of the present application further provides an image processing apparatus, as shown in fig. 3, the apparatus includes:
a determining unit 31, configured to determine a protection mask of an image to be processed, where the protection mask covers a protection area of the image to be processed, and divides the image to be processed into at least the protection area and a non-protection area;
a detection unit 32, configured to detect a liquefaction operation for the non-protected area, and determine a location characteristic corresponding to the liquefaction operation;
the calculation unit 33 is configured to determine at least two pixel points to be processed according to the position characteristics of the liquefaction operation, and perform parallel calculation to obtain operation results corresponding to the at least two pixel points to be processed after the liquefaction operation is performed, where the operation results at least represent the position characteristics corresponding to the pixel points to be processed after the liquefaction operation is performed;
and the processing unit 34 is configured to determine whether the position feature corresponding to the to-be-processed pixel point represented by the operation result after the liquefaction operation is performed falls into the protection area, and determine whether to execute the operation result based on the determination result, so as to prevent the operation result from crossing into the protection area.
In a specific embodiment, the calculating unit 33 is further configured to:
and obtaining the offset corresponding to the pixel points to be processed in parallel, and obtaining the position characteristics corresponding to each pixel point to be processed in the at least two pixel points to be processed after the offset processing is carried out on the pixel point to be processed based on the offset corresponding to the pixel point to be processed.
In a specific embodiment, the processing unit 34 is further configured to:
and after determining that the position characteristic corresponding to the pixel point to be processed represented by the operation result after the liquefaction operation is carried out falls into the protection region, reducing the offset corresponding to the pixel point to be processed, and judging whether the position characteristic corresponding to the pixel point to be processed after the offset is reduced falls into the protection region again.
In a specific embodiment, the processing unit 34 is further configured to:
after determining that the position characteristics corresponding to the pixel points to be processed represented by the operation result after the liquefaction operation is carried out do not fall into the protection area, executing the operation result; alternatively, the first and second electrodes may be,
and after determining that the position characteristics corresponding to the pixel points to be processed represented by the operation result after the liquefaction operation is carried out fall into the protection area, shielding the operation result.
In a specific embodiment, the determining unit 31 is further configured to:
acquiring key point characteristics of an image to be processed, and forming a key point network capable of representing the key point characteristics of the image to be processed;
the method comprises the steps of obtaining key point characteristics of a protection area, generating a protection mask based on a key point network, enabling the generated protection mask to cover the protection area, and dividing an image to be processed into at least the protection area and a non-protection area.
In a specific embodiment, the detecting unit 32 is further configured to detect a copy operation for the protection mask, and obtain a key point feature of a protection area corresponding to the protection mask;
the processing unit 34 is further configured to, after detecting a paste operation for the copy operation, form a new protection mask for the new image to be processed based on the key point feature of the protection area corresponding to the protection mask and the key point network of the new image to be processed, where the new protection mask can cover an area, in the new image to be processed, that matches the protection area corresponding to the protection mask.
Here, it should be noted that: the descriptions of the embodiments of the apparatus are similar to the descriptions of the methods, and have the same advantages as the embodiments of the methods, and therefore are not repeated herein. For technical details that are not disclosed in the embodiments of the apparatus of the present invention, those skilled in the art should refer to the description of the embodiments of the method of the present invention to understand, and for brevity, will not be described again here.
An embodiment of the present application further provides an image processing apparatus, including: one or more processors; a memory communicatively coupled to the one or more processors; one or more application programs; wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the method described above.
In a specific example, the image processing apparatus according to the embodiment of the present application may be embodied as a structure as shown in fig. 4, and the image processing apparatus includes at least a processor 41, a storage medium 42, and at least one external communication interface 43; the processor 41, the storage medium 42, and the external communication interface 43 are all connected by a bus 44. The processor 41 may be a microprocessor, a central processing unit, a digital signal processor, or a programmable logic array, etc. electronic components with processing functions. The storage medium has stored therein computer executable code capable of performing the method of any of the above embodiments. In practical applications, the determining unit 31, the detecting unit 31, the calculating unit 33, and the processing unit 34 can be implemented by the processor 41, and of course, in practical applications, the processor 41 can be embodied as an image processor.
Here, it should be noted that: the above description of the embodiment of the image processing apparatus is similar to the above description of the method, and has the same beneficial effects as the embodiment of the method, and therefore, the description thereof is omitted. For technical details not disclosed in the embodiment of the image processing apparatus of the present invention, those skilled in the art should refer to the description of the embodiment of the method of the present invention for understanding, and for the sake of brevity, will not be described again here.
Embodiments of the present application also provide a computer-readable storage medium, which stores a computer program, and when the program is executed by a processor, the computer program implements the method described above.
A computer-readable storage medium can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable read-only memory (CDROM). Additionally, the computer-readable storage medium may even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that all or part of the steps carried by the method for implementing the above embodiments can be implemented by hardware related to instructions of a program, which can be stored in a computer readable storage medium, and the program includes one or a combination of the steps of the method embodiments when the program is executed.
In addition, functional units in the embodiments of the present invention may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a separate product, may also be stored in a computer readable storage medium. The storage medium may be a read-only memory, a magnetic or optical disk, or the like.
The embodiments described above are only a part of the embodiments of the present invention, and not all of them. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

Claims (10)

1. An image liquefaction processing method, characterized in that the method comprises:
determining a protection mask of an image to be processed, covering a protection area of the image to be processed with the protection mask, and dividing the image to be processed into at least a protection area and a non-protection area;
detecting liquefaction operation aiming at the non-protection area, and determining a position characteristic corresponding to the liquefaction operation;
determining at least two pixel points to be processed according to the position characteristics of the liquefaction operation, and performing parallel computation to obtain operation results corresponding to the at least two pixel points to be processed after the liquefaction operation is performed, wherein the operation results at least represent the position characteristics corresponding to the pixel points to be processed after the liquefaction operation is performed;
and judging whether the position characteristics corresponding to the pixel points to be processed represented by the operation results after the liquefaction operation is carried out fall into the protection area or not, and determining whether to execute the operation results or not based on the judgment results so as to avoid the operation results from crossing into the protection area.
2. The method according to claim 1, wherein the parallel computing to obtain the operation result corresponding to the at least two to-be-processed pixel points after the liquefaction operation is performed comprises:
and obtaining the offset corresponding to the pixel points to be processed in parallel, and obtaining the position characteristics corresponding to each pixel point to be processed in the at least two pixel points to be processed after the offset processing is carried out on the pixel point to be processed based on the offset corresponding to the pixel point to be processed.
3. The method of claim 2, further comprising:
and after determining that the position characteristic corresponding to the pixel point to be processed represented by the operation result after the liquefaction operation is carried out falls into the protection region, reducing the offset corresponding to the pixel point to be processed, and judging whether the position characteristic corresponding to the pixel point to be processed after the offset is reduced falls into the protection region again.
4. The method according to claim 1 or 2, characterized in that the method further comprises:
after determining that the position characteristics corresponding to the pixel points to be processed represented by the operation result after the liquefaction operation is carried out do not fall into the protection area, executing the operation result; alternatively, the first and second electrodes may be,
and after determining that the position characteristics corresponding to the pixel points to be processed represented by the operation result after the liquefaction operation is carried out fall into the protection area, shielding the operation result.
5. The method of claim 1, wherein determining a protection mask for the image to be processed comprises:
acquiring key point characteristics of an image to be processed, and forming a key point network capable of representing the key point characteristics of the image to be processed;
the method comprises the steps of obtaining key point characteristics of a protection area, generating a protection mask based on a key point network, enabling the generated protection mask to cover the protection area, and dividing an image to be processed into at least the protection area and a non-protection area.
6. The method of claim 5, further comprising:
detecting copy operation aiming at the protection mask, and acquiring key point characteristics of a protection area corresponding to the protection mask;
and after the pasting operation aiming at the copying operation is detected, forming a new protection mask aiming at the new image to be processed based on the key point characteristics of the protection area corresponding to the protection mask and the key point network of the new image to be processed, wherein the new protection mask can cover the area, matched with the protection area corresponding to the protection mask, in the new image to be processed.
7. An image processing apparatus, characterized in that the apparatus comprises:
the device comprises a determining unit, a judging unit and a processing unit, wherein the determining unit is used for determining a protection mask of an image to be processed, the protection mask covers a protection area of the image to be processed, and the image to be processed is at least divided into the protection area and a non-protection area;
the detection unit is used for detecting liquefaction operation aiming at the non-protection area and determining a position characteristic corresponding to the liquefaction operation;
the calculation unit is used for determining at least two pixel points to be processed according to the position characteristics of the liquefaction operation, and performing parallel calculation to obtain operation results corresponding to the at least two pixel points to be processed after the liquefaction operation is performed, wherein the operation results at least represent the position characteristics corresponding to the pixel points to be processed after the liquefaction operation is performed;
and the processing unit is used for judging whether the position characteristics corresponding to the pixel points to be processed represented by the operation results after the liquefaction operation is carried out fall into the protection area or not, and determining whether to execute the operation results or not based on the judgment results so as to avoid the operation results from crossing into the protection area.
8. The apparatus of claim 7, wherein the computing unit is further configured to:
and obtaining the offset corresponding to the pixel points to be processed in parallel, and obtaining the position characteristics corresponding to each pixel point to be processed in the at least two pixel points to be processed after the offset processing is carried out on the pixel point to be processed based on the offset corresponding to the pixel point to be processed.
9. An image processing apparatus characterized by comprising:
one or more processors;
a memory communicatively coupled to the one or more processors;
one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the method of any of claims 1-6.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 6.
CN202010345263.1A 2020-04-27 2020-04-27 Image liquefaction processing method, device, equipment and storage medium Active CN111507896B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010345263.1A CN111507896B (en) 2020-04-27 2020-04-27 Image liquefaction processing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010345263.1A CN111507896B (en) 2020-04-27 2020-04-27 Image liquefaction processing method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111507896A true CN111507896A (en) 2020-08-07
CN111507896B CN111507896B (en) 2023-09-05

Family

ID=71876446

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010345263.1A Active CN111507896B (en) 2020-04-27 2020-04-27 Image liquefaction processing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111507896B (en)

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106408510A (en) * 2016-09-08 2017-02-15 厦门美图之家科技有限公司 Method and system for obtaining facial beautification mask of face image
US20170186202A1 (en) * 2015-12-25 2017-06-29 Canon Kabushiki Kaisha Image processing apparatus, image processing method, and non-transitory computer-readable storage medium
WO2017177902A1 (en) * 2016-04-14 2017-10-19 平安科技(深圳)有限公司 Video recording method, server, system, and storage medium
CN108198141A (en) * 2017-12-28 2018-06-22 北京奇虎科技有限公司 Realize image processing method, device and the computing device of thin face special efficacy
CN108346130A (en) * 2018-03-20 2018-07-31 北京奇虎科技有限公司 Image processing method, device and electronic equipment
WO2018137623A1 (en) * 2017-01-24 2018-08-02 深圳市商汤科技有限公司 Image processing method and apparatus, and electronic device
CN108364254A (en) * 2018-03-20 2018-08-03 北京奇虎科技有限公司 Image processing method, device and electronic equipment
CN108389155A (en) * 2018-03-20 2018-08-10 北京奇虎科技有限公司 Image processing method, device and electronic equipment
CN108399599A (en) * 2018-03-20 2018-08-14 北京奇虎科技有限公司 Image processing method, device and electronic equipment
CN108447023A (en) * 2018-03-20 2018-08-24 北京奇虎科技有限公司 Image processing method, device and electronic equipment
WO2019024751A1 (en) * 2017-07-31 2019-02-07 腾讯科技(深圳)有限公司 Facial expression synthesis method and apparatus, electronic device, and storage medium
WO2019071550A1 (en) * 2017-10-13 2019-04-18 深圳传音通讯有限公司 Image processing method, mobile terminal, and computer-readable storage medium
CN110853071A (en) * 2018-08-21 2020-02-28 Tcl集团股份有限公司 Image editing method and terminal equipment

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170186202A1 (en) * 2015-12-25 2017-06-29 Canon Kabushiki Kaisha Image processing apparatus, image processing method, and non-transitory computer-readable storage medium
WO2017177902A1 (en) * 2016-04-14 2017-10-19 平安科技(深圳)有限公司 Video recording method, server, system, and storage medium
CN106408510A (en) * 2016-09-08 2017-02-15 厦门美图之家科技有限公司 Method and system for obtaining facial beautification mask of face image
WO2018137623A1 (en) * 2017-01-24 2018-08-02 深圳市商汤科技有限公司 Image processing method and apparatus, and electronic device
WO2019024751A1 (en) * 2017-07-31 2019-02-07 腾讯科技(深圳)有限公司 Facial expression synthesis method and apparatus, electronic device, and storage medium
WO2019071550A1 (en) * 2017-10-13 2019-04-18 深圳传音通讯有限公司 Image processing method, mobile terminal, and computer-readable storage medium
CN108198141A (en) * 2017-12-28 2018-06-22 北京奇虎科技有限公司 Realize image processing method, device and the computing device of thin face special efficacy
CN108364254A (en) * 2018-03-20 2018-08-03 北京奇虎科技有限公司 Image processing method, device and electronic equipment
CN108399599A (en) * 2018-03-20 2018-08-14 北京奇虎科技有限公司 Image processing method, device and electronic equipment
CN108447023A (en) * 2018-03-20 2018-08-24 北京奇虎科技有限公司 Image processing method, device and electronic equipment
CN108389155A (en) * 2018-03-20 2018-08-10 北京奇虎科技有限公司 Image processing method, device and electronic equipment
CN108346130A (en) * 2018-03-20 2018-07-31 北京奇虎科技有限公司 Image processing method, device and electronic equipment
CN110853071A (en) * 2018-08-21 2020-02-28 Tcl集团股份有限公司 Image editing method and terminal equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李怀琼;陈钱;隋修宝;: "基于边缘保护的红外图像插值放大算法", 兵工学报, no. 04 *

Also Published As

Publication number Publication date
CN111507896B (en) 2023-09-05

Similar Documents

Publication Publication Date Title
CN109191395B (en) Image contrast enhancement method, device, equipment and storage medium
US9070034B2 (en) Method and system for correcting QR code image
US10255665B2 (en) Image processing device and method, image capturing device, program, and record medium
CN108320270B (en) Image correction method, device and storage medium
EP3822757A1 (en) Method and apparatus for setting background of ui control
CN109840912B (en) Method for correcting abnormal pixels in image and computing equipment
CN112819939B (en) Method, apparatus, device and computer readable storage medium for correcting UV coordinates
JPWO2012144020A1 (en) Wrinkle detection device, wrinkle detection method and program
CN111383178A (en) Image enhancement method and device and terminal equipment
CN113129207A (en) Method and device for blurring background of picture, computer equipment and storage medium
JP2013045316A (en) Image processing device and image processing method
CN113052162B (en) Text recognition method and device, readable storage medium and computing equipment
JP2018151994A (en) Image processing method, image processing program, and image processor
US11798227B2 (en) Image processing apparatus and image processing method
CN111507896A (en) Image liquefaction processing method, device, equipment and storage medium
CN111507925A (en) Picture repairing processing method, device, equipment and storage medium
CN110619597A (en) Semitransparent watermark removing method and device, electronic equipment and storage medium
WO2013027572A1 (en) Ridge direction extraction device, ridge direction extraction method, and ridge direction extraction program
JP4687667B2 (en) Image processing program and image processing apparatus
JP5395722B2 (en) Line drawing processing apparatus, line drawing processing method and program
CN112862907B (en) Microscopic image correction method, device, equipment, storage medium and product
CN115826917A (en) Chip computing unit multiplexing method and device, electronic equipment and storage medium
CN112862726B (en) Image processing method, device and computer readable storage medium
CN116134476A (en) Plane correction method and device, computer readable medium and electronic equipment
CN115937017A (en) Image correction method, image correction device, storage medium, image correction apparatus, and computer program product

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant after: Douyin Vision Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant before: Tiktok vision (Beijing) Co.,Ltd.

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant after: Tiktok vision (Beijing) Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant before: BEIJING BYTEDANCE NETWORK TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant