# US 2023/0267624 A1 · Computing optical flow using semi-global matching

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

- Number: US 2023/0267624 A1
- Document ID: US20230267624A1
- Status: Published application
- Kind: A1
- Application number: 17/678,904
- Filed: 2022-02-23
- Published: 2023-08-24
- Earliest claimed: 2022-02-23
- Assignees: NVIDIA Corporation
- Applicants: NVIDIA Corporation
- Inventors: Raju Konda; Sampurnananda Mishra
- Web page: https://patentgrep.com/patent/US20230267624A1

## CPC

- G06T 7/248: {involving reference images or patches}
- G06T 5/50: using two or more images, e.g. averaging or subtraction
- G06T 5/60: using machine learning, e.g. neural networks
- G06T 5/70: Denoising; Smoothing
- G06T 7/13: Edge detection
- G06T 7/136: involving thresholding
- G06T 7/238: using non-full search, e.g. three-step search
- G06T 2207/10016: Video; Image sequence
- G06T 2207/10024: Color image
- G06T 2207/20081: Training; Learning
- G06T 2207/20084: Artificial neural networks [ANN]
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL

## Abstract

Apparatuses, systems, and techniques to determine optical flow. In at least one embodiment, a set of disparity values is used to determine optical flow between input and reference images. For each of a plurality of image regions of the input image, the set of disparity values may include disparity values for a plurality of directions intersecting the image region.

## Claims

### Claim 1

A method comprising:
obtaining an input image and a reference image, the input image comprising a plurality of image regions;
obtaining at least one penalty map comprising a set of penalty values for each of the plurality of image regions, the set of penalty values comprising, for each of the plurality of image regions, a penalty value for each of a plurality of directions intersecting the image region; and
generating an optical flow map for the input and reference images based at least in part on the at least one penalty map.

### Claim 2 (depends on 1)

The method of claim 1, wherein the at least one penalty map comprises first and second penalty maps,
the optical flow map is generated using a Semi-Global Matching (“SGM”) process comprising a first penalty value and a second penalty value to determine a cost for a particular one of the plurality of image regions, a particular disparity, and a particular one of the plurality of directions,
the first penalty value is obtained using the first penalty map for the particular image region and the particular direction, and
the second penalty value is obtained using the second penalty map for the particular image region and the particular direction.

### Claim 3 (depends on 2)

The method of claim 2, wherein the optical flow map is generated by:
determining a plurality of costs, at least one cost of the plurality of costs being determined for one of the plurality of image regions, one of a plurality of disparities, and one of the plurality of directions;
obtaining a plurality of accumulated costs for each unique pair of one of the plurality of image regions and one of the plurality of disparities by summing those of the plurality of costs determined for the unique pair;
selecting, for each of the plurality of image regions, a smallest one of the plurality of accumulated costs obtained for the image region, the smallest accumulated cost having been obtained for a selected one of the plurality of disparities; and
placing, for each of the plurality of image regions, a value based at least in part on the selected disparity in the optical flow map in a location corresponding to the image region.

### Claim 4 (depends on 1)

The method of claim 1, wherein obtaining the at least one penalty map comprises:
producing a denoised input image by denoising the input image,
producing an edge map by performing edge detection on the denoised input image, and
producing an object map by performing object detection on the denoised input image, the edge map, or both the denoised input image and the edge map.

### Claim 5 (depends on 4)

The method of claim 4, wherein the at least one penalty map comprises first and second penalty maps,
the first penalty map is determined based at least in part on the object map, and
the second penalty map is determined based at least in part on the edge map.

### Claim 6 (depends on 4)

The method of claim 4, wherein obtaining the at least one penalty map further comprises producing a thresholded edge map by performing a thresholding process on the edge map to remove any edges having a width below a threshold value,
the at least one penalty map comprises first and second penalty maps,
the first penalty map is determined based at least in part on the object map, and
the second penalty map is determined based at least in part on both the edge map and the thresholded edge map.

### Claim 7 (depends on 1)

The method of claim 1, wherein the plurality of image regions comprises at least one of a set of feature points or a set of pixels.

### Claim 8 (depends on 1)

The method of claim 1, wherein the input image comprises a plurality of pixels, and
the plurality of image regions comprises a subset of the plurality of pixels, the subset including fewer than all of the plurality of pixels.

### Claim 9

A system comprising:
one or more circuits to obtain a plurality of image regions from an input image, determine a set of penalty values for each of the plurality of image regions, and create an optical flow map for the input image and a reference image based at least in part on the set of penalty values determined for each of the plurality of image regions, the set of penalty values comprising, for each of the plurality of image regions, a penalty value for each of a plurality of directions intersecting the image region.

### Claim 10 (depends on 9)

The system of claim 9, further comprising:
upstream hardware connected to the one or more circuits, the upstream hardware providing the input image to the one or more circuits.

### Claim 11 (depends on 9)

The system of claim 9, wherein the one or more circuits comprise:
at least one processor; and
memory storing instructions that are executable by the at least one processor, and when executed by the at least one processor cause the at least one processor to obtain the plurality of image regions, determine the set of penalty values for at least one image region of the plurality of image regions, and create the optical flow map.

### Claim 12 (depends on 11)

The system of claim 11, wherein when the instructions are executed by the at least one processor, the instructions cause the at least one processor to generate the optical flow map by:
determining a plurality of costs for unique combinations of the plurality of image regions, a plurality of disparities between the input and reference images, and the plurality of directions;
obtaining a plurality of accumulated costs by summing those of the plurality of costs determined for each unique pair of one of the plurality of image regions and at least one of the plurality of disparities;
selecting, for at least one portion of one or more of the plurality of image regions, a smallest one of the plurality of accumulated costs obtained for the image region, the smallest accumulated cost having been obtained for a selected one of the plurality of disparities; and
placing, for each of the portion of the plurality of image regions, a value based at least in part on the selected disparity in the optical flow map in a location corresponding to the image region.

### Claim 13 (depends on 12)

The system of claim 12, wherein the one or more circuits are further to determine a particular one of the plurality of costs for a particular one of the unique combinations comprising a particular one of the plurality of image regions, a particular one of the plurality of disparities, and a particular one of the plurality of directions by:
adding a first one of the set of penalty values to a matching term when a first disparity metric value of the particular image region differs by at most a predetermined amount from a second disparity metric value of a neighboring one of the plurality of image regions along the particular direction; and
adding a second one of the set of penalty values to the matching term when the first disparity metric value differs by more than the predetermined amount from the second disparity metric value along the particular direction, the first penalty value being less than the second penalty value.

### Claim 14 (depends on 13)

The system of claim 13, wherein the one or more circuits are further to determine the particular cost equals the matching term when the first disparity metric value equals the second disparity metric value.

### Claim 15 (depends on 11)

The system of claim 11, wherein when the instructions are executed by the at least one processor, the instructions cause the at least one processor to denoise the input image to create a denoised input image, perform edge detection on the denoised input image to produce an edge map, and perform object detection on the denoised input image, the edge map, or both the denoised input image and the edge map to producing an object map.

### Claim 16 (depends on 15)

The system of claim 15, wherein the set of penalty values comprises a first set of penalty values and a different second set of penalty values,
each of the first set of penalty values is determined based at least in part on the object map, and
each of the second set of penalty values is determined based at least in part on the edge map.

### Claim 17 (depends on 15)

The system of claim 15, wherein when the instructions are executed by the at least one processor, the instructions cause the at least one processor to threshold the edge map to produce a thresholded edge map in which edges thinner than a threshold value have been removed,
the set of penalty values comprises a first set of penalty values and a different second set of penalty values,
each of the first set of penalty values is determined based at least in part on the object map, and
each of the second set of penalty values is determined based at least in part on both the edge map and the thresholded edge map.

### Claim 18 (depends on 11)

The system of claim 11, wherein the at least one processor comprises one or more parallel processing units.

### Claim 19 (depends on 11)

The system of claim 11, wherein when the instructions are executed by the at least one processor, the instructions cause the at least one processor to extract a set of feature points from the input image as the plurality of image regions.

### Claim 20 (depends on 11)

The system of claim 11, wherein when the instructions are executed by the at least one processor, the instructions cause the at least one processor to extract a set of pixels from the input image as the plurality of image regions.

### Claim 21 (depends on 20)

The system of claim 20, wherein the input image comprises a plurality of pixels, and the set of pixels comprises fewer than all of the plurality of pixels.

### Claim 22

One or more non-transitory processor-readable media comprising instructions that are executable by at least one processor, and when executed by the at least one processor causing the at least one processor to:
obtain a set of disparity values for each of a plurality of image regions in an input image, the set of disparity values comprising, for each of the plurality of image regions, a disparity value for each of a plurality of directions intersecting the image region; and
use the set of disparity values to create an optical flow map for the input image and a different reference image.

### Claim 23 (depends on 22)

The one or more non-transitory processor-readable media of claim 22,
wherein when the instructions are executed by the at least one processor, the instructions cause the at least one processor to generate the optical flow map by:
determining a plurality of costs for unique combinations of the plurality of image regions, a plurality of disparities between the input and reference images, and the plurality of directions;
obtaining a plurality of accumulated costs by summing those of the plurality of costs determined for each unique pair of one of the plurality of image regions and one of the plurality of disparities;
selecting, for each of at least a portion of the plurality of image regions, a smallest one of the plurality of accumulated costs obtained for the image region, the smallest accumulated cost having been obtained for a selected one of the plurality of disparities; and
storing, for each of the portion of the plurality of image regions, a value based at least in part on the selected disparity in the optical flow map in a location corresponding to the image region.

### Claim 24 (depends on 23)

The one or more non-transitory processor-readable media of claim 23, wherein when the instructions are executed by the at least one processor, the instructions cause the at least one processor to store the set of disparity values as first and second disparity maps, and to determine a particular one of the plurality of costs for a particular one of the unique combinations comprising a particular one of the plurality of image regions, a particular one of the plurality of disparities, and a particular one of the plurality of directions by:
obtaining first and second values from the first and second disparity maps, respectively;
adding the first value to a matching term when a first disparity metric value of the particular image region differs by at most a predetermined amount from a second disparity metric value of a neighboring one of the plurality of image regions along the particular direction; and
adding the second value to the matching term when the first disparity metric value differs by more than the predetermined amount from the second disparity metric value along the particular direction, the first disparity value being less than the second disparity value.

### Claim 25 (depends on 24)

The one or more non-transitory processor-readable media of claim 24, wherein the at least one processor is further to determine the particular cost equals the matching term when the first disparity metric value equals the second disparity metric value.

### Claim 26 (depends on 22)

The one or more non-transitory processor-readable media of claim 22, wherein when the instructions are executed by the at least one processor, the instructions cause the at least one processor to store the set of disparity values as first and second disparity maps, and the at least one processor obtains the set of disparity values for each of a plurality of image regions by:
denoising the input image to produce a denoised input image;
performing edge detection on the denoised input image to produce an edge map;
producing an object map by performing object detection on the denoised input image, the edge map, or both the denoised input image and the edge map;
assigning values to the first disparity map based at least in part on the object map; and
assigning values to the second disparity map based at least in part on the edge map.

### Claim 27 (depends on 22)

The one or more non-transitory processor-readable media of claim 22, wherein when the instructions are executed by the at least one processor, the instructions cause the at least one processor to store the set of disparity values as first and second disparity maps, and the at least one processor obtains the set of disparity values for each of a plurality of image regions by:
denoising the input image to produce a denoised input image;
performing edge detection on the denoised input image to produce an edge map;
performing object detection on the denoised input image, the edge map, or both the denoised input image and the edge map to produce an object map;
thresholding the edge map to remove any edges that are not thicker than a threshold value to produce a thresholded edge map;
assigning values to the first disparity map based at least in part on the object map, and
assigning values to the second disparity map based at least in part on the edge map and the thresholded edge map.

### Claim 28 (depends on 22)

The one or more non-transitory processor-readable media of claim 22, wherein when the instructions are executed by the at least one processor, the instructions cause the at least one processor to extract a set of feature points or a set of pixels from the input image as the plurality of image regions.
