# US 2022/0292734 A1 · Water ripple effect implementing method and apparatus, electronic device, and computer readable storage medium

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

- Number: US 2022/0292734 A1
- Document ID: US20220292734A1
- Status: Published application
- Kind: A1
- Application number: 17/635,629
- Filed: 2020-08-04
- Published: 2022-09-15
- Earliest claimed: 2019-08-16
- Assignees: Beijing Bytedance Network Technology Co., Ltd.
- Applicants: Beijing Bytedance Network Technology Co., Ltd.
- Inventors: Jingye WANG
- Web page: https://patentgrep.com/patent/US20220292734A1

## CPC

- G06T 11/00: Two-dimensional [2D] image generation
- G06T 11/10: Texturing; Colouring; Generation of textures or colours (retouching, inpainting or scratch removal G06T5/77)
- G06T 11/40: Filling planar surfaces by adding surface attributes, e.g. adding colours or textures
- G06T 2207/10024: Color image
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL

## Abstract

A method and apparatus for implementing a water ripple effect, an electronic device, and a computer readable storage medium are provided. The method obtaining a current image frame in an original video; selecting a water ripple map corresponding to the current image frame from a pre-obtained water ripple map sequence; determining displacements of respective pixels in the water ripple map, and forming a displacement vector diagram by using the displacements of the pixels; determining coordinates of respective pixels in the current image frame based on the displacement vector diagram to obtain a first water ripple distortion image; and determining a water ripple effect image corresponding to the current image frame based on the first water ripple distortion image and the water ripple map.

## Claims

### Claim 1

A method for implementing a water ripple effect, comprising:
obtaining a current image frame in an original video;
selecting a water ripple map corresponding to the current image frame from a pre-obtained water ripple map sequence;
determining displacements of respective pixels in the water ripple map, and forming a displacement vector diagram by using the displacements of the pixels;
determining coordinates of respective pixels in the current image frame based on the displacement vector diagram to obtain a first water ripple distortion image; and
determining a water ripple effect image corresponding to the current image frame based on the first water ripple distortion image and the water ripple map.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the determining displacements of respective pixels in the water ripple map, and forming a displacement vector diagram by using the displacements of the pixels comprising:
traversing the pixels in the water ripple map, and using a traversed pixel among the pixels as a current pixel;
determining a preset image region that uses the current pixel as a reference point;
selecting a pixel in the preset image region as a target pixel;
determining a displacement of the current pixel based on the current pixel and the target pixel; and
forming the displacement vector diagram by using displacements of all current pixels that are traversed in the water ripple map.

### Claim 3 (depends on 2)

The method according to claim 2, wherein the determining a displacement of the current pixel based on the current pixel and the target pixel comprises:
determining first coordinates of the current pixel and second coordinate of the target pixel;
determining a first color value of the current pixel in a preset color channel and a second color value of the target pixel in the preset color channel; and
obtaining the displacement of the current pixel based on the first coordinates, the second coordinates, the first color value and the second color value.

### Claim 4 (depends on 3)

The method according to claim 3, wherein the obtaining the displacement of the current pixel based on the first coordinates, the second coordinates, the first color value and the second color value comprises:
obtaining a square of a distance between the current pixel and the target pixel based on the first coordinates and the second coordinates;
determining a relative displacement between the current pixel and the target pixel based on the first coordinates and the second coordinates;
calculating a difference between the second color value and the first color value; and
determining the displacement of the current pixel based on the square, the relative displacement and the difference.

### Claim 5 (depends on 4)

The method according to claim 4, wherein the determining the displacement of the current pixel based on the square, the relative displacement and the difference comprises:
determining the displacement of the current pixel by using the following equation:
V
p
=
∑
q
∈
w
α
⁡
(
L
q
-
L
p
)
⁢
1

q
-
p

⁢
V
pq
,
wherein p represents the coordinates of the current pixel, Vp represents the displacement of the current pixel, q represents the coordinates of the target pixel, Vpq represents the relative displacement, w represents the preset image region, α represents a parameter, ∥⋅∥ represents obtaining an absolute value, and Σ represents summation.

### Claim 6 (depends on 1)

The method according to claim 1, wherein the determining a water ripple effect image corresponding to the current image frame based on the first water ripple distortion image and the water ripple map comprises:
filtering the first water ripple distortion image to obtain a second water ripple distortion image having a preset tone;
processing a color of the water ripple map to obtain a colored water ripple map; and
determining the water ripple effect image corresponding to the current image frame based on the second water ripple distortion image and the colored water ripple map.

### Claim 7 (depends on 6)

The method according to claim 6, wherein the filtering the first water ripple distortion image to obtain a second water ripple distortion image having a preset tone comprises:
determining at least one color channel corresponding to each of pixels in the first water ripple distortion image; and
multiplying a color component of each of the at least one color channel by a preset coefficient, to obtain the second water ripple distorting image having the preset tone.

### Claim 8 (depends on 6)

The method according to claim 6, wherein the processing a color of the water ripple map to obtain a colored water ripple map comprising:
multiplying the water ripple map with a selected preset color to obtain the colored water ripple map.

### Claim 9 (depends on 6)

The method according to claim 6, wherein the determining the water ripple effect image corresponding to the current image frame based on the second water ripple distortion image and the colored water ripple map comprises:
multiplying and blending the second water ripple distortion image with the colored water ripple map to obtain the water ripple effect image corresponding to the current image frame.

### Claim 10

An apparatus for implementing a water ripple effect, comprising:
a memory configured to store non-transitory computer-readable instructions; and
a processor, configured to execute the computer-readable instructions, wherein the processor, when executing the computer-readable instructions, implements operations comprising:
obtaining a current image frame in an original video;
selecting a water ripple map corresponding to the current image frame from a pre-obtained water ripple map sequence;
determining displacements of respective pixels in the water ripple map, and forming a displacement vector diagram by using the displacements of the pixels;
determining coordinates of pixels in the current image frame according to the displacement vector diagram to obtain a first water ripple distortion image; and
determining a water ripple effect image corresponding to the current image frame based on the first water ripple distortion image and the water ripple map.

### Claim 11

(canceled)

### Claim 12

A non-transitory computer-readable storage medium storing non-transitory computer-readable instructions, the non-transitory computer-readable instructions, when executed by a computer, causing the computer to perform operations comprising:
obtaining a current image frame in an original video;
selecting a water ripple map corresponding to the current image frame from a pre-obtained water ripple map sequence;
determining displacements of respective pixels in the water ripple map, and forming a displacement vector diagram by using the displacements of the pixels;
determining coordinates of respective pixels in the current image frame based on the displacement vector diagram to obtain a first water ripple distortion image; and
determining a water ripple effect image corresponding to the current image frame based on the first water ripple distortion image and the water ripple map.

### Claim 13 (depends on 10)

The apparatus according to claim 10, wherein the processor, when executing the computer-readable instructions, implements operations comprising:
traversing the pixels in the water ripple map, and using a traversed pixel among the pixels as a current pixel;
determining a preset image region that uses the current pixel as a reference point;
selecting a pixel in the preset image region as a target pixel;
determining a displacement of the current pixel based on the current pixel and the target pixel; and
forming the displacement vector diagram by using displacements of all current pixels that are traversed in the water ripple map.

### Claim 14 (depends on 13)

The apparatus according to claim 13, wherein the processor, when executing the computer-readable instructions, implements operations comprising:
determining first coordinates of the current pixel and second coordinate of the target pixel;
determining a first color value of the current pixel in a preset color channel and a second color value of the target pixel in the preset color channel; and
obtaining the displacement of the current pixel based on the first coordinates, the second coordinates, the first color value and the second color value.

### Claim 15 (depends on 14)

The apparatus according to claim 14, wherein the processor, when executing the computer-readable instructions, implements operations comprising:
obtaining a square of a distance between the current pixel and the target pixel based on the first coordinates and the second coordinates;
determining a relative displacement between the current pixel and the target pixel based on the first coordinates and the second coordinates;
calculating a difference between the second color value and the first color value; and
determining the displacement of the current pixel based on the square, the relative displacement and the difference.

### Claim 16 (depends on 15)

The apparatus according to claim 15, wherein the processor, when executing the computer-readable instructions, implements operation comprising:
determining the displacement of the current pixel by using the following equation:
V
p
=
∑
q
∈
w
α
⁡
(
L
q
-
L
p
)
⁢
1

q
-
p

⁢
V
pq
,
wherein p represents the coordinates of the current pixel, Vp represents the displacement of the current pixel, q represents the coordinates of the target pixel, Vpq represents the relative displacement, w represents the preset image region, α represents a parameter, ∥⋅∥ represents obtaining an absolute value, and Σ represents summation.

### Claim 17 (depends on 10)

The apparatus according to claim 10, wherein the processor, when executing the computer-readable instructions, implements operations comprising:
filtering the first water ripple distortion image to obtain a second water ripple distortion image having a preset tone;
processing a color of the water ripple map to obtain a colored water ripple map; and
determining the water ripple effect image corresponding to the current image frame based on the second water ripple distortion image and the colored water ripple map.

### Claim 18 (depends on 17)

The apparatus according to claim 17, wherein the processor, when executing the computer-readable instructions, implements operations comprising:
determining at least one color channel corresponding to each of pixels in the first water ripple distortion image; and
multiplying a color component of each of the at least one color channel by a preset coefficient, to obtain the second water ripple distorting image having the preset tone.

### Claim 19 (depends on 17)

The apparatus according to claim 17, wherein the processor, when executing the computer-readable instructions, implements operation comprising:
multiplying the water ripple map with a selected preset color to obtain the colored water ripple map.

### Claim 20 (depends on 17)

The apparatus according to claim 17, wherein the processor, when executing the computer-readable instructions, implements operation comprising:
multiplying and blending the second water ripple distortion image with the colored water ripple map to obtain the water ripple effect image corresponding to the current image frame.
