CN114125302A - Image adjusting method and device - Google Patents

Image adjusting method and device Download PDF

Info

Publication number
CN114125302A
CN114125302A CN202111435896.2A CN202111435896A CN114125302A CN 114125302 A CN114125302 A CN 114125302A CN 202111435896 A CN202111435896 A CN 202111435896A CN 114125302 A CN114125302 A CN 114125302A
Authority
CN
China
Prior art keywords
image
white balance
balance parameter
face
camera
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.)
Pending
Application number
CN202111435896.2A
Other languages
Chinese (zh)
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 CN202111435896.2A priority Critical patent/CN114125302A/en
Publication of CN114125302A publication Critical patent/CN114125302A/en
Pending legal-status Critical Current

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/61Control of cameras or camera modules based on recognised objects
    • H04N23/611Control of cameras or camera modules based on recognised objects where the recognised objects include parts of the human body
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof
    • H04N23/84Camera processing pipelines; Components thereof for processing colour signals
    • H04N23/88Camera processing pipelines; Components thereof for processing colour signals for colour balance, e.g. white-balance circuits or colour temperature control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/77Circuits for processing the brightness signal and the chrominance signal relative to each other, e.g. adjusting the phase of the brightness signal relative to the colour signal, correcting differential gain or differential phase

Abstract

The application discloses an image adjusting method and device, and belongs to the technical field of image processing. The image adjusting method comprises the following steps: acquiring a white balance parameter of a first image under the condition that light source parameters of the environment where a target face and a shooting object are located are consistent; the first image is an image acquired by a first camera for the target face, and the shooting object is shot by a second camera; performing white balance adjustment on a second image according to the white balance parameter of the first image; the second image is an image obtained by shooting the shooting object by the second camera, and the second image does not include a face image or the proportion value of the face image included in the second image is smaller than the proportion value of the face image in the first image.

Description

Image adjusting method and device
Technical Field
The application belongs to the technical field of image processing, and particularly relates to an image adjusting method and device.
Background
According to the principle of visual color constancy, when human eyes judge the color of the same object under different illumination conditions, the subjective perception color is the same. However, the imaging device (such as a camera, a mobile phone with a photographing function, etc.) does not have such an adjustment function, different lighting environments may cause a certain deviation between the color of the acquired image and the real color, and the influence of the lighting environment on the color appearance needs to be eliminated through a white balance algorithm.
In the prior art, some imaging devices have a white balance automatic adjustment function, but when the color of a shot image is complex, it is difficult to obtain more accurate white balance parameters, so that the image adjustment effect is poor, and the shot image cannot meet the user requirements.
Disclosure of Invention
The embodiment of the application aims to provide an image adjusting method and an image adjusting device, which can solve the problem that in the prior art, a relatively accurate white balance parameter is difficult to obtain when an image is shot.
In a first aspect, an embodiment of the present application provides an image adjusting method, where the method includes:
acquiring a white balance parameter of a first image under the condition that light source parameters of the environment where a target face and a shooting object are located are consistent; the first image is an image acquired by a first camera for the target face, and the shooting object is shot by a second camera;
performing white balance adjustment on a second image according to the white balance parameter of the first image; the second image is an image obtained by shooting the shooting object by the second camera, and the second image does not include a face image or the proportion value of the face image included in the second image is smaller than the proportion value of the face image in the first image.
In a second aspect, an embodiment of the present application provides an image adjusting apparatus, including:
the first acquisition module is used for acquiring the white balance parameter of the first image under the condition that the user and the shooting object are under the same light source; the first image is collected through a first camera, and the shooting object is shot through a second camera outside the first camera;
the adjusting module is used for carrying out white balance adjustment on the second image according to the white balance parameter of the first image; and the second image is obtained by shooting the shooting object by the second camera.
In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory, where the memory stores a program or instructions executable on the processor, and the program or instructions, when executed by the processor, implement the steps in the image adjusting method according to the first aspect.
In a fourth aspect, the present application provides a readable storage medium, on which a program or instructions are stored, and when the program or instructions are executed by a processor, the program or instructions implement the steps in the image adjusting 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 image adjustment method according to the first aspect.
In a sixth aspect, embodiments of the present application provide a computer program product, stored on a storage medium, for execution by at least one processor to implement the method according to the first aspect.
In the embodiment of the application, according to the white balance parameter of the first image with the larger proportion value of the face image to the whole image, the white balance adjustment is carried out on the second image without the face image or with the smaller proportion value of the face image to the whole image. The face image in the first image has a larger proportion, so that more face color characteristic information can be acquired, and the white balance parameter obtained based on the face color characteristic information is more accurate than the white balance parameter obtained based on an image without the face image or with a smaller proportion of the face image, so that the white balance adjustment is performed on the second image according to the white balance parameter of the first image, the color of the image after the adjustment of the second image is closer to the real color, and the image with higher quality can be acquired.
Drawings
Fig. 1 is a schematic flowchart of an image adjustment method according to an embodiment of the present application;
FIG. 2 is a schematic diagram of an example provided by an embodiment of the present application;
fig. 3 is a schematic block diagram of an image adjusting apparatus provided in an embodiment of the present application;
FIG. 4 is a block diagram of an electronic device provided by an embodiment of the application;
fig. 5 is a second schematic block diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described clearly 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 that can be derived by one of ordinary skill in the art from the embodiments given herein are intended to be within the scope of the present disclosure.
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 is to be understood that the terms so used are interchangeable under appropriate circumstances such that the embodiments of the application are capable of operation in other sequences than those illustrated or otherwise described herein, and that the terms "first," "second," and the like are generally used herein in a generic sense to distinguish one object from another, and not necessarily to limit the number of objects, e.g., the first object may be one or more. 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 adjusting 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.
Fig. 1 is a schematic flowchart of an image adjusting method according to an embodiment of the present disclosure, where the image adjusting method is applied to an electronic device with a shooting function, such as a mobile phone, a tablet computer, and a camera.
The image adjusting method may include:
step 101: and acquiring the white balance parameter of the first image under the condition that the light source parameters of the environment where the target face and the shooting object are located are consistent.
The first image is an image acquired by the first camera to a target face, and the shooting object is shot by a second camera except the first camera. Generally, a photographic subject is included in an image displayed on a screen of a device.
In the embodiment of the application, the electronic device can judge whether the light source parameters of the target face corresponding to the face image and the environment where the shooting object is located are consistent or not when detecting that the shooting object is shot through the second camera and the face image is collected through the first camera. And if the light source parameters of the target face and the environment where the shooting object is located are consistent, acquiring the white balance parameters of the first image. Among them, the basic concept of White Balance (i.e. White Balance) is: the white object can be restored to white regardless of the light source. The white balance adjustment is then: the color cast phenomenon occurring when shooting under a specific light source is compensated by strengthening the corresponding complementary color.
Step 102: and carrying out white balance adjustment on the second image according to the white balance parameter of the first image.
The second image is an image obtained by shooting the shooting object by the second camera, and the second image does not include the face image or the proportion value of the face image included in the second image is smaller than the proportion value of the face image in the first image, that is, the pixel information amount of the face image in the second image is smaller than the pixel information amount of the face image in the first image.
Under the condition that the light source parameters of the environment where the target face and the shooting object are located are consistent, the lighting conditions of the target face and the shooting object are the same, the same white balance parameters can be used for white balance adjustment, and the larger pixel information amount of the face image in the first image is beneficial to acquiring more face color characteristic information, the white balance parameters obtained based on the face color characteristic information are more accurate compared with the white balance parameters obtained by the image with smaller pixel information amount of the face image, in the embodiment of the present application, therefore, the white balance adjustment is performed on the second image according to the white balance parameter of the first image, namely, the white balance parameter of the first image is taken as the white balance parameter of the second image, the white balance adjustment is carried out on the second image, so that the color of the image after the second image adjustment is closer to the real color, and a better image is obtained.
As an alternative embodiment, the first camera may be a front camera and the second camera may be a camera other than the front camera, such as a rear camera.
The common front camera and the screen of the electronic equipment are arranged on the same side of the electronic equipment, when the front camera except the front camera is used for shooting, the collected images can be displayed in the screen, and a user can approach the screen for looking up the images, so that the distance between the user and the front camera is shortened, and the front camera is favorable for collecting the images with more human face pixel information, so that the white balance parameters obtained based on the collected images are more accurate, therefore, the white balance adjustment can be carried out on the images (namely the second images) shot by other cameras (namely the second cameras) according to the white balance parameters of the first images including the human face images collected by the front camera.
As an alternative embodiment, before acquiring the white balance parameter of the first image, the method may further include:
acquiring a first brightness value and a first color temperature value of a first image; acquiring a second brightness value and a second color temperature value of a preview image acquired by a second camera for a shooting object; and determining that the light source parameters of the target face and the environment where the shooting object is located are consistent under the condition that the first brightness value and the second brightness value are in the same brightness interval and the first color temperature value and the second color temperature value are in the same color temperature interval.
In the embodiment of the application, whether the light source conditions of the target face and the environment where the shooting object is located are consistent or not can be determined according to the brightness value and the color temperature value of the first image and the brightness value and the color temperature value of the preview image of the shooting object. And when the brightness value of the first image and the brightness value of the preview image of the photographic subject are in the same brightness interval, and the color temperature value of the first image and the color temperature value of the preview image of the photographic subject are in the same color temperature interval, the target human face is considered to be consistent with the light source condition of the environment where the photographic subject is located.
The luminance section and the color temperature section may be obtained by dividing in advance. In the embodiment of the application, the brightness value and the color temperature value can be respectively divided into intervals in advance according to the brightness data and the color temperature data of the frequently shot scene.
For example, the luminance value may be divided into luminance sections as follows: 0-100, 230, 290, 330, 370, 420, 450, 500, 550, etc. The color temperature values can be divided into a low color temperature section ([2300, 4100)), a middle color temperature section ([4100, 5900)) and a high color temperature section ([5900, 7700)). As shown in fig. 2, when the user and the object are in the same brightness interval and all in the high color temperature interval, the middle color temperature interval or the low color temperature interval, the user and the object are considered to be in the same light source condition.
Wherein, for the three color temperature intervals, the three color temperature intervals can be further subdivided into the following color temperature intervals:
low color temperature: [2300, 2600),[2600, 2900),[2900, 3200),[3200, 3500),[3500, 3800),[3800, 4100).
Medium color temperature: [4100, 4400), [4400, 4700); [4700, 5000),[5000, 5300),[5300, 5600),[5600, 5900).
High color temperature: [5900, 6200),[6200, 6500),[6500, 6800),[6800, 7100),[7100, 7400),[7400, 7700).
In the embodiment of the application, when the first color temperature value and the second color temperature value are in a low color temperature interval, a medium color temperature interval or a high color temperature interval, it can be determined that the first color temperature value and the second color temperature value are in the same color temperature interval; or when the first color temperature value and the second color temperature value are both in one of the low color temperature intervals, one of the medium color temperature intervals or one of the high color temperature intervals, it can be determined that the first color temperature value and the second color temperature value are in the same color temperature interval, and the specific situation can be selected according to actual requirements.
In the embodiment of the application, under the condition that the second camera is started to collect the image of the shooting object, whether the light source parameters of the target face and the environment where the shooting object is located are consistent or not can be judged in real time or at regular time.
In the embodiment of the present application, the brightness value and the color temperature value in the post-image can be determined by using a camera incident light metering principle and a Correlated Color Temperature (CCT) element.
Optionally, since the spectral distribution of each light source is different, the response of the camera sensor to white under different light sources is also different, which results in that the color seen by the camera sensor is different and the value of Correlated Color Temperature (CCT) is also different under different environments of the same object, so that the embodiment of the present application can determine the actual color temperature value of the scene according to the value of CCT. In addition, the current brightness environment value can be judged according to the photographing exposure time and the gain coefficient (i.e. gain) of the camera.
As an alternative embodiment, step 102: performing white balance adjustment on the second image according to the white balance parameter of the first image may include:
and acquiring a white balance parameter of the second image, and carrying out white balance adjustment on the second image according to the white balance parameter of the first image under the condition that the white balance parameter of the second image is different from the white balance parameter of the first image.
Because the image content of different cameras is different, therefore, the white balance parameter obtained based on the acquired image may also be different, and in the embodiment of the present application, it may be determined whether the white balance parameter obtained based on the image acquired by the second camera is the same as the white balance parameter obtained based on the first image acquired by the first camera. If the first camera and the second camera are the same, performing white balance adjustment on the image shot by the second camera according to the white balance parameter corresponding to the second camera; if the white balance parameters are different, the white balance adjustment is carried out on the image shot by the second camera according to the white balance parameters of the first image, so that unnecessary processing operation can be omitted, for example, when the white balance parameters obtained based on the images collected by the two cameras are consistent, the processing operation of judging whether the light source parameters of the target human face and the environment where the shooting object is located are consistent is not needed, and the pressure of the processor of the equipment is reduced.
As an alternative embodiment, the white balance parameter of the first image is obtained according to at least one of a human face skin color feature, an eye white color feature and a tooth color feature.
In the embodiment of the application, after the first camera collects the first image, the face can be detected, segmented and identified, the color characteristic values of the skin color, the white of eyes and/or teeth of the face are obtained, then the white balance parameters are obtained according to the obtained color characteristic values, and white balance correction is carried out on the image.
Wherein the skin color is gray spots, the white eyes and the teeth are white spots.
Optionally, in this embodiment of the application, when the white balance parameter of the first image is obtained, the automatic white balance module in the image processor may cache the frame image on the pipeline of the image processor into the storage through the control processing software, perform face detection, separation, and recognition of the first camera, and extract the face color feature as the white balance reference surface.
Specifically, R (Red), G (Green), and B (Blue) values of the face image may be acquired, and a gray world (Green world) method is used to obtain the white balance parameter. The falling point (i.e. stats) closer to the reference point in the subsequent photographing process is regarded as a gray point to calibrate the white balance, and the closer to the reference point, the more the possibility of the real gray point is, the farther the possibility is, the less the possibility is.
The principle of the gray scale world method is as follows: for a picture with a large amount of color variation, the average value of R, G, B three components tends to be the same Gray level Gray. In a physical sense, the gray world law assumes that the average of the reflection of light from a natural scene is a constant value as a whole, and the constant value is approximately "gray", in short, the average of the colors throughout the world is gray.
The specific calculation steps of the gray world method are as follows:
step 1: calculating Gray level Gray value
In calculating the Gray value, two methods are generally included:
(1) a fixed value is used.
For example, 128 is typically taken as the grayscale Gray value for an 8-bit image (0 ~ 255).
(2) The average values avgR, avgG, avgB of the R, G, B three channels were calculated, respectively, namely: gray ═ avgR + avgG + avgB)/3.
Where avgR represents the color average of the R channel, avgG represents the color average of the G channel, and avgB represents the color average of the B channel.
Step 2: the gain factor, i.e., the white balance parameter, is calculated for each color channel.
kr ═ Gray/avgR, where kr denotes the gain factor of the R channel.
kg ═ Gray/avgG, where kg denotes the gain factor of the G channel.
kb Gray/avgB, where kb denotes the gain factor of the B channel.
And step 3: and recalculating each pixel value C in the image by using the gain coefficient of each color channel, thereby obtaining the white balance adjusted image.
C (R ') ═ C (R) × kr, where C (R) represents the original pixel value corresponding to the R channel, and C (R') represents the R channel adjusted pixel value.
C (G ') ═ C (G) × kr, where C (G) denotes the original pixel value corresponding to the G channel and C (G') denotes the G channel adjusted pixel value.
C (B ') ═ C (B) × kr, where C (B) represents the original pixel value corresponding to the B channel and C (B') represents the B channel adjusted pixel value.
In summary, in the embodiment of the present application, according to the white balance parameter of the first image with a larger proportion value of the face image to the whole image, the white balance adjustment is performed on the second image without the face image or with a smaller proportion value of the face image to the whole image. The face image in the first image has a larger proportion, so that more face color characteristic information can be acquired, and the white balance parameter obtained based on the face color characteristic information is more accurate than the white balance parameter obtained based on an image without the face image or with a smaller proportion of the face image, so that the white balance adjustment is performed on the second image according to the white balance parameter of the first image, the color of the image after the adjustment of the second image is closer to the real color, and the image with higher quality can be acquired.
It should be noted that, in the image adjusting method provided in the embodiment of the present application, the execution subject may be an image adjusting apparatus, or a control module in the image adjusting apparatus for executing the image adjusting method. The embodiment of the present application takes an image adjusting method executed by an image adjusting apparatus as an example, and the image adjusting apparatus provided in the embodiment of the present application is described.
Fig. 3 is a schematic block diagram of an image adjusting apparatus provided in an embodiment of the present application, where the image adjusting apparatus is applied to an electronic device with a shooting function, such as a mobile phone, a tablet computer, and a camera.
As shown in fig. 3, the image adjusting apparatus may include:
the first obtaining module 301 is configured to obtain a white balance parameter of the first image when the target face is consistent with the light source parameter of the environment where the photographic subject is located.
The first image is an image acquired by the first camera for the target face, and the shooting object is shot by the second camera.
An adjusting module 302, configured to perform white balance adjustment on the second image according to the white balance parameter of the first image.
The second image is an image obtained by shooting the shooting object by the second camera, and the second image does not include a face image or the proportion value of the face image included in the second image is smaller than the proportion value of the face image in the first image.
As an alternative embodiment, the image adjusting apparatus may further include:
and the second acquisition module is used for acquiring a first brightness value and a first color temperature value of the first image.
And the third acquisition module is used for acquiring a second brightness value and a second color temperature value of the preview image acquired by the second camera for the shot object.
And the determining module is used for determining that the light source parameters of the environment where the target face and the shooting object are located are consistent under the condition that the first brightness value and the second brightness value are in the same brightness interval and the first color temperature value and the second color temperature value are in the same color temperature interval.
As an alternative embodiment, the adjusting module 302 may include:
and the acquisition unit is used for acquiring the white balance parameter of the second image.
And an adjusting unit, configured to perform white balance adjustment on the second image according to the white balance parameter of the first image when the white balance parameter of the second image is different from the white balance parameter of the first image.
As an alternative embodiment, the white balance parameter of the first image is obtained according to at least one of a human face skin color feature, an eye white color feature and a tooth color feature.
In the embodiment of the application, according to the white balance parameter of the first image with the larger proportion value of the face image to the whole image, the white balance adjustment is carried out on the second image without the face image or with the smaller proportion value of the face image to the whole image. The face image in the first image has a larger proportion, so that more face color characteristic information can be acquired, and the white balance parameter obtained based on the face color characteristic information is more accurate than the white balance parameter obtained based on an image without the face image or with a smaller proportion of the face image, so that the white balance adjustment is performed on the second image according to the white balance parameter of the first image, the color of the image after the adjustment of the second image is closer to the real color, and the image with higher quality can be acquired.
The image adjusting apparatus in the embodiment of the present application may be an electronic device, or may be a component in the electronic device, such as an integrated circuit or a chip. The electronic device may be a terminal, or may be a device other than a terminal. The electronic Device may be, for example, a Mobile phone, a tablet computer, a notebook computer, a palm top computer, a vehicle-mounted electronic Device, a Mobile Internet Device (MID), an Augmented Reality (AR)/Virtual Reality (VR) Device, a robot, a wearable Device, an ultra-Mobile personal computer (UMPC), a netbook or a Personal Digital Assistant (PDA), and the like, and may also be a server, a Network Attached Storage (NAS), a Personal Computer (PC), a Television (TV), a teller machine, a self-service machine, and the like, and the embodiments of the present application are not particularly limited.
The image adjusting 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 adjusting device provided in the embodiment of the present application can implement each process implemented by the image adjusting method embodiment shown in fig. 1, and is not described here again to avoid repetition.
Optionally, as shown in fig. 4, an embodiment of the present application further provides an electronic device 400, including: the processor 401 and the memory 402, and the memory 402 stores a program or an instruction that can be executed on the processor 401, and when the program or the instruction is executed by the processor 401, the steps of the embodiment of the image adjusting method are implemented, and the same technical effect can be achieved.
It should be noted that the electronic device 400 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 500 includes, but is not limited to: radio frequency unit 501, network module 502, audio output unit 503, input unit 504, sensor 505, display unit 506, user input unit 507, interface unit 508, memory 509, processor 510, and the like.
Those skilled in the art will appreciate that the electronic device 500 may further include a power supply (e.g., a battery) for supplying power to various components, and the power supply may be logically connected to the processor 510 via a power management system, so as to implement functions of managing charging, discharging, and power consumption via 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.
Wherein processor 510 is configured to: acquiring a white balance parameter of a first image under the condition that light source parameters of the environment where a target face and a shooting object are located are consistent; and performing white balance adjustment on the second image according to the white balance parameter of the first image.
The first image is an image acquired by the first camera for the target face, and the shooting object is shot by the second camera. The second image is an image obtained by shooting the shooting object by the second camera, and the second image does not include the face image or the proportion value of the face image included in the second image is smaller than the proportion value of the face image in the first image.
Optionally, processor 510 may be further configured to: acquiring a first brightness value and a first color temperature value of the first image; acquiring a second brightness value and a second color temperature value of a preview image acquired by the second camera for the shot object; and determining that the light source parameters of the environment where the target face and the shooting object are located are consistent under the condition that the first brightness value and the second brightness value are in the same brightness interval and the first color temperature value and the second color temperature value are in the same color temperature interval.
Optionally, processor 510 may be further configured to: acquiring a white balance parameter of the second image; and when the white balance parameter of the second image is different from the white balance parameter of the first image, performing white balance adjustment on the second image according to the white balance parameter of the first image.
In the embodiment of the application, according to the white balance parameter of the first image with the larger proportion value of the face image to the whole image, the white balance adjustment is carried out on the second image without the face image or with the smaller proportion value of the face image to the whole image. The face image in the first image has a larger proportion, so that more face color characteristic information can be acquired, and the white balance parameter obtained based on the face color characteristic information is more accurate than the white balance parameter obtained based on an image without the face image or with a smaller proportion of the face image, so that the white balance adjustment is performed on the second image according to the white balance parameter of the first image, the color of the image after the adjustment of the second image is closer to the real color, and the image with higher quality can be acquired.
It should be understood that in the embodiment of the present application, the input Unit 504 may include a Graphics Processing Unit (GPU) 5041 and a microphone 5042, and the Graphics processor 5041 processes image data of still pictures or videos obtained by an image capturing device (such as a camera) in a video capturing mode or an image capturing mode. The display unit 506 may include a display panel 5061, and the display panel 5061 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 507 includes at least one of a touch panel 5071 and other input devices 5072. A touch panel 5071, also referred to as a touch screen. The touch panel 5071 may include two parts of a touch detection device and a touch controller. Other input devices 5072 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 further detail herein.
The memory 509 may be used to store software programs as well as various data. The memory 509 may mainly include a first storage area storing a program or an instruction and a second storage area storing data, wherein the first storage area may store an operating system, an application program or an instruction (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like. Further, the memory 509 may include volatile memory or non-volatile memory, or the memory 509 may include both volatile and non-volatile memory. The non-volatile memory may be a Read-only memory (ROM), a programmable Read-only memory (PROM), an erasable programmable Read-only memory (erasabprom, EPROM), an electrically erasable programmable Read-only memory (EEPROM), or a flash memory. The volatile Memory may be a Random Access Memory (RAM), a Static Random Access Memory (Static RAM, SRAM), a Dynamic Random Access Memory (Dynamic RAM, DRAM), a Synchronous Dynamic Random Access Memory (Synchronous DRAM, SDRAM), a Double Data Rate Synchronous Dynamic Random Access Memory (Double Data Rate SDRAM, ddr SDRAM), an Enhanced Synchronous SDRAM (ESDRAM), a Synchronous DRAM (SLDRAM), and a Direct Memory bus RAM (DRRAM). The memory 509 in the embodiments of the subject application includes, but is not limited to, these and any other suitable types of memory.
Processor 510 may include one or more processing units, and optionally processor 510 integrates an application processor, which primarily handles operations involving the operating system, user interface, and applications, and a modem processor, which primarily handles wireless communication signals, such as a baseband processor. It will be appreciated that the modem processor described above may not be integrated into processor 510.
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 each process of the embodiment of the image adjusting method, and can achieve the same technical effect, 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 computer read only memory ROM, a random access memory RAM, a magnetic or optical disk, and the like.
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 run a program or an instruction to implement each process of the embodiment of the image adjustment method, and can achieve the same technical effect, and the details are not repeated here to avoid repetition.
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.
Embodiments of the present application provide a computer program product, where the program product is stored in a storage medium, and the program product is executed by at least one processor to implement the processes of the foregoing embodiments of the image adjusting method, and achieve the same technical effects, and in order to avoid repetition, details are not repeated here.
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 computer 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, 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 adjustment method, characterized in that the method comprises:
acquiring a white balance parameter of a first image under the condition that light source parameters of the environment where a target face and a shooting object are located are consistent; the first image is an image acquired by a first camera for the target face, and the shooting object is shot by a second camera;
performing white balance adjustment on a second image according to the white balance parameter of the first image; the second image is an image obtained by shooting the shooting object by the second camera, and the second image does not include a face image or the proportion value of the face image included in the second image is smaller than the proportion value of the face image in the first image.
2. The image adjustment method according to claim 1, wherein before the acquiring the white balance parameter of the first image, the method further comprises:
acquiring a first brightness value and a first color temperature value of the first image;
acquiring a second brightness value and a second color temperature value of a preview image acquired by the second camera for the shot object;
and determining that the light source parameters of the environment where the target face and the shooting object are located are consistent under the condition that the first brightness value and the second brightness value are in the same brightness interval and the first color temperature value and the second color temperature value are in the same color temperature interval.
3. The image adjusting method according to claim 1, wherein the performing white balance adjustment on the second image according to the white balance parameter of the first image comprises:
acquiring a white balance parameter of the second image;
and when the white balance parameter of the second image is different from the white balance parameter of the first image, performing white balance adjustment on the second image according to the white balance parameter of the first image.
4. The image adjustment method according to claim 1, wherein the white balance parameter of the first image is obtained according to at least one of a human face skin color feature, an eye white color feature and a tooth color feature.
5. An image adjusting apparatus, characterized in that the apparatus comprises:
the first acquisition module is used for acquiring a white balance parameter of a first image under the condition that the light source parameters of the environment where the target face and the shooting object are located are consistent; the first image is an image acquired by a first camera for the target face, and the shooting object is shot by a second camera;
the adjusting module is used for carrying out white balance adjustment on the second image according to the white balance parameter of the first image; the second image is an image obtained by shooting the shooting object by the second camera, and the second image does not include a face image or the proportion value of the face image included in the second image is smaller than the proportion value of the face image in the first image.
6. The image adjusting apparatus according to claim 5, further comprising:
the second acquisition module is used for acquiring a first brightness value and a first color temperature value of the first image;
the third acquisition module is used for acquiring a second brightness value and a second color temperature value of a preview image acquired by the second camera for the shot object;
and the determining module is used for determining that the light source parameters of the environment where the target face and the shooting object are located are consistent under the condition that the first brightness value and the second brightness value are in the same brightness interval and the first color temperature value and the second color temperature value are in the same color temperature interval.
7. The image adjusting apparatus according to claim 5, wherein the adjusting module comprises:
an acquisition unit configured to acquire a white balance parameter of the second image;
and an adjusting unit, configured to perform white balance adjustment on the second image according to the white balance parameter of the first image when the white balance parameter of the second image is different from the white balance parameter of the first image.
8. The image adjustment apparatus according to claim 5, wherein the white balance parameter of the first image is obtained according to at least one of a human face skin color feature, an eye white color feature and a tooth color feature.
9. An electronic device comprising a processor and a memory, the memory storing a program or instructions executable on the processor, the program or instructions when executed by the processor implementing the steps in the image adjustment method of any one of claims 1 to 4.
10. A readable storage medium, on which a program or instructions are stored, which when executed by a processor implement the steps in the image adjustment method according to any one of claims 1 to 4.
CN202111435896.2A 2021-11-26 2021-11-26 Image adjusting method and device Pending CN114125302A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111435896.2A CN114125302A (en) 2021-11-26 2021-11-26 Image adjusting method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111435896.2A CN114125302A (en) 2021-11-26 2021-11-26 Image adjusting method and device

Publications (1)

Publication Number Publication Date
CN114125302A true CN114125302A (en) 2022-03-01

Family

ID=80367826

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111435896.2A Pending CN114125302A (en) 2021-11-26 2021-11-26 Image adjusting method and device

Country Status (1)

Country Link
CN (1) CN114125302A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108024055A (en) * 2017-11-03 2018-05-11 广东欧珀移动通信有限公司 Method, apparatus, mobile terminal and the storage medium of white balance processing
CN109151428A (en) * 2018-08-30 2019-01-04 Oppo广东移动通信有限公司 automatic white balance processing method, device and computer storage medium
CN113177886A (en) * 2021-04-14 2021-07-27 RealMe重庆移动通信有限公司 Image processing method, image processing device, computer equipment and readable storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108024055A (en) * 2017-11-03 2018-05-11 广东欧珀移动通信有限公司 Method, apparatus, mobile terminal and the storage medium of white balance processing
CN109151428A (en) * 2018-08-30 2019-01-04 Oppo广东移动通信有限公司 automatic white balance processing method, device and computer storage medium
CN113177886A (en) * 2021-04-14 2021-07-27 RealMe重庆移动通信有限公司 Image processing method, image processing device, computer equipment and readable storage medium

Similar Documents

Publication Publication Date Title
US20160094770A1 (en) Image Processing Method and Apparatus, and Terminal
US11431915B2 (en) Image acquisition method, electronic device, and non-transitory computer readable storage medium
CN108419028B (en) Image processing method, image processing device, computer-readable storage medium and electronic equipment
US20100177215A1 (en) Image processing apparatus and recording medium
CN110009587B (en) Image processing method, image processing device, storage medium and electronic equipment
CN111835982B (en) Image acquisition method, image acquisition device, electronic device, and storage medium
CN110677557B (en) Image processing method, image processing device, storage medium and electronic equipment
CN112422798A (en) Photographing method and device, electronic equipment and storage medium
CN111901519B (en) Screen light supplement method and device and electronic equipment
US8164650B2 (en) Image processing apparatus and method thereof
CN112508820A (en) Image processing method and device and electronic equipment
CN114125302A (en) Image adjusting method and device
CN115049572A (en) Image processing method, image processing device, electronic equipment and computer readable storage medium
CN114339028A (en) Photographing method, electronic device and computer-readable storage medium
CN112446848A (en) Image processing method and device and electronic equipment
CN111583163A (en) AR-based face image processing method, device, equipment and storage medium
CN114143448B (en) Shooting method, shooting device, electronic equipment and readable storage medium
CN112468794B (en) Image processing method and device, electronic equipment and readable storage medium
CN115797160A (en) Image generation method and device
CN113489901B (en) Shooting method and device thereof
CN110266939B (en) Display method, electronic device, and storage medium
CN117793513A (en) Video processing method and device
CN114615440A (en) Photographing method, photographing apparatus, electronic device, and readable storage medium
CN116128844A (en) Image quality detection method, device, electronic equipment and medium
CN117119317A (en) Image processing method, device, electronic equipment and readable storage medium

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