# US 12,002,183 B2 · Image scaling method and apparatus thereof

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

- Number: US 12,002,183 B2
- Document ID: US12002183B2
- Status: Granted
- Kind: B2
- Application number: 17/676,605
- Filed: 2022-02-21
- Published: 2023-06-01
- Granted: 2024-06-04
- Earliest claimed: 2021-11-26
- Assignees: Glenfly Tech Co., Ltd.
- Applicants: Glenfly Tech Co., Ltd.
- Inventors: Xiaofei Wang; Yuan Jiang
- Web page: https://patentgrep.com/patent/US12002183B2

## CPC

- G06T 3/4023: based on decimating pixels or lines of pixels; based on inserting pixels or lines of pixels
- G06T 3/4007: based on interpolation, e.g. bilinear interpolation (image demosaicing G06T3/4015; edge-driven or edge-based scaling G06T3/403)
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL

## Abstract

The present disclosure relates to an image scaling method and an apparatus thereof. The method includes: for at least one interpolation pixel in a source image, grouping at least two adjacent pixels of the interpolation pixel to obtain adjacent pixel sets; no intersection existing between the adjacent pixel sets; determining, based on position relationships between the interpolation pixel and regions formed by the adjacent pixel sets, virtual interpolation pixels corresponding to the interpolation pixel in the regions formed by the adjacent pixel sets respectively; calculating corresponding pixel sampling values of the virtual interpolation pixels in the source image according to a preset bilinear interpolation algorithm respectively; and generating theoretical pixel values corresponding to the interpolation pixel based on the pixel sampling values corresponding to the virtual interpolation pixels; the theoretical pixel values being configured to perform image scaling on the source image. The processing efficiency of the image scaling can be improved with the method.

## Claims

### Claim 1

An image scaling method, comprising:
for at least one interpolation pixel in a source image, grouping at least two adjacent pixels of the interpolation pixel to obtain adjacent pixel sets; no intersection existing between the adjacent pixel sets;
determining, based on position relationships between the interpolation pixel and regions formed by the adjacent pixel sets, virtual interpolation pixels corresponding to the interpolation pixel in the regions formed by the adjacent pixel sets respectively;
calculating corresponding pixel sampling values of the virtual interpolation pixels in the source image according to a preset bilinear interpolation algorithm respectively; and
generating theoretical pixel values corresponding to the interpolation pixel based on the pixel sampling values corresponding to the virtual interpolation pixels; the theoretical pixel values being configured to perform image scaling on the source image.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the determining, based on position relationships between the interpolation pixel and regions formed by the adjacent pixel sets, virtual interpolation pixels corresponding to the interpolation pixel in the regions formed by the adjacent pixel sets respectively comprises:
acquiring fractional parts of pixel coordinates of the interpolation pixel; the fractional parts being configured to represent the position relationships between the interpolation pixel and the regions formed by the adjacent pixel sets;
calculating weights of adjacent pixels in the adjacent pixel sets in at least two directions according to the fractional parts based on a preset bicubic interpolation algorithm; and
determining, based on the weights of the adjacent pixels in the adjacent pixel sets in the at least two directions, the virtual interpolation pixels corresponding to the interpolation pixel in the regions formed by the adjacent pixel sets.

### Claim 3 (depends on 1)

The method according to claim 1, wherein the determining, based on position relationships between the interpolation pixel and regions formed by the adjacent pixel sets, virtual interpolation pixels corresponding to the interpolation pixel in the regions formed by the adjacent pixel sets respectively comprises:
acquiring fractional parts of pixel coordinates of the interpolation pixel; the fractional parts being configured to represent the position relationships between the interpolation pixel and the regions formed by the adjacent pixel sets; and
querying a first pre-established look-up table for virtual interpolation pixels corresponding to coordinates formed by the fractional parts as the virtual interpolation pixels of the interpolation pixel; wherein a first mapping relationship between different preset coordinates and different virtual interpolation pixels is recorded in the first look-up table.

### Claim 4 (depends on 3)

The method according to claim 3, wherein the first look-up table is a first texture image, the first texture image is an image generated by fitting the first mapping relationship, and the querying a first pre-established look-up table for virtual interpolation pixels corresponding to coordinates formed by the fractional parts as the virtual interpolation pixels of the interpolation pixel comprises:
performing bilinear interpolation on the first texture image by using the coordinates formed by the fractional parts, to obtain first interpolation results corresponding to the coordinates formed by the fractional parts; and
taking the first interpolation results corresponding to the coordinates formed by the fractional parts as the virtual interpolation pixels of the interpolation pixel.

### Claim 5 (depends on 1)

The method according to claim 1, wherein the generating theoretical pixel values corresponding to the interpolation pixel based on the pixel sampling values corresponding to the virtual interpolation pixels comprises:
acquiring, based on the position relationships between the interpolation pixel and the regions formed by the adjacent pixel sets, grouping weights corresponding to the adjacent pixel sets; and
weighting and summing the pixel sampling values corresponding to the virtual interpolation pixels according to the grouping weights corresponding to the adjacent pixel sets, to obtain the theoretical pixel values corresponding to the interpolation pixel.

### Claim 6 (depends on 5)

The method according to claim 5, wherein the acquiring, based on the position relationships between the interpolation pixel and the regions formed by the adjacent pixel sets, grouping weights corresponding to the adjacent pixel sets comprises:
acquiring fractional parts of pixel coordinates of the interpolation pixel; the fractional parts being configured to represent the position relationships between the interpolation pixel and the regions formed by the adjacent pixel sets;
calculating weights of adjacent pixels in the adjacent pixel sets in at least two directions according to the fractional parts based on a preset bicubic interpolation algorithm; and
determining the grouping weights corresponding to the adjacent pixel set according to the weights of the adjacent pixels in the adjacent pixel sets in the at least two directions.

### Claim 7 (depends on 5)

The method according to claim 5, wherein the acquiring, based on the position relationships between the interpolation pixel and the regions formed by the adjacent pixel sets, grouping weights corresponding to the adjacent pixel sets comprises:
acquiring fractional parts of pixel coordinates of the interpolation pixel; the fractional parts being configured to represent the position relationships between the interpolation pixel and the regions formed by the adjacent pixel sets; and
querying a second pre-established look-up table for grouping weights corresponding to coordinates formed by the fractional parts, to obtain the grouping weights corresponding to the adjacent pixel sets; wherein a second mapping relationship between different preset coordinates and different grouping weights is recorded in the second look-up table.

### Claim 8 (depends on 7)

The method according to claim 7, wherein the second look-up table is a second texture image, the second texture image is an image generated by fitting the second mapping relationship, and the querying a second pre-established look-up table for grouping weights corresponding to coordinates formed by the fractional parts, to obtain the grouping weights corresponding to the adjacent pixel sets comprises:
performing bilinear interpolation on the second texture image by using the coordinates formed by the fractional parts, to obtain second interpolation results corresponding to the coordinates formed by the fractional parts; and
determining the second interpolation results corresponding to the coordinates formed by the fractional parts as the grouping weights corresponding to the adjacent pixel sets.

### Claim 9

An image scaling apparatus, comprising:
a grouping module configured to, for at least one interpolation pixel in a source image, group at least two adjacent pixels of the interpolation pixel to obtain adjacent pixel sets; no intersection existing between the adjacent pixel sets;
a determination module configured to determine, based on position relationships between the interpolation pixel and regions formed by the adjacent pixel sets, virtual interpolation pixels corresponding to the interpolation pixel in the regions formed by the adjacent pixel sets respectively;
a sampling module configured to calculate corresponding pixel sampling values of the virtual interpolation pixels in the source image according to a preset bilinear interpolation algorithm respectively; and
a generation module configured to generate theoretical pixel values corresponding to the interpolation pixel based on the pixel sampling values corresponding to the virtual interpolation pixels; the theoretical pixel values being configured to perform image scaling on the source image.

### Claim 10 (depends on 9)

The apparatus according to claim 9, wherein the determination module is specifically configured to acquire fractional parts of pixel coordinates of the interpolation pixel; the fractional parts being configured to represent the position relationships between the interpolation pixel and the regions formed by the adjacent pixel sets; calculate weights of adjacent pixels in the adjacent pixel sets in at least two directions according to the fractional parts based on a preset bicubic interpolation algorithm; and determine, based on the weights of the adjacent pixels in the adjacent pixel sets in the at least two directions, the virtual interpolation pixels corresponding to the interpolation pixel in the regions formed by the adjacent pixel sets.

### Claim 11 (depends on 9)

The apparatus according to claim 9, wherein the determination module is specifically configured to acquire fractional parts of pixel coordinates of the interpolation pixel; the fractional parts being configured to represent the position relationships between the interpolation pixel and the regions formed by the adjacent pixel sets; and query a first pre-established look-up table for virtual interpolation pixels corresponding to coordinates formed by the fractional parts as the virtual interpolation pixels of the interpolation pixel; wherein a first mapping relationship between different preset coordinates and different virtual interpolation pixels is recorded in the first look-up table.

### Claim 12 (depends on 11)

The apparatus according to claim 11, wherein the first look-up table is a first texture image, the first texture image is an image generated by fitting the first mapping relationship, and the determination module is specifically configured to perform bilinear interpolation on the first texture image by using the coordinates formed by the fractional parts, to obtain first interpolation results corresponding to the coordinates formed by the fractional parts; and take the first interpolation results corresponding to the coordinates formed by the fractional parts as the virtual interpolation pixels of the interpolation pixel.

### Claim 13 (depends on 9)

The apparatus according to claim 9, wherein the generation module is specifically configured to acquire, based on the position relationships between the interpolation pixel and the regions formed by the adjacent pixel sets, grouping weights corresponding to the adjacent pixel sets; and weight and sum the pixel sampling values corresponding to the virtual interpolation pixels according to the grouping weights corresponding to the adjacent pixel sets, to obtain the theoretical pixel values corresponding to the interpolation pixel.

### Claim 14 (depends on 13)

The apparatus according to claim 13, wherein the generation module is specifically configured to acquire fractional parts of pixel coordinates of the interpolation pixel; the fractional parts being configured to represent the position relationships between the interpolation pixel and the regions formed by the adjacent pixel sets; calculate weights of adjacent pixels in the adjacent pixel sets in at least two directions according to the fractional parts based on a preset bicubic interpolation algorithm; and determine the grouping weights corresponding to the adjacent pixel set according to the weights of the adjacent pixels in the adjacent pixel sets in the at least two directions.

### Claim 15 (depends on 13)

The apparatus according to claim 13, wherein the generation module is specifically configured to acquire fractional parts of pixel coordinates of the interpolation pixel; the fractional parts being configured to represent the position relationships between the interpolation pixel and the regions formed by the adjacent pixel sets; and query a second pre-established look-up table for grouping weights corresponding to coordinates formed by the fractional parts, to obtain the grouping weights corresponding to the adjacent pixel sets; wherein a second mapping relationship between different preset coordinates and different grouping weights is recorded in the second look-up table.

### Claim 16 (depends on 15)

The apparatus according to claim 15, wherein the second look-up table is a second texture image, the second texture image is an image generated by fitting the second mapping relationship, and the generation module is specifically configured to perform bilinear interpolation on the second texture image by using the coordinates formed by the fractional parts, to obtain second interpolation results corresponding to the coordinates formed by the fractional parts; and determine the second interpolation results corresponding to the coordinates formed by the fractional parts as the grouping weights corresponding to the adjacent pixel sets.
