# US 2018/0322609 A1 · Method and apparatus for storing image in texture memory

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

- Number: US 2018/0322609 A1
- Document ID: US20180322609A1
- Status: Published application
- Kind: A1
- Application number: 15/958,989
- Filed: 2018-04-20
- Published: 2018-11-08
- Earliest claimed: 2015-10-22
- Assignees: Alibaba Group Holding Limited
- Inventors: Zhenjiang SHAO; Cun Chen
- Web page: https://patentgrep.com/patent/US20180322609A1

## CPC

- G06T 1/60: Memory management
- G06T 1/20: Processor architectures; Processor configuration, e.g. pipelining
- G06T 7/11: Region-based segmentation
- G06T 7/13: Edge detection
- G06T 2207/20021: Dividing image into blocks, subimages or windows
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL

## Abstract

A method including acquiring dimension information of an image; determining dimensions of texture memory corresponding to the image based on the dimension information of the image; and dividing the image into multiple image blocks based on the dimensions of the texture memory, and storing the multiple image blocks obtained after the division in the texture memory according to a preset storage rule. The methods and apparatuses for storing an image in texture memory save the memory capacity and increase the image processing speed.

## Claims

### Claim 1

A method comprising:
acquiring dimension information of an image;
determining dimensions of texture memory corresponding to the image based on the dimension information of the image; and
dividing the image into multiple image blocks based on the dimensions of the texture memory.

### Claim 2 (depends on 1)

The method of claim 1, wherein the dimension information of the image comprises: a first dimension in a first direction and a second dimension in a second direction, the first direction and the second direction being orthogonal directions.

### Claim 3 (depends on 2)

The method of claim 2, wherein the first direction comprises a horizontal direction or a vertical direction.

### Claim 4 (depends on 1)

The method of claim 1, wherein:
the dimensions of the texture memory comprise a first memory dimension in the first direction and a second memory dimension in the second direction of the texture memory;
the first memory dimension is ½ of a value that is greater than or equal to the first dimension and that is a power of 2; and
the second memory dimension is a value that is greater than or equal to the second dimension and that is a power of 2.

### Claim 5 (depends on 4)

The method of claim 4, wherein:
the first memory dimension is ½ of a minimum value that is greater than or equal to the first dimension and that is a power of 2; and
the second memory dimension is a minimum value that is greater than or equal to the second dimension and that is a power of 2.

### Claim 6 (depends on 4)

The method of claim 4, wherein the dividing the image into the multiple image blocks based on the dimensions of the texture memory comprises:
dividing the image in the first direction to obtain at least three image blocks, the at least three image blocks obtained after the dividing corresponding to three image regions including a first image region, a second image region, and a third image region respectively, the first image region and the third image region corresponding to a first image block and a third image block at two ends of the first direction after the dividing of the image, the second image region corresponding to one or more image blocks located between the first image region and the second image region after the dividing of the image, dimension values of the first image block and the third image block in the first direction being ½ of the first memory dimension of the texture memory; and
dividing the image block of the second image region according to a first division rule to obtain multiple image blocks after the secondary division.

### Claim 7 (depends on 6)

The method of claim 6, wherein the dividing the image block of the second image region according to the first division rule comprises:
calculating a minimum number of divisions of the image block of the second image region in the second direction; and
dividing the image block of the second image region in the second direction according to the calculated minimum number of divisions.

### Claim 8 (depends on 7)

The method of claim 7, wherein the storing the multiple image blocks obtained after the dividing in the texture memory according to the preset storage rule further comprises:
storing image blocks obtained after the secondary division of the image block of the second image region in the rest of the texture memory, wherein
the image blocks obtained after the secondary division of the image block of the second image region are stored next to the first image block and the third image block, and are arranged and stored along the first direction.

### Claim 9 (depends on 7)

The method of claim 7, wherein after the dividing the image block of the second image region in the second direction, the method further comprises:
calculating whether a cumulative dimension value of the image blocks obtained after the secondary division in the second direction is greater than a dimension value of a remaining portion of the texture memory in the second direction; and
in response to a positive result, dividing a last image block obtained after the secondary division in the first direction.

### Claim 10 (depends on 7)

The method of claim 7, wherein the calculating the minimum number of divisions of the image block of the second image region in the second direction comprises:
determining a maximum value of the divided image in the second direction; and
calculating the minimum number of divisions of the block of the second image region in the second direction according to a dimension value of the image block of the second image region in the second direction and the maximum dimension value of the divided image in the second direction.

### Claim 11 (depends on 10)

The method of claim 10, wherein the calculating the minimum number of divisions of the block of the second image region in the second direction comprise:
calculating a ratio of the dimension value of the image block of the second image region in the second direction to the maximum dimension value of the divided image in the second direction, the minimum number of divisions being an integer greater than the ratio.

### Claim 12 (depends on 10)

The method of claim 10, wherein the maximum dimension value of the divided image in the second direction is equal to a dimension value of a remaining portion of the texture memory in the second direction.

### Claim 13 (depends on 10)

The method of claim 10, wherein the maximum dimension value of the divided image in the second direction is equal to a dimension value of the remaining portion of the texture memory in the second direction minus an edge pixel value in the second direction, the edge pixel value in the second direction being equal to a number of division edges of the divided image in the second direction.

### Claim 14 (depends on 6)

The method of claim 6, further comprising calculating texture coordinates of the multiple image blocks obtained after the dividing in the texture memory.

### Claim 15 (depends on 1)

The method of claim 1, further comprising storing the multiple image blocks obtained after the dividing in the texture memory according to a preset storage rule.

### Claim 16 (depends on 15)

The method of claim 15, wherein the storing the multiple image blocks obtained after the dividing in the texture memory according to the preset storage rule comprises storing a first image block and a third image block in a first direction along an edge of the texture memory.

### Claim 17

An apparatus comprising:
one or more processors; and
one or more memories storing thereon computer-readable instructions that, when executed by the one or more processors, cause the one or more processors to perform acts comprising:
acquiring dimension information of an image, the dimension information comprising a first dimension in a first direction and a second dimension in a second direction of the image;
determining dimensions of texture memory corresponding to the image based on the dimension information of the image;
dividing the image into multiple image blocks based on the dimensions of the texture memory.

### Claim 18 (depends on 17)

The apparatus of claim 17, wherein the acts further comprise storing the multiple image blocks obtained after a division in the texture memory according to a preset storage rule.

### Claim 19 (depends on 18)

The apparatus of claim 18, wherein:
the dimensions of the texture memory comprise a first memory dimension in the first direction and a second memory dimension in the second direction of the texture memory;
the first memory dimension is ½ of a value that is greater than or equal to the first dimension and that is a power of 2; and
the second memory dimension is a value that is greater than or equal to the second dimension and that is a power of 2.

### Claim 20

One or more memories storing thereon computer-readable instructions that, when executed by one or more processors, cause the one or more processors to perform acts comprising:
acquiring dimension information of an image;
determining dimensions of texture memory corresponding to the image based on the dimension information of the image;
dividing the image into multiple image blocks based on the dimensions of the texture memory; and
storing the multiple image blocks obtained after the dividing in the texture memory according to a preset storage rule.
