# US 2021/0241509 A1 · Method and apparatus for image processing, device for image processing, and storage medium

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2021/0241509 A1
- Document ID: US20210241509A1
- Status: Published application
- Kind: A1
- Application number: 17/234,957
- Filed: 2021-04-20
- Published: 2021-08-05
- Earliest claimed: 2019-11-29
- Applicants: Beijing SenseTime Technology Development Co., Ltd.
- Inventors: Tong LI; Weiliang ZHANG; Wentao LIU; Chen QIAN
- Web page: https://patentgrep.com/patent/US20210241509A1

## CPC

- G06T 7/73: using feature-based methods
- G06T 3/18: Image warping, e.g. rearranging pixels individually
- G06T 5/50: using two or more images, e.g. averaging or subtraction
- G06T 7/97: {Determining parameters from multiple pictures (depth or shape recovery from multiple images G06T7/55; stereo camera calibration G06T7/85)}
- G06T 11/60: Creating or editing images; Combining images with text
- G06V 10/462: {Salient features, e.g. scale invariant feature transforms [SIFT]}
- G06V 10/7553: {based on shape, e.g. active shape models [ASM]}
- G06V 10/757: {Matching configurations of points or features}
- G06V 40/10: Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06T 2207/20221: Image fusion; Image merging
- G06T 2207/30196: Human being; Person
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING

## Abstract

Disclosed are a method and apparatus for image processing, a device for image processing, and a storage medium. The method for image processing includes: acquiring a first replacement image of a target part at a first posture; determining a posture parameter of the target part at a second posture in a first image; transforming the first replacement image into a second replacement image corresponding to the second posture according to the posture parameter; and fusing the second replacement image to the target part in the first image to obtain a second image.

## Claims

### Claim 1

A method for image processing, comprising:
acquiring a first replacement image of a target part at a first posture;
determining a posture parameter of the target part at a second posture in a first image;
transforming the first replacement image into a second replacement image corresponding to the second posture according to the posture parameter; and
fusing the second replacement image to the target part in the first image to obtain a second image.

### Claim 2 (depends on 1)

The method according to claim 1, wherein transforming the first replacement image into the second replacement image corresponding to the second posture according to the posture parameter comprises:
acquiring coordinates of each of a plurality of first key points of the target part in the first replacement image;
determining, from the first replacement image based on coordinates of the plurality of first key points, at least one original polygonal area enclosed by a group of first key points among the plurality of first key points; and
deforming the at least one original polygonal area based on the posture parameter to obtain the second replacement image.

### Claim 3 (depends on 1)

The method according to claim 1, wherein determining the posture parameter of the target part at the second posture in the first image comprises:
performing key point detection for the target part in the first image to obtain coordinates of each of a plurality of key points of the target part in the first image; and
determining the posture parameter of the target part according to coordinates of the plurality of key points of the target part in the first image.

### Claim 4 (depends on 1)

The method according to claim 1, wherein the target part comprises an abdomen; and
determining the posture parameter of the target part at the second posture in the first image comprises:
acquiring coordinates of each of at least three types of key points of the abdomen in the first image, wherein the at least three types of key points comprise: at least two first edge key points, at least two second edge key points and at least two central-axis key points, the at least two first edge key points are distributed at a different side of one of the at least two central-axis key points compared with the at least two second edge key points, and positions of the at least three types of key points are configured to represent the posture parameter of the target part.

### Claim 5 (depends on 4)

The method according to claim 4, wherein transforming the first replacement image into the second replacement image corresponding to the second posture according to the posture parameter comprises:
obtaining a target triangular area according to a triangular area formed by three adjacent key points among the at least three types of key points;
obtaining, according to coordinates of a plurality of first key points acquired from the first replacement image, an original triangular area enclosed by three adjacent first key points among the plurality of first key points, wherein the plurality of first key points and the at least three types of key points are all key points of the target part; and
transforming the first replacement image into the second replacement image according to a mapping relationship between the original triangular area and the target triangular area.

### Claim 6 (depends on 1)

The method according to claim 1, further comprising:
determining, according to the posture parameter, a target area where the target part is located in the first image,
wherein fusing the second replacement image to the target part in the first image to obtain the second image comprises:
fusing the second replacement image to the target area in the first image to obtain the second image.

### Claim 7 (depends on 6)

The method according to claim 6, wherein fusing the second replacement image to the target area in the first image to obtain the second image comprises:
setting all pixel values in the target area in the first image to be a default pixel value; and replacing the default pixel value at each position in the target area in the first image with a respective pixel value at a same position in the second replacement image; or
setting transparency in the target area in the first image to be a default transparency;
and replacing each of the pixel values in the target area in the first image with a respective pixel value at a same position in the second replacement image.

### Claim 8

An apparatus for image processing, comprising:
a memory; and
a processor, connected to the memory, and configured to execute computer-executable instructions stored in the memory to:
acquire a first replacement image of a target part at a first posture;
determine a posture parameter of the target part at a second posture in a first image;
transform the first replacement image into a second replacement image corresponding to the second posture according to the posture parameter; and
fuse the second replacement image to the target part in the first image to obtain a second image.

### Claim 9 (depends on 8)

The apparatus according to claim 8, wherein in transforming the first replacement image into the second replacement image corresponding to the second posture according to the posture parameter, the processor is configured to execute the computer-executable instructions stored in the memory to:
acquire coordinates of each of a plurality of first key points of the target part in the first replacement image;
determine, from the first replacement image based on coordinates of the plurality of first key points, at least one original polygonal area enclosed by a group of first key points among the plurality of first key points; and
deform the at least one original polygonal area based on the posture parameter to obtain the second replacement image.

### Claim 10 (depends on 8)

The apparatus according to claim 8, wherein in determining the posture parameter of the target part at the second posture in the first image, the processor is configured to execute the computer-executable instructions stored in the memory to:
perform key point detection for the target part in the first image to obtain coordinates of each of a plurality of key points of the target part in the first image; and
determine the posture parameter of the target part according to coordinates of the plurality of key points of the target part in the first image.

### Claim 11 (depends on 8)

The apparatus according to claim 8, wherein the target part comprises an abdomen; and the processor is configured to execute the computer-executable instructions stored in the memory to:
acquire coordinates of each of at least three types of key points of the abdomen in the first image, wherein the at least three types of key points comprise: at least two first edge key points, at least two second edge key points and at least two central-axis key points, the at least two first edge key points are distributed at a different side of one of the at least two central-axis key points compared with the at least two second edge key points, and positions of the at least three types of key points are configured to represent the posture parameter of the target part.

### Claim 12 (depends on 11)

The apparatus according to claim 11, wherein in transforming the first replacement image into the second replacement image corresponding to the second posture according to the posture parameter, the processor is configured to execute the computer-executable instructions stored in the memory to:
obtain a target triangular area according to a triangular area formed by three adjacent key points among the at least three types of key points;
obtain, according to coordinates of a plurality of first key points acquired from the first replacement image, an original triangular area enclosed by three adjacent first key points among the plurality of first key points, wherein the plurality of first key points and the at least three types of key points are all key points of the target part; and
transform the first replacement image into the second replacement image according to a mapping relationship between the original triangular area and the target triangular area.

### Claim 13 (depends on 8)

The apparatus according to claim 8, wherein the processor is configured to execute the computer-executable instructions stored in the memory to:
determine, according to the posture parameter, a target area where the target part is located in the first image, and
fuse the second replacement image to the target area in the first image to obtain the second image.

### Claim 14 (depends on 13)

The apparatus according to claim 13, wherein in fusing the second replacement image to the target area in the first image to obtain the second image, the processor is configured to execute computer-executable instructions stored in the memory to:
set all pixel values in the target area in the first image to be a default pixel value; and replace the default pixel value at each position in the target area in the first image with a respective pixel value at a same position in the second replacement image; or
set transparency in the target area in the first image to be a default transparency; and replace each of the pixel values in the target area in the first image with a respective pixel value at a same position in the second replacement image.

### Claim 15

A non-transitory computer storage medium having computer-executable instructions stored thereon, wherein the computer-executable instructions, when executed by a processor, implement a method for image processing, the method comprising:
acquiring a first replacement image of a target part at a first posture;
determining a posture parameter of the target part at a second posture in a first image;
transforming the first replacement image into a second replacement image corresponding to the second posture according to the posture parameter; and
fusing the second replacement image to the target part in the first image to obtain a second image.

### Claim 16 (depends on 15)

The non-transitory computer storage medium according to claim 15, wherein transforming the first replacement image into the second replacement image corresponding to the second posture according to the posture parameter comprises:
acquiring coordinates of each of a plurality of first key points of the target part in the first replacement image;
determining, from the first replacement image based on coordinates of the plurality of first key points, at least one original polygonal area enclosed by a group of first key points among the plurality of first key points; and
deforming the at least one original polygonal area based on the posture parameter to obtain the second replacement image.

### Claim 17 (depends on 15)

The non-transitory computer storage medium according to claim 15, wherein determining the posture parameter of the target part at the second posture in the first image comprises:
performing key point detection for the target part in the first image to obtain coordinates of each of a plurality of key points of the target part in the first image; and
determining the posture parameter of the target part according to coordinates of the plurality of key points of the target part in the first image.

### Claim 18 (depends on 15)

The non-transitory computer storage medium according to claim 15, wherein the target part comprises an abdomen; and
determining the posture parameter of the target part at the second posture in the first image comprises:
acquiring coordinates of each of at least three types of key points of the abdomen in the first image, wherein the at least three types of key points comprise: at least two first edge key points, at least two second edge key points and at least two central-axis key points, the at least two first edge key points are distributed at a different side of one of the at least two central-axis key points compared with the at least two second edge key points, and positions of the at least three types of key points are configured to represent the posture parameter of the target part.

### Claim 19 (depends on 18)

The non-transitory computer storage medium according to claim 18, wherein transforming the first replacement image into the second replacement image corresponding to the second posture according to the posture parameter comprises:
obtaining a target triangular area according to a triangular area formed by three adjacent key points among the at least three types of key points;
obtaining, according to coordinates of a plurality of first key points acquired from the first replacement image, an original triangular area enclosed by three adjacent first key points among the plurality of first key points, wherein the plurality of first key points and the at least three types of key points are all key points of the target part; and
transforming the first replacement image into the second replacement image according to a mapping relationship between the original triangular area and the target triangular area.

### Claim 20 (depends on 15)

The non-transitory computer storage medium according to claim 15, wherein the method further comprises:
determining, according to the posture parameter, a target area where the target part is located in the first image,
wherein fusing the second replacement image to the target part in the first image to obtain the second image comprises:
fusing the second replacement image to the target area in the first image to obtain the second image.
