CN114143447A - Image processing method and device and electronic equipment - Google Patents

Image processing method and device and electronic equipment Download PDF

Info

Publication number
CN114143447A
CN114143447A CN202111315718.6A CN202111315718A CN114143447A CN 114143447 A CN114143447 A CN 114143447A CN 202111315718 A CN202111315718 A CN 202111315718A CN 114143447 A CN114143447 A CN 114143447A
Authority
CN
China
Prior art keywords
image
parameter information
white balance
image area
automatic white
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111315718.6A
Other languages
Chinese (zh)
Other versions
CN114143447B (en
Inventor
刘莹
赖有攀
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN202111315718.6A priority Critical patent/CN114143447B/en
Publication of CN114143447A publication Critical patent/CN114143447A/en
Application granted granted Critical
Publication of CN114143447B publication Critical patent/CN114143447B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/63Control of cameras or camera modules by using electronic viewfinders
    • H04N23/631Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/7243User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages
    • H04M1/72439User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages for image or video messaging
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72454User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/64Circuits for processing colour signals
    • H04N9/73Colour balance circuits, e.g. white balance circuits or colour temperature control

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Multimedia (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Environmental & Geological Engineering (AREA)
  • Color Television Image Signal Generators (AREA)
  • Processing Of Color Television Signals (AREA)

Abstract

The application discloses an image processing method, an image processing device and electronic equipment, and belongs to the technical field of image processing. The method comprises the following steps: determining target automatic white balance parameter information of the shooting preview image based on the temperature information of the shooting object corresponding to each image area unit in the shooting preview image; and performing image processing on the shot preview image based on the target automatic white balance parameter information, and outputting a target image.

Description

Image processing method and device and electronic equipment
Technical Field
The application belongs to the technical field of image processing, and particularly relates to an image processing method and device and electronic equipment.
Background
At present, when a user shoots through an electronic device, the color of light reflected by a shot object changes according to the color of a light source, so that a picture shot by the electronic device has a distortion phenomenon, for example, the picture shot in a light bulb lighting environment may be yellow. For this reason, the electronic device may adjust the captured picture through an Automatic White Balance (AWB) algorithm to solve the problem of picture color distortion.
However, in the above method, since the parameters in the AWB algorithm (hereinafter referred to as AWB parameters) are preset in the electronic device, when the surrounding environment is complicated, the adjusted picture may still have a color difference problem, which results in a poor picture taken by the electronic device.
Disclosure of Invention
The embodiment of the application aims to provide an image processing method and device and electronic equipment, and the problem that pictures shot by the electronic equipment have chromatic aberration can be solved.
In order to solve the technical problem, the present application is implemented as follows:
in a first aspect, an embodiment of the present application provides an image processing method, including: determining target automatic white balance parameter information of the shooting preview image based on the temperature information of the shooting object corresponding to each image area unit in the shooting preview image; and performing image processing on the shot preview image based on the target automatic white balance parameter information, and outputting a target image.
In a second aspect, an embodiment of the present application provides an image processing apparatus, including: the device comprises a determining module and a processing module. And the determining module is used for determining target automatic white balance parameter information of the shooting preview image based on the temperature information of the shooting object corresponding to each image area unit in the shooting preview image. And the processing module is used for carrying out image processing on the shot preview image based on the target automatic white balance parameter information and outputting a target image.
In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instructions stored on the memory and executable on the processor, and when executed by the processor, the program or instructions implement the steps of the method according to the first aspect.
In a fourth aspect, embodiments of the present application provide a readable storage medium, on which a program or instructions are stored, which when executed by a processor implement the steps of the method according to the first aspect.
In a fifth aspect, an embodiment of the present application provides a chip, where the chip includes a processor and a communication interface, where the communication interface is coupled to the processor, and the processor is configured to execute a program or instructions to implement the method according to the first aspect.
In the embodiment of the application, the electronic device determines that a current shooting scene is an indoor scene or an outdoor scene according to the temperature value of each image area unit by performing area division on a shooting preview image and acquiring the temperature value of each image area unit, and determines whether the shooting preview image corresponds to a plurality of different light sources, so as to determine M image areas (that is, image areas corresponding to different light sources in the shooting preview image in the outdoor scene), and then the electronic device can determine an AWB parameter of each image area in the M image areas, and performs optimization processing on the image according to the AWB parameter, so as to improve the quality of the shooting image.
Drawings
Fig. 1 is a flowchart of an image processing method provided in an embodiment of the present application;
fig. 2 is a schematic diagram of an example of an interface of a mobile phone according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of an image processing apparatus according to an embodiment of the present application;
fig. 4 is a schematic hardware structure diagram of an electronic device according to an embodiment of the present disclosure;
fig. 5 is a second schematic diagram of a hardware structure of an electronic device according to an embodiment of the present disclosure.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms first, second and the like in the description and in the claims of the present application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that embodiments of the application may be practiced in sequences other than those illustrated or described herein, and that the terms "first," "second," and the like are generally used herein in a generic sense and do not limit the number of terms, e.g., the first term can be one or more than one. In addition, "and/or" in the specification and claims means at least one of connected objects, a character "/" generally means that a preceding and succeeding related objects are in an "or" relationship.
The image processing method provided by the embodiment of the present application is described in detail below with reference to the accompanying drawings through specific embodiments and application scenarios thereof.
Users have higher and higher requirements on the quality of images shot by electronic equipment, and AWB is an important measure of image quality. At present, when a shooting scene is relatively complex (for example, a plurality of light sources exist in the current shooting scene), the problem of color cast of an adjusted picture still occurs through a traditional AWB scheme, that is, the picture is adjusted according to set AWB parameters.
In the embodiment of the application, the electronic device determines that a current shooting scene is an indoor scene or an outdoor scene according to the temperature value of each image area unit by performing area division on a shooting preview image and acquiring the temperature value of each image area unit, and determines whether the shooting preview image corresponds to a plurality of different light sources, so as to determine M image areas (i.e., image areas corresponding to different light sources in the shooting preview image in the outdoor scene), and then the electronic device can determine an AWB parameter of each image area in the M image areas, and performs optimization processing on the image according to the AWB parameter, so as to improve the quality of the shooting image.
It should be noted that the AWB is a color correction algorithm, and the AWB process can make the object in the image captured under different scene light sources present a uniform and normal picture that accords with the perception of human eyes on the color of the object itself.
An embodiment of the present application provides an image processing method, and fig. 1 shows a flowchart of an image processing method provided in an embodiment of the present application. As shown in fig. 1, the image processing method provided in the embodiment of the present application may include steps 201 and 202 described below.
In step 201, the electronic device determines target automatic white balance parameter information of the shooting preview image based on the temperature information of the shooting object corresponding to each image area unit in the shooting preview image.
In the embodiment of the application, the electronic device can calculate the target automatic white balance parameter information corresponding to the image area according to the temperature information of the shooting object corresponding to each image area unit in the shooting preview image and through a preset automatic white balance algorithm, so that the target automatic white balance parameter information of the shooting preview image is obtained.
Optionally, in the embodiment of the present invention, the shooting object may be an object in any shooting scene, that is, a shooting object or a shooting person.
It should be noted that the shooting preview image described in the embodiment of the present application is described in a broad sense, that is, the image may be understood as a picture or a video, that is, the embodiment of the present application may be applied to a picture shooting scene or a video recording scene.
And step 202, the electronic equipment performs image processing on the shot preview image based on the target automatic white balance parameter information and outputs a target image.
In the embodiment of the present application, the electronic device may input the target automatic white balance parameter information to an Image Signal Processor (ISP) to perform automatic white balance compensation processing on the captured preview Image through the ISP, thereby completing automatic white balance adjustment on the captured preview Image and outputting the target Image.
Alternatively, in this embodiment of the application, the step 201 may be specifically implemented by the following steps 201a to 201c, and the step 202 may be specifically implemented by the following step 202 a.
Step 201a, the electronic device classifies the image area units based on the temperature information of the shooting object corresponding to each image area unit to obtain a first image area.
In the embodiment of the application, the electronic device can measure the temperature value corresponding to the shooting object in each image area unit through the temperature sensor, judge whether different light sources exist in every two adjacent image area units in the image area units according to the temperature value corresponding to each shooting object, and determine the first image area according to the judgment result. It is to be understood that in the case where the same light source exists in any two adjacent image areas, the electronic device may determine the any two adjacent image areas as the first image area, that is, the first image area is an area in which the same light source exists in the image area unit.
Optionally, in this embodiment of the application, if the temperature difference between two adjacent image regions is less than or equal to a temperature difference threshold, that is, the two adjacent image regions are determined to be the same light source s, the two adjacent image regions may be regarded as s1 (i.e., a first image region), and all other adjacent image regions are traversed to determine whether the same light source exists, and the sets of image regions in the other adjacent image regions where the same light source exists are respectively regarded as s2 (e.g., a second image region), s3 (e.g., a third image region), and the like.
Illustratively, taking an electronic device as a mobile phone as an example, as shown in fig. 2, an image area unit in the mobile phone preview image interface 10 includes areas 1 to 6, where area 1 is adjacent to both area 2 and area 4, area 2 is adjacent to both area 3 and area 5, area 3 is adjacent to area 6, area 4 is adjacent to area 5, and area 5 is adjacent to area 6. If the temperature difference value between the area 1 and the area 2 is smaller than the temperature difference threshold value, it is determined that the same light source exists in the area 1 and the area 2, that is, the area 1 and the area 2 are determined as a group of image areas (for example, an area group a, which is denoted by 11 in fig. 2); if the temperature difference between the area 2 and the area 5 is smaller than the temperature difference threshold, it is determined that the same light source exists in the area 2 and the area 5, that is, the area 2 and the area 5 are determined as a group of image areas (for example, area group b, indicated by 12 in fig. 2); if the temperature difference between the area 5 and the area 6 is smaller than the temperature difference threshold, it is determined that the same light source exists in the area 5 and the area 6, that is, the area 5 and the area 6 are determined as a group of image areas (for example, an area group c, indicated by 13 in fig. 2); in this manner, the cellular phone can determine K sets of image areas, i.e., an area group a, an area group b, and an area group c, from the image area unit, thereby determining all the image areas in the area group a as the first image area, all the image areas in the area group b as the second image area, and all the image areas in the area group c as the third image area.
Optionally, in this embodiment of the application, the electronic device may determine a temperature difference value according to temperature values of every two adjacent image areas.
Optionally, in this embodiment of the application, the electronic device may calculate a difference between temperature values of every two adjacent image areas to obtain a temperature difference, and determine whether the same light source exists in every two adjacent image areas according to each temperature difference. So that the electronic device can determine the first image area from the image area unit based on the temperature difference.
Optionally, in this embodiment of the application, for each temperature difference value of the at least one temperature difference value, the electronic device may determine a size relationship between one temperature difference value and a temperature difference threshold (i.e., a preset threshold described in the following embodiments) to determine whether there is a different light source in two adjacent image regions corresponding to the one temperature difference value, so that in a case that there is a different light source in the two adjacent image regions, the two adjacent image regions are determined as regions corresponding to the same light source, and thus, according to a determination result of each temperature difference value, M image regions (i.e., a first image region, a second image region, and a third image region) are determined from the image region unit.
It should be noted that each of the at least one temperature difference values is a difference between temperature values of any two adjacent image areas.
Optionally, in this embodiment of the application, the two adjacent image areas may be any one of the following: right and left adjacent image areas, upper and lower adjacent image areas, and diagonally adjacent image areas. The method can be determined according to actual use requirements, and the embodiment of the application is not limited.
Step 201b, the electronic device calculates first automatic white balance parameter information of the first image area based on the first gray scale parameter information.
In this embodiment, the electronic device may perform correction processing on the first gray scale parameter information of the first image area to obtain first automatic white balance parameter information of the first image area.
In an embodiment of the present application, the first gray parameter information is used to indicate a color characteristic of the first image region.
Optionally, in this embodiment of the application, the electronic device may input the image parameter of the first image region into a preset automatic white balance algorithm to calculate a first parameter of the first image region, that is, a first gray scale parameter, where the first gray scale parameter may reflect an average gray scale value of three RGB channels of the image region.
Optionally, in this embodiment of the application, the image parameter of the first image region may include at least one of: color parameters, brightness parameters, gray scale parameters, color temperature parameters, etc.
Optionally, in this embodiment of the application, the electronic device may perform correction processing on the first gray scale parameter by using a preset correction algorithm to obtain first automatic white balance parameter information. Specifically, the electronic device may perform an inverse operation (1/first gray parameter) on the first gray parameter to inversely complement first automatic white balance parameter information (hereinafter, abbreviated as AWB gain2) of the first image area.
Optionally, in this embodiment of the application, the electronic device may determine M target automatic white balance parameters according to image parameters of M image regions. Each of the M image regions corresponds to a target automatic white balance parameter, respectively.
Optionally, in this embodiment of the application, for each image area in the M image areas, the electronic device may use a preset automatic white balance algorithm, and according to an image parameter of one image area, calculate to obtain automatic white balance parameter information corresponding to the one image area, so as to obtain the M automatic white balance parameter information.
Optionally, in this embodiment of the application, the electronic device may calculate an average temperature value of the shot preview image, set an indoor and outdoor temperature threshold, and determine that the current shooting scene is an outdoor scene if the average temperature value of the shot preview image is greater than the indoor and outdoor temperature threshold, otherwise, determine that the current shooting scene is an indoor scene.
And step 201c, the electronic device calculates target automatic white balance parameter information based on the first automatic white balance parameter information and the second automatic white balance parameter information.
In an embodiment of the present application, the second automatic white balance parameter information is automatic white balance parameter information corresponding to a captured preview image.
In this embodiment, the electronic device may determine, as the target automatic white balance parameter information, a difference between the second automatic white balance parameter information of the captured preview image and the first automatic white balance parameter information of the first image area.
It is to be understood that the above-mentioned target automatic white balance parameter information can be understood as an automatic white balance compensation gain (hereinafter referred to as AWB gain3) that one image area needs to be compensated.
Exemplarily, it is assumed that a shooting preview image includes a blue sky, a mountain, and a shadow area, which are 3 areas corresponding to different light sources; if the current shooting scene is judged to be an outdoor scene, the temperature value at the shadow area is the lowest, the image parameters of the divided shadow area are input into a preset AWB algorithm, a single gray world parameter (simple gray world) of the shadow area, namely a first gray parameter, is counted, the AWB gain2 of the shadow area is reversely compensated through reciprocal operation, and then the difference value between the AWB gain2 and the AWB gain1 is calculated, so that the AWB gain3 which is actually required to be compensated in the shadow area is obtained.
Step 202a, the electronic device performs image processing on the first image area based on the target automatic white balance parameter information, and outputs a target image.
In the embodiment of the present application, the electronic device may input the target automatic white balance parameter information into an Image Signal Processor (ISP) to perform compensation processing on the first Image area in the captured preview Image through the ISP, so as to complete local automatic white balance adjustment on the captured preview Image.
Optionally, in this embodiment of the present application, the electronic device may perform automatic white balance compensation processing on an image area in the captured preview image by using at least one piece of target automatic white balance parameter information.
It is understood that, for each image area in the captured preview image, the electronic device may perform automatic white balance compensation processing on the image area corresponding to one target automatic white balance parameter by using the one target automatic white balance parameter.
In the embodiment of the application, the electronic device may classify the image area units according to the temperature information of the object to be photographed in each image area unit to obtain the first image area, and obtain the first gray parameter information of the first image area, so that the electronic device may obtain the first automatic white balance parameter information according to the first gray parameter information, and obtain the target automatic white balance parameter information according to the first automatic white balance parameter information and the automatic white balance parameter information of the preview interface, so that the electronic device may perform image processing on the first image according to the target automatic white balance parameter information, that is, the electronic device may perform automatic white balance processing on the first image area according to the divided first image areas, thereby avoiding the problem that local color cast may occur after performing image optimization on the conventional automatic white balance due to different light sources, the quality of the shot image is improved.
Alternatively, in this embodiment of the application, the step 201 may be specifically implemented by the following steps 201d to 201g, and the step 202 may be specifically implemented by the following step 202 b.
Step 201d, the electronic device classifies the image area units based on the temperature information of the shooting object corresponding to each image area unit to obtain a second image area and a third image area.
It should be noted that, for the electronic device that can obtain the second image area and the third image area, reference may be made to the description in step 201a, and details are not repeated here.
Step 201e, the electronic device obtains second gray parameter information of all image area units in the second image area, and third gray parameter information of all image area units in the third image area.
In this embodiment, the electronic device may input the image parameters of all the image area units in the second image area into a preset AWB algorithm to count the second gray scale parameter of the second image area, and input the image parameters of all the image area units in the third image area into the preset AWB algorithm to count the third gray scale parameter of the third image area.
Optionally, in this embodiment of the application, the image parameter of the image area unit may include at least one of: color parameters, brightness parameters, gray scale parameters, color temperature parameters, etc.
In step 201f, the electronic device determines a second weight of the second image area and a third weight of the third image area based on the second gray parameter information and the third gray parameter information.
In this embodiment of the application, under the condition that the second gray scale parameter information of the second image area and the third gray scale parameter information of the third image area are both within the preset brightness range, the electronic device may adjust color temperature values of the second image area and the third image area, that is, determine the second weight of the second image area and the third weight of the third image area, so that the electronic device may determine the target automatic white balance parameter information corresponding to the captured preview image according to the image parameters of the second image area and the third image area after the weights are adjusted.
Optionally, in this embodiment of the application, the electronic device may determine, according to a brightness value of the captured preview image output by the preset AWB algorithm, a brightness range/brightness level (i.e., a level L1, a level L2, and a level L3) in which the brightness value is located, and determine whether the current captured scene is an indoor scene or an outdoor scene according to a temperature value of the captured preview image, and then, the electronic device may process the second image area and the third image area to adjust a weight of the color temperature value of the local area (i.e., an image area whose brightness value is within the preset brightness range) in combination with the color temperature value of the image area whose brightness value is within the preset brightness range and the brightness value of the captured preview image.
For example, assuming that the temperature values of the blue area and the white area in the captured preview image match, it is determined that the blue area and the white area are areas of the same light source. The color temperature values of the blue region and the white region are greatly different, and when the brightness value of the shooting preview image in the current shooting scene is smaller than L1, it is determined that the shooting scene is brighter, and the weight of the color temperature value of the region with smaller brightness value (i.e. the brightness value is smaller than L1) in the shooting preview image can be increased to increase the weight corresponding to the high color temperature region, and the final automatic white balance compensation gain (i.e. the target automatic white balance parameter of the high color temperature region) is calculated.
And step 201g, the electronic device adjusts the second automatic white balance parameter information based on the second weight and the third weight, and calculates to obtain target automatic white balance parameter information.
In this embodiment of the application, the second automatic white balance parameter information is automatic white balance parameter information corresponding to a captured preview image.
It should be noted that, for the method for calculating, by the electronic device, target automatic white balance parameter information of the captured preview image according to the image parameters of the second image area and the third image area after the color temperature value weight is adjusted, reference may be made to the description in step 201b and step 201c, and details are not repeated here.
And step 202b, the electronic equipment performs image processing on the second image area and the third image area based on the target automatic white balance parameter information, and outputs a target image.
In this embodiment, the electronic device may input the target automatic white balance parameter information into an Image Signal Processor (ISP) to perform area compensation processing on the second Image area and the third Image area in the captured preview Image through the ISP, so as to complete global automatic white balance adjustment on the captured preview Image.
Optionally, in this embodiment of the application, the electronic device determines, according to image parameters of other image areas, target automatic white balance parameter information of the other areas, where the other image areas are image areas other than the second image area and the third image area in the captured preview image.
It should be noted that, for the method for determining, by the electronic device, the target automatic white balance parameter information of other areas according to the image parameters of other image areas, reference may be made to the description in step 201b and step 201c, which is not described herein again.
In the embodiment of the application, when the brightness value of the shot preview image is higher or lower, the electronic device may adjust the color temperature value of the image area with the higher or lower brightness value, determine the target automatic white balance parameter information of the image area based on the image parameter of the image area after the color temperature value is adjusted, and balance the brightness of each image area in the shot preview image by adjusting the weight of the color temperature value, so as to obtain the automatic white balance compensation gain of each image area, so as to implement the global automatic white balance processing of the shot preview image.
The embodiment of the application provides an image processing method, wherein electronic equipment performs area division on a shooting preview image, acquires a temperature value of each image area unit through a temperature sensor, determines that a current shooting scene is an indoor scene or an outdoor scene according to the temperature value of each image area unit, and determines whether the shooting preview image corresponds to a plurality of different light sources, so as to determine M image areas (namely image areas corresponding to different light sources in the shooting preview image in the outdoor scene), and then the electronic equipment can determine an AWB parameter of each image area in the M image areas, and performs optimization processing on the image according to the AWB parameter, so as to improve the quality of the shooting image.
Optionally, in this embodiment of the present application, before step 201 described above, the image processing method provided in this embodiment of the present application further includes step 301 described below.
Step 301, the electronic device obtains temperature information of a shooting object corresponding to each image area unit in the shooting preview image.
In this embodiment of the application, the electronic device may perform area division on the captured preview image to obtain N image area units, and then the electronic device may acquire temperature information corresponding to each image area, where N is an integer greater than 1.
Optionally, in this embodiment of the application, after the user triggers the electronic device to start the camera, the electronic device may acquire an image through the camera, and display a shooting preview interface, so as to display the acquired image in the shooting preview interface (i.e., shooting preview image); then, the electronic device may perform area division on the photographed preview image through the temperature sensor to divide the photographed preview image into N × m (i.e., N rows by m columns) block areas to obtain N image area units, where N and m are positive integers.
Optionally, in this embodiment of the application, the user may start the camera through a target application program, where the target application program may be a camera application program, an album application program, or another application program with a shooting function.
Optionally, in this embodiment of the application, different shooting objects correspond to different image temperature values; the temperature sensor may perform area division on the photographing preview image according to a temperature value of the photographing object included in the photographing preview image.
For example, when the shooting preview image includes a sky, a tree in the sun, and a shadow region, the mobile phone may perform region division on the shooting preview image according to temperature values of the sky, the tree in the sun, and the shadow region.
In the embodiment of the application, the electronic equipment can perform area division on the shot preview image and acquire the temperature value of each image area through the temperature sensor, so that the electronic equipment can determine the image area unit according to the temperature value of each image area, then the electronic equipment can determine the automatic white balance parameter of each image area in the image area unit, the image is subjected to optimization processing according to the automatic white balance parameter, and the quality of the shot image is improved.
Optionally, in this embodiment of the present application, before the step 202, the image processing method provided in this embodiment of the present application further includes the following step 302, and the step 202 may be specifically realized by the following step 202 c.
Step 302, the electronic device receives a first input of a user.
Optionally, in this embodiment of the application, the first input is a long-press input, a click input, a sliding input, or a preset trajectory input of the user to the shooting control in the shooting preview interface; alternatively, the first key may be a pressing input of a physical key or a combination of physical keys of the electronic device by the user. The specific method can be determined according to actual use requirements, and is not limited in the embodiment of the application.
And step 202c, the electronic equipment responds to the first input, performs image processing on the shot preview image based on the target automatic white balance parameter information, and outputs a target image.
In the embodiment of the application, after receiving the shooting input of the user, the electronic device can shoot to obtain the target picture corresponding to the shooting preview image, and perform image processing on the target picture based on the target automatic white balance parameter information.
In the embodiment of the application, the electronic equipment can automatically perform white balance processing on the shot preview image according to the shooting input of the user and output the target image, so that the problem of color cast of the shot image under the condition that the shooting environment is complex is avoided, and the picture shooting effect of the electronic equipment is improved.
It should be noted that, in the image processing method provided in the embodiment of the present application, the execution subject may be an electronic device, or an image processing apparatus, or a control module in the image processing apparatus for executing the image processing method. The embodiment of the present application takes an example of an electronic device executing an image processing method, and describes an image processing apparatus provided in the embodiment of the present application.
Fig. 3 shows a schematic diagram of a possible structure of an image processing apparatus according to an embodiment of the present application. As shown in fig. 3, the image processing apparatus 70 may include: a determination module 71 and a processing module 72.
The determining module 71 is configured to determine target automatic white balance parameter information of the captured preview image based on the temperature information of the captured object corresponding to each image area unit in the captured preview image. And the processing module 72 is configured to perform image processing on the captured preview image based on the target automatic white balance parameter information, and output a target image.
In one possible implementation manner, the image processing apparatus 70 provided in the embodiment of the present application may further include: and an acquisition module. And the acquisition module is used for acquiring the temperature information of the shooting object corresponding to each image area unit in the shooting preview image before determining the target automatic white balance parameter information of the shooting preview image based on the temperature information of the shooting object corresponding to each image area unit in the shooting preview image.
In a possible implementation manner, the determining module 71 is specifically configured to classify the image area units based on the temperature information of the shooting object corresponding to each image area unit to obtain a first image area; acquiring first gray parameter information of all image area units in a first image area; calculating first automatic white balance parameter information of the first image area based on the first gray parameter information; and calculating to obtain target automatic white balance parameter information based on the first automatic white balance parameter information and second automatic white balance parameter information, wherein the second automatic white balance parameter information is the automatic white balance parameter information corresponding to the shot preview image. The processing module 72 is specifically configured to perform image processing on the first image region based on the target automatic white balance parameter information.
In a possible implementation manner, the determining module 71 is specifically configured to classify the image area units based on the temperature information of the shooting object corresponding to each image area unit to obtain a second image area and a third image area; acquiring second gray parameter information of all image area units in a second image area and third gray parameter information of all image area units in a third image area; determining a second weight of the second image area and a third weight of the third image area based on the second gray parameter information and the third gray parameter information; and adjusting second automatic white balance parameter information based on the second weight and the third weight, and calculating to obtain target automatic white balance parameter information, wherein the second automatic white balance parameter information is the automatic white balance parameter information corresponding to the shot preview image. The processing module 72 is specifically configured to perform image processing on the second image area and the third image area based on the target automatic white balance parameter information.
In one possible implementation manner, the image processing apparatus 70 provided in the embodiment of the present application may further include: and a receiving module. And the receiving module is used for receiving a first input of a user before image processing is carried out on the shooting preview image based on the target automatic white balance parameter information. And the processing module 72 is specifically configured to perform image processing on the captured preview image based on the target automatic white balance parameter information in response to the first input.
The embodiment of the application provides an image processing device, because the image processing device can perform area division on a shooting preview image, and acquire a temperature value of each image area unit through a temperature sensor, so as to determine that a current shooting scene is an indoor scene or an outdoor scene according to the temperature value of each image area unit, and determine whether the shooting preview image corresponds to a plurality of different light sources, thereby determining M image areas (that is, image areas corresponding to different light sources in the shooting preview image in the outdoor scene), then the image processing device can determine an AWB parameter of each image area in the M image areas, and perform optimization processing on the image according to the AWB parameter, so as to improve the quality of the shooting image.
The image processing apparatus in the embodiment of the present application may be an apparatus, or may be a component, an integrated circuit, or a chip in an electronic device. The device can be mobile electronic equipment or non-mobile electronic equipment. By way of example, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palm top computer, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a Personal Digital Assistant (PDA), and the like, and the non-mobile electronic device may be a server, a Network Attached Storage (NAS), a Personal Computer (PC), a Television (TV), a teller machine or a self-service machine, and the like, and the embodiments of the present application are not particularly limited.
The image processing apparatus in the embodiment of the present application may be an apparatus having an operating system. The operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, and embodiments of the present application are not limited specifically.
The image processing apparatus provided in the embodiment of the present application can implement each process implemented by the foregoing method embodiment, and can achieve the same technical effect, and for avoiding repetition, details are not repeated here.
Optionally, as shown in fig. 4, an electronic device 90 is further provided in this embodiment of the present application, and includes a processor 91, a memory 92, and a program or an instruction stored in the memory 92 and capable of being executed on the processor 91, where the program or the instruction is executed by the processor 91 to implement each process of the foregoing method embodiment, and can achieve the same technical effect, and no further description is provided here to avoid repetition.
It should be noted that the electronic device in the embodiment of the present application includes the mobile electronic device and the non-mobile electronic device described above.
Fig. 5 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
The electronic device 100 includes, but is not limited to: a radio frequency unit 101, a network module 102, an audio output unit 103, an input unit 104, a sensor 105, a display unit 106, a user input unit 107, an interface unit 108, a memory 109, and a processor 110.
Those skilled in the art will appreciate that the electronic device 100 may further comprise a power source (e.g., a battery) for supplying power to various components, and the power source may be logically connected to the processor 110 through a power management system, so as to implement functions of managing charging, discharging, and power consumption through the power management system. The electronic device structure shown in fig. 5 does not constitute a limitation of the electronic device, and the electronic device may include more or less components than those shown, or combine some components, or arrange different components, and thus, the description is omitted here.
The processor 110 is configured to determine target automatic white balance parameter information of the captured preview image based on temperature information of a captured object corresponding to each image area unit in the captured preview image; and based on the target automatic white balance parameter information, performing image processing on the shot preview image and outputting a target image.
The embodiment of the application provides an electronic device, because the electronic device can perform area division on a shooting preview image, and acquire a temperature value of each image area unit through a temperature sensor, so as to determine that a current shooting scene is an indoor scene or an outdoor scene according to the temperature value of each image area unit, and determine whether the shooting preview image corresponds to a plurality of different light sources, thereby determining M image areas (that is, image areas corresponding to different light sources in the shooting preview image in the outdoor scene), then the electronic device can determine an AWB parameter of each image area in the M image areas, and perform optimization processing on the image according to the AWB parameter, so as to improve the quality of the shooting image.
Optionally, in this embodiment of the application, the processor 110 is further configured to acquire temperature information of the photographic subject corresponding to each image area unit in the captured preview image before determining target auto white balance parameter information of the captured preview image based on the temperature information of the photographic subject corresponding to each image area unit in the captured preview image.
Optionally, in this embodiment of the application, the processor 110 is specifically configured to classify the image area units based on the temperature information of the shooting object corresponding to each image area unit to obtain a first image area; acquiring first gray parameter information of all image area units in a first image area; calculating first automatic white balance parameter information of the first image area based on the first gray parameter information; and calculating to obtain target automatic white balance parameter information based on the first automatic white balance parameter information and second automatic white balance parameter information, wherein the second automatic white balance parameter information is the automatic white balance parameter information corresponding to the shot preview image. The processor 110 is specifically configured to perform image processing on the first image region based on the target automatic white balance parameter information.
Optionally, in this embodiment of the application, the processor 110 is specifically configured to classify the image area units based on the temperature information of the shooting object corresponding to each image area unit, so as to obtain a second image area and a third image area; acquiring second gray parameter information of all image area units in a second image area and third gray parameter information of all image area units in a third image area; determining a second weight of the second image area and a third weight of the third image area based on the second gray parameter information and the third gray parameter information; and adjusting second automatic white balance parameter information based on the second weight and the third weight, and calculating to obtain target automatic white balance parameter information, wherein the second automatic white balance parameter information is the automatic white balance parameter information corresponding to the shooting preview image. The processor 110 is specifically configured to perform image processing on the second image area and the third image area based on the target automatic white balance parameter information.
Optionally, in this embodiment of the application, the user input unit 107 is further configured to receive a first input of a user. The processor 110 is specifically configured to perform image processing on the captured preview image based on the target auto white balance parameter information in response to the first input.
The electronic device provided by the embodiment of the application can realize each process realized by the method embodiment, and can achieve the same technical effect, and for avoiding repetition, the details are not repeated here.
The beneficial effects of the various implementation manners in this embodiment may specifically refer to the beneficial effects of the corresponding implementation manners in the above method embodiments, and are not described herein again to avoid repetition.
It should be understood that, in the embodiment of the present application, the input Unit 104 may include a Graphics Processing Unit (GPU) 1041 and a microphone 1042, and the Graphics Processing Unit 1041 processes image data of a still picture or a video obtained by an image capturing device (such as a camera) in a video capturing mode or an image capturing mode. The display unit 106 may include a display panel 1061, and the display panel 1061 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 107 includes a touch panel 1071 and other input devices 1072. The touch panel 1071 is also referred to as a touch screen. The touch panel 1071 may include two parts of a touch detection device and a touch controller. Other input devices 1072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail herein. The memory 109 may be used to store software programs as well as various data including, but not limited to, application programs and an operating system. The processor 110 may integrate an application processor, which primarily handles operating systems, user interfaces, applications, etc., and a modem processor, which primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 110.
The embodiment of the present application further provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or the instruction is executed by a processor, the program or the instruction implements the processes of the foregoing method embodiments, and can achieve the same technical effects, and in order to avoid repetition, details are not repeated here.
The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and so on.
The embodiment of the present application further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to execute a program or an instruction to implement each process of the foregoing method embodiments, and can achieve the same technical effect, and in order to avoid repetition, the details are not repeated here.
It should be understood that the chips mentioned in the embodiments of the present application may also be referred to as system-on-chip, system-on-chip or system-on-chip, etc.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. Further, it should be noted that the scope of the methods and apparatus of the embodiments of the present application is not limited to performing the functions in the order illustrated or discussed, but may include performing the functions in a substantially simultaneous manner or in a reverse order based on the functions involved, e.g., the methods described may be performed in an order different than that described, and various steps may be added, omitted, or combined. In addition, features described with reference to certain examples may be combined in other examples.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present application.
While the present embodiments have been described with reference to the accompanying drawings, it is to be understood that the invention is not limited to the precise embodiments described above, which are meant to be illustrative and not restrictive, and that various changes may be made therein by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (10)

1. An image processing method, characterized in that the method comprises:
determining target automatic white balance parameter information of a shooting preview image based on temperature information of a shooting object corresponding to each image area unit in the shooting preview image;
and performing image processing on the shooting preview image based on the target automatic white balance parameter information, and outputting a target image.
2. The method according to claim 1, wherein before determining the target auto white balance parameter information of the capture preview image based on the temperature information of the subject corresponding to each image area unit in the capture preview image, the method further comprises:
and acquiring the temperature information of the shooting object corresponding to each image area unit in the shooting preview image.
3. The method according to claim 1, wherein the determining target auto white balance parameter information of the capture preview image based on the temperature information of the capture object corresponding to each image area unit in the capture preview image comprises:
classifying the image area units based on the temperature information of the shooting object corresponding to each image area unit to obtain a first image area;
acquiring first gray parameter information of all image area units in the first image area;
calculating first automatic white balance parameter information of the first image area based on the first gray parameter information;
calculating to obtain the target automatic white balance parameter information based on the first automatic white balance parameter information and second automatic white balance parameter information, wherein the second automatic white balance parameter information is the automatic white balance parameter information corresponding to the shooting preview image;
the image processing of the shot preview image based on the target automatic white balance parameter information includes:
and performing image processing on the first image area based on the target automatic white balance parameter information.
4. The method according to claim 1, wherein the determining target auto white balance parameter information of the capture preview image based on the temperature information of the capture object corresponding to each image area unit in the capture preview image comprises:
classifying the image area units based on the temperature information of the shooting object corresponding to each image area unit to obtain a second image area and a third image area;
acquiring second gray parameter information of all image area units in the second image area and third gray parameter information of all image area units in the third image area;
determining a second weight of the second image region and a third weight of the third image region based on the second gray parameter information and the third gray parameter information;
adjusting second automatic white balance parameter information based on the second weight and the third weight, and calculating to obtain the target automatic white balance parameter information, wherein the second automatic white balance parameter information is the automatic white balance parameter information corresponding to the shooting preview image;
the image processing of the shot preview image based on the target automatic white balance parameter information includes:
and performing image processing on the second image area and the third image area based on the target automatic white balance parameter information.
5. The method according to claim 1, wherein before performing image processing on the captured preview image based on the target automatic white balance parameter information, the method further comprises:
receiving a first input of a user;
the image processing of the shot preview image based on the target automatic white balance parameter information includes:
and responding to the first input, and performing image processing on the shooting preview image based on the target automatic white balance parameter information.
6. An image processing apparatus characterized by comprising: a determining module and a processing module;
the determining module is used for determining target automatic white balance parameter information of the shooting preview image based on the temperature information of the shooting object corresponding to each image area unit in the shooting preview image;
and the processing module is used for carrying out image processing on the shooting preview image based on the target automatic white balance parameter information and outputting a target image.
7. The apparatus according to claim 6, wherein the image processing apparatus further comprises: an acquisition module;
the acquisition module is used for acquiring the temperature information of the shooting object corresponding to each image area unit in the shooting preview image before determining the target automatic white balance parameter information of the shooting preview image based on the temperature information of the shooting object corresponding to each image area unit in the shooting preview image.
8. The apparatus of claim 6,
the determining module is specifically configured to classify the image area units based on the temperature information of the photographic object corresponding to each image area unit to obtain a first image area; acquiring first gray parameter information of all image area units in the first image area; calculating first automatic white balance parameter information of the first image area based on the first gray parameter information; calculating to obtain the target automatic white balance parameter information based on the first automatic white balance parameter information and second automatic white balance parameter information, wherein the second automatic white balance parameter information is the automatic white balance parameter information corresponding to the shooting preview image;
the processing module is specifically configured to perform image processing on the first image region based on the target automatic white balance parameter information.
9. The apparatus of claim 6,
the determining module is specifically configured to classify the image area units based on the temperature information of the photographic object corresponding to each image area unit to obtain a second image area and a third image area; acquiring second gray parameter information of all image area units in the second image area and third gray parameter information of all image area units in the third image area; determining a second weight of the second image region and a third weight of the third image region based on the second gray parameter information and the third gray parameter information; adjusting second automatic white balance parameter information based on the second weight and the third weight, and calculating to obtain the target automatic white balance parameter information, wherein the second automatic white balance parameter information is the automatic white balance parameter information corresponding to the shooting preview image;
the processing module is specifically configured to perform image processing on the second image area and the third image area based on the target automatic white balance parameter information.
10. An electronic device comprising a processor, a memory and a program or instructions stored on the memory and executable on the processor, the program or instructions, when executed by the processor, implementing the steps of the image processing method according to any one of claims 1 to 5.
CN202111315718.6A 2021-11-08 2021-11-08 Image processing method and device and electronic equipment Active CN114143447B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111315718.6A CN114143447B (en) 2021-11-08 2021-11-08 Image processing method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111315718.6A CN114143447B (en) 2021-11-08 2021-11-08 Image processing method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN114143447A true CN114143447A (en) 2022-03-04
CN114143447B CN114143447B (en) 2024-03-05

Family

ID=80393285

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111315718.6A Active CN114143447B (en) 2021-11-08 2021-11-08 Image processing method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN114143447B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102892010A (en) * 2012-10-22 2013-01-23 浙江宇视科技有限公司 White balance processing method and device under multiple light sources
CN107483908A (en) * 2017-09-27 2017-12-15 歌尔科技有限公司 White balance calibration method and electronic equipment
CN107800944A (en) * 2016-08-31 2018-03-13 中兴通讯股份有限公司 A kind of white balance adjustment method, device and mobile terminal
CN107959841A (en) * 2017-12-07 2018-04-24 广东欧珀移动通信有限公司 Image processing method, device, storage medium and electronic equipment
CN107959851A (en) * 2017-12-25 2018-04-24 广东欧珀移动通信有限公司 Colour temperature detection method and device, computer-readable recording medium and computer equipment
CN110691226A (en) * 2019-09-19 2020-01-14 RealMe重庆移动通信有限公司 Image processing method, device, terminal and computer readable storage medium
CN111641819A (en) * 2020-05-19 2020-09-08 浙江大华技术股份有限公司 Method, device, system and computer device for white balance gain correction
CN111953955A (en) * 2020-08-26 2020-11-17 维沃移动通信有限公司 White balance compensation method and device and electronic equipment
CN113301318A (en) * 2021-05-24 2021-08-24 展讯半导体(南京)有限公司 Image white balance processing method and device, storage medium and terminal

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102892010A (en) * 2012-10-22 2013-01-23 浙江宇视科技有限公司 White balance processing method and device under multiple light sources
CN107800944A (en) * 2016-08-31 2018-03-13 中兴通讯股份有限公司 A kind of white balance adjustment method, device and mobile terminal
CN107483908A (en) * 2017-09-27 2017-12-15 歌尔科技有限公司 White balance calibration method and electronic equipment
CN107959841A (en) * 2017-12-07 2018-04-24 广东欧珀移动通信有限公司 Image processing method, device, storage medium and electronic equipment
CN107959851A (en) * 2017-12-25 2018-04-24 广东欧珀移动通信有限公司 Colour temperature detection method and device, computer-readable recording medium and computer equipment
CN110691226A (en) * 2019-09-19 2020-01-14 RealMe重庆移动通信有限公司 Image processing method, device, terminal and computer readable storage medium
CN111641819A (en) * 2020-05-19 2020-09-08 浙江大华技术股份有限公司 Method, device, system and computer device for white balance gain correction
CN111953955A (en) * 2020-08-26 2020-11-17 维沃移动通信有限公司 White balance compensation method and device and electronic equipment
CN113301318A (en) * 2021-05-24 2021-08-24 展讯半导体(南京)有限公司 Image white balance processing method and device, storage medium and terminal

Also Published As

Publication number Publication date
CN114143447B (en) 2024-03-05

Similar Documents

Publication Publication Date Title
CN112150399B (en) Image enhancement method based on wide dynamic range and electronic equipment
US9451173B2 (en) Electronic device and control method of the same
CN104883504B (en) Open the method and device of high dynamic range HDR functions on intelligent terminal
CN100553301C (en) The modification method of brightness
CN111327824B (en) Shooting parameter selection method and device, storage medium and electronic equipment
US20200412942A1 (en) Photographing Method and Device, and Related Electronic Apparatus
CN111835982B (en) Image acquisition method, image acquisition device, electronic device, and storage medium
CN113132695B (en) Lens shading correction method and device and electronic equipment
CN113014803A (en) Filter adding method and device and electronic equipment
CN112333385B (en) Electronic anti-shake control method and device
CN112037160A (en) Image processing method, device and equipment
CN111901519B (en) Screen light supplement method and device and electronic equipment
CN112312035B (en) Exposure parameter adjusting method, exposure parameter adjusting device and electronic equipment
US8384801B2 (en) Scene-dependent auto exposure control
CN114143447B (en) Image processing method and device and electronic equipment
CN116055891A (en) Image processing method and device
CN109672829A (en) Method of adjustment, device, storage medium and the terminal of brightness of image
CN115439386A (en) Image fusion method and device, electronic equipment and storage medium
CN114816619A (en) Information processing method and electronic equipment
CN113962840A (en) Image processing method, image processing device, electronic equipment and storage medium
CN113989387A (en) Camera shooting parameter adjusting method and device and electronic equipment
CN113487497A (en) Image processing method and device and electronic equipment
CN112446848A (en) Image processing method and device and electronic equipment
CN111339330A (en) Photo processing method and device, storage medium and electronic equipment
CN112419218B (en) Image processing method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant