IP Library Granted Patent US 12,731,364
Granted Patent B2
US 12,731,364 · App. 18/573,564 · Granted Sep 8, 2026

Image processing method and apparatus

Inventor: Lei Shi (Beijing, CN)
Assignee: Beijing Zitiao Network Technology Co., Ltd.
G06V10/25G06T3/40G06T7/40G06V10/54G06T2207/20132
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,731,364
App. No.
18/573,564
Granted
Sep 8, 2026
Kind
B2
Abstract

An image processing method and apparatus, relating to the technical field of image processing. The method comprises: calling an image acquisition device by means of an application program to obtain first image data; cropping the first image data to second image data, the ratio of the first image data being different from that of the second image data, the ratio of the first image data being a ratio supported by the image acquisition device, and the ratio of the second image data being a ratio supported by the application program; performing effect processing on the second image data; and performing first processing on the second image data subjected to effect processing, the first processing comprising at least one of displaying in an interface of the application program, encoding, and storing.

Claims (61)

1 . An image processing method, comprising:

calling an image acquisition device by an application program to obtain first image data;

adjusting a ratio to be used for second image data in response to a screen rotation angle being greater than or equal to a pre-set angle threshold;

cropping the first image data to the second image data, wherein a ratio of the first image data is different from a ratio of the second image data, the ratio of the first image data is a ratio supported by the image acquisition device, and the ratio of the second image data is a ratio supported by the application program;

performing effect processing on the second image data; and

performing first processing on the second image data subjected to the effect processing, wherein the first processing comprises at least one of displaying in an interface of the application program, encoding and storing.

2 . The method according to claim 1 , wherein cropping the first image data to the second image data comprises:

determining a target region in the first image data, wherein a ratio of the target region is equal to the ratio of the second image data; and

converting a texture of the target region from a first type to a second type to obtain the second image data constituted by the target region, wherein the converting comprises the cropping for the first image data, the first type is a texture type supported when the image acquisition device performs image displaying, and the second type is a texture type supported when the application program performs image displaying.

3 . The method according to claim 2 , wherein

in response to the ratio of the first image data being greater than the ratio of the second image data, a height of the target region is a height of the first image data;

in response to the ratio of the first image data being smaller than the ratio of the second image data, a width of the target region is a width of the first image data.

4 . The method according to claim 2 , wherein determining the target region in the first image data comprises:

determining key image information included in the first image data; and

determining a region including the key image information in the first image data as the target region.

5 . The method according to claim 1 , wherein before performing the first processing on the second image data subjected to the effect processing, the method further comprises:

determining a first angle according to the screen rotation angle, wherein a sum of the first angle and the screen rotation angle is 0 degrees or 360 degrees; and

transposing the second image data subjected to the effect processing according to the first angle.

6 . The method according to claim 1 , wherein before cropping the first image data to the second image data, the method further comprises:

receiving a target ratio input into the application program; and

adjusting the ratio to be used for the second image data to the target ratio.

7 . The method according to claim 6 , further comprising:

in response to the adjusted ratio to be used for the second image data not matching the ratio of the first image data, selecting, from candidate ratios of the image acquisition device, a ratio that matches the adjusted ratio to be used for the second image data as the ratio of the first image data.

8 . The method according to claim 7 , wherein after selecting, from the candidate ratios of the image acquisition device, the ratio that matches the adjusted ratio to be used for the second image data as the ratio of the first image data, the method further comprises:

restarting preview of the image acquisition device according to an adjusted ratio of the first image data, thereby entering the step of calling the image acquisition device by the application program to obtain the first image data.

9 . An electronic device, comprising: at least one processor and a memory;

the memory storing computer-executable instructions;

the at least one processor executing the computer-executable instructions stored in the memory, to cause the electronic device to perform operations comprising:

calling an image acquisition device by an application program to obtain first image data;

adjusting a ratio to be used for second image data in response to a screen rotation angle being greater than or equal to a pre-set angle threshold;

cropping the first image data to the second image data, wherein a ratio of the first image data is different from a ratio of the second image data, the ratio of the first image data is a ratio supported by the image acquisition device, and the ratio of the second image data is a ratio supported by the application program;

performing effect processing on the second image data; and

performing first processing on the second image data subjected to the effect processing, wherein the first processing comprises at least one of displaying in an interface of the application program, encoding and storing.

10 . The electronic device according to claim 9 , wherein cropping the first image data to the second image data comprises:

determining a target region in the first image data, wherein a ratio of the target region is equal to the ratio of the second image data; and

converting a texture of the target region from a first type to a second type to obtain the second image data constituted by the target region, wherein the converting comprises the cropping for the first image data, the first type is a texture type supported when the image acquisition device performs image displaying, and the second type is a texture type supported when the application program performs image displaying.

11 . The electronic device according to claim 10 , wherein

in response to the ratio of the first image data being greater than the ratio of the second image data, a height of the target region is a height of the first image data;

in response to the ratio of the first image data being smaller than the ratio of the second image data, a width of the target region is a width of the first image data.

12 . The electronic device according to claim 10 , wherein determining the target region in the first image data comprises:

determining key image information included in the first image data; and

determining a region including the key image information in the first image data as the target region.

13 . The electronic device according to claim 9 , wherein before performing the first processing on the second image data subjected to the effect processing, the operations further comprise:

determining a first angle according to the screen rotation angle, wherein a sum of the first angle and the screen rotation angle is 0 degrees or 360 degrees; and

transposing the second image data subjected to the effect processing according to the first angle.

14 . The electronic device according to claim 9 , wherein before cropping the first image data to the second image data, the operations further comprise:

receiving a target ratio input into the application program; and

adjusting the ratio to be used for the second image data to the target ratio.

15 . The electronic device according to claim 14 , wherein the operations further comprise:

in response to the adjusted ratio to be used for the second image data not matching the ratio of the first image data, selecting, from candidate ratios of the image acquisition device, a ratio that matches the adjusted ratio to be used for the second image data as the ratio of the first image data.

16 . The electronic device according to claim 15 , wherein after selecting, from the candidate ratios of the image acquisition device, the ratio that matches the adjusted ratio to be used for the second image data as the ratio of the first image data, the operation further comprise:

restarting preview of the image acquisition device according to an adjusted ratio of the first image data, thereby entering the step of calling the image acquisition device by the application program to obtain the first image data.

17 . A non-transitory computer-readable storage medium having stored therein computer-executable instructions which, when executed by a processor, cause a computing device to perform operations comprising:

calling an image acquisition device by an application program to obtain first image data;

adjusting a ratio to be used for second image data in response to a screen rotation angle being greater than or equal to a pre-set angle threshold;

cropping the first image data to the second image data, wherein a ratio of the first image data is different from a ratio of the second image data, the ratio of the first image data is a ratio supported by the image acquisition device, and the ratio of the second image data is a ratio supported by the application program;

performing effect processing on the second image data; and

performing first processing on the second image data subjected to the effect processing, wherein the first processing comprises at least one of displaying in an interface of the application program, encoding and storing.

18 . The non-transitory computer-readable storage medium according to claim 12 , wherein cropping the first image data to the second image data comprises:

determining a target region in the first image data, wherein a ratio of the target region is equal to the ratio of the second image data; and

converting a texture of the target region from a first type to a second type to obtain the second image data constituted by the target region, wherein the converting comprises the cropping for the first image data, the first type is a texture type supported when the image acquisition device performs image displaying, and the second type is a texture type supported when the application program performs image displaying.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 4, 2026
From: SHI, LEI
To: BEIJING ZITIAO NETWORK TECHNOLOGY CO., LTD.
Reel/Frame 075527/0001 →
Priority Claims (1)
CN 202111066745.4 · Sep 13, 2021 · national
Continuity (1)
Related Publication 20240290060A1 · Aug 29, 2024
References Cited (37)
US 11328693B2 · Sun · 2022 [cited by examiner]
US 12417513B2 · Bakar · 2025 [cited by examiner]
US 20060188173A1 · Zhang · 2006 [cited by examiner]
US 20080192166A1 · Wong · 2008 [cited by examiner]
US 20080259094A1 · Kim · 2008 [cited by examiner]
US 20090251594A1 · Hua · 2009 [cited by examiner]
US 20100080528A1 · Yen · 2010 [cited by examiner]
US 20110234640A1 · Ishida · 2011 [cited by examiner]
US 20110234852A1 · Ishida · 2011 [cited by examiner]
US 20130082960A1 · Otake · 2013 [cited by examiner]
US 20130175913A1 · Kim · 2013 [cited by examiner]
US 20150206284A1 · Yang · 2015 [cited by examiner]
US 20150363915A1 · Li · 2015 [cited by examiner]
US 20170041472A1 · Steadman · 2017 [cited by examiner]
US 20180278855A1 · Li · 2018 [cited by examiner]
US 20200068138A1 · Gandhi · 2020 [cited by examiner]
US 20210020144A1 · Sun · 2021 [cited by examiner]
US 20210209721A1 · Peng · 2021 [cited by examiner]
US 20210293371A1 · Choi · 2021 [cited by examiner]
US 20210398333A1 · Kalu · 2021 [cited by examiner]
US 20220108541A1 · Ozone · 2022 [cited by examiner]
US 20230252758A1 · Cao · 2023 [cited by examiner]
US 20240054691A1 · Liu · 2024 [cited by examiner]
US 20240290060A1 · Shi · 2024 [cited by examiner]
US 20250232450A1 · Zhu · 2025 [cited by examiner]
US 20250245782A1 · Morimoto · 2025 [cited by examiner]
US 20250328990A1 · Lu · 2025 [cited by examiner]
CN 103020900A · 2013 [cited by applicant]
CN 103841330A · 2014 [cited by applicant]
CN 106937043A · 2017 [cited by applicant]
CN 109819187A · 2019 [cited by applicant]
CN 111356000A · 2020 [cited by applicant]
CN 111415399A · 2020 [cited by applicant]
CN 112073765A · 2020 [cited by applicant]
JP 2014050027A · 2014 [cited by applicant]
WO 2019041226A1 · 2019 [cited by applicant]
ISA China National Intellectual Property Administration, International Search Report and Written Opinion Issued in Application No. PCT/CN2022/117897, Nov. 28, 2022, WIPO, 10 pages. [cited by applicant]