IP Library › Granted Patent US 12,739,352
Granted Patent B2
US 12,739,352 · App. 18/596,829 · Granted Sep 15, 2026

Image processing method and apparatus

Inventor: Kang Chen (Hangzhou, CN)
Assignee: Yinwang Intelligent Technologies Co., Ltd.
H04N9/73G06T7/11G06T7/13G06T7/90G06V10/25G06T2207/10024G06V2201/07
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,739,352
App. No.
18/596,829
Granted
Sep 15, 2026
Kind
B2
Abstract

Embodiments of this application disclose an image processing method and an apparatus. The method includes: obtaining an image, where the image includes a detection object; performing region division on the image based on the detection object to obtain image regions, where the obtained image regions include a first region and a second region, and the first region includes the detection object, and the second region does not include the detection object; and performing white balance correction on the image based on a color temperature value of the first region and a color temperature value of the second region. According to this solution, a white balance processing effect of an image can be improved, and display quality of the image can be improved.

Claims (75)

1 . An image processing method, comprising:

obtaining an image, wherein the image comprises a detection object;

determining, based on a detected environment of a mobile station, whether the image is affected by light sources of at least two different color temperatures;

in response to determining that the image is affected by light sources of at least two different color temperatures, performing region division on the image based on the detection object to obtain image regions, wherein the obtained image regions comprise a first region and a second region, the first region comprises the detection object, and the second region does not comprise the detection object; and

performing white balance correction on the image based on a color temperature value of the first region and a color temperature value of the second region.

2 . The method according to claim 1 , wherein the performing the white balance correction on the image based on a color temperature value of the first region and a color temperature value of the second region comprises:

if a difference between the color temperature value of the first region and the color temperature value of the second region is greater than a preset threshold, determining, based on the color temperature value of the first region, a first white balance gain coefficient corresponding to the first region, and determining, based on the color temperature value of the second region, a second white balance gain coefficient corresponding to the second region; and

performing the white balance correction on the image based on the first white balance gain coefficient and the second white balance gain coefficient.

3 . The method according to claim 2 , wherein the method further comprises:

if the difference between the color temperature value of the first region and the color temperature value of the second region is not greater than the preset threshold, determining a color temperature value of the image based on the color temperature value of the first region and the color temperature value of the second region;

determining a third white balance gain coefficient corresponding to the color temperature value of the image; and

performing the white balance correction on the image based on the third white balance gain coefficient.

4 . The method according to claim 3 , wherein the determining a color temperature value of the image based on the color temperature value of the first region and the color temperature value of the second region comprises:

determining a first weight based on an area proportion of the first region in the image, and determining a second weight based on an area proportion of the second region in the image; and

determining the color temperature value of the image based on the color temperature value of the first region, the color temperature value of the second region, the first weight, and the second weight.

5 . The method according to claim 1 , wherein the performing white balance correction on the image based on a color temperature value of the first region and a color temperature value of the second region comprises:

determining, based on the color temperature value of the first region, a first white balance gain coefficient corresponding to the first region, and determining, based on the color temperature value of the second region, a second white balance gain coefficient corresponding to the second region; and

if a difference between the color temperature value of the first region and the color temperature value of the second region is greater than a preset threshold, performing the white balance correction on the image based on the first white balance gain coefficient and the second white balance gain coefficient; or

if a difference between the color temperature value of the first region and the color temperature value of the second region is not greater than a preset threshold, determining a fourth white balance gain coefficient based on the first white balance gain coefficient and the second white balance gain coefficient; and performing the white balance correction on the image based on the fourth white balance gain coefficient.

6 . The method according to claim 5 , wherein the determining the fourth white balance gain coefficient based on the first white balance gain coefficient and the second white balance gain coefficient comprises:

determining a first weight based on an area proportion of the first region in the image, and determining a second weight based on an area proportion of the second region in the image; and

determining the fourth white balance gain coefficient based on the first white balance gain coefficient, the second white balance gain coefficient, the first weight, and the second weight.

7 . The method according to claim 1 , wherein the performing the region division on the image based on the detection object comprises:

performing the region division on the image based on a contour line of the detection object.

8 . The method according to claim 7 , wherein the obtained image regions further comprise a critical region, and the critical region comprises the contour line; and

the performing white balance correction on the image based on a color temperature value of the first region and a color temperature value of the second region comprises:

if a difference between the color temperature value of the first region and the color temperature value of the second region is greater than a preset threshold, determining, based on the color temperature value of the first region, a first white balance gain coefficient corresponding to the first region, and determining, based on the color temperature value of the second region, a second white balance gain coefficient corresponding to the second region;

determining a fifth white balance gain coefficient based on the first white balance gain coefficient and the second white balance gain coefficient, wherein the fifth white balance gain coefficient is used to correct the critical region; and

performing the white balance correction on the image based on the first white balance gain coefficient, the second white balance gain coefficient, and the fifth white balance gain coefficient.

9 . The method according to claim 7 , wherein the performing the region division on the image based on the contour line of the detection object comprises:

generating a first bounding box of the detection object;

determining, in an image region comprised in a second bounding box, a region contour line that comprises a largest image area as the contour line of the detection object, wherein the second bounding box is obtained by extending the first bounding box outwards; and

performing the region division on the image based on the contour line of the detection object, wherein the first region is an image region comprised in the contour line, and the second region is an image region outside the contour line.

10 . The method according to claim 1 , wherein before the performing the region division on the image based on the detection object, the method comprises:

determining that a current location is close to a preset location.

11 . A image processing apparatus, comprising:

a memory configured to store program code; and

a processor configured to invoke the program code in the memory to cause the imaging processing apparatus to:

obtain an image, wherein the image comprises a detection object;

determine, based on a detected environment of a mobile station, whether the image is affected by light sources of at least two different color temperatures;

in response to determining that the image is affected by light sources of at least two different color temperatures, perform region division on the image based on the detection object to obtain image regions, wherein the obtained image regions comprise a first region and a second region, the first region comprises the detection object, and the second region does not comprise the detection object; and

perform white balance correction on the image based on a color temperature value of the first region and a color temperature value of the second region.

12 . The apparatus according to claim 11 , wherein to perform white balance correction on the image based on a color temperature value of the first region and a color temperature value of the second region, the image processing apparatus is further to:

if a difference between the color temperature value of the first region and the color temperature value of the second region is greater than a preset threshold, determine, based on the color temperature value of the first region, a first white balance gain coefficient corresponding to the first region, and determine, based on the color temperature value of the second region, a second white balance gain coefficient corresponding to the second region; and

perform the white balance correction on the image based on the first white balance gain coefficient and the second white balance gain coefficient.

13 . The apparatus according to claim 12 , wherein the image processing apparatus is further to:

if the difference between the color temperature value of the first region and the color temperature value of the second region is not greater than the preset threshold, determine a color temperature value of the image based on the color temperature value of the first region and the color temperature value of the second region;

determine a third white balance gain coefficient corresponding to the color temperature value of the image; and

perform the white balance correction on the image based on the third white balance gain coefficient.

14 . The apparatus according to claim 13 , wherein the determining a color temperature value of the image based on the color temperature value of the first region and the color temperature value of the second region, the image processing apparatus is further to:

determine a first weight based on an area proportion of the first region in the image, and determining a second weight based on an area proportion of the second region in the image; and

determine the color temperature value of the image based on the color temperature value of the first region, the color temperature value of the second region, the first weight, and the second weight.

15 . The apparatus according to claim 11 , wherein the performing white balance correction on the image based on a color temperature value of the first region and a color temperature value of the second region, the image processing apparatus is further to:

determine, based on the color temperature value of the first region, a first white balance gain coefficient corresponding to the first region, and determining, based on the color temperature value of the second region, a second white balance gain coefficient corresponding to the second region; and

if a difference between the color temperature value of the first region and the color temperature value of the second region is greater than a preset threshold, perform the white balance correction on the image based on the first white balance gain coefficient and the second white balance gain coefficient; or

if a difference between the color temperature value of the first region and the color temperature value of the second region is not greater than a preset threshold, determine a fourth white balance gain coefficient based on the first white balance gain coefficient and the second white balance gain coefficient; and performing the white balance correction on the image based on the fourth white balance gain coefficient.

16 . The apparatus according to claim 15 , wherein the determining the fourth white balance gain coefficient based on the first white balance gain coefficient and the second white balance gain coefficient-, the image processing apparatus is further to:

determine a first weight based on an area proportion of the first region in the image, and determining a second weight based on an area proportion of the second region in the image; and

determine the fourth white balance gain coefficient based on the first white balance gain coefficient, the second white balance gain coefficient, the first weight, and the second weight.

17 . The apparatus according to claim 11 , wherein the performing the region division on the image based on the detection object-, the image processing apparatus is further to:

perform the region division on the image based on a contour line of the detection object.

18 . The apparatus according to claim 17 , wherein the obtained image regions further comprise a critical region, and the critical region comprises the contour line; and

to perform white balance correction on the image based on a color temperature value of the first region and a color temperature value of the second region-, the image processing apparatus is further to:

if a difference between the color temperature value of the first region and the color temperature value of the second region is greater than a preset threshold, determine, based on the color temperature value of the first region, a first white balance gain coefficient corresponding to the first region, and determine, based on the color temperature value of the second region, a second white balance gain coefficient corresponding to the second region;

determine a fifth white balance gain coefficient based on the first white balance gain coefficient and the second white balance gain coefficient, wherein the fifth white balance gain coefficient is used to correct the critical region; and

perform the white balance correction on the image based on the first white balance gain coefficient, the second white balance gain coefficient, and the fifth white balance gain coefficient.

19 . The apparatus according to claim 17 , wherein the performing the region division on the image based on the contour line of the detection object-, the image processing apparatus is further to:

generate a first bounding box of the detection object;

determine, in an image region comprised in a second bounding box, a region contour line that comprises a largest image area as the contour line of the detection object, wherein the second bounding box is obtained by extending the first bounding box outwards; and

perform the region division on the image based on the contour line of the detection object, wherein the first region is an image region comprised in the contour line, and the second region is an image region outside the contour line.

20 . A non-transitory computer-readable storage medium, wherein the computer-readable storage medium is configured to store instructions; and when the instructions are executed by a processor, cause the processor to:

obtain an image, wherein the image comprises a detection object;

determine, based on a detected environment of a mobile station, whether the image is affected by light sources of at least two different color temperatures;

in response to determining that the image is affected by light sources of at least two different color temperatures, perform region division on the image based on the detection object to obtain image regions, wherein the obtained image regions comprise a first region and a second region, the first region comprises the detection object, and the second region does not comprise the detection object; and

perform white balance correction on the image based on a color temperature value of the first region and a color temperature value of the second region.

Assignments (3)
CHANGE OF NAME Recorded Apr 28, 2026
From: SHENZHEN YINWANG INTELLIGENT TECHNOLOGIES CO., LTD.
To: YINWANG INTELLIGENT TECHNOLOGIES CO., LTD.
Reel/Frame 075485/0524 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 12, 2024
From: HUAWEI TECHNOLOGIES CO., LTD.
To: SHENZHEN YINWANG INTELLIGENT TECHNOLOGIES CO., LTD.
Reel/Frame 069336/0125 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 25, 2024
From: CHEN, KANG
To: HUAWEI TECHNOLOGIES CO., LTD.
Reel/Frame 069023/0421 →
Continuity (2)
Continuation PCTCN2021117049 · Sep 7, 2021
Related Publication 20240223737A1 · Jul 4, 2024
References Cited (14)
US 8786729B2 · Peng · 2014 [cited by examiner]
US 11064135B2 · Sugimoto · 2021 [cited by examiner]
US 11064174B2 · Yuan · 2021 [cited by examiner]
US 11128908B2 · Whang · 2021 [cited by examiner]
US 11295421B2 · Sun · 2022 [cited by examiner]
US 11503228B2 · Zhang · 2022 [cited by examiner]
US 20100208099A1 · Nomura · 2010 [cited by applicant]
US 20110234845A1 · Fujiwara · 2011 [cited by examiner]
US 20200053332A1 · Seok · 2020 [cited by applicant]
US 20210266507A1 · Watanabe · 2021 [cited by applicant]
CN 103200410B · 2015 [cited by applicant]
CN 106303250A · 2017 [cited by applicant]
CN 112601063A · 2021 [cited by applicant]
WO 2019216072A1 · 2019 [cited by applicant]