Image processing method and apparatus
AssigneeYinwang Intelligent Technologies Co., Ltd.
InventorKang Chen
Life of this patent
Estimating the term…
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.
Claims20
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.
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.
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.
Dependencies are inferred from the claim text.