WO2021128667A1 - 白平衡自动调节方法、装置及计算机可读存储介质 - Google Patents
白平衡自动调节方法、装置及计算机可读存储介质 Download PDFInfo
- Publication number
- WO2021128667A1 WO2021128667A1 PCT/CN2020/086279 CN2020086279W WO2021128667A1 WO 2021128667 A1 WO2021128667 A1 WO 2021128667A1 CN 2020086279 W CN2020086279 W CN 2020086279W WO 2021128667 A1 WO2021128667 A1 WO 2021128667A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- white balance
- sky
- image function
- data set
- sun
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N9/00—Details of colour television systems
- H04N9/64—Circuits for processing colour signals
- H04N9/73—Colour balance circuits, e.g. white balance circuits or colour temperature control
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N5/00—Details of television systems
- H04N5/76—Television signal recording
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N5/00—Details of television systems
- H04N5/76—Television signal recording
- H04N5/91—Television signal processing therefor
Definitions
- This application relates to the field of artificial intelligence technology, and in particular to a method, device, electronic device, and computer-readable storage medium for automatically adjusting white balance.
- White balance will have an important impact on imaging. Since most users are not professional photographers, it is difficult to adjust the mobile phone camera or camera to an appropriate white balance value. The inventor found that if you use the existing automatic white balance of the mobile phone camera or camera Options, especially when shooting a video, the white balance value in the entire video is constantly changing, so it will affect the results of imaging or beauty algorithms and other inaccurate results. Most of the current white balance adjustment methods are based on spot-measured white light. Although they have certain effects, they cannot be accurately adjusted due to cloudy weather and flashing lights. Therefore, an improved white balance automatic adjustment method is needed.
- This application provides a white balance automatic adjustment method, device, electronic equipment, and computer-readable storage medium, the main purpose of which is to automatically adjust the white balance according to the brightness relation equation.
- the white balance automatic adjustment method provided by this application includes:
- the video recording device is controlled to perform the video recording operation normally.
- the present application also provides a white balance automatic adjustment device, which includes a memory and a processor, and the memory stores a white balance automatic adjustment program that can run on the processor.
- a white balance automatic adjustment program that can run on the processor.
- the video recording device is controlled to perform the video recording operation normally.
- the present application also provides an electronic device, wherein the device includes a memory, a processor, and a computer program that is stored in the memory and can run on the processor, and the processor executes The computer program implements the steps of the method for automatically adjusting the white balance as described above.
- the present application also provides a computer-readable storage medium, which stores a white balance automatic adjustment program, and the white balance automatic adjustment program can be executed by one or more processors. Perform the steps of the method for automatically adjusting the white balance as described above.
- This application uses the brightness relation equation to update the pixels of the white balance data set. Since the brightness relation equation combines the sunlight-based image function and the sky light-based image function, the value of the white balance will continue to change, which can be changed according to the environment.
- FIG. 1 is a schematic flowchart of a method for automatically adjusting white balance according to an embodiment of the application
- FIG. 2 is a schematic diagram of the internal structure of a white balance automatic adjustment device provided by an embodiment of the application;
- FIG. 3 is a schematic diagram of modules of a white balance automatic adjustment program in a white balance automatic adjustment device provided by an embodiment of the application.
- FIG. 1 it is a schematic flowchart of a method for automatically adjusting white balance according to an embodiment of this application.
- the method can be executed by a device, and the device can be implemented by software and/or hardware.
- the method for automatically adjusting the white balance includes:
- S1 Receive an analog video set captured by a video recording device, and perform a histogram equalization operation on the analog video set to obtain a video data set.
- the analog video set is not a video actually recorded by the recording device, but a recorded video set captured when the recording button of the recording device is not clicked after the recording device is turned on.
- the calculation method of the histogram equalization operation is:
- H(q i ) represents the analog video set
- the gray scale range of the analog video set is (q 0 , q k )
- (p 0 , p) represents the pixel brightness transformation range
- G(t i ) Represents video data
- (t 0 ,t k ) is the output brightness range of the video data
- N represents the number of the analog video set
- k represents the number of grayscale or pixel brightness
- H(s) represents the number of s histograms
- f represents the equalization probability corresponding to the video data G(t i ).
- the preferred embodiment of the present application inputs the video data set into a countdown model, and the countdown model includes a preset time threshold and frame rate.
- the countdown model performs receiving and toning processing on the video data set within the time threshold and the frame rate.
- the human eye has the same perception of the same color, but the video recording device does not have the adaptability of the human eye.
- the unbalanced output will cause the distortion of the video data. Therefore, the adjustment The color processing is to use white as the primary color of the video data set, to color the video data set, and then obtain the white balance data set.
- color correction methods such as inputting the video data set into pre-built color correction software (or using existing Meitu Xiuxiu, PS, etc.), and playing the video data set , And readjust the brightness, color intensity, fade value, etc. of the video data set according to the color correction software. During the readjustment process, the color correction software will display the video white balance at this time, thereby Obtain the white balance data set.
- the S3 includes: constructing a solar light-based image function and a sky light-based image function, and creating a brightness relation equation based on the white balance data set, the solar light-based image function, and the sky light-based image function , Adjust the solar light-based image function and the sky light-based image function according to the brightness relation equation, divide the white balance data set into a plurality of small data blocks in a preset manner, and according to the adjusted The solar light base image function and the sky light base image function update the pixel value of each of the small data blocks to obtain the white balance change set.
- the brightness relation equation is:
- I(x, ⁇ ) is the white balance data set
- L SUN (x, ⁇ ) represents the solar light base image function
- L SKY (x, ⁇ ) represents the sky light base image function
- C SKY It represents the standard sky light-based image value
- C SUN represents the standard solar light-based image value
- ⁇ represents the light wave wavelength
- the C SUN (x, ⁇ ) and the C SKY (x, ⁇ ) are the result of the combined effect of scene geometry, material, and occlusion coefficient. If the position of the sun is fixed, no matter how the light intensity changes, the C The value of SUN (x, ⁇ ) will not change. If the sky occlusion coefficient and other parameters are fixed, the value of C SKY (x, ⁇ ) will not change.
- the white balance data set is divided into a plurality of small blocks, and the pixel values of the plurality of small blocks: I(x 1 ), I(x 2 ),..., I(x n )
- the pixel values of the plurality of small blocks are updated according to the adjusted solar light base image and the adjusted sky light base image, and the update method is:
- I(x 1 ) C SUN L SUN (x 1 )+C SKY L SKY (x 1 )
- I(x 2 ) C SUN L SUN (x 2 )+C SKY L SKY (x 2 )
- I(x n ) C SUN L SUN (x n )+C SKY L SKY (x n )
- C SUN L SUN () is the adjusted solar light base image
- C SKY L SKY () is the adjusted sky light base image
- the S4 includes: in the case that the white balance variation set obeys a normal distribution, calculating the average pixel value of the white balance variation set, and deleting the deviation of the white balance value variation set from the pixel average value More than 3 ⁇ pixels, so as to get the standard white balance change set.
- the white balance change set obeys a normal distribution as:
- the probability of pixel value distribution in ( ⁇ - ⁇ , ⁇ + ⁇ ) is 0.6827
- the probability of distribution in ( ⁇ -2 ⁇ , ⁇ +2 ⁇ ) is 0.9545
- the probability of distribution in ( ⁇ -3 ⁇ , ⁇ +3 ⁇ ) Is 0.9973
- the white balance change set is P(
- >3 ⁇ ) ⁇ 0.003
- ⁇ is the expected value of the normal distribution
- ⁇ is the preset value of the 3 ⁇ principle.
- the fetching processing for example, sorting the pixels of the standard white balance variation set from small to large, respectively taking the odd bits of the sorting result as the white balance fetching set, or taking the sorting
- the even-numbered bits of the result are used as the white balance fetch set, and the purpose of the fetch processing is to reduce the data set and reduce the redundant pixel values generated in the previous step.
- the pixel range is (56, 100) and the range threshold is 80%, 82% of the pixels in the white balance access set meet the pixel range (56, 100), so the lock determination is successful and the white balance processing is successful. At this time, the user can Take photos or videos.
- the application also provides an automatic white balance adjustment device.
- FIG. 2 it is a schematic diagram of the internal structure of an automatic white balance adjustment device provided by an embodiment of this application.
- the white balance automatic adjustment device 1 may be a PC (Personal Computer, personal computer), or a terminal device such as a smart phone, a tablet computer, or a portable computer, or a server.
- the white balance automatic adjustment device 1 at least includes a memory 11, a processor 12, a communication bus 13, and a network interface 14.
- the memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), magnetic memory, magnetic disk, optical disk, and the like.
- the memory 11 may be an internal storage unit of the white balance automatic adjustment device 1 in some embodiments, such as a hard disk of the white balance automatic adjustment device 1.
- the memory 11 may also be an external storage device of the white balance automatic adjustment device 1, such as a plug-in hard disk equipped on the white balance automatic adjustment device 1, a smart media card (SMC), and a secure digital (Secure Digital, SD) card, flash card (Flash Card), etc.
- the memory 11 may also include both an internal storage unit of the white balance automatic adjustment device 1 and an external storage device.
- the memory 11 can be used not only to store application software and various data installed in the white balance automatic adjustment device 1, such as the code of the white balance automatic adjustment program 01, etc., but also to temporarily store data that has been output or will be output.
- the processor 12 may be a central processing unit (CPU), controller, microcontroller, microprocessor, or other data processing chip, for running program codes or processing stored in the memory 11 Data, for example, execute the white balance automatic adjustment program 01 and so on.
- CPU central processing unit
- controller microcontroller
- microprocessor microprocessor
- other data processing chip for running program codes or processing stored in the memory 11 Data, for example, execute the white balance automatic adjustment program 01 and so on.
- the communication bus 13 is used to realize the connection and communication between these components.
- the network interface 14 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface), and is usually used to establish a communication connection between the device 1 and other electronic devices.
- the device 1 may also include a user interface.
- the user interface may include a display (Display) and an input unit such as a keyboard (Keyboard).
- the optional user interface may also include a standard wired interface and a wireless interface.
- the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode, organic light-emitting diode) touch device, etc.
- the display can also be appropriately called a display screen or a display unit, which is used to display the information processed in the white balance automatic adjustment device 1 and to display a visualized user interface.
- FIG. 2 only shows the white balance automatic adjustment device 1 with components 11-14 and the white balance automatic adjustment program 01.
- FIG. 1 does not constitute the white balance automatic adjustment device 1
- the definition of may include fewer or more components than shown, or a combination of certain components, or a different component arrangement.
- the white balance automatic adjustment program 01 is stored in the memory 11; when the processor 12 executes the white balance automatic adjustment program 01 stored in the memory 11, the following steps are implemented:
- Step 1 Receive an analog video set captured by a video recording device, and perform a histogram equalization operation on the analog video set to obtain a video data set.
- the analog video set is not a video actually recorded by the recording device, but a recorded video set captured when the recording button of the recording device is not clicked after the recording device is turned on.
- the calculation method of the histogram equalization operation is:
- H(q i ) represents the analog video set
- the gray scale range of the analog video set is (q 0 , q k )
- (p 0 , p) represents the pixel brightness transformation range
- G(t i ) represents video data
- (t 0 , t k ) is the output brightness range of the video data
- N represents the number of the analog video set
- k represents the number of grayscale or pixel brightness
- H(s) represents the number of s histograms
- f represents the equalization probability corresponding to the video data G(t i ).
- Step 2 Perform toning processing on the video data set to obtain a white balance data set.
- the preferred embodiment of the present application inputs the video data set into a countdown model, and the countdown model includes a preset time threshold and frame rate.
- the countdown model performs receiving and toning processing on the video data set within the time threshold and the frame rate.
- the human eye has the same perception of the same color, but the video recording device does not have the adaptability of the human eye.
- the unbalanced output will cause the distortion of the video data. Therefore, the adjustment The color processing is to use white as the primary color of the video data set, to color the video data set, and then obtain the white balance data set.
- color correction methods such as inputting the video data set into pre-built color correction software (or using existing Meitu Xiuxiu, PS, etc.), and playing the video data set , And readjust the brightness, color intensity, fade value, etc. of the video data set according to the color correction software. During the readjustment process, the color correction software will display the video white balance at this time, thereby Obtain the white balance data set.
- Step 3 Create a brightness relation equation according to the white balance data set, adjust the brightness relation equation to update the pixels of the white balance data set, and obtain a white balance change set.
- the S3 includes: constructing a solar light-based image function and a sky light-based image function, and creating a brightness relation equation based on the white balance data set, the solar light-based image function, and the sky light-based image function , Adjust the solar light-based image function and the sky light-based image function according to the brightness relation equation, divide the white balance data set into a plurality of small data blocks in a preset manner, and according to the adjusted The solar light base image function and the sky light base image function update the pixel value of each of the small data blocks to obtain the white balance change set.
- the brightness relation equation is:
- I(x, ⁇ ) is the white balance data set
- L SUN (x, ⁇ ) represents the solar light base image function
- L SKY (x, ⁇ ) represents the sky light base image function
- C SKY It represents the standard sky light-based image value
- C SUN represents the standard solar light-based image value
- ⁇ represents the light wave wavelength
- the C SUN (x, ⁇ ) and the C SKY (x, ⁇ ) are the result of the combined effect of scene geometry, material, and occlusion coefficient. If the position of the sun is fixed, no matter how the light intensity changes, the C SKY (x, ⁇ ) The value of SUN (x, ⁇ ) will not change. If the sky occlusion coefficient and other parameters are fixed, the value of C SKY (x, ⁇ ) will not change.
- the white balance data set is divided into a plurality of small blocks, and the pixel values of the plurality of small blocks: I(x 1 ), I(x 2 ),..., I(x n )
- the pixel values of the plurality of small blocks are updated according to the adjusted solar light base image and the adjusted sky light base image, and the update method is:
- I(x 1 ) C SUN L SUN (x 1 )+C SKY L SKY (x 1 )
- I(x 2 ) C SUN L SUN (x 2 )+C SKY L SKY (x 2 )
- I(x n ) C SUN L SUN (x n )+C SKY L SKY (x n )
- C SUN L SUN () is the adjusted solar light base image
- C SKY L SKY () is the adjusted sky light base image
- Step 4 Perform abnormal processing on the white balance change set according to the 3 ⁇ principle to obtain a standard white balance change set.
- the S4 includes: in the case that the white balance variation set obeys a normal distribution, calculating the average pixel value of the white balance variation set, and deleting the deviation of the white balance value variation set from the pixel average value More than 3 ⁇ pixels, so as to get the standard white balance change set.
- the white balance change set obeys a normal distribution as:
- the probability of pixel value distribution in ( ⁇ - ⁇ , ⁇ + ⁇ ) is 0.6827
- the probability of distribution in ( ⁇ -2 ⁇ , ⁇ +2 ⁇ ) is 0.9545
- the probability of distribution in ( ⁇ -3 ⁇ , ⁇ +3 ⁇ ) Is 0.9973
- the white balance change set is P(
- >3 ⁇ ) ⁇ 0.003
- ⁇ is the expected value of the normal distribution
- ⁇ is the preset value of the 3 ⁇ principle.
- Step 5 Perform number processing on the standard white balance variation set to obtain a white balance access set.
- the fetching processing for example, sorting the pixels of the standard white balance variation set from small to large, respectively taking the odd bits of the sorting result as the white balance fetching set, or taking the sorting
- the even-numbered bits of the result are used as the white balance fetch set, and the purpose of the fetch processing is to reduce the data set and reduce the redundant pixel values generated in the previous step.
- Step 6 setting the pixel range of the white balance fetch set and setting the range threshold.
- Step 7 If the proportion of pixels in the white balance access set exceeding the pixel range exceeds the range threshold, control the video recording device not to perform the video recording operation, and re-acquire the analog video set, if the white balance If the proportion of pixels in the fetch set that does not exceed the pixel range does not exceed the range threshold, the video recording device is controlled to perform the video recording operation normally.
- the pixel range is (56, 100) and the range threshold is 80%, 82% of the pixels in the white balance access set meet the pixel range (56, 100), so the lock determination is successful and the white balance processing is successful. At this time, the user can Take photos or videos.
- the white balance automatic adjustment program can also be divided into one or more modules, and the one or more modules are stored in the memory 11 and run by one or more processors (in this embodiment). It is executed by the processor 12) to complete this application.
- the module referred to in this application refers to a series of computer program instruction segments that can complete specific functions, and is used to describe the execution process of the white balance automatic adjustment program in the white balance automatic adjustment device .
- the white balance automatic adjustment program can be divided into data receiving and The processing module 10, the white balance data update module 20, the abnormal removal and fetching processing model 30, and the white balance output module 40 are exemplary:
- the data receiving and processing module 10 is configured to receive an analog video set captured by a video recording device, and perform a histogram equalization operation on the analog video set to obtain a video data set.
- the white balance data update module 20 is configured to: perform toning processing on the video data set to obtain a white balance data set, create a brightness relation equation according to the white balance data set, and adjust the brightness relation equation Thereby, the pixels of the white balance data set are updated to obtain a white balance change set.
- the abnormality removal and access processing model training 30 is used for: performing abnormal removal processing on the white balance variation set according to the 3 ⁇ principle to obtain a standard white balance variation set, and performing access processing on the standard white balance variation set to obtain a white balance Access set.
- the white balance output module 40 is configured to: set the pixel range of the white balance access set and set a range threshold, if the proportion of pixels in the white balance access set exceeding the pixel range exceeds the range threshold, Control the recording device not to perform the video recording operation, and re-acquire the analog video set. If the pixels of the white balance access set do not exceed the pixel range and the ratio does not exceed the range threshold, control the recording device Perform video-enrollment operations normally.
- an embodiment of the present application also proposes an electronic device, which includes a memory, a processor, and a computer program that is stored in the memory and can run on the processor.
- the processor executes the computer program, The steps for realizing the above-mentioned white balance automatic adjustment method.
- an embodiment of the present application also proposes a computer-readable storage medium, and the computer-readable storage medium stores a white balance automatic adjustment program, and the white balance automatic adjustment program can be executed by one or more processors to The steps for realizing the above-mentioned white balance automatic adjustment method.
- the specific implementation of the computer-readable storage medium of the present application is substantially the same as the specific implementation of the above-mentioned white balance automatic adjustment method, and will not be repeated here.
- the computer-readable storage medium may be nonvolatile or volatile.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Color Television Image Signal Generators (AREA)
- Processing Of Color Television Signals (AREA)
Abstract
本申请涉及一种人工智能技术,揭露了一种白平衡自动调节方法,包括:接收录像设备捕获的模拟视频集,对所述模拟视频集执行直方图均衡化操作得到视频数据集,将所述视频数据集进行调色处理得到白平衡数据集,根据所述白平衡数据集创建光亮度联系等式,根据所述光亮度联系等式更新所述白平衡数据集的像素得到白平衡变化集,对所述标准白平衡变化集进行取数处理得到白平衡取数集,预先设置一个像素范围并设定范围阈值,若所述白平衡取数集的像素未超过所述像素范围的比例没有超过所述范围阈值,则控制所述录像设备正常执行录取视频操作。本申请还提出一种白平衡自动调节装置以及一种计算机可读存储介质。本申请可以实现高效的白平衡自动调节功能。
Description
本申请要求于2019年12月26日提交中国专利局、申请号为201911399042.6,申请名称为“白平衡自动调节方法、装置及计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及人工智能技术领域,尤其涉及一种白平衡自动调节方法、装置、电子设备及计算机可读存储介质。
白平衡会对成像有重要影响,由于多数用户并不是专业摄影师,很难将手机摄像头或相机调整到一个合适的白平衡值,发明人发现,如果使用手机摄像头或相机现有的自动白平衡选项,特别是拍摄视频时,在整段视频中白平衡的值是不断变化的,因此会影响成像或美颜等算法的结果不准确。目前白平衡调节方法多数基于点测白光的形式,虽然具有一定效果,但由于受阴天、闪光等影响,无法做到白平衡精确调节,故需要一种改进的白平衡自动调节方法。
发明内容
本申请提供一种白平衡自动调节方法、装置、电子设备及计算机可读存储介质,其主要目的在于根据光亮度联系等式进行白平衡自动调节。
为实现上述目的,本申请提供的一种白平衡自动调节方法,包括:
接收录像设备捕获的模拟视频集,对所述模拟视频集执行直方图均衡化操作得到视频数据集;
将所述视频数据集进行调色处理,得到白平衡数据集;
根据所述白平衡数据集创建光亮度联系等式,调节所述光亮度联系等式从而更新所述白平衡数据集的像素,得到白平衡变化集;
根据3σ原则将所述白平衡变化集进行去异常处理得到标准白平衡变化集;
对所述标准白平衡变化集进行取数处理得到白平衡取数集;
设置所述白平衡取数集的像素范围并设定范围阈值;
若所述白平衡取数集的像素超过所述像素范围的比例超过所述范围阈值, 则控制所述录像设备不可执行录取视频操作,并重新获取模拟视频集;
若所述白平衡取数集的像素未超过所述像素范围的比例没有超过所述范围阈值,则控制所述录像设备正常执行录取视频操作。
此外,为实现上述目的,本申请还提供一种白平衡自动调节装置,该装置包括存储器和处理器,所述存储器中存储有可在所述处理器上运行的白平衡自动调节程序,所述白平衡自动调节程序被所述处理器执行时实现如下步骤:
接收录像设备捕获的模拟视频集,对所述模拟视频集执行直方图均衡化操作得到视频数据集;
将所述视频数据集进行调色处理,得到白平衡数据集;
根据所述白平衡数据集创建光亮度联系等式,调节所述光亮度联系等式从而更新所述白平衡数据集的像素,得到白平衡变化集;
根据3σ原则将所述白平衡变化集进行去异常处理得到标准白平衡变化集;
对所述标准白平衡变化集进行取数处理得到白平衡取数集;
设置所述白平衡取数集的像素范围并设定范围阈值;
若所述白平衡取数集的像素超过所述像素范围的比例超过所述范围阈值,则控制所述录像设备不可执行录取视频操作,并重新获取模拟视频集;
若所述白平衡取数集的像素未超过所述像素范围的比例没有超过所述范围阈值,则控制所述录像设备正常执行录取视频操作。
此外,为实现上述目的,本申请还提供一种电子设备,其中,该设备包括存储器、处理器以及存储在所述存储器中并可以在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如上所述的白平衡自动调节方法的步骤。
此外,为实现上述目的,本申请还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有白平衡自动调节程序,所述白平衡自动调节程序可被一个或者多个处理器执行,以实现如上所述的白平衡自动调节方法的步骤。
本申请利用光亮度联系等式更新白平衡数据集的像素,由于所述光亮度联系等式结合了太阳光基图像函数和天空光基图像函数,使得白平衡的数值会不断变化,能够根据环境特征自动校正白平衡数值,不受阴天、闪光等影 响,提高白平衡数值的准确性,使得相机的成像色彩还原度较高,克服了目前的感光技术无法具有如人眼的校正功能,提高用户的体验感,且3σ原则的去异常处理会提高像素去异常的准确率。因此本申请提出的白平衡自动调节方法、装置及计算机可读存储介质,可以实现精准的相机白平衡调节目的。
图1为本申请一实施例提供的白平衡自动调节方法的流程示意图;
图2为本申请一实施例提供的白平衡自动调节装置的内部结构示意图;
图3为本申请一实施例提供的白平衡自动调节装置中白平衡自动调节程序的模块示意图。
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
本申请提供一种白平衡自动调节方法。参照图1所示,为本申请一实施例提供的白平衡自动调节方法的流程示意图。该方法可以由一个装置执行,该装置可以由软件和/或硬件实现。
在本实施例中,白平衡自动调节方法包括:
S1、接收录像设备捕获的模拟视频集,对所述模拟视频集执行直方图均衡化操作得到视频数据集。
较佳地,所述模拟视频集并非录像设备真正录制的视频,而是录像设备被开启后,该录像设备的录制按钮未被点击的时候捕捉到的录制视频集。
优选地,所述直方图均衡化操作的计算方法为:
其中,H(q
i)表示所述模拟视频集,所述模拟视频集的灰度级范围为(q
0, q
k),(p
0,p)表示像素亮度变换范围,G(t
i)表示视频数据,(t
0,t
k)是所述视频数据的输出亮度范围,N表示所述模拟视频集的数量,k表示灰度或像素亮度数量,H(s)表示s个直方图的直方图函数,f表示所述视频数据G(t
i)对应的均衡概率。
S2、将所述视频数据集进行调色处理,得到白平衡数据集。
较佳地,本申请较佳实施例将所述视频数据集输入至一个倒计时模型中,该倒计时模型包括预先设置的一个时间阈值和帧率。所述倒计时模型在所述时间阈值及所述帧率内,对所述视频数据集进行接收及调色处理。
人眼对相同颜色的感觉是相同的,但是录像设备并没有人眼的适应性,所述录像设备在不同的光线下录制时,输出的不平衡性会造成视频数据的失真,因此所述调色处理是将白色作为所述视频数据集的基色,对所述视频数据集进行调色,进而得到所述白平衡数据集。
本申请所述调色处理的方法有很多种,如将所述视频数据集输入至预先构建的调色软件(或可使用已有的美图秀秀、PS等),播放所述视频数据集,并根据所述调色软件重新调整所述视频数据集的明亮度、颜色强度、渐隐值等,在所述重新调整过程中,所述调色软件会显示此时的视频白平衡,从而得到所述白平衡数据集。
例如所述时间阈值为3秒钟,所述帧率为60,则3秒钟内会得到3*60=180个经过所述倒计时模型调色处理的白平衡数值集。
S3、根据所述白平衡数据集创建光亮度联系等式,调节所述光亮度联系等式从而更新所述白平衡数据集的像素,得到白平衡变化集。
进一步地,所述S3包括:构建太阳光基图像函数和天空光基图像函数,根据所述白平衡数据集、所述太阳光基图像函数和所述天空光基图像函数创建光亮度联系等式,根据所述光亮度联系等式调节所述太阳光基图像函数和所述天空光基图像函数,将所述白平衡数据集按照预设方式分成多个小数据块,根据所述调节后的太阳光基图像函数和天空光基图像函数更新每一个所述小数据块的像素值,得到所述白平衡变化集。
较佳地,所述光亮度联系等式为:
I(x,γ)=C
SUNL
SUN(x,γ)+C
SKYL
SKY(x,γ)
其中,I(x,γ)为所述白平衡数据集,L
SUN(x,γ)表示所述太阳光基图像函数, L
SKY(x,γ)表示所述天空光基图像函数,C
SKY表示标准天空光基图像值,C
SUN表示标准太阳光基图像值,γ表示光波波长。
进一步地,所述C
SUN(x,γ)和所述C
SKY(x,γ)是场景几何、材质和遮挡系数共同作用的结果,若太阳位置固定,则不管光照强度如何变化,所述C
SUN(x,γ)值都不会改变,若天空的遮挡系数等参数固定,所述C
SKY(x,γ)的值也不会改变。
进一步地,所述将所述白平衡数据集分成多个小块,所述多个小块的的像素值:I(x
1),I(x
2),……,I(x
n)
进一步地,根据所述调节后的太阳光基图像和所述调节后的天空光基图像更新所述多个小块的像素值,所述更新方法为:
I(x
1)=C
SUNL
SUN(x
1)+C
SKYL
SKY(x
1)
I(x
2)=C
SUNL
SUN(x
2)+C
SKYL
SKY(x
2)
……
I(x
n)=C
SUNL
SUN(x
n)+C
SKYL
SKY(x
n)
C
SUNL
SUN()为所述调节后的太阳光基图像,C
SKYL
SKY()为所述调节后的天空光基图像。
S4、根据3σ原则将所述白平衡变化集进行去异常处理得到标准白平衡变化集。
进一步地,所述S4包括:在所述白平衡变化集服从正态分布的情况下,计算所述白平衡变化集的像素平均值,删除所述白平衡数值变化集中与所述像素平均值偏差超过3σ的像素,从而得到标准白平衡变化集。
具体地,所述白平衡变化集服从正态分布为:
像素值分布在(μ-σ,μ+σ)中的概率为0.6827,分布在(μ-2σ,μ+2σ)中的概率为0.9545,分布在(μ-3σ,μ+3σ)中的概率为0.9973,当所述白平衡变化集在P(|x-μ|>3σ)<=0.003,则进行所述剔除操作。
其中,μ为所述正态分布的期望值,σ为所述3σ原则的预设值。
S5、对所述标准白平衡变化集进行取数处理得到白平衡取数集。
本申请中,所述取数处理的方法有很多,例如将所述标准白平衡变化集的像素从小到大的排序,分别取排序结果的奇数位作为所述白平衡取数集,或取排序结果的偶数位作为所述白平衡取数集,所述取数处理的目的是缩小 数据集,较少在前面步骤中产生的多余像素值。
S6、设置所述白平衡取数集的像素范围并设定范围阈值。
S7、若所述白平衡取数集的像素超过所述像素范围的比例超过所述范围阈值,则控制所述录像设备不可执行录取视频操作,并重新获取模拟视频集,若所述白平衡取数集的像素未超过所述像素范围的比例没有超过所述范围阈值,则控制所述录像设备正常执行录取视频操作。
例如假设像素范围为(56,100),范围阈值为80%,所述白平衡取数集的像素有82%满足所述像素范围(56,100),因此锁定判断成功,白平衡处理成功,此时用户可以进行拍照或者录像。
本申请还提供一种白平衡自动调节装置。参照图2所示,为本申请一实施例提供的白平衡自动调节装置的内部结构示意图。
在本实施例中,所述白平衡自动调节装置1可以是PC(Personal Computer,个人电脑),或者是智能手机、平板电脑、便携计算机等终端设备,也可以是一种服务器等。该白平衡自动调节装置1至少包括存储器11、处理器12,通信总线13,以及网络接口14。
其中,存储器11至少包括一种类型的可读存储介质,所述可读存储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、磁性存储器、磁盘、光盘等。存储器11在一些实施例中可以是白平衡自动调节装置1的内部存储单元,例如该白平衡自动调节装置1的硬盘。存储器11在另一些实施例中也可以是白平衡自动调节装置1的外部存储设备,例如白平衡自动调节装置1上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,存储器11还可以既包括白平衡自动调节装置1的内部存储单元也包括外部存储设备。存储器11不仅可以用于存储安装于白平衡自动调节装置1的应用软件及各类数据,例如白平衡自动调节程序01的代码等,还可以用于暂时地存储已经输出或者将要输出的数据。
处理器12在一些实施例中可以是一中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器或其他数据处理芯片,用于运行存储器11中存储的程序代码或处理数据,例如执行白平衡自动调节程序01等。
通信总线13用于实现这些组件之间的连接通信。
网络接口14可选的可以包括标准的有线接口、无线接口(如WI-FI接口),通常用于在该装置1与其他电子设备之间建立通信连接。
可选地,该装置1还可以包括用户接口,用户接口可以包括显示器(Display)、输入单元比如键盘(Keyboard),可选的用户接口还可以包括标准的有线接口、无线接口。可选地,在一些实施例中,显示器可以是LED显示器、液晶显示器、触控式液晶显示器以及OLED(Organic Light-Emitting Diode,有机发光二极管)触摸器等。其中,显示器也可以适当的称为显示屏或显示单元,用于显示在白平衡自动调节装置1中处理的信息以及用于显示可视化的用户界面。
图2仅示出了具有组件11-14以及白平衡自动调节程序01的白平衡自动调节装置1,本领域技术人员可以理解的是,图1示出的结构并不构成对白平衡自动调节装置1的限定,可以包括比图示更少或者更多的部件,或者组合某些部件,或者不同的部件布置。
在图2所示的装置1实施例中,存储器11中存储有白平衡自动调节程序01;处理器12执行存储器11中存储的白平衡自动调节程序01时实现如下步骤:
步骤一、接收录像设备捕获的模拟视频集,对所述模拟视频集执行直方图均衡化操作得到视频数据集。
较佳地,所述模拟视频集并非录像设备真正录制的视频,而是录像设备被开启后,该录像设备的录制按钮未被点击的时候捕捉到的录制视频集。
优选地,所述直方图均衡化操作的计算方法为:
其中,H(q
i)表示所述模拟视频集,所述模拟视频集的灰度级范围为(q
0,q
k),(p
0,p)表示像素亮度变换范围,G(t
i)表示视频数据,(t
0,t
k)是所述视频数据的输出亮度范围,N表示所述模拟视频集的数量,k表示灰度或像素亮度 数量,H(s)表示s个直方图的直方图函数,f表示所述视频数据G(t
i)对应的均衡概率。
步骤二、将所述视频数据集进行调色处理,得到白平衡数据集。
较佳地,本申请较佳实施例将所述视频数据集输入至一个倒计时模型中,该倒计时模型包括预先设置的一个时间阈值和帧率。所述倒计时模型在所述时间阈值及所述帧率内,对所述视频数据集进行接收及调色处理。
人眼对相同颜色的感觉是相同的,但是录像设备并没有人眼的适应性,所述录像设备在不同的光线下录制时,输出的不平衡性会造成视频数据的失真,因此所述调色处理是将白色作为所述视频数据集的基色,对所述视频数据集进行调色,进而得到所述白平衡数据集。
本申请所述调色处理的方法有很多种,如将所述视频数据集输入至预先构建的调色软件(或可使用已有的美图秀秀、PS等),播放所述视频数据集,并根据所述调色软件重新调整所述视频数据集的明亮度、颜色强度、渐隐值等,在所述重新调整过程中,所述调色软件会显示此时的视频白平衡,从而得到所述白平衡数据集。
例如所述时间阈值为3秒钟,所述帧率为60,则3秒钟内会得到3*60=180个经过所述倒计时模型调色处理的白平衡数值集。
步骤三、根据所述白平衡数据集创建光亮度联系等式,调节所述光亮度联系等式从而更新所述白平衡数据集的像素,得到白平衡变化集。
进一步地,所述S3包括:构建太阳光基图像函数和天空光基图像函数,根据所述白平衡数据集、所述太阳光基图像函数和所述天空光基图像函数创建光亮度联系等式,根据所述光亮度联系等式调节所述太阳光基图像函数和所述天空光基图像函数,将所述白平衡数据集按照预设方式分成多个小数据块,根据所述调节后的太阳光基图像函数和天空光基图像函数更新每一个所述小数据块的像素值,得到所述白平衡变化集。
较佳地,所述光亮度联系等式为:
I(x,γ)=C
SUNL
SUN(x,γ)+C
SKYL
SKY(x,γ)
其中,I(x,γ)为所述白平衡数据集,L
SUN(x,γ)表示所述太阳光基图像函数,L
SKY(x,γ)表示所述天空光基图像函数,C
SKY表示标准天空光基图像值,C
SUN表示标准太阳光基图像值,γ表示光波波长。
进一步地,所述C
SUN(x,γ)和所述C
SKY(x,γ)是场景几何、材质和遮挡系数共同作用的结果,若太阳位置固定,则不管光照强度如何变化,所述C
SUN(x,γ)值都不会改变,若天空的遮挡系数等参数固定,所述C
SKY(x,γ)的值也不会改变。
进一步地,所述将所述白平衡数据集分成多个小块,所述多个小块的的像素值:I(x
1),I(x
2),……,I(x
n)
进一步地,根据所述调节后的太阳光基图像和所述调节后的天空光基图像更新所述多个小块的像素值,所述更新方法为:
I(x
1)=C
SUNL
SUN(x
1)+C
SKYL
SKY(x
1)
I(x
2)=C
SUNL
SUN(x
2)+C
SKYL
SKY(x
2)
……
I(x
n)=C
SUNL
SUN(x
n)+C
SKYL
SKY(x
n)
C
SUNL
SUN()为所述调节后的太阳光基图像,C
SKYL
SKY()为所述调节后的天空光基图像。
步骤四、根据3σ原则将所述白平衡变化集进行去异常处理得到标准白平衡变化集。
进一步地,所述S4包括:在所述白平衡变化集服从正态分布的情况下,计算所述白平衡变化集的像素平均值,删除所述白平衡数值变化集中与所述像素平均值偏差超过3σ的像素,从而得到标准白平衡变化集。
具体地,所述白平衡变化集服从正态分布为:
像素值分布在(μ-σ,μ+σ)中的概率为0.6827,分布在(μ-2σ,μ+2σ)中的概率为0.9545,分布在(μ-3σ,μ+3σ)中的概率为0.9973,当所述白平衡变化集在P(|x-μ|>3σ)<=0.003,则进行所述剔除操作。
其中,μ为所述正态分布的期望值,σ为所述3σ原则的预设值。
步骤五、对所述标准白平衡变化集进行取数处理得到白平衡取数集。
本申请中,所述取数处理的方法有很多,例如将所述标准白平衡变化集的像素从小到大的排序,分别取排序结果的奇数位作为所述白平衡取数集,或取排序结果的偶数位作为所述白平衡取数集,所述取数处理的目的是缩小数据集,较少在前面步骤中产生的多余像素值。
步骤六、设置所述白平衡取数集的像素范围并设定范围阈值。
步骤七、若所述白平衡取数集的像素超过所述像素范围的比例超过所述范围阈值,则控制所述录像设备不可执行录取视频操作,并重新获取模拟视频集,若所述白平衡取数集的像素未超过所述像素范围的比例没有超过所述范围阈值,则控制所述录像设备正常执行录取视频操作。
例如假设像素范围为(56,100),范围阈值为80%,所述白平衡取数集的像素有82%满足所述像素范围(56,100),因此锁定判断成功,白平衡处理成功,此时用户可以进行拍照或者录像。
可选地,在其他实施例中,白平衡自动调节程序还可以被分割为一个或者多个模块,一个或者多个模块被存储于存储器11中,并由一个或多个处理器(本实施例为处理器12)所执行以完成本申请,本申请所称的模块是指能够完成特定功能的一系列计算机程序指令段,用于描述白平衡自动调节程序在白平衡自动调节装置中的执行过程。
例如,参照图3所示,为本申请白平衡自动调节装置一实施例中的白平衡自动调节程序的程序模块示意图,该实施例中,所述白平衡自动调节程序可以被分割为数据接收及处理模块10、白平衡数据更新模块20、去异常及取数处理模型30、白平衡输出模块40示例性地:
所述数据接收及处理模块10用于:接收录像设备捕获的模拟视频集,对所述模拟视频集执行直方图均衡化操作得到视频数据集。
所述白平衡数据更新模块20用于:将所述视频数据集进行调色处理,得到白平衡数据集,根据所述白平衡数据集创建光亮度联系等式,调节所述光亮度联系等式从而更新所述白平衡数据集的像素,得到白平衡变化集。
所述去异常及取数处理模型训练30用于:根据3σ原则将所述白平衡变化集进行去异常处理得到标准白平衡变化集,对所述标准白平衡变化集进行取数处理得到白平衡取数集。
所述白平衡输出模块40用于:设置所述白平衡取数集的像素范围并设定范围阈值,若所述白平衡取数集的像素超过所述像素范围的比例超过所述范围阈值,则控制所述录像设备不可执行录取视频操作,并重新获取模拟视频集,若所述白平衡取数集的像素未超过所述像素范围的比例没有超过所述范围阈值,则控制所述录像设备正常执行录取视频操作。
上述数据接收及处理模块10、白平衡数据更新模块20、去异常及取数处 理模型30、白平衡输出模块40等程序模块被执行时所实现的功能或操作步骤与上述实施例大体相同,在此不再赘述。
此外,本申请实施例还提出一种电子设备,该设备包括存储器、处理器以及存储在所述存储器中并可以在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现上述白平衡自动调节方法的步骤。
本申请之电子设备的具体实施方式与上述白平衡自动调节方法的具体实施方式大致相同,在此不再赘述。
此外,本申请实施例还提出一种计算机可读存储介质,所述计算机可读存储介质上存储有白平衡自动调节程序,所述白平衡自动调节程序可被一个或多个处理器执行,以实现上述白平衡自动调节方法的步骤。本申请之计算机可读存储介质的具体实施方式与上述白平衡自动调节方法的具体实施方式大致相同,在此不再赘述。计算机可读存储介质可以是非易失性,也可以是易失性。
需要说明的是,上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。并且本文中的术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、装置、物品或者方法不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、装置、物品或者方法所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、装置、物品或者方法中还存在另外的相同要素。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在如上所述的一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法。
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。
Claims (20)
- 一种白平衡自动调节方法,所述方法包括:接收录像设备捕获的模拟视频集,对所述模拟视频集执行直方图均衡化操作得到视频数据集;将所述视频数据集进行调色处理,得到白平衡数据集;根据所述白平衡数据集创建光亮度联系等式,调节所述光亮度联系等式从而更新所述白平衡数据集的像素,得到白平衡变化集;根据3σ原则将所述白平衡变化集进行去异常处理得到标准白平衡变化集;对所述标准白平衡变化集进行取数处理得到白平衡取数集;设置所述白平衡取数集的像素范围并设定范围阈值;若所述白平衡取数集的像素超过所述像素范围的比例超过所述范围阈值,则控制所述录像设备不可执行录取视频操作,并重新获取模拟视频集;若所述白平衡取数集的像素未超过所述像素范围的比例没有超过所述范围阈值,则控制所述录像设备正常执行录取视频操作。
- 如权利要求1所述的白平衡自动调节方法,其中,所述根据所述白平衡数据集创建光亮度联系等式,调节所述光亮度联系等式从而更新所述白平衡数据集的像素,得到白平衡变化集,包括:构建太阳光基图像函数和天空光基图像函数;根据所述白平衡数据集、所述太阳光基图像函数和所述天空光基图像函数创建光亮度联系等式;根据所述光亮度联系等式调节所述太阳光基图像函数和所述天空光基图像函数;将所述白平衡数据集按照预设方式分成多个小数据块,根据所述调节后的太阳光基图像函数和天空光基图像函数更新每一个所述小数据块的像素值,得到所述白平衡变化集。
- 如权利要求2所述的白平衡自动调节方法,其中,所述光亮度联系等式为:I(x,γ)=C SUNL SUN(x,γ)+C SKYL SKY(x,γ)其中,I(x,γ)为所述白平衡数据集,L SUN(x,γ)表示所述太阳光基图像函数,L SKY(x,γ)表示所述天空光基图像函数,C SKY表示标准天空光基图像值,C SUN表 示标准太阳光基图像值,γ表示光波波长。
- 如权利要求2所述的白平衡自动调节方法,其中,所述每一个所述小数据块的像素值的更新方法为:I(x n)=C SUNL SUN(x n)+C SKYL SKY(x n)其中,C SUNL SUN(x n)为所述调节后的太阳光基图像函数,C SKYL SKY(x n)为所述调节后的天空光基图像函数,I(x n)为所述多个小块的的像素值,x n为所述小块的编号。
- 如权利要求1至4中任意一项所述的白平衡自动调节方法,其中,所述根据3σ原则将所述白平衡变化集进行去异常处理得到标准白平衡变化集,包括:在所述白平衡变化集服从正态分布的情况下,计算所述白平衡变化集的像素平均值;删除所述白平衡数值变化集中与所述像素平均值偏差超过3σ的像素,从而得到所述标准白平衡变化集。
- 一种白平衡自动调节装置,所述装置包括存储器和处理器,所述存储器上存储有可在所述处理器上运行的白平衡自动调节程序,所述白平衡自动调节程序被所述处理器执行时实现如下步骤:接收录像设备捕获的模拟视频集,对所述模拟视频集执行直方图均衡化操作得到视频数据集;将所述视频数据集进行调色处理,得到白平衡数据集;根据所述白平衡数据集创建光亮度联系等式,调节所述光亮度联系等式从而更新所述白平衡数据集的像素,得到白平衡变化集;根据3σ原则将所述白平衡变化集进行去异常处理得到标准白平衡变化集;对所述标准白平衡变化集进行取数处理得到白平衡取数集;设置所述白平衡取数集的像素范围并设定范围阈值;若所述白平衡取数集的像素超过所述像素范围的比例超过所述范围阈值,则控制所述录像设备不可执行录取视频操作,并重新获取模拟视频集;若所述白平衡取数集的像素未超过所述像素范围的比例没有超过所述范围阈值,则控制所述录像设备正常执行录取视频操作。
- 如权利要求6所述的白平衡自动调节装置,其中,根据所述白平衡数 据集创建光亮度联系等式,调节所述光亮度联系等式从而更新所述白平衡数据集的像素,得到白平衡变化集,包括:构建太阳光基图像函数和天空光基图像函数;根据所述白平衡数据集、所述太阳光基图像函数和所述天空光基图像函数创建光亮度联系等式;根据所述光亮度联系等式调节所述太阳光基图像函数和所述天空光基图像函数;将所述白平衡数据集按照预设方式分成多个小数据块,根据所述调节后的太阳光基图像函数和天空光基图像函数更新每一个所述小数据块的像素值,得到所述白平衡变化集。
- 如权利要求7所述的白平衡自动调节装置,其中,所述光亮度联系等式为:I(x,γ)=C SUNL SUN(x,γ)+C SKYL SKY(x,γ)其中,I(x,γ)为所述白平衡数据集,L SUN(x,γ)表示所述太阳光基图像函数,L SKY(x,γ)表示所述天空光基图像函数,C SKY表示标准天空光基图像值,C SUN表示标准太阳光基图像值,γ表示光波波长。
- 如权利要求7所述的白平衡自动调节装置,其中,所述每一个所述小数据块的像素值的更新方法为:I(x n)=C SUNL SUN(x n)+C SKYL SKY(x n)其中,C SUNL SUN(x n)为所述调节后的太阳光基图像函数,C SKYL SKY(x n)为所述调节后的天空光基图像函数,I(x n)为所述多个小块的的像素值,x n为所述小块的编号。
- 如权利要求6中所述的白平衡自动调节装置,其中,根据3σ原则将所述白平衡变化集进行去异常处理得到标准白平衡变化集,包括:在所述白平衡变化集服从正态分布的情况下,计算所述白平衡变化集的像素平均值;删除所述白平衡数值变化集中与所述像素平均值偏差超过3σ的像素,从而得到标准白平衡变化集。
- 一种电子设备,该设备包括存储器、处理器以及存储在所述存储器中并可以在所述处理器上运行的计算机程序,所述处理器执行所述计算机程 序时实现如下步骤:接收录像设备捕获的模拟视频集,对所述模拟视频集执行直方图均衡化操作得到视频数据集;将所述视频数据集进行调色处理,得到白平衡数据集;根据所述白平衡数据集创建光亮度联系等式,调节所述光亮度联系等式从而更新所述白平衡数据集的像素,得到白平衡变化集;根据3σ原则将所述白平衡变化集进行去异常处理得到标准白平衡变化集;对所述标准白平衡变化集进行取数处理得到白平衡取数集;设置所述白平衡取数集的像素范围并设定范围阈值;若所述白平衡取数集的像素超过所述像素范围的比例超过所述范围阈值,则控制所述录像设备不可执行录取视频操作,并重新获取模拟视频集;若所述白平衡取数集的像素未超过所述像素范围的比例没有超过所述范围阈值,则控制所述录像设备正常执行录取视频操作。
- 如权利要求11所述的电子设备,其中,所述根据所述白平衡数据集创建光亮度联系等式,调节所述光亮度联系等式从而更新所述白平衡数据集的像素,得到白平衡变化集,包括:构建太阳光基图像函数和天空光基图像函数;根据所述白平衡数据集、所述太阳光基图像函数和所述天空光基图像函数创建光亮度联系等式;根据所述光亮度联系等式调节所述太阳光基图像函数和所述天空光基图像函数;将所述白平衡数据集按照预设方式分成多个小数据块,根据所述调节后的太阳光基图像函数和天空光基图像函数更新每一个所述小数据块的像素值,得到所述白平衡变化集。
- 如权利要求12所述的电子设备,其中,所述光亮度联系等式为:I(x,γ)=C SUNL SUN(x,γ)+C SKYL SKY(x,γ)其中,I(x,γ)为所述白平衡数据集,L SUN(x,γ)表示所述太阳光基图像函数,L SKY(x,γ)表示所述天空光基图像函数,C SKY表示标准天空光基图像值,C SUN表示标准太阳光基图像值,γ表示光波波长。
- 如权利要求12所述的电子设备,其中,所述每一个所述小数据块的 像素值的更新方法为:I(x n)=C SUNL SUN(x n)+C SKYL SKY(x n)其中,C SUNL SUN(x n)为所述调节后的太阳光基图像函数,C SKYL SKY(x n)为所述调节后的天空光基图像函数,I(x n)为所述多个小块的的像素值,x n为所述小块的编号。
- 如权利要求11至15中任意一项所述的电子设备,其中,所述根据3σ原则将所述白平衡变化集进行去异常处理得到标准白平衡变化集,包括:在所述白平衡变化集服从正态分布的情况下,计算所述白平衡变化集的像素平均值;删除所述白平衡数值变化集中与所述像素平均值偏差超过3σ的像素,从而得到所述标准白平衡变化集。
- 一种计算机可读存储介质,所述计算机可读存储介质上存储有白平衡自动调节程序,所述白平衡自动调节程序可被一个或者多个处理器执行,以实现如下步骤:接收录像设备捕获的模拟视频集,对所述模拟视频集执行直方图均衡化操作得到视频数据集;将所述视频数据集进行调色处理,得到白平衡数据集;根据所述白平衡数据集创建光亮度联系等式,调节所述光亮度联系等式从而更新所述白平衡数据集的像素,得到白平衡变化集;根据3σ原则将所述白平衡变化集进行去异常处理得到标准白平衡变化集;对所述标准白平衡变化集进行取数处理得到白平衡取数集;设置所述白平衡取数集的像素范围并设定范围阈值;若所述白平衡取数集的像素超过所述像素范围的比例超过所述范围阈值,则控制所述录像设备不可执行录取视频操作,并重新获取模拟视频集;若所述白平衡取数集的像素未超过所述像素范围的比例没有超过所述范围阈值,则控制所述录像设备正常执行录取视频操作。
- 如权利要求16所述的计算机可读存储介质,其中,所述根据所述白平衡数据集创建光亮度联系等式,调节所述光亮度联系等式从而更新所述白平衡数据集的像素,得到白平衡变化集,包括:构建太阳光基图像函数和天空光基图像函数;根据所述白平衡数据集、所述太阳光基图像函数和所述天空光基图像函数创建光亮度联系等式;根据所述光亮度联系等式调节所述太阳光基图像函数和所述天空光基图像函数;将所述白平衡数据集按照预设方式分成多个小数据块,根据所述调节后的太阳光基图像函数和天空光基图像函数更新每一个所述小数据块的像素值,得到所述白平衡变化集。
- 如权利要求17所述的计算机可读存储介质,其中,所述光亮度联系等式为:I(x,γ)=C SUNL SUN(x,γ)+C SKYL SKY(x,γ)其中,I(x,γ)为所述白平衡数据集,L SUN(x,γ)表示所述太阳光基图像函数,L SKY(x,γ)表示所述天空光基图像函数,C SKY表示标准天空光基图像值,C SUN表示标准太阳光基图像值,γ表示光波波长。
- 如权利要求17所述的计算机可读存储介质,其中,所述每一个所述小数据块的像素值的更新方法为:I(x n)=C SUNL SUN(x n)+C SKYL SKY(x n)其中,C SUNL SUN(x n)为所述调节后的太阳光基图像函数,C SKYL SKY(x n)为所述调节后的天空光基图像函数,I(x n)为所述多个小块的的像素值,x n为所述小块的编号。
- 如权利要求15至19中任一项所述的计算机可读存储介质,其中,所述根据3σ原则将所述白平衡变化集进行去异常处理得到标准白平衡变化集,包括:在所述白平衡变化集服从正态分布的情况下,计算所述白平衡变化集的像素平均值;删除所述白平衡数值变化集中与所述像素平均值偏差超过3σ的像素,从而得到所述标准白平衡变化集。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911399042.6A CN110913195B (zh) | 2019-12-26 | 2019-12-26 | 白平衡自动调节方法、装置及计算机可读存储介质 |
CN201911399042.6 | 2019-12-26 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2021128667A1 true WO2021128667A1 (zh) | 2021-07-01 |
Family
ID=69814180
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2020/086279 WO2021128667A1 (zh) | 2019-12-26 | 2020-04-23 | 白平衡自动调节方法、装置及计算机可读存储介质 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN110913195B (zh) |
WO (1) | WO2021128667A1 (zh) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110913195B (zh) * | 2019-12-26 | 2022-10-04 | 深圳壹账通智能科技有限公司 | 白平衡自动调节方法、装置及计算机可读存储介质 |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110234842A1 (en) * | 2009-11-26 | 2011-09-29 | Nikon Corporation | Image processing device |
CN102209246A (zh) * | 2011-05-23 | 2011-10-05 | 北京工业大学 | 一种实时视频白平衡处理系统 |
CN108881876A (zh) * | 2018-08-17 | 2018-11-23 | Oppo广东移动通信有限公司 | 对图像进行白平衡处理的方法、装置和电子设备 |
CN109151426A (zh) * | 2017-06-28 | 2019-01-04 | 杭州海康威视数字技术股份有限公司 | 一种白平衡调整方法、装置、相机及介质 |
CN110913195A (zh) * | 2019-12-26 | 2020-03-24 | 深圳壹账通智能科技有限公司 | 白平衡自动调节方法、装置及计算机可读存储介质 |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070052814A1 (en) * | 2005-09-07 | 2007-03-08 | Ranganath Tirumala R | Method and Apparatus for white-balancing an image |
CN102170574B (zh) * | 2011-05-23 | 2012-12-26 | 北京工业大学 | 一种实时视频去雾处理系统 |
US9350964B2 (en) * | 2014-03-25 | 2016-05-24 | Fu-Chi Wu | Barrel-based white balance filter |
CN105654437B (zh) * | 2015-12-24 | 2019-04-19 | 广东迅通科技股份有限公司 | 一种对低照度图像的增强方法 |
-
2019
- 2019-12-26 CN CN201911399042.6A patent/CN110913195B/zh active Active
-
2020
- 2020-04-23 WO PCT/CN2020/086279 patent/WO2021128667A1/zh active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110234842A1 (en) * | 2009-11-26 | 2011-09-29 | Nikon Corporation | Image processing device |
CN102209246A (zh) * | 2011-05-23 | 2011-10-05 | 北京工业大学 | 一种实时视频白平衡处理系统 |
CN109151426A (zh) * | 2017-06-28 | 2019-01-04 | 杭州海康威视数字技术股份有限公司 | 一种白平衡调整方法、装置、相机及介质 |
CN108881876A (zh) * | 2018-08-17 | 2018-11-23 | Oppo广东移动通信有限公司 | 对图像进行白平衡处理的方法、装置和电子设备 |
CN110913195A (zh) * | 2019-12-26 | 2020-03-24 | 深圳壹账通智能科技有限公司 | 白平衡自动调节方法、装置及计算机可读存储介质 |
Non-Patent Citations (1)
Title |
---|
FANG JING, ZHANG RUI, CUI WEI, HAN HUI-JIAN: "Outdoor Lighting Estimation Algorithm Based on White Balance Correction", COMPUTER SCIENCE, KEXUE JISHU WENXIAN CHUBANSHE CHONGQING FENSHE, CN, vol. 46, no. 6A, 1 June 2019 (2019-06-01), CN, pages 211 - 221, XP055823360, ISSN: 1002-137X * |
Also Published As
Publication number | Publication date |
---|---|
CN110913195A (zh) | 2020-03-24 |
CN110913195B (zh) | 2022-10-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10074165B2 (en) | Image composition device, image composition method, and recording medium | |
US10019823B2 (en) | Combined composition and change-based models for image cropping | |
US9330334B2 (en) | Iterative saliency map estimation | |
CN111062876B (zh) | 用于校正模型训练和图像校正的方法和装置及电子设备 | |
WO2022078041A1 (zh) | 遮挡检测模型的训练方法及人脸图像的美化处理方法 | |
US9292911B2 (en) | Automatic image adjustment parameter correction | |
US20190335077A1 (en) | Systems and methods for image capture and processing | |
WO2020253508A1 (zh) | 异常细胞检测方法、装置及计算机可读存储介质 | |
US20080297611A1 (en) | Computer-controlled lighting for video communication | |
US20150317510A1 (en) | Rating photos for tasks based on content and adjacent signals | |
WO2019223068A1 (zh) | 虹膜图像局部增强方法、装置、设备及存储介质 | |
US10594930B2 (en) | Image enhancement and repair using sample data from other images | |
KR102146855B1 (ko) | 촬영 설정 값을 공유하는 촬영 장치 및 방법 및 공유 시스템 | |
CN113177438B (zh) | 图像处理方法、设备及存储介质 | |
WO2024041108A1 (zh) | 图像矫正模型训练及图像矫正方法、装置和计算机设备 | |
WO2021115130A1 (zh) | 脑出血点智能检测方法、装置、电子设备及存储介质 | |
WO2019091196A1 (zh) | 图像处理的方法和装置 | |
CN110956679A (zh) | 图像处理方法和装置、电子设备、计算机可读存储介质 | |
WO2021128667A1 (zh) | 白平衡自动调节方法、装置及计算机可读存储介质 | |
WO2020168807A1 (zh) | 图像亮度的调节方法、装置、计算机设备和存储介质 | |
TWI604413B (zh) | 影像處理方法及影像處理裝置 | |
US20230222639A1 (en) | Data processing method, system, and apparatus | |
US11232616B2 (en) | Methods and systems for performing editing operations on media | |
US10887525B2 (en) | Delivery of notifications for feedback over visual quality of images | |
US20170163852A1 (en) | Method and electronic device for dynamically adjusting gamma parameter |
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: 20904806 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 31/10/2022) |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 20904806 Country of ref document: EP Kind code of ref document: A1 |