IP Library › Granted Patent US 12,483,792
Granted Patent B2
US 12,483,792 · App. 17/843,242 · Granted Nov 25, 2025

Video processing method and electronic device

Inventors: Yanhua Chen (Beijing, CN); Hongma Liu (Beijing, CN); Chao Zhang (Beijing, CN); Yaqi Zhang (Beijing, CN); Hongyu Li (Beijing, CN)
Assignee: HUAWEI TECHNOLOGIES CO., LTD.
H04N23/695H04N23/61H04N23/635
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,483,792
App. No.
17/843,242
Granted
Nov 25, 2025
Kind
B2
Abstract

A video processing method is provided. The method includes obtaining a first video frame, determining that the first video frame includes at least one target object, determining a cropping box by using the at least one target object as a center, obtaining content in the cropping box, and displaying the content as a second video frame.

Claims (113)

1 . A method, applied to an electronic device, comprising:

obtaining a first video frame;

determining that the first video frame comprises a first target object;

determining a first cropping box by using a coordinate box comprising a left box border, a right box border, an upper box border, and a lower box border;

determining a center of the first target object by using the coordinate box, wherein a first preset distance exists between a lower cropping side of the first cropping box and a preset joint point of the first target object;

determining a width of the first target object and a width of the first video frame;

determining a cropping width for cropping the first video frame based on the width of the first target object and the width of the first video frame;

determining a left cropping side and a right cropping side by using the cropping width, wherein the left box border of the coordinate box is used as the left cropping side and the right box border of the coordinate box is used as the right cropping side;

determining an upper cropping side and the lower cropping side based on a vertical coordinate of the first target object in the coordinate box, wherein the upper box border is used as the upper cropping side and the lower box border is used as the lower cropping side;

determining the first cropping box based on the upper cropping side, the lower cropping side, the left cropping side, and the right cropping side;

obtaining content in the first cropping box; and

outputting the content as a second video frame.

2 . The method of claim 1 , wherein the determining the first cropping box further comprises:

determining a first pre-cropping box according to a preset rule;

determining whether the first preset distance exists between a lower cropping side of the first pre-cropping box and the preset joint point; and

moving, when the first preset distance does not exist between the lower cropping side of the first pre-cropping box and the preset joint point, moving the lower cropping side of the first pre-cropping box upwards to a cropping location corresponding to the preset joint point to obtain the first cropping box.

3 . The method of claim 1 , wherein the determining the first cropping box by using the first target object as the center further comprises:

determining a first pre-cropping box according to a preset rule;

determining whether a center line of the first pre-cropping box is located below a center line of the first target object; and

moving, when the center line of the first pre-cropping box is not located below the center line of the first target object, an upper cropping side of the first pre-cropping box upwards by a second preset distance and a lower cropping side of the first pre-cropping box downwards by a third preset distance to obtain the first cropping box.

4 . The method of claim 1 , further comprising:

obtaining a third video frame through collection;

determining, when it is detected that content that meets a preset gesture exists is in the third video frame, a direction corresponding to the preset gesture;

determining a second cropping box based on the direction of the preset gesture, wherein the second cropping box moves relative to the first cropping box in the direction corresponding to the preset gesture;

obtaining content in the second cropping box; and

outputting the content as a fourth video frame.

5 . The method of claim 4 ,

wherein when the direction of the preset gesture is a direction in which an arm of a person in the third video frame points to the left, the second cropping box is a cropping box that moves leftwards relative to the first cropping box; or

wherein when the direction of the preset gesture is a direction in which an arm of a person in the third video frame points to the right, the second cropping box is a cropping box that moves rightwards relative to the first cropping box.

6 . The method of claim 1 , further comprising:

obtaining a third video frame through collection, wherein the third video frame comprises at least two target objects comprising the first target object and a second target object;

determining a second cropping box by using the at least two target objects as centers, wherein a lower cropping side of the second cropping box is located below a center line of the first target object in a horizontal direction and is located below a center line of the second target object in a horizontal direction; and

obtaining content in the second cropping box, and outputting the content as a fourth video frame.

7 . The method of claim 6 , further comprising wherein determining a third cropping box comprises:

determining a pre-cropping box according to a preset rule;

determining a first center line of the first target object in a horizontal direction and a second center line of the second target object in a horizontal direction;

determining whether a lower cropping side of the pre-cropping box is located below the first center line and the second center line; and

moving, when the lower cropping side of the pre-cropping box is not located below the first center line or the lower cropping side of the pre-cropping box is not located below the second center line, the lower cropping side of the pre-cropping box downwards until the lower cropping side of the pre-cropping box is located below the first center line and the second center line.

8 . The method of claim 7 , wherein determining the first center line of the first target object in the horizontal direction and the second center line of the second target object in the horizontal direction comprises:

determining a relative distance between a first preset key point of the first target object and the first preset key point of the second target object;

determining whether the relative distance is greater than a preset threshold; and

determining, when the relative distance is greater than the preset threshold, the first center line and the second center line.

9 . The method of claim 1 , further comprises:

obtaining a third video frame through collection, wherein the third video frame comprises at least two target objects comprising the first target object and a second target object;

determining whether a focus operation focusing on the second target object exists;

determining, when the focus operation exists, a second cropping box by using the second target object as a center;

obtaining content in the second cropping box; and

outputting the content as a fourth video frame.

10 . The method of claim 1 , wherein before the determining the first cropping box by using the first target object as the center, the method further comprises:

obtaining a third video frame through collection;

outputting the third video frame that is not cropped;

detecting and obtaining a first operation, and entering a target tracking mode in response to the first operation; and

determining the first cropping box by using the first target object as the center after entering the target tracking mode.

11 . The method of claim 10 , further comprising after the detecting and obtaining a first operation and entering the target tracking mode in response to the first operation:

detecting a second operation in the target tracking mode; and

using a spotlight effect on at least one of the target objects in at least one of video frames output by the electronic device in response to the second operation.

12 . The method of claim 1 , further comprising during a video call process:

transmitting the second video frame to a peer electronic device; or

displaying the second video frame in a video communications interface.

13 . An electronic device, comprising:

a processor;

memory; and

one or more applications stored in the memory that when executed by the processor configure the electronic device to:

obtain a first video frame;

determine that the first video frame comprises a first target object;

determine a first cropping box by using a coordinate box comprising a left box border, a right box border, an upper box border, and a lower box border;

determine a center of the first target object by using the coordinate box, wherein a first preset distance exists between a lower cropping side of the first cropping box and a preset joint point of the first target object;

determine a width of the first target object and a width of the first video frame;

determine a cropping width for cropping the first video frame based on the width of the first target object and the width of the first video frame;

determine a left cropping side and a right cropping side by using the cropping width, wherein the left box border of the coordinate box is used as the left cropping side and the right box border of the coordinate box is used as the right cropping side;

determine an upper cropping side and the lower cropping side based on a vertical coordinate of the first target object in the coordinate box, wherein the upper box border is used as the upper cropping side and the lower box border is used as the lower cropping side;

determine the first cropping box based on the upper cropping side, the lower cropping side, the left cropping side, and the right cropping side;

obtain content in the first cropping box; and

output the content as a second video frame.

14 . The electronic device of claim 13 , wherein the one or more applications when executed by the processor further configure the electronic device to:

determine a first pre-cropping box according to a preset rule;

determine whether a first preset distance exists between the lower cropping side of the first pre-cropping box and the preset joint point; and

move, when the first preset distance does not exist between the lower cropping side of the first pre-cropping box and the preset joint point, the lower cropping side of the first pre-cropping box upwards to a cropping location corresponding to the preset joint point to obtain the first cropping box.

15 . The electronic device of claim 13 , wherein the one or more applications when executed by the processor further configure the electronic device to:

determine a first pre-cropping box according to a preset rule;

determine whether a center line of the first pre-cropping box is located below a center line of the first target object; and

move, when the center line of the first pre-cropping box is not located below the center line of the first target object, an upper cropping side of the first pre-cropping box upwards by a second preset distance and a lower cropping side of the first pre-cropping box downwards by a third preset distance to obtain the first cropping box.

16 . The electronic device of claim 13 , wherein the one or more applications when executed by the processor further configure the electronic device to:

obtain a third video frame through collection;

when it is detected that content that meets a preset gesture exists in the third video frame, determine a direction corresponding to the preset gesture;

determine a second cropping box based on the direction of the preset gesture, wherein the second cropping box moves relative to the first cropping box in the direction corresponding to the preset gesture;

obtain content in the second cropping box; and

output the content as a fourth video frame.

17 . The electronic device of claim 16 , wherein the one or more applications when executed by the processor further configure the electronic device to:

when the direction of the preset gesture is a direction in which an arm of a person in the third video frame points to the left, the second cropping box is a cropping box that moves leftwards relative to the first cropping box;

when the direction of the preset gesture is a direction in which an arm of a person in the third video frame points to the right, the second cropping box is a cropping box that moves rightwards relative to the first cropping box;

when the direction of the preset gesture is a direction in which an arm of a person in the third video frame swings from top to bottom, the second cropping box is a cropping box that moves upwards relative to the first cropping box; or

when the direction of the preset gesture is a direction in which an arm of a person in the third video frame swings from bottom to top, the second cropping box is a cropping box that moves downwards relative to the first cropping box.

18 . The electronic device of claim 13 , wherein the one or more applications when executed by the processor further configure the electronic device to:

obtain a third video frame through collection, wherein the third video frame comprises at least two target objects comprising the first target object and a second target object;

determine a second cropping box by using the at least two target objects as centers, wherein a lower cropping side of the second cropping box is located below a center line of the first target object in a horizontal direction and is located below a center line of the second target object in a horizontal direction;

obtain content in the second cropping box; and

output the content as a fourth video frame.

19 . A non-transitory computer-readable storage medium, comprising instructions, that when executed perform a method comprising:

obtaining a first video frame;

determining that the first video frame comprises a first target object;

determining a first cropping box by using a coordinate box comprising a left box border, a right box border, an upper box border, and a lower box border;

determining a center of the first target object by using the coordinate box, wherein a first preset distance exists between a lower cropping side of the first cropping box and a preset joint point of the first target object;

determining a width of the first target object and a width of the first video frame;

determining a cropping width for cropping the first video frame based on the width of the first target object and the width of the first video frame;

determining a left cropping side and a right cropping side by using the cropping width, wherein the left box border of the coordinate box is used as the left cropping side and the right box border of the coordinate box is used as the right cropping side;

determining an upper cropping side and the lower cropping side based on a vertical coordinate of the first target object in the coordinate box, wherein the upper box border is used as the upper cropping side and the lower box border is used as the lower cropping side;

determining the first cropping box based on the upper cropping side, the lower cropping side, the left cropping side, and the right cropping side;

obtaining content in the first cropping box; and

outputting the content as a second video frame.

20 . The method of claim 4 ,

wherein when the direction of the preset gesture is a direction in which an arm of a person in the third video frame swings from top to bottom, the second cropping box is a cropping box that moves upwards relative to the first cropping box; or

wherein when the direction of the preset gesture is a direction in which an arm of a person in the third video frame swings from bottom to top, the second cropping box is a cropping box that moves downwards relative to the first cropping box.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 14, 2022
From: CHEN, YANHUA; LIU, HONGMA; ZHANG, CHAO; ZHANG, YAQI; LI, HONGYU
To: HUAWEI TECHNOLOGIES CO., LTD.
Reel/Frame 060508/0857 →
Priority Claims (2)
CN 201911315344.0 · Dec 19, 2019 · national
CN 202010753515.4 · Jul 30, 2020 · national
Continuity (2)
Continuation PCTCN2020137550 · Dec 18, 2020
Related Publication 20220321788A1 · Oct 6, 2022
References Cited (24)
US 11194995B1 · Profida Ferreira · 2021 [cited by examiner]
US 20070120979A1 · Zhang et al. · 2007 [cited by applicant]
US 20110091108A1 · Oshima · 2011 [cited by applicant]
US 20180108144A1 · Tsunashima · 2018 [cited by examiner]
US 20190191094A1 · Khoe et al. · 2019 [cited by applicant]
CN 103576848A · 2014 [cited by applicant]
CN 103607533A · 2014 [cited by applicant]
CN 104378552A · 2015 [cited by applicant]
CN 105979383A · 2016 [cited by applicant]
CN 106034216A · 2016 [cited by applicant]
CN 108334099A · 2018 [cited by applicant]
CN 108366303A · 2018 [cited by applicant]
CN 109905593A · 2019 [cited by applicant]
CN 110189378A · 2019 [cited by applicant]
CN 110198428A · 2019 [cited by applicant]
CN 110301136A · 2019 [cited by applicant]
CN 110347877A · 2019 [cited by applicant]
CN 110381281A · 2019 [cited by applicant]
CN 110401766A · 2019 [cited by applicant]
CN 110427833A · 2019 [cited by applicant]
CN 110533700A · 2019 [cited by applicant]
JP 2010068470A · 2010 [cited by applicant]
WO 2012034329A1 · 2012 [cited by applicant]
WO 2014023153A1 · 2014 [cited by applicant]