IP Library Granted Patent US 12,499,588
Granted Patent B2
US 12,499,588 · App. 18/091,021 · Granted Dec 16, 2025

Image processing method and device, and storage medium

Inventors: Mengfei Liu (Beijing, CN); Yang Sun (Beijing, CN); Miao Zhang (Beijing, CN)
Assignee: Beijing Xiaomi Mobile Software Co., Ltd.
G06T11/00G06F3/04842G06T9/002G06V40/16G06T2200/24G06T2210/22
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,499,588
App. No.
18/091,021
Granted
Dec 16, 2025
Kind
B2
Abstract

An image processing method, the method includes: obtaining a compressed image of a current image, where resolution of the current image is greater than that of the compressed image; cropping out at least one composition preview image based on the compressed image; and in response to selecting a target composition image from said at least one composition preview image displayed, cropping the current image based on a cropping range indicated by the target composition image.

Claims (89)

1 . An image processing method, comprising:

obtaining a compressed image of a current image, wherein resolution of the current image is greater than that of the compressed image;

cropping out at least one composition preview image based on the compressed image; and

cropping, in response to selecting a target composition image from said at least one composition preview image displayed, the current image based on a cropping range indicated by the target composition image;

wherein cropping out at least one composition preview image based on the compressed image comprises:

determining a target body image type in the compressed image;

determining, based on a correspondence between a pre-constructed body image type and a composition rule, a target composition rule corresponding to the target body image type; and

obtaining at least one composition preview image by cropping the compressed image based on the target composition rule;

wherein the target composition rule comprises at least one of:

a distribution principle of a body image in the composition preview image, wherein the distribution principle comprises at least one of: a distribution principle based on an image median line, a distribution principle based on an image trisection line, a distribution principle based on a preset image quality point, a distribution principle based on a preset image inner frame region, or a principle for setting an edge or an outer frame around the body image;

a cropping circumvention principle of the body image in the composition preview image, wherein the cropping circumvention principle comprises circumventing at least one of a face, four limbs, and a specific joint of a portrait, and a face, four limbs, and a specific joint of a pet when cropping an edge of the body image; or

an inclination angle correction principle of the body image in the composition preview image.

2 . The image processing method according to claim 1 , further comprises:

executing, in response to the current image meeting an image processing condition, an operation of obtaining the compressed image of the current image;

the current image meeting the image processing condition comprises at least one of:

detecting an instruction for shooting the current image; or

detecting a trigger operation for a preset composition function entrance, wherein the preset composition function entrance is located at a large image browsing page of the current image in a photo album application.

3 . The image processing method according to claim 1 , wherein the determining a target body image type in the compressed image comprises:

recognizing the target body image type in the compressed image based on a preset image recognition algorithm.

4 . The image processing method according to claim 1 , wherein the determining a target body image type in the compressed image comprises:

determining the target body image type in the compressed image based on pre-obtained label information of the current image, wherein the pre-obtained label information comprises at least one of a face detection result of the current image and an artificial intelligence scenario detection result.

5 . The image processing method according to claim 1 , wherein the target body image type comprises a portrait type and a non-portrait type;

the portrait type further comprises a portrait subtype, wherein the portrait subtype is at least one of: single-person, double-person, or multi-person; and

the non-portrait type further comprises a non-portrait subtype, wherein the non-portrait subtype at least one of: animals, plants, scenery, constructions, or food.

6 . The image processing method according to claim 1 , wherein the target composition rule further comprises:

a preset image scale of the composition preview image.

7 . The image processing method according to claim 1 , wherein the cropping out at least one composition preview image based on the compressed image comprises:

obtaining the at least one composition preview image by inputting the compressed image to a pre-trained composition preview image generation model.

8 . The image processing method according to claim 7 , further comprising training a composition preview image generation model to form the pre-trained composition preview image generation model based on:

obtaining a plurality of sample images of different body image types;

obtaining at least one sample composition preview image of each of the plurality of sample images by cropping each of the plurality of sample images based on a composition rule corresponding to each body image type;

establishing a sample image database based on each of the plurality of sample images and the at least one sample composition preview image; and

obtaining a trained composition preview image generation model by training a pre-constructed composition preview image generation model based on the sample image database, wherein the composition preview image generation model uses a neural network model based on deep learning.

9 . The image processing method according to claim 1 , wherein

the preset image quality point is at least one of a focus of the image median line or a focus of the image trisection line, and

the preset image inner frame region is a minimum wrapped rectangle of the preset image quality point.

10 . An electronic device, comprising:

a processor, and a memory configured to store a computer program;

wherein when executing the computer program, the processor is configured to implement:

obtaining a compressed image of a current image, wherein resolution of the current image is greater than that of the compressed image;

cropping out at least one composition preview image based on the compressed image; and

cropping, in response to selecting a target composition image from said at least one composition preview image displayed, the current image based on a cropping range indicated by the target composition image;

wherein cropping out at least one composition preview image based on the compressed image comprises:

determining a target body image type in the compressed image;

determining, based on a correspondence between a pre-constructed body image type and a composition rule, a target composition rule corresponding to the target body image type; and

obtaining at least one composition preview image by cropping the compressed image based on the target composition rule;

wherein the target composition rule comprises at least one of:

a distribution principle of a body image in the composition preview image, wherein the distribution principle comprises at least one of: a distribution principle based on an image median line, a distribution principle based on an image trisection line, a distribution principle based on a preset image quality point, a distribution principle based on a preset image inner frame region, or a principle for setting an edge or an outer frame around the body image;

a cropping circumvention principle of the body image in the composition preview image, wherein the cropping circumvention principle comprises circumventing at least one of a face, four limbs, and a specific joint of a portrait, and a face, four limbs, and a specific joint of a pet when cropping an edge of the body image; or

an inclination angle correction principle of the body image in the composition preview image.

11 . The electronic device according to claim 10 , wherein when executing the computer program, the processor is further configured to implement:

executing, in response to the current image meeting an image processing condition, an operation of obtaining the compressed image of the current image;

the current image meeting the image processing condition comprises at least one of:

detecting an instruction for shooting the current image; or

detecting a trigger operation for a preset composition function entrance, wherein the preset composition function entrance is located at a large image browsing page of the current image in a photo album application.

12 . The electronic device according to claim 10 , wherein when executing the computer program, the processor is further configured to implement:

recognizing the target body image type in the compressed image based on a preset image recognition algorithm.

13 . The electronic device according to claim 10 , wherein when executing the computer program, the processor is further configured to implement:

determining the target body image type in the compressed image based on pre-obtained label information of the current image, wherein the pre-obtained label information comprises at least one of a face detection result of the current image and an artificial intelligence scenario detection result.

14 . The electronic device according to claim 10 , wherein the target body image type comprises a portrait type and a non-portrait type;

the portrait type further comprises a portrait subtype, wherein the portrait subtype is at least one of: single-person, double-person, or multi-person; and

the non-portrait type further comprises a non-portrait subtype, wherein the non-portrait subtype is at least one of:

animals, plants, scenery, constructions, or food.

15 . The electronic device according to claim 10 , wherein the target composition rule further comprises:

a preset image scale of the composition preview image.

16 . The electronic device according to claim 10 , wherein when executing the computer program, the processor is further configured to implement:

obtaining the at least one composition preview image by inputting the compressed image to a pre-trained composition preview image generation model.

17 . The electronic device according to claim 16 , wherein when executing the computer program, the processor is further configured to implement:

obtaining a plurality of sample images of different body image types;

obtaining at least one sample composition preview image of each of the plurality of sample images by cropping each of the plurality of sample images based on a composition rule corresponding to each body image type;

establishing a sample image database based on each of the plurality of sample images and the at least one sample composition preview image; and

obtaining a trained composition preview image generation model by training a pre- constructed composition preview image generation model based on the sample image database, wherein the pre-constructed composition preview image generation model uses a neural network model based on deep learning.

18 . A non-transitory computer-readable storage medium storing a computer program, the computer program when executed by a processor cause the processor to execute a method comprising:

obtaining a compressed image of a current image, wherein resolution of the current image is greater than that of the compressed image;

cropping out at least one composition preview image based on the compressed image; and

cropping, in response to selecting a target composition image from said at least one composition preview image displayed, the current image based on a cropping range indicated by the target composition image;

wherein cropping out at least one composition preview image based on the compressed image comprises:

determining a target body image type in the compressed image;

determining, based on a correspondence between a pre-constructed body image type and a composition rule, a target composition rule corresponding to the target body image type; and

obtaining at least one composition preview image by cropping the compressed image based on the target composition rule;

wherein the target composition rule comprises at least one of:

a distribution principle of a body image in the composition preview image, wherein the distribution principle comprises at least one of: a distribution principle based on an image median line, a distribution principle based on an image trisection line, a distribution principle based on a preset image quality point, a distribution principle based on a preset image inner frame region, or a principle for setting an edge or an outer frame around the body image;

a cropping circumvention principle of the body image in the composition preview image, wherein the cropping circumvention principle comprises circumventing at least one of a face, four limbs, and a specific joint of a portrait, and a face, four limbs, and a specific joint of a pet when cropping an edge of the body image; or

an inclination angle correction principle of the body image in the composition preview image.

19 . The non-transitory computer-readable storage medium according to claim 18 , wherein the method further comprises:

executing, in response to the current image meeting an image processing condition, an operation of obtaining the compressed image of the current image;

the current image meeting the image processing condition comprises at least one of:

detecting an instruction for shooting the current image; or

detecting a trigger operation for a preset composition function entrance, wherein the preset composition function entrance is located at a large image browsing page of the current image in a photo album application.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 30, 2022
From: LIU, MENGFEI; SUN, YANG; ZHANG, MIAO
To: BEIJING XIAOMI MOBILE SOFTWARE CO., LTD.
Reel/Frame 062243/0956 →
Priority Claims (1)
CN 202210957723.5 · Aug 10, 2022 · national
Continuity (1)
Related Publication 20240054691A1 · Feb 15, 2024
References Cited (7)
US 20090027337A1 · Hildreth · 2009 [cited by examiner]
US 20190109981A1 · Zhang · 2019 [cited by examiner]
US 20220038621A1 · Lee · 2022 [cited by examiner]
CN 113709386A · 2021 [cited by applicant]
WO 2021185296A1 · 2021 [cited by applicant]
Luo, “A Novel Method for Detecting Cropped and Recompressed Image Block” , 2007 (Year 2007), IEEE ICASSP 2007, pp. 217-220 (Year 2007). [cited by examiner]
Extended European Search Report issued on Aug. 22, 2023 for European Patent Application No. 22217145.6. [cited by applicant]