# US 11,328,387 B1 · System and method for image scaling while maintaining aspect ratio of objects within image

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

- Number: US 11,328,387 B1
- Document ID: US11328387B1
- Status: Granted
- Kind: B1
- Application number: 17/179,859
- Filed: 2021-02-19
- Granted: 2022-05-10
- Earliest claimed: 2020-12-17
- Assignees: Wipro Limited
- Applicants: Wipro Limited
- Inventors: Vijay Kumar Kodavalla; Venumadhav Chittapragada Hanumantharao
- Web page: https://patentgrep.com/patent/US11328387B1

## CPC

- G06T 3/4023: based on decimating pixels or lines of pixels; based on inserting pixels or lines of pixels
- G06T 3/4084: in the transform domain, e.g. fast Fourier transform [FFT] domain scaling
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL

## Abstract

The disclosure relates to method and system for image scaling. The method includes determining a nature of image scaling required to be performed on an input image based on a vertical scaling ratio and a horizontal scaling ratio and includes determining if the image scaling is an upscaling or a downscaling, a symmetric scaling or an asymmetric scaling. The method further includes determining an overall scaling ratio based on a lower or an equal of the vertical scaling ratio and the horizontal scaling ratio. The method further includes scaling an input image to a target image using a polyphase finite impulse response (FIR) scaling filter based on the nature of the image scaling, the overall scaling ratio, and a structure of the polyphase FIR scaling filter. The scaling includes dynamically performing at least one of duplication of lines, addition of filler lines, duplication of pixels, and addition of filler pixels.

## Claims

### Claim 1

A method of image scaling, the method comprising:
determining, by a system for image scaling, a nature of image scaling required to be performed on an input image based on a vertical scaling ratio and a horizontal scaling ratio, wherein determining the nature of image scaling comprises:
determining if the image scaling is an upscaling or a downscaling, and
determining if the image scaling is a symmetric scaling or an asymmetric scaling;
determining, by the system, an overall scaling ratio based on a lower or an equal of the vertical scaling ratio and the horizontal scaling ratio;
scaling, by the system, an input image to a target image using a polyphase finite impulse response (FIR) scaling filter based on the nature of the image scaling, the overall scaling ratio, and a structure of the polyphase FIR scaling filter, wherein the scaling comprises dynamically performing at least one of:
duplication of lines at a start or at an end of the input image;
addition of filler lines at the end of the input image;
duplication of pixels at a start or at an end of each line of the input image; and
addition of filler pixels at the end of the each line of the input image.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
determining, by the system, the vertical scaling ratio and the horizontal scaling ratio based on an input image resolution and a target image resolution.

### Claim 3 (depends on 1)

The method of claim 1, wherein the structure of the polyphase FIR scaling filter comprises:
a number of filter taps in a polyphase FIR vertical scaling filter; and
a number of filter taps in a polyphase FIR horizontal scaling filter.

### Claim 4 (depends on 3)

The method of claim 3, wherein the duplication of lines is dynamically determined based on an input image resolution, a target image resolution, and the number of filter taps in the polyphase FIR vertical scaling filter, in case of the upscaling or the downscaling.

### Claim 5 (depends on 3)

The method of claim 3, wherein the addition of filler lines is dynamically determined based on an input image resolution, a target image resolution, and the number of filter taps in the polyphase FIR vertical scaling filter, in case of the upscaling.

### Claim 6 (depends on 3)

The method of claim 3, wherein the duplication of pixels is dynamically determined based on an input image resolution, a target image resolution, and the number of filter taps in the polyphase FIR horizontal scaling filter, in case of the upscaling or the downscaling.

### Claim 7 (depends on 3)

The method of claim 3, wherein the addition of filler pixels is dynamically determined based on an input image resolution, a target image resolution, and the number of filter taps in the polyphase FIR horizontal scaling filter, in case of the upscaling.

### Claim 8 (depends on 1)

The method of claim 1, wherein scaling comprises:
scaling, by the system, an input image to an interim target image, in case of the asymmetric scaling; and
generating, by the system, the target image by processing the interim target image, wherein the processing comprises one of:
adding a number of filler lines at a start or at an end of the interim target image, when the overall scaling ratio is based on the horizontal scaling ratio; and
adding a number of filler pixels at a start or at an end of each line of the interim target image, when the overall scaling ratio is based on the vertical scaling ratio.

### Claim 9 (depends on 8)

The method of claim 8, wherein the number of filler lines or the number of filler pixels is dynamically determined based on an interim target image resolution, a target image resolution, and a difference between the horizontal scaling ratio and the vertical scaling ratio.

### Claim 10

A system for image scaling, the system comprising:
a processor and a memory communicatively coupled to the processor, wherein the memory stores processor-executable instructions, which on execution, cause the processor to:
determine a nature of image scaling required to be performed on an input image based on a vertical scaling ratio and a horizontal scaling ratio, wherein determining the nature of image scaling comprises:
determining if the image scaling is an upscaling or a downscaling, and
determining if the image scaling is a symmetric scaling or an asymmetric scaling;
determine an overall scaling ratio based on a lower or an equal of the vertical scaling ratio and the horizontal scaling ratio;
scale an input image to a target image using a polyphase finite impulse response (FIR) scaling filter based on the nature of the image scaling, the overall scaling ratio, and a structure of the polyphase FIR scaling filter, wherein the scaling comprises dynamically performing at least one of:
duplication of lines at a start or at an end of the input image;
addition of filler lines at the end of the input image;
duplication of pixels at a start or at an end of each line of the input image; and
addition of filler pixels at the end of the each line of the input image.

### Claim 11 (depends on 10)

The system of claim 10, wherein the processor-executable instructions, on execution, further cause the processor to:
determine the vertical scaling ratio and the horizontal scaling ratio based on an input image resolution and a target image resolution.

### Claim 12 (depends on 10)

The system of claim 10, wherein the structure of the polyphase FIR scaling filter comprises:
a number of filter taps in a polyphase FIR vertical scaling filter; and
a number of filter taps in a polyphase FIR horizontal scaling filter.

### Claim 13 (depends on 12)

The system of claim 12, wherein the duplication of lines is dynamically determined based on an input image resolution, a target image resolution, and the number of filter taps in the polyphase FIR vertical scaling filter, in case of the upscaling or the downscaling.

### Claim 14 (depends on 12)

The system of claim 12, wherein the addition of filler lines is dynamically determined based on an input image resolution, a target image resolution, and the number of filter taps in the polyphase FIR vertical scaling filter, in case of the upscaling.

### Claim 15 (depends on 12)

The system of claim 12, wherein the duplication of pixels is dynamically determined based on an input image resolution, a target image resolution, and the number of filter taps in the polyphase FIR horizontal scaling filter, in case of the upscaling or the downscaling.

### Claim 16 (depends on 12)

The system of claim 12, wherein the addition of filler pixels is dynamically determined based on an input image resolution, a target image resolution, and the number of filter taps in the polyphase FIR horizontal scaling filter, in case of the upscaling.

### Claim 17 (depends on 10)

The system of claim 10, wherein scaling comprises:
scaling an input image to an interim target image, in case of the asymmetric scaling; and
generating the target image by processing the interim target image, wherein the processing comprises one of:
adding a number of filler lines at a start or at an end of the interim target image, when the overall scaling ratio is based on the horizontal scaling ratio; and
adding a number of filler pixels at a start or at an end of each line of the interim target image, when the overall scaling ratio is based on the vertical scaling ratio.

### Claim 18 (depends on 17)

The system of claim 17, wherein the number of filler lines or the number of filler pixels is dynamically determined based on an interim target image resolution, a target image resolution, and a difference between the horizontal scaling ratio and the vertical scaling ratio.

### Claim 19

A non-transitory computer-readable storage medium storing computer-executable instructions for:
determining a nature of image scaling required to be performed on an input image based on a vertical scaling ratio and a horizontal scaling ratio, wherein determining the nature of image scaling comprises:
determining if the image scaling is an upscaling or a downscaling, and
determining if the image scaling is a symmetric scaling or an asymmetric scaling;
determining an overall scaling ratio based on a lower or an equal of the vertical scaling ratio and the horizontal scaling ratio;
scaling an input image to a target image using a polyphase finite impulse response (FIR) scaling filter based on the nature of the image scaling, the overall scaling ratio, and a structure of the polyphase FIR scaling filter, wherein the scaling comprises dynamically performing at least one of:
duplication of lines at a start or at an end of the input image;
addition of filler lines at the end of the input image;
duplication of pixels at a start or at an end of each line of the input image; and
addition of filler pixels at the end of the each line of the input image.

### Claim 20 (depends on 19)

The non-transitory computer-readable storage medium of claim 19, wherein scaling comprises:
scaling an input image to an interim target image, in case of the asymmetric scaling; and
generating the target image by processing the interim target image, wherein the processing comprises one of:
adding a number of filler lines at a start or at an end of the interim target image, when the overall scaling ratio is based on the horizontal scaling ratio; and
adding a number of filler pixels at a start or at an end of each line of the interim target image, when the overall scaling ratio is based on the vertical scaling ratio.
