WO2021016845A1 - White balance calibration method and device, and photographing device - Google Patents

White balance calibration method and device, and photographing device Download PDF

Info

Publication number
WO2021016845A1
WO2021016845A1 PCT/CN2019/098324 CN2019098324W WO2021016845A1 WO 2021016845 A1 WO2021016845 A1 WO 2021016845A1 CN 2019098324 W CN2019098324 W CN 2019098324W WO 2021016845 A1 WO2021016845 A1 WO 2021016845A1
Authority
WO
WIPO (PCT)
Prior art keywords
white balance
environment
marker
color component
image
Prior art date
Application number
PCT/CN2019/098324
Other languages
French (fr)
Chinese (zh)
Inventor
翁松伟
杨文哲
Original Assignee
深圳市大疆创新科技有限公司
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 深圳市大疆创新科技有限公司 filed Critical 深圳市大疆创新科技有限公司
Priority to PCT/CN2019/098324 priority Critical patent/WO2021016845A1/en
Priority to CN201980031415.6A priority patent/CN112166603A/en
Publication of WO2021016845A1 publication Critical patent/WO2021016845A1/en

Links

Images

Classifications

    • 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
    • H04N17/00Diagnosis, testing or measuring for television systems or their details
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N17/00Diagnosis, testing or measuring for television systems or their details
    • H04N17/002Diagnosis, testing or measuring for television systems or their details for television cameras
    • 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

Definitions

  • the invention relates to the field of parameter calibration of photographing devices, and in particular to a white balance calibration method, device and photographing device.
  • AOB Automatic white balance
  • the white balance value of the image obtained by using the above shooting device in a conventional environment meets the white balance standard; while in a special environment
  • the white balance value of the image obtained by using the above-mentioned imaging device in has a large deviation compared with the standard white balance value. Therefore, the image captured by the camera in a special environment cannot well restore the colors of the special environment.
  • the invention provides a white balance calibration method, device and photographing device.
  • the present invention is implemented through the following technical solutions:
  • a white balance calibration method applied to a photographing device including:
  • a white balance calibration parameter in the second environment is determined.
  • a white balance calibration device applied to a photographing device comprising:
  • Storage device for storing program instructions
  • One or more processors call program instructions stored in the storage device, and when the program instructions are executed, the one or more processors are individually or collectively configured to implement the following operations:
  • a white balance calibration parameter in the second environment is determined.
  • a photographing device comprising:
  • Image acquisition module for shooting images
  • Storage device for storing program instructions
  • One or more processors call program instructions stored in the storage device, and when the program instructions are executed, the one or more processors are individually or collectively configured to implement the following operations:
  • a white balance calibration parameter in the second environment is determined.
  • the photographing device of the present invention uses the first environment as a reference for white balance calibration in the second environment, allowing users to quickly perform white balance calibration in the second environment; An environment satisfies the environmental conditions of the desired white balance.
  • Using the first environment as a reference for the white balance calibration of the second environment also quickly calibrates the white balance of the camera in the second environment, thereby quickly adjusting the camera to a suitable white balance.
  • the balance helps the camera to output images that meet the user's desired shooting effect.
  • FIG. 1 is a method flowchart of a white balance calibration method in an embodiment of the present invention
  • FIG. 2 is a usage scene diagram of a white balance calibration method in an embodiment of the present invention.
  • FIG. 3 is a method flowchart of a white balance calibration method in another embodiment of the present invention.
  • FIG. 5 is a method flowchart of a white balance calibration method in still another embodiment of the present invention.
  • FIG. 6 is a structural block diagram of a white balance calibration device in an embodiment of the present invention.
  • Fig. 7 is a structural block diagram of a photographing device in an embodiment of the present invention.
  • the white balance value of the image obtained by using the existing camera in a special environment has a large deviation compared with the standard white balance value.
  • the camera of the present invention uses the first environment as a reference for white balance calibration in the second environment, allowing users to quickly perform white balance calibration in the second environment; at the same time, since the first environment meets the environmental conditions of the desired white balance , Using the first environment as a reference for white balance calibration in the second environment also quickly calibrates the white balance of the camera in the second environment, so that the camera can be quickly adjusted to a proper white balance, which is beneficial for the output of the camera to satisfy the user The picture of the desired shooting effect.
  • the white balance calibration method of the embodiment of the present invention may be applied to a photographing device, and the photographing device may include, but is not limited to, a camera, an aerial vehicle, a handheld pan/tilt and other equipment with a photographing function.
  • Fig. 1 is a method flowchart of a white balance calibration method in an embodiment of the present invention. As shown in Fig. 1, the white balance calibration method of this embodiment may include the following steps:
  • S101 Acquire a first white balance value of the marker in a first environment, where the first environment meets the environmental conditions of the expected white balance;
  • the type of the marker can be selected according to needs.
  • the marker has a single color suitable for the white balance standard.
  • the color of the marker is white, and the marker can be a white card or other White marker; of course, the color of the marker can also be other single colors suitable for the white balance standard.
  • the marker is the user's hand area. When the user performs white balance calibration on the camera, the user does not need to prepare additional markers, and directly uses the hand area as the marker to make the white balance of the camera The calibration process is more convenient and practical. It is understandable that the marker is not limited to the marker or the user's hand area with a single color suitable for the white balance standard listed in the above-mentioned embodiment, and other markers can also be selected.
  • the first white balance value can be obtained by the camera in real time, or can be stored in the camera in advance.
  • the process of obtaining the first white balance value of the marker in the first environment may include but is not limited to the following steps:
  • the first target frame is displayed on the shooting screen of the photographing device to prompt that the landmark is at least partially placed in the first target frame to ensure that the photographing device captures To the marker.
  • the first target frame of this embodiment is set in the central area of the shooting frame.
  • the above-mentioned first target frame can also be set at other positions of the shooting frame.
  • the first target frame can be rectangular, square, or other shapes, which is not specifically limited here.
  • the camera when the camera detects that the marker satisfies the first preset strategy, the camera captures the marker to obtain the first image. Wherein, the marker satisfies the first preset strategy to ensure the accuracy of the first white balance value determined by the camera.
  • the first preset strategy includes: the area ratio of the marker in the first target frame exceeds a first preset ratio threshold, and the first preset ratio threshold can be set as needed, such as the first preset
  • the threshold of the proportion can be greater than or equal to 80% and less than or equal to 100%, or can be set to other values.
  • the first preset strategy includes: the marker is located at the center position of the first target frame, for example, the center position of the marker coincides with the center position of the first target frame.
  • the first preset strategy can also be set to other.
  • the marker is a square card
  • the four corners of the card coincide with the four corners of the first target frame
  • the edge of the card coincides with the edge of the first target frame, and so on.
  • the camera uses the above steps (1) and (2) to obtain the first white balance value in real time; in some embodiments, the camera uses the above steps (1) and (2) to obtain the first white balance value in advance.
  • the white balance value is stored in the storage unit of the photographing device, such as a hard disk. When the photographing device performs white balance calibration, it can directly obtain the pre-stored first white balance value from the storage unit.
  • the user may trigger the camera to perform step S101, or when the camera recognizes the landmark, the camera automatically triggers the camera to perform step S101.
  • the white balance calibration method before the marker is photographed and the first image is obtained, the white balance calibration method further includes: receiving a first trigger instruction, that is, triggering the imaging device to perform the steps by the first trigger instruction In S101, the function of triggering the camera to execute step S101 by the user is realized.
  • the first trigger instruction is used to instruct the camera to enter the custom white balance calibration mode.
  • the first trigger instruction can be sent by an external device capable of controlling the camera such as a mobile phone, a tablet computer, or a remote control, or it can be sent by the camera on the camera.
  • the control part such as a button, button or knob
  • the user operates an external device or control part to trigger the camera to execute S101.
  • the imaging device detects that the marker satisfies the first preset strategy and receives the first trigger instruction, it will capture the marker to obtain the first image.
  • the environmental condition of the desired white balance can be an environmental condition that meets the standard white balance, that is, the white balance of the shooting device in the first environment meets the standard white balance.
  • the first white balance value also meets the standard white balance requirements.
  • the device uses the first environment that meets the environmental conditions of the standard white balance as a reference, and performs white balance calibration on the second environment, thereby restoring the white balance of the camera in the second environment to the standard white balance, which is beneficial for the camera to output high-quality images ;
  • the desired environmental conditions for white balance can also be environmental conditions with other white balance effects.
  • the environmental conditions with other white balance effects are used as a reference to perform white balance calibration on the second environment so that the camera is in the second environment To achieve different shooting effects.
  • the first environment and the second environment have different environmental conditions, such as different locations in the same area, different time periods in the same scene, different areas, and so on.
  • the first environment and the second environment are different locations in the same area, where different locations have different background colors.
  • the first environment includes an environment on the ground or an environment in the air
  • the second environment includes an environment under water.
  • the white balance of the camera in the environment on the ground or in the air is effective for the camera in the underwater environment.
  • the white balance is calibrated so that the white balance of the image captured by the camera under the underwater environment can achieve the white balance effect of the camera on the ground or in the air; of course, the first environment and the second environment can also interact
  • the first environment includes the underwater environment
  • the second environment includes the ground environment or the air environment.
  • the white balance of the shooting device in the underwater environment is used to determine the white balance of the shooting device in the ground environment or the air environment.
  • the balance is calibrated to make the white balance of the camera in an environment on the ground or in the air the white balance effect of the camera in an underwater environment.
  • the first environment and the second environment may also be other different positions in the same area, such as different depth positions in the same area, different horizontal positions in the same area, and so on.
  • the first environment and the second environment are in different time periods of the same scene, wherein there are changes in ambient light in different time periods. For example, in different periods of a certain area on the ground, different periods of a certain area in the air, or different periods of the same water area, due to changes in sunlight throughout the day, the above-mentioned areas have different ambient light at different time periods, causing the camera to be There are differences in the white balance of the images taken at different time periods in the above areas. After the white balance calibration is performed, the white balance effects of the images captured by the photographing device in each time period can be made consistent, which meets the photographing needs of users.
  • the first environment can be a non-sunset period and a non-sunrise period of a certain aerial scene
  • the second environment can be a sunset period or a sunrise period of the above aerial scene.
  • the first environment and the second environment can also be Different time periods in other scenes, or other different time periods in the above scenes.
  • the first environment and the second environment are different areas, such as different water areas. Due to the change of the color of the water area, the white balance of the images taken by the camera in the different water areas is different. After performing white balance calibration, the camera can have the same white balance effect in different areas.
  • the second white balance value is acquired by the camera in real time, wherein acquiring the second white balance value of the marker in the second environment may include but is not limited to the following steps:
  • the second target frame is displayed on the shooting screen of the camera to prompt the marker to be placed in the second target frame to ensure that the camera captures the marker.
  • the second target frame in this embodiment is set in the central area of the shooting frame.
  • the above-mentioned second target frame can also be set at other positions of the shooting frame.
  • the second target frame can be rectangular, square, or other shapes, and is not specifically limited here.
  • the camera when the camera detects that the marker satisfies the second preset strategy, the camera captures the marker to obtain the second image.
  • the marker satisfies the second preset strategy to ensure the accuracy of the second white balance value determined by the camera.
  • the second preset strategy includes: the area ratio of the marker in the second target frame exceeds a second preset ratio threshold, and the second preset ratio threshold can be set as required, such as the second preset
  • the threshold of the proportion can be greater than or equal to 80% and less than or equal to 100%, or can be set to other values.
  • the second preset strategy includes: the marker is located at the center position of the second target frame, for example, the center position of the marker coincides with the center position of the second target frame.
  • the second preset strategy can also be set to other, for example, when the marker is a square card, the four corners of the card coincide with the four corners of the second target frame, or the edge of the card coincides with the edge of the second target frame, and so on.
  • the user may trigger the camera to perform step S102, or when the camera recognizes the landmark, the camera automatically triggers the camera to perform step S102.
  • the white balance calibration method before the marker is photographed and the second image is obtained, the white balance calibration method further includes: receiving a second trigger instruction, that is, triggering the imaging device to perform the steps by the second trigger instruction In S102, the function of triggering the camera to execute step S102 by the user is realized.
  • the second trigger instruction is used to instruct the camera to enter the custom white balance calibration mode.
  • the second trigger instruction can be sent by an external device capable of controlling the camera such as a mobile phone, a tablet computer, or a remote controller, or it can be sent by the camera on the camera.
  • the control part such as a button, button or knob
  • the user operates an external device or control part to trigger the camera to execute S102.
  • the imaging device detects that the marker satisfies the second preset strategy and receives the second trigger instruction, the imaging device captures the marker to obtain the second image.
  • determining the white balance value of the marker based on the image uses the existing white balance
  • the detection algorithm is implemented.
  • the first trigger instruction and the second trigger instruction mentioned in the embodiment of the present invention may not be triggered by the user, but may be generated by detecting preset conditions. For example, during the shooting process, if the current The environment and the previous environment may cause the white balance difference of the captured image, you can automatically enter the custom white balance calibration mode, and prompt the user to perform the white balance calibration operation.
  • the user after receiving the first trigger instruction, it can be assumed that the user is in the custom white balance calibration mode before ending the custom white balance calibration mode without the second trigger instruction.
  • the second target frame is displayed on the shooting screen of the shooting device, so that when the user shoots an image again, the image defaults to the second image, so that the user can Operate continuously and quickly.
  • multiple first images can be taken in the first environment
  • multiple second images can be taken in the second environment.
  • multiple first images and multiple second images can be taken separately. The two images are fused, and they can also be used in multiple first images and multiple second images respectively. For example, it can be selected by the user. In this way, it can avoid the lack of image quality in some cases.
  • the white balance calibration is not effective.
  • S103 Determine a white balance calibration parameter in the second environment according to the first white balance value and the second white balance value.
  • the first white balance value includes at least two of the following: the first color component ratio R/G of the red component R and the green component G of the marker in the first environment, and the marker in the first environment
  • the second The white balance value includes at least two of the following: the fourth color component ratio R1/B1 of the red component R1 and the green component G1 of the marker in the second environment, the red component R1 and blue of the marker in the second environment
  • the color component ratios of the first white balance value and the second white balance value correspond to each other, that is, if the first white balance value includes: R/G and R/B, the second white balance value includes : R1/G1 and R1/B1; if the first white balance value includes: R/G and G/B, the second white balance value includes: R1/G1 and G1/B1; if the first white balance value includes: R /B and G/B, the second white balance value includes: R1/B1 and G1/B1; if the first white balance value includes: R/G, R/B and G/B, the second white balance value includes : R1/G1, R1/B1 and G1/B1. According to the ratio of the corresponding color components in the first white balance value and the second white balance value, the white balance calibration parameter in the second environment can be determined.
  • the second set of color component ratios is determined based on at least two of the following three sets of color component ratios.
  • White balance calibration parameters under the environment R/G and R1/G1, R/B and R1/B1, G/B and G1/B1.
  • the white balance calibration parameter includes at least two of the following ratios: R/G: R1/G1, R/B: R1/B1, G/B: G1/B1.
  • two of x, y, and z are determined according to the first white balance value and the second white balance value; in some embodiments, according to the first white balance value and the second white balance value , Determine x, y, and z.
  • the calculation method of the white balance calibration parameters x, y, z is not limited to the above formula (1), and other methods may also be used.
  • the above steps S101 to S101 can be used.
  • S103 performs white balance calibration on different positions in the second environment to obtain white balance calibration parameters for different positions in the second environment, so that the white balance of the images captured by the camera at different positions in the second environment has the same effect.
  • the white balance calibration parameter changes with the change of the position of the marker in the second environment.
  • the white balance calibration parameter changes with the change of the depth position of the marker in the second environment. Take seawater as an example. As the depth deepens, the color of the seawater gradually darkens.
  • the white balance calibration parameters change with the depth position of the marker in the seawater; optionally, the white balance calibration parameters follow the level of the marker in the second environment.
  • the position (the horizontal direction is the direction perpendicular to the depth direction) changes.
  • the first environment is a water environment
  • the second environment is an underwater environment.
  • the implementation process of the white balance calibration method specifically includes:
  • the user When on the water, the user operates the buttons on the camera to trigger the camera to enter the custom white balance calibration mode.
  • a first target frame appears in the shooting screen, prompting the user to place the white card (that is, the white card) in the second A target frame (full of the first target frame) is then photographed to obtain the first image;
  • the gain value of the white card in the first target frame in the first environment calculated by the shooting device ie R/ At least two of G, R/B and G/B
  • the shooting device calculates the gain value of the white card in the second target frame in the second environment according to the second image (ie at least two of R1/G1, R1/B1 and G1/B1) ;
  • the user can use the above white balance calibration process to complete the white balance calibration of the camera in the second environment every time before using the camera to shoot in the second environment; of course, the above white balance calibration can also be completed at a certain time After the process, save the determined white balance calibration parameters in the second environment in the camera. Next time you use the camera to shoot in the second environment, directly call the white balance calibration in the second environment saved in the camera. The parameters can make the images shot in the second environment have the desired white balance effect, without the user having to repeat the white balance calibration.
  • the white balance calibration method of this embodiment may further include:
  • the white balance calibration parameters are stored in the storage unit of the shooting device, which is convenient for the next use.
  • the white balance calibration parameters can be stored in the hard disk of the camera, or the white balance calibration parameters can be stored in other storage units of the camera. Further, the white balance calibration parameters of different positions in the second environment and the corresponding positions of the second environment are stored in the photographing device in a one-to-one correspondence.
  • the white balance calibration of the shooting device in the second environment is completed.
  • the white balance parameters can be used to calibrate the real-time shot images, so that the images shot in the second environment can be calibrated.
  • the ratio between the red component, the green component and the blue component is the same as the ratio between the red component, the green component and the blue component of the image captured by the camera in the first environment, so that the camera captured in the second environment.
  • the image has the desired white balance effect to meet the user's shooting needs.
  • the white balance calibration method of this embodiment may further include the following steps:
  • step S401 is executed by the user triggering the camera.
  • the user can operate an external device capable of controlling the camera, such as a mobile phone, tablet, remote control, etc., to trigger the camera to execute step S401.
  • an external device capable of controlling the camera, such as a mobile phone, tablet, remote control, etc.
  • the user can also operate the camera
  • the shutter button on the button or the button on the handle of the hand-held pan/tilt trigger triggers the camera to perform step S401.
  • step S401 is automatically triggered by the camera. For example, when the camera follows the target in the second environment, it automatically acquires the target image in the second environment.
  • S402 Perform white balance correction on the target image according to the white balance calibration parameter.
  • the white balance calibration method may further include the following steps:
  • the imaging device of this embodiment performs white balance correction on the target image according to the white balance calibration parameters in the white balance correction mode, that is, step S402 is executed after step S501.
  • the camera can perform step S401 and step S501 at the same time, or can perform step S401 and step S501 in a sequential order.
  • the camera first performs step S501 and then step S401.
  • the camera detects that the camera is in the second environment, that is, automatically enters the white balance correction mode to perform white balance correction on the target image, and the camera can directly output the target image that meets the desired white balance effect.
  • the user can also trigger the camera to enter the white balance correction mode.
  • the user can trigger the camera to enter the white balance correction mode by operating an external device, or by operating a specific button on the camera, A specific button or specific knob triggers the camera to enter the white balance correction mode.
  • an embodiment of the present invention also provides a white balance calibration device, which can be applied to a photographing device.
  • the white balance calibration device of this embodiment may include: a first storage device and a first processor.
  • the first storage device is used to store program instructions; one or more first processors call the program instructions stored in the first storage device.
  • the one or more first processors individually or jointly
  • the ground is configured to perform the following operations: obtain the first white balance value of the marker in the first environment, the first environment meets the environmental conditions of the desired white balance; obtain the second white balance value of the marker in the second environment ; According to the first white balance value and the second white balance value, determine the white balance calibration parameters in the second environment.
  • the first processor can implement the white balance calibration method of the embodiment shown in FIG. 1, FIG. 3, FIG. 4, and FIG. 5, and the white balance calibration device of this embodiment can be described with reference to the white balance calibration method of the above embodiment .
  • An embodiment of the present invention also provides a photographing device.
  • the photographing device of this embodiment may include: an image acquisition module, a second storage device, and a second processor.
  • the image acquisition module is used to capture images;
  • the second storage device is used to store program instructions; one or more second processors call the program instructions stored in the second storage device, and when the program instructions are executed, one or more The second processor is individually or collectively configured to perform the following operations: obtain the first white balance value of the marker in the first environment, the first environment meets the environmental conditions of the desired white balance; obtain the marker in the second The second white balance value under the environment; according to the first white balance value and the second white balance value, the white balance calibration parameter under the second environment is determined.
  • the second processor can implement the white balance calibration method of the embodiments shown in FIG. 1, FIG. 3, FIG. 4, and FIG. 5 of the present invention.
  • the white balance calibration method of the foregoing embodiment may be referred to for the description of the photographing device in this embodiment.
  • the photographing device in this embodiment includes an aerial photographing aircraft or a handheld gimbal, and may also include a camera or other photographing devices.
  • the aforementioned storage device may include volatile memory, such as random-access memory (RAM); the storage device may also include non-volatile memory, such as flash memory ( flash memory, hard disk drive (HDD) or solid-state drive (SSD); the storage device may also include a combination of the foregoing types of memory.
  • volatile memory such as random-access memory (RAM)
  • non-volatile memory such as flash memory ( flash memory, hard disk drive (HDD) or solid-state drive (SSD)
  • SSD solid-state drive
  • the storage device may also include a combination of the foregoing types of memory.
  • the foregoing processor may be a central processing unit (CPU).
  • the processor can also be other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA) ) Or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.
  • DSP Digital Signal Processor
  • ASIC application-specific integrated circuit
  • FPGA field-programmable gate array
  • the general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
  • an embodiment of the present invention also provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the steps of the white balance calibration method in the foregoing embodiment are implemented.
  • the computer-readable storage medium may be an internal storage unit of the photographing device described in any of the foregoing embodiments, such as a hard disk or a memory.
  • the computer-readable storage medium may also be an external storage device of the camera, such as a plug-in hard disk, a smart media card (SMC), an SD card, a flash memory card (Flash Card), etc. equipped on the device .
  • the computer-readable storage medium may also include both an internal storage unit of the photographing device and an external storage device.
  • the computer-readable storage medium is used to store the computer program and other programs and data required by the photographing device, and can also be used to temporarily store data that has been output or will be output.
  • the program can be stored in a computer readable storage medium. During execution, it may include the procedures of the above-mentioned method embodiments.
  • the storage medium may be a magnetic disk, an optical disc, a read-only memory (Read-Only Memory, ROM), or a random access memory (Random Access Memory, RAM), etc.

Abstract

A white balance calibration method and device, and a photographing device. The method comprises: obtaining a first white balance value of a marker in a first environment, the first environment satisfying an environmental condition of desired white balance; obtaining a second white balance value of the marker in a second environment; and determining a white balance calibration parameter in the second environment according to the first white balance value and the second white balance value. By using the first environment as a reference for the white balance calibration in the second environment, the photographing device of the present invention can make a user quickly perform white balance calibration of the second environment. In addition, since the first environment satisfies an environmental condition of desired white balance, the use of the first environment as the reference of the white balance calibration of the second environment also quickly calibrates the white balance of the photographing device in the second environment, so as to quickly adjust the photographing device to suitable white balance, thereby facilitating outputting, by the photographing device, a scene satisfying a photographing effect desired by a user.

Description

白平衡校准方法、装置和拍摄装置White balance calibration method, device and shooting device 技术领域Technical field
本发明涉及拍摄装置的参数校准领域,尤其涉及一种白平衡校准方法、装置和拍摄装置。The invention relates to the field of parameter calibration of photographing devices, and in particular to a white balance calibration method, device and photographing device.
背景技术Background technique
随着摄影技术的发展,用户对拍照的要求越来越高,拍摄装置的使用场景也越来越丰富,比如在一些特殊环境如水下环境中使用拍摄装置拍照。目前,拍摄装置大都在实验室或常规环境下进行白平衡(AWB,Automatic white balance)标定,在常规环境中使用上述拍摄装置得到的图像,其白平衡值满足白平衡的标准;而在特殊环境中使用上述拍摄装置得到的图像,其白平衡值与标准白平衡值相比偏差较大。因此,拍摄装置在特殊环境下拍摄的图像无法很好的还原特殊环境的色彩。With the development of photography technology, users have higher and higher requirements for taking pictures, and the use scenes of shooting devices are becoming more and more abundant, such as using the shooting device to take pictures in some special environments such as underwater environments. At present, most of the shooting devices are calibrated for white balance (AWB, Automatic white balance) in a laboratory or in a conventional environment. The white balance value of the image obtained by using the above shooting device in a conventional environment meets the white balance standard; while in a special environment The white balance value of the image obtained by using the above-mentioned imaging device in, has a large deviation compared with the standard white balance value. Therefore, the image captured by the camera in a special environment cannot well restore the colors of the special environment.
发明内容Summary of the invention
本发明提供一种白平衡校准方法、装置和拍摄装置。The invention provides a white balance calibration method, device and photographing device.
具体地,本发明是通过如下技术方案实现的:Specifically, the present invention is implemented through the following technical solutions:
根据本发明的第一方面,提供一种白平衡校准方法,应用于拍摄装置,所述方法包括:According to a first aspect of the present invention, there is provided a white balance calibration method applied to a photographing device, the method including:
获取标志物在第一环境下的第一白平衡值,所述第一环境满足期望白平衡的环境条件;Acquiring a first white balance value of the marker in a first environment, where the first environment meets environmental conditions of the desired white balance;
获取所述标志物在第二环境下的第二白平衡值;Acquiring a second white balance value of the marker in the second environment;
根据所述第一白平衡值和所述第二白平衡值,确定所述第二环境下的白平衡校准参数。According to the first white balance value and the second white balance value, a white balance calibration parameter in the second environment is determined.
根据本发明的第二方面,提供一种白平衡校准装置,应用于拍摄装置,所述白平衡校准装置包括:According to a second aspect of the present invention, there is provided a white balance calibration device applied to a photographing device, the white balance calibration device comprising:
存储装置,用于存储程序指令;Storage device for storing program instructions;
一个或多个处理器,调用所述存储装置中存储的程序指令,当所述程序指令被执行时,所述一个或多个处理器单独地或共同地被配置成用于实施如下操作:One or more processors call program instructions stored in the storage device, and when the program instructions are executed, the one or more processors are individually or collectively configured to implement the following operations:
获取标志物在第一环境下的第一白平衡值,所述第一环境满足期望白平衡的环境条件;Acquiring a first white balance value of the marker in a first environment, where the first environment meets environmental conditions of the desired white balance;
获取所述标志物在第二环境下的第二白平衡值;Acquiring a second white balance value of the marker in the second environment;
根据所述第一白平衡值和所述第二白平衡值,确定所述第二环境下的白平衡校准参数。According to the first white balance value and the second white balance value, a white balance calibration parameter in the second environment is determined.
根据本发明的第三方面,提供一种拍摄装置,所述拍摄装置包括:According to a third aspect of the present invention, there is provided a photographing device, the photographing device comprising:
图像采集模块,用于拍摄图像;Image acquisition module for shooting images;
存储装置,用于存储程序指令;Storage device for storing program instructions;
一个或多个处理器,调用所述存储装置中存储的程序指令,当所述程序指令被执行时,所述一个或多个处理器单独地或共同地被配置成用于实施如下操作:One or more processors call program instructions stored in the storage device, and when the program instructions are executed, the one or more processors are individually or collectively configured to implement the following operations:
获取标志物在第一环境下的第一白平衡值,所述第一环境满足期望白平衡的环境条件;Acquiring a first white balance value of the marker in a first environment, where the first environment meets environmental conditions of the desired white balance;
获取所述标志物在第二环境下的第二白平衡值;Acquiring a second white balance value of the marker in the second environment;
根据所述第一白平衡值和所述第二白平衡值,确定所述第二环境下的白平衡校准参数。According to the first white balance value and the second white balance value, a white balance calibration parameter in the second environment is determined.
由以上本发明实施例提供的技术方案可见,本发明的拍摄装置将第一环境作为第二环境进行白平衡校准的参照,可以让用户快速地进行第二环境的白平衡校准;同时,由于第一环境满足期望白平衡的环境条件,将第一环境作为第二环境进行白平衡校准的参照也快速地校准了拍摄装置在第二环境下的白平衡,从而将拍摄装置快速调节至合适的白平衡,有利于拍摄装置输出满足用户期望拍摄效果的画面。It can be seen from the technical solutions provided by the above embodiments of the present invention that the photographing device of the present invention uses the first environment as a reference for white balance calibration in the second environment, allowing users to quickly perform white balance calibration in the second environment; An environment satisfies the environmental conditions of the desired white balance. Using the first environment as a reference for the white balance calibration of the second environment also quickly calibrates the white balance of the camera in the second environment, thereby quickly adjusting the camera to a suitable white balance. The balance helps the camera to output images that meet the user's desired shooting effect.
附图说明Description of the drawings
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly describe the technical solutions in the embodiments of the present invention, the following will briefly introduce the accompanying drawings used in the description of the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative labor.
图1是本发明一实施例中的白平衡校准方法的方法流程图;FIG. 1 is a method flowchart of a white balance calibration method in an embodiment of the present invention;
图2是本发明一实施例中的白平衡校准方法的使用场景图;2 is a usage scene diagram of a white balance calibration method in an embodiment of the present invention;
图3是本发明另一实施例中的白平衡校准方法的方法流程图;3 is a method flowchart of a white balance calibration method in another embodiment of the present invention;
图4是本发明又一实施例中的白平衡校准方法的方法流程图;4 is a method flowchart of a white balance calibration method in another embodiment of the present invention;
图5是本发明还一实施例中的白平衡校准方法的方法流程图;FIG. 5 is a method flowchart of a white balance calibration method in still another embodiment of the present invention;
图6是本发明一实施例中的白平衡校准装置的结构框图;6 is a structural block diagram of a white balance calibration device in an embodiment of the present invention;
图7是本发明一实施例中的拍摄装置的结构框图。Fig. 7 is a structural block diagram of a photographing device in an embodiment of the present invention.
具体实施方式Detailed ways
在特殊环境中使用现有拍摄装置得到的图像,其白平衡值与标准白平衡值相比偏差较大。并且,目前缺乏色卡对特殊环境中的拍摄装置进行白平衡标定,因此,拍摄装置在特殊环境下拍摄的图像无法很好的还原特殊环境的色彩。The white balance value of the image obtained by using the existing camera in a special environment has a large deviation compared with the standard white balance value. In addition, there is currently a lack of color cards to calibrate the white balance of the camera in a special environment. Therefore, the image captured by the camera in the special environment cannot well restore the colors of the special environment.
对于此,本发明的拍摄装置将第一环境作为第二环境进行白平衡校准的参照,可以让用户快速的进行第二环境的白平衡校准;同时,由于第一环境满足期望白平衡的环境条件,将第一环境作为第二环境进行白平衡校准的参照也快速地校准了拍摄装置在第二环境下的白平衡,从而将拍摄装置快速调节至合适的白平衡,有利于拍摄装置输出满足用户期望拍摄效果的画面。In this regard, the camera of the present invention uses the first environment as a reference for white balance calibration in the second environment, allowing users to quickly perform white balance calibration in the second environment; at the same time, since the first environment meets the environmental conditions of the desired white balance , Using the first environment as a reference for white balance calibration in the second environment also quickly calibrates the white balance of the camera in the second environment, so that the camera can be quickly adjusted to a proper white balance, which is beneficial for the output of the camera to satisfy the user The picture of the desired shooting effect.
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of the present invention.
需要说明的是,在不冲突的情况下,下述的实施例及实施方式中的特征可以相互组合。It should be noted that, in the case of no conflict, the following embodiments and features in the implementation can be combined with each other.
本发明实施例的白平衡校准方法可以应用于拍摄装置,该拍摄装置可以包括但不限于相机、航拍飞行器、手持云台等具备拍摄功能的设备。The white balance calibration method of the embodiment of the present invention may be applied to a photographing device, and the photographing device may include, but is not limited to, a camera, an aerial vehicle, a handheld pan/tilt and other equipment with a photographing function.
图1是本发明一实施例中的白平衡校准方法的方法流程图,如图1所示,本实施例的白平衡校准方法可以包括如下步骤:Fig. 1 is a method flowchart of a white balance calibration method in an embodiment of the present invention. As shown in Fig. 1, the white balance calibration method of this embodiment may include the following steps:
S101:获取标志物在第一环境下的第一白平衡值,第一环境满足期望白平衡的环境条件;S101: Acquire a first white balance value of the marker in a first environment, where the first environment meets the environmental conditions of the expected white balance;
标志物的类型可根据需要选择,例如,在某些实施例中,标志物具有适合于白平衡标准的单一颜色,可选的,标志物的颜色为白色,该标志物可以为白色卡片或其他白色标志物;当然,标志物的颜色也可以为其他适合于白平衡标准的单一颜色。在某些实施例中,标志物为用户的手部区域,用户在对拍摄装置进行白平衡校准时,不需要额外准备标志物,直接使用其手部区域作为标志物,使得拍摄装置的白平衡校准过程更加便捷、实用。可以理解地,标志物不限于上述实施例所列举的具有适合于白平衡标准的单一颜色的标志物或用户的手部区域,也可以选择其他。The type of the marker can be selected according to needs. For example, in some embodiments, the marker has a single color suitable for the white balance standard. Optionally, the color of the marker is white, and the marker can be a white card or other White marker; of course, the color of the marker can also be other single colors suitable for the white balance standard. In some embodiments, the marker is the user's hand area. When the user performs white balance calibration on the camera, the user does not need to prepare additional markers, and directly uses the hand area as the marker to make the white balance of the camera The calibration process is more convenient and practical. It is understandable that the marker is not limited to the marker or the user's hand area with a single color suitable for the white balance standard listed in the above-mentioned embodiment, and other markers can also be selected.
第一白平衡值可以由拍摄装置实时获取,也可以预先存储在拍摄装置中。The first white balance value can be obtained by the camera in real time, or can be stored in the camera in advance.
其中,获取标志物在第一环境下的第一白平衡值的过程可以包括但不限于如下步骤:Wherein, the process of obtaining the first white balance value of the marker in the first environment may include but is not limited to the following steps:
(1)、当标志物置于第一环境中时,拍摄标志物,得到第一图像;(1) When the marker is placed in the first environment, photograph the marker to obtain the first image;
(2)根据第一图像,确定标志物的第一白平衡值。(2) According to the first image, determine the first white balance value of the marker.
在某些实施例中,在拍摄标志物,得到第一图像之前,在拍摄装置的拍摄画面上显示第一目标框,以提示使得标志物至少部分置于第一目标框内,确保拍摄装置拍摄到标志物。本实施例的第一目标框设于拍摄画面的中心区域,当然,上述第一目标框也可以设于拍摄画面的其他位置。第一目标框可以为长方形、正方形或其他形状,在此不做具体限定。In some embodiments, before the landmark is photographed and the first image is obtained, the first target frame is displayed on the shooting screen of the photographing device to prompt that the landmark is at least partially placed in the first target frame to ensure that the photographing device captures To the marker. The first target frame of this embodiment is set in the central area of the shooting frame. Of course, the above-mentioned first target frame can also be set at other positions of the shooting frame. The first target frame can be rectangular, square, or other shapes, which is not specifically limited here.
进一步地,在某些实施例中,拍摄装置在检测到标志物满足第一预设策略时,拍摄标志物,得到第一图像。其中,标志物满足第一预设策略,确保拍摄装置所确定的第一白平衡值的准确性。可选的,第一预设策略包括:标志物在第一目标框中的面积占比超过第一预设占比阈值,该第一预设占比阈值可以根据需要设定,如第一预设占比阈值可以大于等于80%并小于等于100%,也可以设置为其他。可选的,第一预设策略包括:标志物位于第一目标框的中心位置,如标志物的中心位置与第一目标框的中心位置重合。当然,第一预设策略也可以设置为其他,例如,当标志物为方形的卡片时,卡片的四角与第一目标边框的四角重合或者卡片的边缘与第一目标边框的边缘重合等等。Further, in some embodiments, when the camera detects that the marker satisfies the first preset strategy, the camera captures the marker to obtain the first image. Wherein, the marker satisfies the first preset strategy to ensure the accuracy of the first white balance value determined by the camera. Optionally, the first preset strategy includes: the area ratio of the marker in the first target frame exceeds a first preset ratio threshold, and the first preset ratio threshold can be set as needed, such as the first preset The threshold of the proportion can be greater than or equal to 80% and less than or equal to 100%, or can be set to other values. Optionally, the first preset strategy includes: the marker is located at the center position of the first target frame, for example, the center position of the marker coincides with the center position of the first target frame. Of course, the first preset strategy can also be set to other. For example, when the marker is a square card, the four corners of the card coincide with the four corners of the first target frame, or the edge of the card coincides with the edge of the first target frame, and so on.
在某些实施例中,拍摄装置利用上述步骤(1)和(2)实时获取第一白平衡值;在某些实施例中,拍摄装置预先利用上述步骤(1)和(2)获取第一白平衡值,并存储在拍摄装置的存储单元如硬盘中,拍摄装置在进行白平衡校准时,直接从存储单元中获取预先保存的第一白平衡值即可。In some embodiments, the camera uses the above steps (1) and (2) to obtain the first white balance value in real time; in some embodiments, the camera uses the above steps (1) and (2) to obtain the first white balance value in advance. The white balance value is stored in the storage unit of the photographing device, such as a hard disk. When the photographing device performs white balance calibration, it can directly obtain the pre-stored first white balance value from the storage unit.
可以由用户触发拍摄装置执行步骤S101,也可以在拍摄装置识别到标志物时,由拍摄装置自动触发拍摄装置执行步骤S101。The user may trigger the camera to perform step S101, or when the camera recognizes the landmark, the camera automatically triggers the camera to perform step S101.
可选的,在某些实施例中,拍摄标志物,得到第一图像之前,所述白平衡校准方法还包括:接收到第一触发指令,也即,由第一触发指令触发拍摄装置执行步骤S101,实现通过用户触发拍摄装置执行步骤S101的功能。其中,第一触发指令用于指示拍摄装置进入自定义白平衡标定模式,该第一触发指令可以由诸如手机、平板电脑、遥控器等能够控制拍摄装置的外部设备发送,也可以由拍摄装置上的控制部如按键、按钮或旋钮等被触发时产生,用户操作外部设备或控制部,即可触发拍摄装置执行S101。本实施例中,拍摄装置在检测到标志物满足第一预设策略,且接收到第一触发指令时,拍摄标志物,得到第一图像。Optionally, in some embodiments, before the marker is photographed and the first image is obtained, the white balance calibration method further includes: receiving a first trigger instruction, that is, triggering the imaging device to perform the steps by the first trigger instruction In S101, the function of triggering the camera to execute step S101 by the user is realized. Among them, the first trigger instruction is used to instruct the camera to enter the custom white balance calibration mode. The first trigger instruction can be sent by an external device capable of controlling the camera such as a mobile phone, a tablet computer, or a remote control, or it can be sent by the camera on the camera. When the control part such as a button, button or knob is triggered, the user operates an external device or control part to trigger the camera to execute S101. In this embodiment, when the imaging device detects that the marker satisfies the first preset strategy and receives the first trigger instruction, it will capture the marker to obtain the first image.
其中,期望白平衡的环境条件可以为符合标准白平衡的环境条件,即拍摄装置在第一环境下的白平衡符合标准白平衡,此时,第一白平衡值也符合标准白平衡要求,拍摄装置将符合标准白平衡的环境条件的第一环境作为参照,对第二环境进行白平衡校准,从而将拍摄装置在第二环境下的白平衡还原成标准白平衡,有利于拍摄装置输出优质画面;当然,期望白平衡的环境条件也可以为具有其他白平衡效果的环境条件, 将该具有其他白平衡效果的环境条件作为参照,对第二环境进行白平衡校准,使得拍摄装置在第二环境下达到不同的拍摄效果。Among them, the environmental condition of the desired white balance can be an environmental condition that meets the standard white balance, that is, the white balance of the shooting device in the first environment meets the standard white balance. At this time, the first white balance value also meets the standard white balance requirements. The device uses the first environment that meets the environmental conditions of the standard white balance as a reference, and performs white balance calibration on the second environment, thereby restoring the white balance of the camera in the second environment to the standard white balance, which is beneficial for the camera to output high-quality images ; Of course, the desired environmental conditions for white balance can also be environmental conditions with other white balance effects. The environmental conditions with other white balance effects are used as a reference to perform white balance calibration on the second environment so that the camera is in the second environment To achieve different shooting effects.
S102:获取标志物在第二环境下的第二白平衡值;S102: Acquire a second white balance value of the marker in the second environment;
本实施例中,第一环境和第二环境具有不同的环境条件,如同一区域的不同位置、同一场景的不同时段、不同区域等等。In this embodiment, the first environment and the second environment have different environmental conditions, such as different locations in the same area, different time periods in the same scene, different areas, and so on.
例如,在某些实施例中,第一环境和第二环境为同一区域的不同位置,其中,不同位置的背景色不同。可选的,第一环境包括地上的环境或空中的环境,第二环境包括水下的环境,通过拍摄装置在地上的环境或空中的环境下的白平衡对拍摄装置在水下的环境下的白平衡进行校准,使得拍摄装置在水下的环境下所拍摄的图像的白平衡达到拍摄装置在地上的环境或空中的环境下的白平衡效果;当然,第一环境和第二环境也可以互换,即第一环境包括水下的环境,第二环境包括地上的环境或空中的环境,通过拍摄装置在水下的环境下的白平衡对拍摄装置在地上的环境或空中的环境下的白平衡进行校准,使得拍摄装置在地上的环境或空中的环境下的白平衡拍摄装置在水下的环境下的白平衡效果。可以理解的是,第一环境和第二环境也可以为上述同一区域的其他不同位置,如同一区域不同深度位置、同一区域不同水平位置等等。For example, in some embodiments, the first environment and the second environment are different locations in the same area, where different locations have different background colors. Optionally, the first environment includes an environment on the ground or an environment in the air, and the second environment includes an environment under water. The white balance of the camera in the environment on the ground or in the air is effective for the camera in the underwater environment. The white balance is calibrated so that the white balance of the image captured by the camera under the underwater environment can achieve the white balance effect of the camera on the ground or in the air; of course, the first environment and the second environment can also interact In other words, the first environment includes the underwater environment, and the second environment includes the ground environment or the air environment. The white balance of the shooting device in the underwater environment is used to determine the white balance of the shooting device in the ground environment or the air environment. The balance is calibrated to make the white balance of the camera in an environment on the ground or in the air the white balance effect of the camera in an underwater environment. It can be understood that the first environment and the second environment may also be other different positions in the same area, such as different depth positions in the same area, different horizontal positions in the same area, and so on.
在某些实施例中,第一环境和第二环境为同一场景的不同时间段,其中,不同时段的环境光存在变化。如地面上某一区域的不同时段、空中某一区域的不同时段或同一水域的不同时段,由于日照在一天当中的变化,使得上述区域在不同的时间段具有不同的环境光,导致拍摄装置在上述区域的不同时间段所拍摄的图像的白平衡存在差异。在进行白平衡校准后,可使得拍摄装置在各时间段所拍摄的图像的白平衡效果趋于一致,满足用户的拍摄需求。可选的,第一环境可以为某一空中场景的非夕阳时段以及非日出时段,第二环境可以为上述空中场景的夕阳时段或日出时段,当然,第一环境和第二环境也可以为其他场景的不同时段,或上述场景的其他不同时段。In some embodiments, the first environment and the second environment are in different time periods of the same scene, wherein there are changes in ambient light in different time periods. For example, in different periods of a certain area on the ground, different periods of a certain area in the air, or different periods of the same water area, due to changes in sunlight throughout the day, the above-mentioned areas have different ambient light at different time periods, causing the camera to be There are differences in the white balance of the images taken at different time periods in the above areas. After the white balance calibration is performed, the white balance effects of the images captured by the photographing device in each time period can be made consistent, which meets the photographing needs of users. Optionally, the first environment can be a non-sunset period and a non-sunrise period of a certain aerial scene, and the second environment can be a sunset period or a sunrise period of the above aerial scene. Of course, the first environment and the second environment can also be Different time periods in other scenes, or other different time periods in the above scenes.
在某些实施例中,第一环境和第二环境为不同区域,如不同的水域,由于水域颜色的变化,导致拍摄装置在不同的水域所拍摄的图像的白平衡存在差异。在进行白平衡校准后,可使得拍摄装置在不同区域下具有相同的白平衡效果。In some embodiments, the first environment and the second environment are different areas, such as different water areas. Due to the change of the color of the water area, the white balance of the images taken by the camera in the different water areas is different. After performing white balance calibration, the camera can have the same white balance effect in different areas.
本实施例中,第二白平衡值为拍摄装置实时获取,其中,获取标志物在第二环境下的第二白平衡值可以包括但不限于如下步骤:In this embodiment, the second white balance value is acquired by the camera in real time, wherein acquiring the second white balance value of the marker in the second environment may include but is not limited to the following steps:
(1)、当标志物置于第二环境中时,拍摄标志物,得到第二图像;(1) When the marker is placed in the second environment, photograph the marker to obtain a second image;
(2)根据第二图像,确定标志物的第二白平衡值。(2) According to the second image, determine the second white balance value of the marker.
在某些实施例中,拍摄标志物,得到第二图像之前,在拍摄装置的拍摄画面上显示第二目标框,以提示使得标志物置于第二目标框内,确保拍摄装置拍摄到标志物。本实施例的第二目标框设于拍摄画面的中心区域,当然,上述第二目标框也可以设于 拍摄画面的其他位置。第二目标框可以为长方形、正方形或其他形状,在此不做具体限定。In some embodiments, before the marker is taken and the second image is obtained, the second target frame is displayed on the shooting screen of the camera to prompt the marker to be placed in the second target frame to ensure that the camera captures the marker. The second target frame in this embodiment is set in the central area of the shooting frame. Of course, the above-mentioned second target frame can also be set at other positions of the shooting frame. The second target frame can be rectangular, square, or other shapes, and is not specifically limited here.
进一步地,在某些实施例中,拍摄装置在检测到标志物满足第二预设策略时,拍摄标志物,得到第二图像。其中,标志物满足第二预设策略,确保拍摄装置所确定的第二白平衡值的准确性。可选的,第二预设策略包括:标志物在第二目标框中的面积占比超过第二预设占比阈值,该第二预设占比阈值可以根据需要设定,如第二预设占比阈值可以大于等于80%并小于等于100%,也可以设置为其他。可选的,第二预设策略包括:标志物位于第二目标框的中心位置,如标志物的中心位置与第二目标框的中心位置重合。当然,第二预设策略也可以设置为其他,例如,当标志物为方形的卡片时,卡片的四角与第二目标边框的四角重合或者卡片的边缘与第二目标边框的边缘重合等等。Further, in some embodiments, when the camera detects that the marker satisfies the second preset strategy, the camera captures the marker to obtain the second image. Wherein, the marker satisfies the second preset strategy to ensure the accuracy of the second white balance value determined by the camera. Optionally, the second preset strategy includes: the area ratio of the marker in the second target frame exceeds a second preset ratio threshold, and the second preset ratio threshold can be set as required, such as the second preset The threshold of the proportion can be greater than or equal to 80% and less than or equal to 100%, or can be set to other values. Optionally, the second preset strategy includes: the marker is located at the center position of the second target frame, for example, the center position of the marker coincides with the center position of the second target frame. Of course, the second preset strategy can also be set to other, for example, when the marker is a square card, the four corners of the card coincide with the four corners of the second target frame, or the edge of the card coincides with the edge of the second target frame, and so on.
可以由用户触发拍摄装置执行步骤S102,也可以在拍摄装置识别到标志物时,由拍摄装置自动触发拍摄装置执行步骤S102。The user may trigger the camera to perform step S102, or when the camera recognizes the landmark, the camera automatically triggers the camera to perform step S102.
可选的,在某些实施例中,拍摄标志物,得到第二图像之前,所述白平衡校准方法还包括:接收到第二触发指令,也即,由第二触发指令触发拍摄装置执行步骤S102,实现通过用户触发拍摄装置执行步骤S102的功能。其中,第二触发指令用于指示拍摄装置进入自定义白平衡标定模式,该第二触发指令可以由诸如手机、平板电脑、遥控器等能够控制拍摄装置的外部设备发送,也可以由拍摄装置上的控制部如按键、按钮或旋钮等被触发时产生,用户操作外部设备或控制部,即可触发拍摄装置执行S102。本实施例中,拍摄装置在检测到标志物满足第二预设策略,且接收到第二触发指令时,拍摄标志物,得到第二图像。Optionally, in some embodiments, before the marker is photographed and the second image is obtained, the white balance calibration method further includes: receiving a second trigger instruction, that is, triggering the imaging device to perform the steps by the second trigger instruction In S102, the function of triggering the camera to execute step S102 by the user is realized. Wherein, the second trigger instruction is used to instruct the camera to enter the custom white balance calibration mode. The second trigger instruction can be sent by an external device capable of controlling the camera such as a mobile phone, a tablet computer, or a remote controller, or it can be sent by the camera on the camera. When the control part such as a button, button or knob is triggered, the user operates an external device or control part to trigger the camera to execute S102. In this embodiment, when the imaging device detects that the marker satisfies the second preset strategy and receives the second trigger instruction, the imaging device captures the marker to obtain the second image.
需要说明的是,根据图像确定标志物的白平衡值,如根据第一图像确定标志物的第一白平衡值以及根据第二图像确定标志物的第二白平衡值,是采用现有白平衡检测算法来实现的。It should be noted that determining the white balance value of the marker based on the image, such as determining the first white balance value of the marker based on the first image and determining the second white balance value of the marker based on the second image, uses the existing white balance The detection algorithm is implemented.
可以理解,本发明实施例中提到的第一触发指令以及第二触发指令,也可以不由用户触发产生,而是通过对预置条件的检测产生,例如,在拍摄过程中,若检测到当前环境与之前环境可能导致拍摄的图像的白平衡差异,则可以自动进入自定义白平衡标定模式,并提示用户进行白平衡校准的操作。It can be understood that the first trigger instruction and the second trigger instruction mentioned in the embodiment of the present invention may not be triggered by the user, but may be generated by detecting preset conditions. For example, during the shooting process, if the current The environment and the previous environment may cause the white balance difference of the captured image, you can automatically enter the custom white balance calibration mode, and prompt the user to perform the white balance calibration operation.
进一步的,在接收到第一触发指令后,可以默认在结束自定义白平衡标定模式之前,一直处于自定义白平衡标定模式,而不需要第二触发指令。例如,在第一环境下拍摄第一图像后,即在拍摄装置的拍摄画面上显示第二目标框,以在用户再次拍摄一图像时,即将该图像默认为是第二图像,从而使得用户可以连续、快速地进行操作。在实际应用中,可以分别在第一环境下拍摄多张第一图像,在第二环境下拍摄多张第二图像,在进行白平衡校准时,可以分别对多张第一图像、多张第二图像进行融合处 理,也可以分别在多张第一图像、多张第二图像中择一使用,例如,可以由用户选择,如此,可以避免某些情况下,由于图像画质不加而导致白平衡校准效果不好的情况。Further, after receiving the first trigger instruction, it can be assumed that the user is in the custom white balance calibration mode before ending the custom white balance calibration mode without the second trigger instruction. For example, after shooting the first image in the first environment, the second target frame is displayed on the shooting screen of the shooting device, so that when the user shoots an image again, the image defaults to the second image, so that the user can Operate continuously and quickly. In practical applications, multiple first images can be taken in the first environment, and multiple second images can be taken in the second environment. When performing white balance calibration, multiple first images and multiple second images can be taken separately. The two images are fused, and they can also be used in multiple first images and multiple second images respectively. For example, it can be selected by the user. In this way, it can avoid the lack of image quality in some cases. When the white balance calibration is not effective.
S103:根据第一白平衡值和第二白平衡值,确定第二环境下的白平衡校准参数。S103: Determine a white balance calibration parameter in the second environment according to the first white balance value and the second white balance value.
本实施例中,第一白平衡值包括以下中的至少两个:标志物在第一环境下的红色分量R与绿色分量G的第一颜色分量比R/G、标志物在第一环境下的红色分量R与蓝色分量B的第二颜色分量比R/B、标志物在第一环境下的绿色分量G与蓝色分量B的第三颜色分量比G/B;相应地,第二白平衡值包括以下中的至少两个:标志物在第二环境下的红色分量R1与绿色分量G1的第四颜色分量比R1/B1、标志物在第二环境下的红色分量R1与蓝色分量B1的第五颜色分量比R1/B1、标志物在第二环境下的绿色分量G1与蓝色分量B1的第六颜色分量比G1/B1。In this embodiment, the first white balance value includes at least two of the following: the first color component ratio R/G of the red component R and the green component G of the marker in the first environment, and the marker in the first environment The second color component ratio R/B of the red component R and the blue component B, and the third color component ratio G/B of the green component G and blue component B of the marker in the first environment; correspondingly, the second The white balance value includes at least two of the following: the fourth color component ratio R1/B1 of the red component R1 and the green component G1 of the marker in the second environment, the red component R1 and blue of the marker in the second environment The fifth color component ratio R1/B1 of the component B1, and the sixth color component ratio G1/B1 of the green component G1 and the blue component B1 of the marker in the second environment.
在本实施例中,第一白平衡值和第二白平衡值的颜色分量比相对应,也即,若第一白平衡值包括:R/G和R/B,第二白平衡值则包括:R1/G1和R1/B1;若第一白平衡值包括:R/G和G/B,第二白平衡值则包括:R1/G1和G1/B1;若第一白平衡值包括:R/B和G/B,第二白平衡值则包括:R1/B1和G1/B1;若第一白平衡值包括:R/G、R/B和G/B,第二白平衡值则包括:R1/G1、R1/B1和G1/B1。根据第一白平衡值和第二白平衡值中相对应的颜色分量比,即可确定第二环境下的白平衡校准参数。In this embodiment, the color component ratios of the first white balance value and the second white balance value correspond to each other, that is, if the first white balance value includes: R/G and R/B, the second white balance value includes : R1/G1 and R1/B1; if the first white balance value includes: R/G and G/B, the second white balance value includes: R1/G1 and G1/B1; if the first white balance value includes: R /B and G/B, the second white balance value includes: R1/B1 and G1/B1; if the first white balance value includes: R/G, R/B and G/B, the second white balance value includes : R1/G1, R1/B1 and G1/B1. According to the ratio of the corresponding color components in the first white balance value and the second white balance value, the white balance calibration parameter in the second environment can be determined.
本实施例中,在根据第一白平衡值和第二白平衡值,确定第二环境下的白平衡校准参数时,根据以下三组颜色分量比中的至少两组颜色分量比,确定第二环境下的白平衡校准参数:R/G和R1/G1、R/B和R1/B1、G/B和G1/B1。进一步的,白平衡校准参数包括以下比值中的至少两个:R/G:R1/G1、R/B:R1/B1、G/B:G1/B1。In this embodiment, when determining the white balance calibration parameters in the second environment based on the first white balance value and the second white balance value, the second set of color component ratios is determined based on at least two of the following three sets of color component ratios. White balance calibration parameters under the environment: R/G and R1/G1, R/B and R1/B1, G/B and G1/B1. Further, the white balance calibration parameter includes at least two of the following ratios: R/G: R1/G1, R/B: R1/B1, G/B: G1/B1.
具体而言,采用下述公式(1)计算白平衡校准参数x、y、z:Specifically, the following formula (1) is used to calculate the white balance calibration parameters x, y, and z:
Figure PCTCN2019098324-appb-000001
Figure PCTCN2019098324-appb-000001
Figure PCTCN2019098324-appb-000002
Figure PCTCN2019098324-appb-000002
Figure PCTCN2019098324-appb-000003
Figure PCTCN2019098324-appb-000003
在某些实施例中,根据第一白平衡值和第二白平衡值,确定x、y和z中的两个;在某些实施例中,根据第一白平衡值和第二白平衡值,确定x、y和z。In some embodiments, two of x, y, and z are determined according to the first white balance value and the second white balance value; in some embodiments, according to the first white balance value and the second white balance value , Determine x, y, and z.
当然,白平衡校准参数x、y、z的计算方式不限于上述公式(1),也可采用其他方式。Of course, the calculation method of the white balance calibration parameters x, y, z is not limited to the above formula (1), and other methods may also be used.
由于第二环境的不同位置可能存在环境光的变化和/或背景色的变化,导致拍摄装置在第二环境的不同位置拍摄的图像之间也存在白平衡差异,因此,可以采用上述步骤S101~S103对第二环境中的不同位置分别进行白平衡校准,获得第二环境的不同位 置的白平衡校准参数,使得拍摄装置在第二环境的不同位置拍摄的图像的白平衡具有相同的效果。本实施例中,白平衡校准参数随标志物在第二环境中的位置变化而变化,可选的,白平衡校准参数随标志物在第二环境中的深度位置变化而变化,以第二环境为海水为例,随着深度加深,海水的颜色逐渐加深,白平衡校准参数随标志物在海水的深度位置变化而变化;可选的,白平衡校准参数随标志物在第二环境中的水平位置(水平方向为沿着深度方向垂直的方向)的变化而变化。Since there may be changes in ambient light and/or background color in different locations in the second environment, resulting in white balance differences between the images captured by the camera at different locations in the second environment, the above steps S101 to S101 can be used. S103 performs white balance calibration on different positions in the second environment to obtain white balance calibration parameters for different positions in the second environment, so that the white balance of the images captured by the camera at different positions in the second environment has the same effect. In this embodiment, the white balance calibration parameter changes with the change of the position of the marker in the second environment. Optionally, the white balance calibration parameter changes with the change of the depth position of the marker in the second environment. Take seawater as an example. As the depth deepens, the color of the seawater gradually darkens. The white balance calibration parameters change with the depth position of the marker in the seawater; optionally, the white balance calibration parameters follow the level of the marker in the second environment. The position (the horizontal direction is the direction perpendicular to the depth direction) changes.
在一具体实施例中,第一环境为水上的环境,第二环境为水下的环境,如图2所示,白平衡校准方法的实现过程具体包括:In a specific embodiment, the first environment is a water environment, and the second environment is an underwater environment. As shown in FIG. 2, the implementation process of the white balance calibration method specifically includes:
(1)、在水上时,用户操作拍摄装置上的按键,触发拍摄装置进入自定义白平衡标定模式,拍摄画面中出现一个第一目标框,提示用户将白卡(即白色卡片)置于第一目标框(充满第一目标框)中后进行拍摄,得到第一图像;通过第一图像得出第一目标框内的白卡在拍摄装置统计的第一环境下的gain值(即R/G、R/B和G/B中的至少两个),并将第一环境下的gain值保存在拍摄装置的存储单元中;(1) When on the water, the user operates the buttons on the camera to trigger the camera to enter the custom white balance calibration mode. A first target frame appears in the shooting screen, prompting the user to place the white card (that is, the white card) in the second A target frame (full of the first target frame) is then photographed to obtain the first image; the gain value of the white card in the first target frame in the first environment calculated by the shooting device (ie R/ At least two of G, R/B and G/B), and save the gain value in the first environment in the storage unit of the camera;
(2)、进入水下后,用户操作拍摄装置上的按键,触发拍摄装置进入自定义白平衡标定模式,拍摄装置弹出第二目标框,将步骤(1)中相同的白卡充满第二目标框,拍摄得到第二图像;拍摄装置根据第二图像计算第二目标框内的白卡在第二环境下的gain值(即R1/G1、R1/B1和G1/B1中的至少两个);(2) After entering underwater, the user operates the button on the camera to trigger the camera to enter the custom white balance calibration mode, the camera pops up the second target frame, and fills the second target with the same white card in step (1) Frame, the second image is obtained by shooting; the shooting device calculates the gain value of the white card in the second target frame in the second environment according to the second image (ie at least two of R1/G1, R1/B1 and G1/B1) ;
(3)、基于步骤(1)得到的第一环境下的gain值以及步骤(2)得到的第二环境下的gain值,确定第二环境下的白平衡校准参数x、y和z。(3) Determine the white balance calibration parameters x, y, and z in the second environment based on the gain value in the first environment obtained in step (1) and the gain value in the second environment obtained in step (2).
其中,用户在每一次在第二环境中使用拍摄装置拍摄前,都可以采用上述白平衡校准过程完成拍摄装置在第二环境下的白平衡校准;当然,也可以在某次完成上述白平衡校准过程后,将确定的第二环境下的白平衡校准参数保存在拍摄装置中,下一次在第二环境中使用拍摄装置拍摄时,直接调用保存在拍摄装置中的第二环境下的白平衡校准参数,即可使得拍摄在第二环境下拍摄的图像具有期望白平衡效果,无需用户重复进行白平衡校准。如图3所示,本实施例的白平衡校准方法还可以包括:Among them, the user can use the above white balance calibration process to complete the white balance calibration of the camera in the second environment every time before using the camera to shoot in the second environment; of course, the above white balance calibration can also be completed at a certain time After the process, save the determined white balance calibration parameters in the second environment in the camera. Next time you use the camera to shoot in the second environment, directly call the white balance calibration in the second environment saved in the camera. The parameters can make the images shot in the second environment have the desired white balance effect, without the user having to repeat the white balance calibration. As shown in FIG. 3, the white balance calibration method of this embodiment may further include:
S301:将白平衡校准参数保存在拍摄装置中。S301: Save the white balance calibration parameter in the shooting device.
本实施例将白平衡校准参数保存在拍摄装置的存储单元中,方便下一次使用。可以将白平衡校准参数保存在拍摄装置的硬盘中,也可以将白平衡校准参数保存在拍摄装置的其他存储单元中。进一步的,将第二环境中的不同位置的白平衡校准参数与对应的第二环境的位置一一对应保存在拍摄装置中。In this embodiment, the white balance calibration parameters are stored in the storage unit of the shooting device, which is convenient for the next use. The white balance calibration parameters can be stored in the hard disk of the camera, or the white balance calibration parameters can be stored in other storage units of the camera. Further, the white balance calibration parameters of different positions in the second environment and the corresponding positions of the second environment are stored in the photographing device in a one-to-one correspondence.
至此,完成拍摄装置在第二环境下的白平衡校准,拍摄装置在第二环境拍摄时,可以采用上述白平衡参数对实时拍摄的图像进行校准,即可使得在第二环境下拍摄的图像的红色分量、绿色分量和蓝色分量之间的比值与拍摄装置在第一环境下拍摄的图像的红色分量、绿色分量和蓝色分量之间的比值相同,使得拍摄装置在第二环境下拍 摄的图像具有期望白平衡效果,满足用户的拍摄需求。So far, the white balance calibration of the shooting device in the second environment is completed. When the shooting device is shooting in the second environment, the white balance parameters can be used to calibrate the real-time shot images, so that the images shot in the second environment can be calibrated. The ratio between the red component, the green component and the blue component is the same as the ratio between the red component, the green component and the blue component of the image captured by the camera in the first environment, so that the camera captured in the second environment The image has the desired white balance effect to meet the user's shooting needs.
参见图4,本实施例的白平衡校准方法还可以包括如下步骤:Referring to FIG. 4, the white balance calibration method of this embodiment may further include the following steps:
S401:获取第二环境下的目标图像;S401: Acquire a target image in the second environment;
在某些实施例中,步骤S401由用户触发拍摄装置执行,用户可以操作诸如手机、平板电脑、遥控器等能够控制拍摄装置的外部设备触发拍摄装置执行步骤S401,当然,用户也可以操作拍摄装置上的快门键或手持云台手柄上的按键触发拍摄装置执行步骤S401。In some embodiments, step S401 is executed by the user triggering the camera. The user can operate an external device capable of controlling the camera, such as a mobile phone, tablet, remote control, etc., to trigger the camera to execute step S401. Of course, the user can also operate the camera The shutter button on the button or the button on the handle of the hand-held pan/tilt trigger triggers the camera to perform step S401.
在某些实施例中,步骤S401由拍摄装置自动触发,如拍摄装置在跟随第二环境下的目标物时,自动获取第二环境下的目标图像。In some embodiments, step S401 is automatically triggered by the camera. For example, when the camera follows the target in the second environment, it automatically acquires the target image in the second environment.
S402:根据白平衡校准参数,对目标图像进行白平衡矫正。S402: Perform white balance correction on the target image according to the white balance calibration parameter.
在根据白平衡校准参数,对目标图像进行白平衡矫正时,具体的,获取目标图像的每一像素点的红色分量R2、绿色分量G2以及蓝色分量B2,对于每一像素点,采用以下调整策略中的至少两个:将
Figure PCTCN2019098324-appb-000004
调整至
Figure PCTCN2019098324-appb-000005
Figure PCTCN2019098324-appb-000006
调整至
Figure PCTCN2019098324-appb-000007
Figure PCTCN2019098324-appb-000008
调整至
Figure PCTCN2019098324-appb-000009
从而使得目标图像的白平衡满足预期白平衡效果。
When performing white balance correction on the target image according to the white balance calibration parameters, specifically, obtain the red component R2, green component G2, and blue component B2 of each pixel of the target image, and for each pixel, the following adjustments are used At least two of the strategies:
Figure PCTCN2019098324-appb-000004
Adjusted to
Figure PCTCN2019098324-appb-000005
will
Figure PCTCN2019098324-appb-000006
Adjusted to
Figure PCTCN2019098324-appb-000007
will
Figure PCTCN2019098324-appb-000008
Adjusted to
Figure PCTCN2019098324-appb-000009
So that the white balance of the target image meets the expected white balance effect.
进一步的,在某些实施例中,白平衡校准方法还可以包括如下步骤:Further, in some embodiments, the white balance calibration method may further include the following steps:
S501:检测到拍摄装置处于第二环境,触发拍摄装置进入白平衡矫正模式;S501: It is detected that the camera is in the second environment, and the camera is triggered to enter the white balance correction mode;
本实施例的拍摄装置是在白平衡矫正模式下,根据白平衡校准参数,对目标图像进行白平衡矫正的,也即,步骤S402是在步骤S501之后执行的。The imaging device of this embodiment performs white balance correction on the target image according to the white balance calibration parameters in the white balance correction mode, that is, step S402 is executed after step S501.
其中,拍摄装置可以同时执行步骤S401和步骤S501,也可以按照先后顺序执行步骤S401和步骤S501,在图5所示实施例中,拍摄装置先执行步骤S501,再执行步骤S401。Wherein, the camera can perform step S401 and step S501 at the same time, or can perform step S401 and step S501 in a sequential order. In the embodiment shown in FIG. 5, the camera first performs step S501 and then step S401.
本实施例中,拍摄装置检测到拍摄装置处于第二环境,即自动进入白平衡矫正模式,对目标图像进行白平衡矫正,拍摄装置能够直接输出满足期望白平衡效果的目标图像。可以理解的是,在其他实施例中,也可以由用户触发拍摄装置进入白平衡矫正模式,用户可以通过操作外部设备触发拍摄装置进入白平衡矫正模式,也可以通过操作拍摄装置上的特定按键、特定按钮或特定旋钮触发拍摄装置进入白平衡矫正模式。In this embodiment, the camera detects that the camera is in the second environment, that is, automatically enters the white balance correction mode to perform white balance correction on the target image, and the camera can directly output the target image that meets the desired white balance effect. It is understandable that in other embodiments, the user can also trigger the camera to enter the white balance correction mode. The user can trigger the camera to enter the white balance correction mode by operating an external device, or by operating a specific button on the camera, A specific button or specific knob triggers the camera to enter the white balance correction mode.
对应于上述实施例的白平衡校准方法,本发明实施例还提供一种白平衡校准装置,该白平衡矫正装置能够应用于拍摄装置上。参见图6,本实施例的白平衡校准装置可以包括:第一存储装置和第一处理器。Corresponding to the white balance calibration method of the foregoing embodiment, an embodiment of the present invention also provides a white balance calibration device, which can be applied to a photographing device. Referring to FIG. 6, the white balance calibration device of this embodiment may include: a first storage device and a first processor.
其中,第一存储装置用于存储程序指令;一个或多个第一处理器调用第一存储装 置中存储的程序指令,当程序指令被执行时,一个或多个第一处理器单独地或共同地被配置成用于实施如下操作:获取标志物在第一环境下的第一白平衡值,第一环境满足期望白平衡的环境条件;获取标志物在第二环境下的第二白平衡值;根据第一白平衡值和第二白平衡值,确定第二环境下的白平衡校准参数。The first storage device is used to store program instructions; one or more first processors call the program instructions stored in the first storage device. When the program instructions are executed, the one or more first processors individually or jointly The ground is configured to perform the following operations: obtain the first white balance value of the marker in the first environment, the first environment meets the environmental conditions of the desired white balance; obtain the second white balance value of the marker in the second environment ; According to the first white balance value and the second white balance value, determine the white balance calibration parameters in the second environment.
第一处理器可以实现如本发明图1、图3、图4和图5所示实施例的白平衡校准方法,可参见上述实施例的白平衡校准方法对本实施例的白平衡校准装置进行说明。The first processor can implement the white balance calibration method of the embodiment shown in FIG. 1, FIG. 3, FIG. 4, and FIG. 5, and the white balance calibration device of this embodiment can be described with reference to the white balance calibration method of the above embodiment .
本发明实施例还提供一种拍摄装置,参见图7,本实施例的拍摄装置可以包括:图像采集模块、第二存储装置和第二处理器。An embodiment of the present invention also provides a photographing device. Referring to FIG. 7, the photographing device of this embodiment may include: an image acquisition module, a second storage device, and a second processor.
其中,图像采集模块用于拍摄图像;第二存储装置用于存储程序指令;一个或多个第二处理器调用第二存储装置中存储的程序指令,当程序指令被执行时,一个或多个第二处理器单独地或共同地被配置成用于实施如下操作:获取标志物在第一环境下的第一白平衡值,第一环境满足期望白平衡的环境条件;获取标志物在第二环境下的第二白平衡值;根据第一白平衡值和第二白平衡值,确定第二环境下的白平衡校准参数。Among them, the image acquisition module is used to capture images; the second storage device is used to store program instructions; one or more second processors call the program instructions stored in the second storage device, and when the program instructions are executed, one or more The second processor is individually or collectively configured to perform the following operations: obtain the first white balance value of the marker in the first environment, the first environment meets the environmental conditions of the desired white balance; obtain the marker in the second The second white balance value under the environment; according to the first white balance value and the second white balance value, the white balance calibration parameter under the second environment is determined.
第二处理器可以实现如本发明图1、图3、图4和图5所示实施例的白平衡校准方法,可参见上述实施例的白平衡校准方法对本实施例的拍摄装置进行说明。The second processor can implement the white balance calibration method of the embodiments shown in FIG. 1, FIG. 3, FIG. 4, and FIG. 5 of the present invention. The white balance calibration method of the foregoing embodiment may be referred to for the description of the photographing device in this embodiment.
本实施例的拍摄装置包括航拍飞行器或手持云台,也可以包括相机或其他拍摄装置。The photographing device in this embodiment includes an aerial photographing aircraft or a handheld gimbal, and may also include a camera or other photographing devices.
上述存储装置可以包括易失性存储器(volatile memory),例如随机存取存储器(random-access memory,RAM);存储装置也可以包括非易失性存储器(non-volatile memory),例如快闪存储器(flash memory),硬盘(hard disk drive,HDD)或固态硬盘(solid-state drive,SSD);存储装置还可以包括上述种类的存储器的组合。The aforementioned storage device may include volatile memory, such as random-access memory (RAM); the storage device may also include non-volatile memory, such as flash memory ( flash memory, hard disk drive (HDD) or solid-state drive (SSD); the storage device may also include a combination of the foregoing types of memory.
上述处理器可以是中央处理器(central processing unit,CPU)。该处理器还可以是其它通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(application-specific integrated circuit,ASIC)、现场可编程逻辑门阵列(field-programmable gate array,FPGA)或者其它可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。The foregoing processor may be a central processing unit (CPU). The processor can also be other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA) ) Or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
此外,本发明实施例还提供一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现上述实施例的白平衡校准方法的步骤。In addition, an embodiment of the present invention also provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the steps of the white balance calibration method in the foregoing embodiment are implemented.
所述计算机可读存储介质可以是前述任一实施例所述的拍摄装置的内部存储单元,例如硬盘或内存。所述计算机可读存储介质也可以是拍摄装置的外部存储设备,例如所述设备上配备的插接式硬盘、智能存储卡(Smart Media Card,SMC)、SD卡、 闪存卡(Flash Card)等。进一步的,所述计算机可读存储介质还可以既包括拍摄装置的内部存储单元也包括外部存储设备。所述计算机可读存储介质用于存储所述计算机程序以及所述拍摄装置所需的其他程序和数据,还可以用于暂时地存储已经输出或者将要输出的数据。The computer-readable storage medium may be an internal storage unit of the photographing device described in any of the foregoing embodiments, such as a hard disk or a memory. The computer-readable storage medium may also be an external storage device of the camera, such as a plug-in hard disk, a smart media card (SMC), an SD card, a flash memory card (Flash Card), etc. equipped on the device . Further, the computer-readable storage medium may also include both an internal storage unit of the photographing device and an external storage device. The computer-readable storage medium is used to store the computer program and other programs and data required by the photographing device, and can also be used to temporarily store data that has been output or will be output.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(Random Access Memory,RAM)等。A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing relevant hardware through a computer program. The program can be stored in a computer readable storage medium. During execution, it may include the procedures of the above-mentioned method embodiments. Wherein, the storage medium may be a magnetic disk, an optical disc, a read-only memory (Read-Only Memory, ROM), or a random access memory (Random Access Memory, RAM), etc.
以上所揭露的仅为本发明部分实施例而已,当然不能以此来限定本发明之权利范围,因此依本发明权利要求所作的等同变化,仍属本发明所涵盖的范围。The above-disclosed are only some embodiments of the present invention, which of course cannot be used to limit the scope of rights of the present invention. Therefore, equivalent changes made according to the claims of the present invention still fall within the scope of the present invention.

Claims (73)

  1. 一种白平衡校准方法,应用于拍摄装置,其特征在于,所述方法包括:A white balance calibration method applied to a photographing device, characterized in that the method includes:
    获取标志物在第一环境下的第一白平衡值,所述第一环境满足期望白平衡的环境条件;Acquiring a first white balance value of the marker in a first environment, where the first environment meets environmental conditions of a desired white balance;
    获取所述标志物在第二环境下的第二白平衡值;Acquiring a second white balance value of the marker in the second environment;
    根据所述第一白平衡值和所述第二白平衡值,确定所述第二环境下的白平衡校准参数。According to the first white balance value and the second white balance value, a white balance calibration parameter in the second environment is determined.
  2. 根据权利要求1所述的方法,其特征在于,所述第一环境和所述第二环境为同一区域的不同位置,其中,不同位置的背景色不同。The method according to claim 1, wherein the first environment and the second environment are different locations in the same area, wherein different locations have different background colors.
  3. 根据权利要求2所述的方法,其特征在于,所述第一环境包括地上的环境或空中的环境,所述第二环境包括水下的环境。The method according to claim 2, wherein the first environment includes an environment on the ground or an air environment, and the second environment includes an underwater environment.
  4. 根据权利要求1所述的方法,其特征在于,所述第一环境和所述第二环境为同一场景的不同时间段,其中,不同时段的环境光存在变化。The method according to claim 1, wherein the first environment and the second environment are in different time periods of the same scene, wherein there are changes in ambient light in different time periods.
  5. 根据权利要求1所述的方法,其特征在于,所述标志物具有适合于白平衡标准的单一颜色。The method according to claim 1, wherein the marker has a single color suitable for white balance standards.
  6. 根据权利要求5所述的方法,其特征在于,所述标志物的颜色为白色。The method of claim 5, wherein the color of the marker is white.
  7. 根据权利要求1所述的方法,其特征在于,所述标志物为用户的手部区域。The method of claim 1, wherein the marker is a user's hand area.
  8. 根据权利要求1所述的方法,其特征在于,所述第一白平衡值预先存储在所述拍摄装置中。The method according to claim 1, wherein the first white balance value is pre-stored in the photographing device.
  9. 根据权利要求1所述的方法,其特征在于,所述获取标志物在第一环境下的第一白平衡值,包括:The method according to claim 1, wherein the obtaining the first white balance value of the marker in the first environment comprises:
    当所述标志物置于所述第一环境中时,拍摄所述标志物,得到第一图像;When the marker is placed in the first environment, photograph the marker to obtain a first image;
    根据所述第一图像,确定所述标志物的第一白平衡值。According to the first image, the first white balance value of the marker is determined.
  10. 根据权利要求9所述的方法,其特征在于,所述拍摄所述标志物,得到第一图像之前,还包括:The method according to claim 9, characterized in that, before the photographing the landmark to obtain the first image, the method further comprises:
    在所述拍摄装置的拍摄画面上显示第一目标框,以提示使得所述标志物至少部分置于所述第一目标框内。A first target frame is displayed on the shooting screen of the shooting device to prompt that the marker is at least partially placed in the first target frame.
  11. 根据权利要求10所述的方法,其特征在于,所述拍摄所述标志物,得到第一图像,包括:The method according to claim 10, wherein the photographing the landmark to obtain the first image comprises:
    当检测到所述标志物在所述第一目标框中的面积占比超过第一预设占比阈值或所述标志物位于所述第一目标框的中心位置时,拍摄所述标志物,得到第一图像。When it is detected that the area proportion of the marker in the first target frame exceeds a first preset proportion threshold or the marker is located at the center of the first target frame, photograph the marker, Get the first image.
  12. 根据权利要求9所述的方法,其特征在于,所述拍摄所述标志物,得到第一图像之前,还包括:The method according to claim 9, characterized in that, before the photographing the marker to obtain the first image, the method further comprises:
    接收到第一触发指令,其中,所述第一触发指令用于指示所述拍摄装置进入自定义白平衡标定模式。A first trigger instruction is received, where the first trigger instruction is used to instruct the camera to enter a custom white balance calibration mode.
  13. 根据权利要求1所述的方法,其特征在于,所述获取所述标志物在第二环境 下的第二白平衡值,包括:The method according to claim 1, wherein said obtaining a second white balance value of the marker in a second environment comprises:
    当所述标志物置于所述第二环境中时,拍摄所述标志物,得到第二图像;When the marker is placed in the second environment, photograph the marker to obtain a second image;
    根据所述第二图像,确定所述标志物的第二白平衡值。According to the second image, a second white balance value of the marker is determined.
  14. 根据权利要求13所述的方法,其特征在于,所述拍摄所述标志物,得到第二图像之前,还包括:The method according to claim 13, characterized in that, before the photographing the landmark to obtain the second image, the method further comprises:
    在所述拍摄装置的拍摄画面上显示第二目标框,以提示使得所述标志物置于所述第二目标框内。A second target frame is displayed on the shooting screen of the shooting device to prompt that the marker is placed in the second target frame.
  15. 根据权利要求14所述的方法,其特征在于,所述拍摄所述标志物,得到第二图像,包括:The method according to claim 14, wherein the photographing the marker to obtain the second image comprises:
    当检测到所述标志物在所述第二目标框中的面积占比超过第二预设占比阈值或所述标志物位于所述第二目标框的中心位置时,拍摄所述标志物,得到第二图像。When it is detected that the area proportion of the marker in the second target frame exceeds a second preset proportion threshold or the marker is located at the center of the second target frame, the marker is photographed, Get the second image.
  16. 根据权利要求13所述的方法,其特征在于,所述拍摄所述标志物,得到第二图像之前,还包括:The method according to claim 13, characterized in that, before the photographing the landmark to obtain the second image, the method further comprises:
    接收到第二触发指令,其中,所述第二触发指令用于指示拍摄装置进入自定义白平衡标定模式。A second trigger instruction is received, where the second trigger instruction is used to instruct the camera to enter the custom white balance calibration mode.
  17. 根据权利要求1所述的方法,其特征在于,所述第一白平衡值包括以下中的至少两个:The method according to claim 1, wherein the first white balance value includes at least two of the following:
    所述标志物在所述第一环境下的红色分量与绿色分量的第一颜色分量比、所述标志物在所述第一环境下的红色分量与蓝色分量的第二颜色分量比、所述标志物在所述第一环境下的绿色分量与蓝色分量的第三颜色分量比;The first color component ratio of the red component to the green component of the marker in the first environment, the second color component ratio of the red component to the blue component of the marker in the first environment, and the The third color component ratio of the green component and the blue component of the marker in the first environment;
    所述第二白平衡值包括以下中的至少两个:The second white balance value includes at least two of the following:
    所述标志物在所述第二环境下的红色分量与绿色分量的第四颜色分量比、所述标志物在所述第二环境下的红色分量与蓝色分量的第五颜色分量比、所述标志物在所述第二环境下的绿色分量与蓝色分量的第六颜色分量比;The fourth color component ratio of the red component to the green component of the marker in the second environment, the fifth color component ratio of the red component to the blue component of the marker in the second environment, and the The ratio of the sixth color component of the green component to the blue component of the marker in the second environment;
    所述第一白平衡值和所述第二白平衡值的颜色分量比相对应。The color component ratios of the first white balance value and the second white balance value correspond to each other.
  18. 根据权利要求17所述的方法,其特征在于,所述根据所述第一白平衡值和所述第二白平衡值,确定所述第二环境下的白平衡校准参数,包括:The method according to claim 17, wherein the determining the white balance calibration parameter in the second environment according to the first white balance value and the second white balance value comprises:
    根据以下三组颜色分量比中的至少两组颜色分量比,确定所述第二环境下的白平衡校准参数:Determine the white balance calibration parameter in the second environment according to at least two sets of color component ratios among the following three sets of color component ratios:
    所述第一颜色分量比和所述第四颜色分量比、所述第二颜色分量比和所述第五颜色分量比、以及所述第三颜色分量比和所述第六颜色分量比。The first color component ratio and the fourth color component ratio, the second color component ratio and the fifth color component ratio, and the third color component ratio and the sixth color component ratio.
  19. 根据权利要求18所述的方法,其特征在于,所述白平衡校准参数包括以下比值中的至少两个:The method according to claim 18, wherein the white balance calibration parameter includes at least two of the following ratios:
    所述第一颜色分量比和所述第四颜色分量比的比值、所述第二颜色分量比和所述第五颜色分量比的比值、以及所述第三颜色分量比和所述第六颜色分量比的比值。The ratio of the first color component ratio and the fourth color component ratio, the ratio of the second color component ratio and the fifth color component ratio, and the third color component ratio and the sixth color The ratio of the component ratios.
  20. 根据权利要求1所述的方法,其特征在于,所述白平衡校准参数随所述标志 物在所述第二环境中的位置变化而变化。The method of claim 1, wherein the white balance calibration parameter changes with the position of the marker in the second environment.
  21. 根据权利要求20所述的方法,其特征在于,所述白平衡校准参数随所述标志物在所述第二环境中的深度位置变化而变化。22. The method of claim 20, wherein the white balance calibration parameter changes with the depth position of the marker in the second environment.
  22. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method of claim 1, wherein the method further comprises:
    将所述白平衡校准参数保存在拍摄装置中。The white balance calibration parameters are stored in the camera.
  23. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method of claim 1, wherein the method further comprises:
    获取所述第二环境下的目标图像;Acquiring a target image in the second environment;
    根据所述白平衡校准参数,对所述目标图像进行白平衡矫正。Perform white balance correction on the target image according to the white balance calibration parameter.
  24. 根据权利要求23所述的方法,其特征在于,所述方法还包括:The method of claim 23, wherein the method further comprises:
    检测到所述拍摄装置处于所述第二环境,触发所述拍摄装置进入白平衡矫正模式;Detecting that the photographing device is in the second environment, triggering the photographing device to enter a white balance correction mode;
    在所述白平衡矫正模式下,根据所述白平衡校准参数,对所述目标图像进行白平衡矫正。In the white balance correction mode, white balance correction is performed on the target image according to the white balance calibration parameters.
  25. 一种白平衡校准装置,应用于拍摄装置,其特征在于,所述白平衡校准装置包括:A white balance calibration device applied to a photographing device, wherein the white balance calibration device includes:
    存储装置,用于存储程序指令;Storage device for storing program instructions;
    一个或多个处理器,调用所述存储装置中存储的程序指令,当所述程序指令被执行时,所述一个或多个处理器单独地或共同地被配置成用于实施如下操作:One or more processors call program instructions stored in the storage device, and when the program instructions are executed, the one or more processors are individually or collectively configured to implement the following operations:
    获取标志物在第一环境下的第一白平衡值,所述第一环境满足期望白平衡的环境条件;Acquiring a first white balance value of the marker in a first environment, where the first environment meets environmental conditions of a desired white balance;
    获取所述标志物在第二环境下的第二白平衡值;Acquiring a second white balance value of the marker in the second environment;
    根据所述第一白平衡值和所述第二白平衡值,确定所述第二环境下的白平衡校准参数。According to the first white balance value and the second white balance value, a white balance calibration parameter in the second environment is determined.
  26. 根据权利要求25所述的装置,其特征在于,所述第一环境和所述第二环境为同一区域的不同位置,其中,不同位置的背景色不同。The device according to claim 25, wherein the first environment and the second environment are different locations in the same area, wherein different locations have different background colors.
  27. 根据权利要求26所述的装置,其特征在于,所述第一环境包括地上的环境或空中的环境,所述第二环境包括水下的环境。The device according to claim 26, wherein the first environment includes an environment on the ground or an air environment, and the second environment includes an underwater environment.
  28. 根据权利要求25所述的装置,其特征在于,所述第一环境和所述第二环境为同一场景的不同时间段,其中,不同时段的环境光存在变化。The device according to claim 25, wherein the first environment and the second environment are in different time periods of the same scene, wherein there are changes in ambient light in different time periods.
  29. 根据权利要求25所述的装置,其特征在于,所述标志物具有适合于白平衡标准的单一颜色。The device of claim 25, wherein the marker has a single color suitable for white balance standards.
  30. 根据权利要求29所述的装置,其特征在于,所述标志物的颜色为白色。The device of claim 29, wherein the color of the marker is white.
  31. 根据权利要求25所述的装置,其特征在于,所述标志物为用户的手部区域。The device of claim 25, wherein the marker is a user's hand area.
  32. 根据权利要求25所述的装置,其特征在于,所述第一白平衡值预先存储在所述拍摄装置中。The device according to claim 25, wherein the first white balance value is pre-stored in the photographing device.
  33. 根据权利要求25所述的装置,其特征在于,所述一个或多个处理器在获取标志物在第一环境下的第一白平衡值时,单独地或共同地被进一步配置成用于实施如下 操作:The device according to claim 25, wherein when the one or more processors obtain the first white balance value of the marker in the first environment, they are separately or collectively further configured to implement Do as follows:
    当所述标志物置于所述第一环境中时,拍摄所述标志物,得到第一图像;When the marker is placed in the first environment, photograph the marker to obtain a first image;
    根据所述第一图像,确定所述标志物的第一白平衡值。According to the first image, the first white balance value of the marker is determined.
  34. 根据权利要求33所述的装置,其特征在于,所述一个或多个处理器在拍摄所述标志物,得到第一图像之前,单独地或共同地被进一步配置成用于实施如下操作:The device according to claim 33, wherein the one or more processors are separately or collectively further configured to perform the following operations before taking the marker to obtain the first image:
    在所述拍摄装置的拍摄画面上显示第一目标框,以提示使得所述标志物至少部分置于所述第一目标框内。A first target frame is displayed on the shooting screen of the shooting device to prompt that the marker is at least partially placed in the first target frame.
  35. 根据权利要求34所述的装置,其特征在于,所述一个或多个处理器在拍摄所述标志物,得到第一图像时,单独地或共同地被进一步配置成用于实施如下操作:The device according to claim 34, wherein the one or more processors are separately or collectively further configured to perform the following operations when photographing the landmark to obtain the first image:
    当检测到所述标志物在所述第一目标框中的面积占比超过第一预设占比阈值或所述标志物位于所述第一目标框的中心位置时,拍摄所述标志物,得到第一图像。When it is detected that the area proportion of the marker in the first target frame exceeds a first preset proportion threshold or the marker is located at the center of the first target frame, photograph the marker, Get the first image.
  36. 根据权利要求33所述的装置,其特征在于,所述一个或多个处理器在拍摄所述标志物,得到第一图像之前,单独地或共同地被进一步配置成用于实施如下操作:The device according to claim 33, wherein the one or more processors are separately or collectively further configured to perform the following operations before taking the marker to obtain the first image:
    接收到第一触发指令,其中,所述第一触发指令用于指示所述拍摄装置进入自定义白平衡标定模式。A first trigger instruction is received, where the first trigger instruction is used to instruct the camera to enter a custom white balance calibration mode.
  37. 根据权利要求25所述的装置,其特征在于,所述一个或多个处理器在获取所述标志物在第二环境下的第二白平衡值时,单独地或共同地被进一步配置成用于实施如下操作:The device according to claim 25, wherein when the one or more processors obtain the second white balance value of the marker in the second environment, they are separately or collectively further configured to use To implement the following operations:
    当所述标志物置于所述第二环境中时,拍摄所述标志物,得到第二图像;When the marker is placed in the second environment, photograph the marker to obtain a second image;
    根据所述第二图像,确定所述标志物的第二白平衡值。According to the second image, a second white balance value of the marker is determined.
  38. 根据权利要求37所述的装置,其特征在于,所述一个或多个处理器在拍摄所述标志物,得到第二图像之前,单独地或共同地被进一步配置成用于实施如下操作:The device according to claim 37, wherein the one or more processors are separately or collectively further configured to perform the following operations before capturing the landmark and obtaining the second image:
    在所述拍摄装置的拍摄画面上显示第二目标框,以提示使得所述标志物置于所述第二目标框内。A second target frame is displayed on the shooting screen of the shooting device to prompt that the marker is placed in the second target frame.
  39. 根据权利要求38所述的装置,其特征在于,所述一个或多个处理器在拍摄所述标志物,得到第二图像时,单独地或共同地被进一步配置成用于实施如下操作:The device according to claim 38, wherein the one or more processors are separately or collectively further configured to perform the following operations when photographing the marker to obtain the second image:
    当检测到所述标志物在所述第二目标框中的面积占比超过第二预设占比阈值或所述标志物位于所述第二目标框的中心位置时,拍摄所述标志物,得到第二图像。When it is detected that the area proportion of the marker in the second target frame exceeds a second preset proportion threshold or the marker is located at the center of the second target frame, the marker is photographed, Get the second image.
  40. 根据权利要求37所述的装置,其特征在于,所述一个或多个处理器在拍摄所述标志物,得到第二图像之前,单独地或共同地被进一步配置成用于实施如下操作:The device according to claim 37, wherein the one or more processors are separately or collectively further configured to perform the following operations before capturing the landmark and obtaining the second image:
    接收到第二触发指令,其中,所述第二触发指令用于指示拍摄装置进入自定义白平衡标定模式。A second trigger instruction is received, where the second trigger instruction is used to instruct the camera to enter the custom white balance calibration mode.
  41. 根据权利要求25所述的装置,其特征在于,所述第一白平衡值包括以下中的至少两个:The device according to claim 25, wherein the first white balance value comprises at least two of the following:
    所述标志物在所述第一环境下的红色分量与绿色分量的第一颜色分量比、所述标志物在所述第一环境下的红色分量与蓝色分量的第二颜色分量比、所述标志物在所述 第一环境下的绿色分量与蓝色分量的第三颜色分量比;The first color component ratio of the red component to the green component of the marker in the first environment, the second color component ratio of the red component to the blue component of the marker in the first environment, and the The third color component ratio of the green component and the blue component of the marker in the first environment;
    所述第二白平衡值包括以下中的至少两个:The second white balance value includes at least two of the following:
    所述标志物在所述第二环境下的红色分量与绿色分量的第四颜色分量比、所述标志物在所述第二环境下的红色分量与蓝色分量的第五颜色分量比、所述标志物在所述第二环境下的绿色分量与蓝色分量的第六颜色分量比;The fourth color component ratio of the red component to the green component of the marker in the second environment, the fifth color component ratio of the red component to the blue component of the marker in the second environment, and the The ratio of the sixth color component of the green component to the blue component of the marker in the second environment;
    所述第一白平衡值和所述第二白平衡值的颜色分量比相对应。The color component ratios of the first white balance value and the second white balance value correspond to each other.
  42. 根据权利要求41所述的装置,其特征在于,所述一个或多个处理器在根据所述第一白平衡值和所述第二白平衡值,确定所述第二环境下的白平衡校准参数时,单独地或共同地被进一步配置成用于实施如下操作:The device according to claim 41, wherein the one or more processors determine the white balance calibration in the second environment according to the first white balance value and the second white balance value. Parameters, individually or collectively, are further configured to implement the following operations:
    根据以下三组颜色分量比中的至少两组颜色分量比,确定所述第二环境下的白平衡校准参数:Determine the white balance calibration parameter in the second environment according to at least two sets of color component ratios among the following three sets of color component ratios:
    所述第一颜色分量比和所述第四颜色分量比、所述第二颜色分量比和所述第五颜色分量比、以及所述第三颜色分量比和所述第六颜色分量比。The first color component ratio and the fourth color component ratio, the second color component ratio and the fifth color component ratio, and the third color component ratio and the sixth color component ratio.
  43. 根据权利要求42所述的装置,其特征在于,所述白平衡校准参数包括以下比值中的至少两个:The device of claim 42, wherein the white balance calibration parameter comprises at least two of the following ratios:
    所述第一颜色分量比和所述第四颜色分量比的比值、所述第二颜色分量比和所述第五颜色分量比的比值、以及所述第三颜色分量比和所述第六颜色分量比的比值。The ratio of the first color component ratio and the fourth color component ratio, the ratio of the second color component ratio and the fifth color component ratio, and the third color component ratio and the sixth color The ratio of the component ratios.
  44. 根据权利要求25所述的装置,其特征在于,所述白平衡校准参数随所述标志物在所述第二环境中的位置变化而变化。The device of claim 25, wherein the white balance calibration parameter changes with the position of the marker in the second environment.
  45. 根据权利要求44所述的装置,其特征在于,所述白平衡校准参数随所述标志物在所述第二环境中的深度位置变化而变化。The device of claim 44, wherein the white balance calibration parameter changes with the depth position of the marker in the second environment.
  46. 根据权利要求25所述的装置,其特征在于,所述一个或多个处理器单独地或共同地被进一步配置成用于实施如下操作:The apparatus according to claim 25, wherein the one or more processors, individually or collectively, are further configured to perform the following operations:
    将所述白平衡校准参数保存在拍摄装置中。The white balance calibration parameters are stored in the camera.
  47. 根据权利要求25所述的装置,其特征在于,所述一个或多个处理器单独地或共同地被进一步配置成用于实施如下操作:The apparatus according to claim 25, wherein the one or more processors, individually or collectively, are further configured to perform the following operations:
    获取所述第二环境下的目标图像;Acquiring a target image in the second environment;
    根据所述白平衡校准参数,对所述目标图像进行白平衡矫正。Perform white balance correction on the target image according to the white balance calibration parameter.
  48. 根据权利要求47所述的装置,其特征在于,所述一个或多个处理器单独地或共同地被进一步配置成用于实施如下操作:The device according to claim 47, wherein the one or more processors are separately or collectively further configured to perform the following operations:
    检测到所述拍摄装置处于所述第二环境,触发所述拍摄装置进入白平衡矫正模式;Detecting that the photographing device is in the second environment, triggering the photographing device to enter a white balance correction mode;
    在所述白平衡矫正模式下,根据所述白平衡校准参数,对所述目标图像进行白平衡矫正。In the white balance correction mode, white balance correction is performed on the target image according to the white balance calibration parameters.
  49. 一种拍摄装置,其特征在于,所述拍摄装置包括:A photographing device, characterized in that the photographing device comprises:
    图像采集模块,用于拍摄图像;Image acquisition module for shooting images;
    存储装置,用于存储程序指令;Storage device for storing program instructions;
    一个或多个处理器,调用所述存储装置中存储的程序指令,当所述程序指令被执行时,所述一个或多个处理器单独地或共同地被配置成用于实施如下操作:One or more processors call program instructions stored in the storage device, and when the program instructions are executed, the one or more processors are individually or collectively configured to implement the following operations:
    获取标志物在第一环境下的第一白平衡值,所述第一环境满足期望白平衡的环境条件;Acquiring a first white balance value of the marker in a first environment, where the first environment meets environmental conditions of a desired white balance;
    获取所述标志物在第二环境下的第二白平衡值;Acquiring a second white balance value of the marker in the second environment;
    根据所述第一白平衡值和所述第二白平衡值,确定所述第二环境下的白平衡校准参数。According to the first white balance value and the second white balance value, a white balance calibration parameter in the second environment is determined.
  50. 根据权利要求49所述的拍摄装置,其特征在于,所述第一环境和所述第二环境为同一区域的不同位置,其中,不同位置的背景色不同。The photographing device according to claim 49, wherein the first environment and the second environment are different locations in the same area, wherein different locations have different background colors.
  51. 根据权利要求50所述的拍摄装置,其特征在于,所述第一环境包括地上的环境或空中的环境,所述第二环境包括水下的环境。The photographing device according to claim 50, wherein the first environment includes an environment on the ground or an air environment, and the second environment includes an underwater environment.
  52. 根据权利要求49所述的拍摄装置,其特征在于,所述第一环境和所述第二环境为同一场景的不同时间段,其中,不同时段的环境光存在变化。The photographing device according to claim 49, wherein the first environment and the second environment are in different time periods of the same scene, wherein there are changes in ambient light in different time periods.
  53. 根据权利要求49所述的拍摄装置,其特征在于,所述标志物具有适合于白平衡标准的单一颜色。The imaging device of claim 49, wherein the marker has a single color suitable for a white balance standard.
  54. 根据权利要求53所述的拍摄装置,其特征在于,所述标志物的颜色为白色。The imaging device of claim 53, wherein the color of the marker is white.
  55. 根据权利要求49所述的拍摄装置,其特征在于,所述标志物为用户的手部区域。The photographing device according to claim 49, wherein the marker is a user's hand area.
  56. 根据权利要求49所述的拍摄装置,其特征在于,所述第一白平衡值预先存储在所述拍摄装置中。The photographing device according to claim 49, wherein the first white balance value is pre-stored in the photographing device.
  57. 根据权利要求49所述的拍摄装置,其特征在于,所述一个或多个处理器在获取标志物在第一环境下的第一白平衡值时,单独地或共同地被进一步配置成用于实施如下操作:The photographing device according to claim 49, wherein the one or more processors are separately or collectively further configured to be used for obtaining the first white balance value of the marker in the first environment. Perform the following operations:
    当所述标志物置于所述第一环境中时,拍摄所述标志物,得到第一图像;When the marker is placed in the first environment, photograph the marker to obtain a first image;
    根据所述第一图像,确定所述标志物的第一白平衡值。According to the first image, the first white balance value of the marker is determined.
  58. 根据权利要求57所述的拍摄装置,其特征在于,所述一个或多个处理器在拍摄所述标志物,得到第一图像之前,单独地或共同地被进一步配置成用于实施如下操作:The photographing device according to claim 57, wherein the one or more processors are separately or collectively further configured to perform the following operations before photographing the landmark to obtain the first image:
    在所述拍摄装置的拍摄画面上显示第一目标框,以提示使得所述标志物至少部分置于所述第一目标框内。A first target frame is displayed on the shooting screen of the shooting device to prompt that the marker is at least partially placed in the first target frame.
  59. 根据权利要求58所述的拍摄装置,其特征在于,所述一个或多个处理器在拍摄所述标志物,得到第一图像时,单独地或共同地被进一步配置成用于实施如下操作:The photographing device according to claim 58, wherein the one or more processors are separately or collectively further configured to perform the following operations when photographing the landmark to obtain the first image:
    当检测到所述标志物在所述第一目标框中的面积占比超过第一预设占比阈值或所述标志物位于所述第一目标框的中心位置时,拍摄所述标志物,得到第一图像。When it is detected that the area proportion of the marker in the first target frame exceeds a first preset proportion threshold or the marker is located at the center of the first target frame, photograph the marker, Get the first image.
  60. 根据权利要求57所述的拍摄装置,其特征在于,所述一个或多个处理器在拍摄所述标志物,得到第一图像之前,单独地或共同地被进一步配置成用于实施如下操 作:The photographing device according to claim 57, wherein the one or more processors are separately or collectively further configured to perform the following operations before photographing the landmark to obtain the first image:
    接收到第一触发指令,其中,所述第一触发指令用于指示所述拍摄装置进入自定义白平衡标定模式。A first trigger instruction is received, where the first trigger instruction is used to instruct the camera to enter a custom white balance calibration mode.
  61. 根据权利要求49所述的拍摄装置,其特征在于,所述一个或多个处理器在获取所述标志物在第二环境下的第二白平衡值时,单独地或共同地被进一步配置成用于实施如下操作:The photographing device according to claim 49, wherein when the one or more processors obtain the second white balance value of the marker in the second environment, they are separately or collectively further configured to Used to implement the following operations:
    当所述标志物置于所述第二环境中时,拍摄所述标志物,得到第二图像;When the marker is placed in the second environment, photograph the marker to obtain a second image;
    根据所述第二图像,确定所述标志物的第二白平衡值。According to the second image, a second white balance value of the marker is determined.
  62. 根据权利要求61所述的拍摄装置,其特征在于,所述一个或多个处理器在拍摄所述标志物,得到第二图像之前,单独地或共同地被进一步配置成用于实施如下操作:The photographing device according to claim 61, wherein the one or more processors are separately or collectively further configured to perform the following operations before photographing the landmark to obtain the second image:
    在所述拍摄装置的拍摄画面上显示第二目标框,以提示使得所述标志物置于所述第二目标框内。A second target frame is displayed on the shooting screen of the shooting device to prompt that the marker is placed in the second target frame.
  63. 根据权利要求62所述的拍摄装置,其特征在于,所述一个或多个处理器在拍摄所述标志物,得到第二图像时,单独地或共同地被进一步配置成用于实施如下操作:The photographing device according to claim 62, wherein the one or more processors are separately or collectively further configured to perform the following operations when photographing the landmark to obtain the second image:
    当检测到所述标志物在所述第二目标框中的面积占比超过第二预设占比阈值或所述标志物位于所述第二目标框的中心位置时,拍摄所述标志物,得到第二图像。When it is detected that the area proportion of the marker in the second target frame exceeds a second preset proportion threshold or the marker is located at the center of the second target frame, the marker is photographed, Get the second image.
  64. 根据权利要求61所述的拍摄装置,其特征在于,所述一个或多个处理器在拍摄所述标志物,得到第二图像之前,单独地或共同地被进一步配置成用于实施如下操作:The photographing device according to claim 61, wherein the one or more processors are separately or collectively further configured to perform the following operations before photographing the landmark to obtain the second image:
    接收到第二触发指令,其中,所述第二触发指令用于指示拍摄装置进入自定义白平衡标定模式。A second trigger instruction is received, where the second trigger instruction is used to instruct the camera to enter the custom white balance calibration mode.
  65. 根据权利要求49所述的拍摄装置,其特征在于,所述第一白平衡值包括以下中的至少两个:The photographing device according to claim 49, wherein the first white balance value comprises at least two of the following:
    所述标志物在所述第一环境下的红色分量与绿色分量的第一颜色分量比、所述标志物在所述第一环境下的红色分量与蓝色分量的第二颜色分量比、所述标志物在所述第一环境下的绿色分量与蓝色分量的第三颜色分量比;The first color component ratio of the red component to the green component of the marker in the first environment, the second color component ratio of the red component to the blue component of the marker in the first environment, and the The third color component ratio of the green component and the blue component of the marker in the first environment;
    所述第二白平衡值包括以下中的至少两个:The second white balance value includes at least two of the following:
    所述标志物在所述第二环境下的红色分量与绿色分量的第四颜色分量比、所述标志物在所述第二环境下的红色分量与蓝色分量的第五颜色分量比、所述标志物在所述第二环境下的绿色分量与蓝色分量的第六颜色分量比;The fourth color component ratio of the red component to the green component of the marker in the second environment, the fifth color component ratio of the red component to the blue component of the marker in the second environment, and the The ratio of the sixth color component of the green component to the blue component of the marker in the second environment;
    所述第一白平衡值和所述第二白平衡值的颜色分量比相对应。The color component ratios of the first white balance value and the second white balance value correspond to each other.
  66. 根据权利要求65所述的拍摄装置,其特征在于,所述一个或多个处理器在根据所述第一白平衡值和所述第二白平衡值,确定所述第二环境下的白平衡校准参数时,单独地或共同地被进一步配置成用于实施如下操作:The photographing device according to claim 65, wherein the one or more processors determine the white balance in the second environment according to the first white balance value and the second white balance value. When calibrating parameters, individually or collectively, they are further configured to implement the following operations:
    根据以下三组颜色分量比中的至少两组颜色分量比,确定所述第二环境下的白平 衡校准参数:Determine the white balance calibration parameter in the second environment according to at least two sets of color component ratios among the following three sets of color component ratios:
    所述第一颜色分量比和所述第四颜色分量比、所述第二颜色分量比和所述第五颜色分量比、以及所述第三颜色分量比和所述第六颜色分量比。The first color component ratio and the fourth color component ratio, the second color component ratio and the fifth color component ratio, and the third color component ratio and the sixth color component ratio.
  67. 根据权利要求66所述的拍摄装置,其特征在于,所述白平衡校准参数包括以下比值中的至少两个:The photographing device according to claim 66, wherein the white balance calibration parameter comprises at least two of the following ratios:
    所述第一颜色分量比和所述第四颜色分量比的比值、所述第二颜色分量比和所述第五颜色分量比的比值、以及所述第三颜色分量比和所述第六颜色分量比的比值。The ratio of the first color component ratio and the fourth color component ratio, the ratio of the second color component ratio and the fifth color component ratio, and the third color component ratio and the sixth color The ratio of the component ratios.
  68. 根据权利要求49所述的拍摄装置,其特征在于,所述白平衡校准参数随所述标志物在所述第二环境中的位置变化而变化。The photographing device according to claim 49, wherein the white balance calibration parameter changes with the position of the marker in the second environment.
  69. 根据权利要求68所述的拍摄装置,其特征在于,所述白平衡校准参数随所述标志物在所述第二环境中的深度位置变化而变化。The photographing device according to claim 68, wherein the white balance calibration parameter changes with the depth position of the marker in the second environment.
  70. 根据权利要求49所述的拍摄装置,其特征在于,所述一个或多个处理器单独地或共同地被进一步配置成用于实施如下操作:The photographing device according to claim 49, wherein the one or more processors are separately or collectively further configured to perform the following operations:
    将所述白平衡校准参数保存在拍摄装置中。The white balance calibration parameters are stored in the camera.
  71. 根据权利要求49所述的拍摄装置,其特征在于,所述一个或多个处理器单独地或共同地被进一步配置成用于实施如下操作:The photographing device according to claim 49, wherein the one or more processors are separately or collectively further configured to perform the following operations:
    获取所述第二环境下的目标图像;Acquiring a target image in the second environment;
    根据所述白平衡校准参数,对所述目标图像进行白平衡矫正。Perform white balance correction on the target image according to the white balance calibration parameter.
  72. 根据权利要求71所述的拍摄装置,其特征在于,所述一个或多个处理器单独地或共同地被进一步配置成用于实施如下操作:The photographing device according to claim 71, wherein the one or more processors are separately or collectively further configured to perform the following operations:
    检测到所述拍摄装置处于所述第二环境,触发所述拍摄装置进入白平衡矫正模式;Detecting that the photographing device is in the second environment, triggering the photographing device to enter a white balance correction mode;
    在所述白平衡矫正模式下,根据所述白平衡校准参数,对所述目标图像进行白平衡矫正。In the white balance correction mode, white balance correction is performed on the target image according to the white balance calibration parameters.
  73. 根据权利要求49所述的拍摄装置,其特征在于,所述拍摄装置包括航拍飞行器或手持云台。The photographing device according to claim 49, wherein the photographing device comprises an aerial photography aircraft or a handheld pan/tilt.
PCT/CN2019/098324 2019-07-30 2019-07-30 White balance calibration method and device, and photographing device WO2021016845A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2019/098324 WO2021016845A1 (en) 2019-07-30 2019-07-30 White balance calibration method and device, and photographing device
CN201980031415.6A CN112166603A (en) 2019-07-30 2019-07-30 White balance calibration method and device and shooting device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/098324 WO2021016845A1 (en) 2019-07-30 2019-07-30 White balance calibration method and device, and photographing device

Publications (1)

Publication Number Publication Date
WO2021016845A1 true WO2021016845A1 (en) 2021-02-04

Family

ID=73859689

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/098324 WO2021016845A1 (en) 2019-07-30 2019-07-30 White balance calibration method and device, and photographing device

Country Status (2)

Country Link
CN (1) CN112166603A (en)
WO (1) WO2021016845A1 (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009010814A (en) * 2007-06-29 2009-01-15 Fujifilm Corp Image processing device and method, and program, and imaging apparatus and method, and program
CN104853172A (en) * 2014-02-19 2015-08-19 联想(北京)有限公司 Information processing method and electronic device
CN106331661A (en) * 2015-06-25 2017-01-11 西安中兴新软件有限责任公司 White balance processing method and device
CN106713887A (en) * 2017-01-03 2017-05-24 捷开通讯(深圳)有限公司 Mobile terminal, and white balance adjustment method
CN107343189A (en) * 2017-07-10 2017-11-10 广东欧珀移动通信有限公司 White balancing treatment method and device
EP3301910A1 (en) * 2016-09-29 2018-04-04 Continental Automotive GmbH Device for white balance correction
CN108182667A (en) * 2017-12-29 2018-06-19 努比亚技术有限公司 A kind of image optimization method, terminal and computer readable storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009010814A (en) * 2007-06-29 2009-01-15 Fujifilm Corp Image processing device and method, and program, and imaging apparatus and method, and program
CN104853172A (en) * 2014-02-19 2015-08-19 联想(北京)有限公司 Information processing method and electronic device
CN106331661A (en) * 2015-06-25 2017-01-11 西安中兴新软件有限责任公司 White balance processing method and device
EP3301910A1 (en) * 2016-09-29 2018-04-04 Continental Automotive GmbH Device for white balance correction
CN106713887A (en) * 2017-01-03 2017-05-24 捷开通讯(深圳)有限公司 Mobile terminal, and white balance adjustment method
CN107343189A (en) * 2017-07-10 2017-11-10 广东欧珀移动通信有限公司 White balancing treatment method and device
CN108182667A (en) * 2017-12-29 2018-06-19 努比亚技术有限公司 A kind of image optimization method, terminal and computer readable storage medium

Also Published As

Publication number Publication date
CN112166603A (en) 2021-01-01

Similar Documents

Publication Publication Date Title
US9756243B2 (en) Imaging controller and imaging control method and program
CN106331508B (en) Method and device for shooting composition
JP5971207B2 (en) Image adjustment apparatus, image adjustment method, and program
US9462169B2 (en) Shooting method, apparatus, and terminal
EP2905955A1 (en) Shooting method and device, and terminal
US20170094155A1 (en) Mobile terminal and photographing method therefor
WO2017043190A1 (en) Control system, imaging device, and program
JP6119235B2 (en) Imaging control apparatus, imaging system, imaging control method, and program
WO2017096858A1 (en) Method and device for calibrating white balance of images
Vazquez-Corral et al. Color stabilization along time and across shots of the same scene, for one or several cameras of unknown specifications
CN111246080B (en) Control apparatus, control method, image pickup apparatus, and storage medium
WO2021175116A1 (en) Image capture scene recognition control method and apparatus and image capture device
US20170214847A1 (en) Method for Setting Shooting Parameters of HDR mode and Electronic Device Using the Same
US9319653B2 (en) White balance compensation method and electronic apparatus using the same
US20110273584A1 (en) Image processing apparatus and image processing method
US11120533B2 (en) Information processing method and information processing apparatus
CN101472064A (en) Filming system and method for processing scene depth
US20130135442A1 (en) Digital photographing apparatus and control method thereof
WO2015192545A1 (en) Photographing method and apparatus and computer storage medium
WO2021016845A1 (en) White balance calibration method and device, and photographing device
JP2015050498A (en) Imaging device, imaging method, and recording medium
US20200288066A1 (en) Delivery of notifications for feedback over visual quality of images
TWI764484B (en) Dual sensor imaging system and calibration method thereof
JP7455656B2 (en) Image processing device, image processing method, and program
JP6541416B2 (en) IMAGE PROCESSING APPARATUS, IMAGE PROCESSING METHOD, PROGRAM, AND STORAGE MEDIUM

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19939352

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19939352

Country of ref document: EP

Kind code of ref document: A1