WO2018058727A1 - 控制闪光灯的方法及终端 - Google Patents
控制闪光灯的方法及终端 Download PDFInfo
- Publication number
- WO2018058727A1 WO2018058727A1 PCT/CN2016/103963 CN2016103963W WO2018058727A1 WO 2018058727 A1 WO2018058727 A1 WO 2018058727A1 CN 2016103963 W CN2016103963 W CN 2016103963W WO 2018058727 A1 WO2018058727 A1 WO 2018058727A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- flash
- spectrum
- terminal
- color
- command
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/10—Cameras or camera modules comprising electronic image sensors; Control thereof for generating image signals from different wavelengths
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/62—Control of parameters via user interfaces
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/70—Circuitry for compensating brightness variation in the scene
- H04N23/74—Circuitry for compensating brightness variation in the scene by influencing the scene brightness using illuminating means
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/80—Camera processing pipelines; Components thereof
- H04N23/84—Camera processing pipelines; Components thereof for processing colour signals
- H04N23/88—Camera processing pipelines; Components thereof for processing colour signals for colour balance, e.g. white-balance circuits or colour temperature control
Definitions
- the present invention relates to the field of computer technologies, and in particular, to a method and a terminal for controlling a flash.
- the color that the user sees with the naked eye or the photo taken by the camera or the color in the image loses the white balance, and cannot display its original color.
- a series of white balance processing such as color reproduction or tone processing can be performed on the photo.
- the existing white balance processing is limited to the adjustment of the ratio of red, blue and green in the image after photographing or the manual use of the standard reference by the user, the former does not achieve the ideal white balance effect, the latter It is very inconvenient in the process of use, and the user cannot carry certain standard reference objects and prepared placement positions every time, so that the corresponding white balance effect is not satisfactory.
- the white balance method of color distortion in the case of the existing natural light is not a natural spectrum, and the stability and the effectiveness of the white balance effect are insufficient.
- a method of controlling a flash the method being based on a terminal provided with a spectral sensor and a color flash;
- the method includes:
- the method further includes:
- the method further includes:
- a flash control interface is displayed on the display interface, and a fine adjustment component is displayed on the flash control interface;
- the method further includes:
- the method further includes:
- a preview interface for displaying a photo is displayed on the display interface, and a preview image acquired by the camera is displayed on the preview interface.
- a terminal provided with a spectrum sensor and a color flash
- the terminal further includes:
- An ambient light spectrum detecting unit configured to detect an ambient light spectrum by the spectral sensor
- a natural light reference spectrum acquisition unit configured to acquire a natural light reference spectrum pre-stored in the terminal
- a compensation spectrum calculation unit configured to calculate a difference between the ambient light spectrum and the natural light reference spectrum as a compensation spectrum
- the color flash control unit is configured to determine an intensity of light emission of each of the RGB colors in the color flash according to the compensation spectrum and to turn on the color flash.
- the terminal further includes a flash-on command receiving unit, configured to receive a flash-on command by the terminal, and invoke the ambient light spectrum detection when the flash-on command is received unit.
- a flash-on command receiving unit configured to receive a flash-on command by the terminal, and invoke the ambient light spectrum detection when the flash-on command is received unit.
- the terminal further includes a fine adjustment unit, configured to display a flash control interface on the display interface when the flash on command is received, and perform fine adjustment on the flash control interface.
- a fine adjustment unit configured to display a flash control interface on the display interface when the flash on command is received, and perform fine adjustment on the flash control interface.
- Receiving, by the fine adjustment component, an input white balance adjustment instruction acquiring adjustment data in the white balance adjustment instruction; correcting the compensation spectrum according to the adjustment data, and determining, according to the corrected compensation spectrum The intensity of the RGB light emission in the color flash.
- the terminal further includes a camera open command receiving unit, configured to receive a camera open command by the terminal, and invoke the ambient light spectrum detection after receiving the camera open command. unit.
- a camera open command receiving unit configured to receive a camera open command by the terminal, and invoke the ambient light spectrum detection after receiving the camera open command. unit.
- the terminal further includes a preview image display unit, configured to display a preview interface of the photograph on the display interface, and obtain a preview image captured by the camera to display on the preview interface.
- a preview image display unit configured to display a preview interface of the photograph on the display interface, and obtain a preview image captured by the camera to display on the preview interface.
- the spectrum corresponding to the ambient light is acquired by the spectral sensor in the terminal, and the spectrum corresponding to the ambient light is calculated between the spectrum corresponding to the standard white light.
- the difference and then determining the emission intensity of the corresponding color lights in the turned-on flash according to the difference, so that after the color flash is turned on, the spectral balance between the ambient light and the color flash is white balance, that is, Say, after the flash is turned on, the color that the user sees by the naked eye is the true color of the object, and there is color distortion or chromatic aberration. That is to say, after adopting the above method and terminal for controlling the flash, the authenticity of the color presented by the object is improved, the accuracy of the white balance effect is improved, and the user experience is improved.
- FIG. 1 is a schematic flow chart of a method for controlling a flash in an embodiment
- FIG. 2 is a schematic structural diagram of a terminal in an embodiment
- FIG. 3 is a block diagram showing the construction of a computer device for operating the aforementioned method of controlling a flash in an embodiment.
- the method of flashing the implementation of the method may depend on a computer program running on a computer system based on a von Neumann system, which may be a flash control program on the terminal, for example, built into a camera application Flash control program in the middle.
- the computer system may be a server or terminal such as a smartphone, tablet, personal computer or the like that runs the above computer program.
- the method for controlling the flash is provided with a spectrum sensor and a color flash in the terminal.
- the spectral sensor can detect the spectrum corresponding to the ambient light, that is, determine the distribution of the ambient light rays at various wavelengths or frequencies after performing the splitting, or the distribution under the respective colors after the splitting.
- a color flash refers to a flash that is provided with a plurality of colors in the flash.
- a color flash includes a monochrome flash of three colors of red, green, and blue corresponding to RGB, and corresponds to the flash of the above different colors. The control of the light intensity allows the color flash to finally present a variety of different colors of light.
- the above method for controlling the flash includes the following steps S102-S108:
- Step S102 detecting an ambient light spectrum by the spectral sensor.
- Step S104 Acquire a natural light reference spectrum pre-stored in the terminal.
- Step S106 Calculate a difference between the ambient light spectrum and the natural light reference spectrum as a compensation spectrum.
- the spectrum sensor can detect the spectrum corresponding to the ambient light, so that it is known whether there is any light source other than the natural light in the current ambient light, especially whether the white light balance is included in the light source existing in the ambient light.
- a natural light reference spectrum under standard natural light is prestored in the terminal, and the natural light reference spectrum corresponds to a standard white light spectrum in a white equilibrium state.
- the ambient light spectrum If there is a difference between the ambient light spectrum and the natural light reference spectrum, it indicates that there is currently a light source or other object that affects the white balance in the ambient light, that is, in the current environment, the object seen by the user's naked eye may have color distortion.
- the phenomenon, or the color of an image taken in the current environment may have a color difference from its true color.
- the degree of color distortion or the magnitude of the chromatic aberration described above can be determined by the difference between the ambient light spectrum and the natural light reference spectrum. Moreover, since the present embodiment is for presenting the original color of the article under ambient light, it is necessary to determine what kind of pipeline should be added under the current environment in order to make the light in the current environment appear white balance.
- Step S108 Determine, according to the compensation spectrum, the RGB color light emission intensity in the color flash and turn on the color flash.
- the compensation spectrum is a specific spectral parameter corresponding to the light source that should be compensated in the current environment to achieve white balance, because each color or each color in the color flash can be determined according to the compensation spectrum.
- the parameter corresponding to the light source at the wavelength For example, in the case where the color flash is a color flash composed of RGB three-color flash, the emission intensity corresponding to the RGB colors can be determined according to the compensation spectrum, that is, the compensation light source is determined.
- the flash after the emission intensity corresponding to each color of the light in the flash is determined, the flash can be turned on according to the above-mentioned setting of the emission intensity of each color light in the RGB, after the flash is turned on, because the flash is based on the ambient light spectrum and the natural light. The difference between the reference spectra is determined. Therefore, the flash set and turned on according to the compensation spectrum can adjust the color of the current environment due to the influence of other light sources existing in the current environment on the ambient light. It is white balanced, ie there is no color distortion or chromatic aberration.
- the user when the user needs to distinguish the true color of an object or determine whether the currently presented color has color distortion in a store or elsewhere, the user can turn on the operation command of the color flash.
- the flash lamp and under the dual action of ambient light and flash light, there is no color distortion or chromatic aberration in the color presented by the object of interest to the user.
- the method for controlling the flash further includes: receiving, by the terminal, a flash-on command, and when receiving the flash-on command, performing steps S102-S108.
- the flash input command is input through the terminal, and after receiving the flash-on command input by the user, the terminal can turn on the color flash for compensating the white balance of the ambient light through the above steps S102-S108. .
- the user can input a flash-on command by a control or a button or the like corresponding to the flash, for example, a flash-on command displayed on a page displayed after the smartphone's menu bar is pulled down to input a flash-on command, so that the user needs to When the white balance of the ambient light is adjusted or the actual color corresponding to an item needs to be determined, the ambient light is compensated by the above operation and the color under natural light is restored.
- the ambient light can be compensated, so that the color display under the natural light is presented by the superposition of the ambient light and the color flash.
- the color of the flash may not be required by the user, or the user needs to be warm or partial. Cold colors, that is, users themselves may have some other needs for light.
- the method for controlling the flash further includes: displaying a flash control interface on the display interface when the flash open command is received, and displaying a fine adjustment component on the flash control interface;
- the fine adjustment component receives the input white balance adjustment command, acquires adjustment data in the white balance adjustment command, corrects the compensation spectrum according to the adjustment data, and determines the color flash according to the corrected compensation spectrum. RGB color light emission intensity.
- a flash control interface is also displayed, and the interface can be turned on after the terminal receives the flash-on command input by the user, that is, the flash-on command input by the user not only triggers.
- the activation of the flash also triggers the display of the flash control interface.
- the components shown in the flash control interface include a flash switch assembly (used to control the on and off of the flash), and a control component such as a fine-tuning component that allows the user to adjust the effect of the flash by fine-tuning the component.
- a flash switch assembly used to control the on and off of the flash
- a control component such as a fine-tuning component that allows the user to adjust the effect of the flash by fine-tuning the component.
- a control component such as a fine-tuning component that allows the user to adjust the effect of the flash by fine-tuning the component.
- the control component such as a fine-tuning component that allows the user to adjust the effect of the flash by fine-tuning the component.
- the control component such as a fine-tuning component that allows the user to adjust the effect of the flash by fine-tuning the component.
- the user can turn off the already turned-on color flash through the flash switch assembly; for example, when the user needs to adjust the color flash light effect
- the user can input a specific adjustment request by clicking the fine-tuning control page displayed by the fine-tuning component, that is, the corresponding adjustment in the white balance adjustment command input by the user.
- the data and based on the adjustment data input by the user, can determine the intensity of the light emission corresponding to the light of each color in the flash.
- the user can not only turn on the color flash when the ambient light causes color distortion, but also can turn on the color flash of the required lighting effect in any scene according to his own needs.
- the above method for controlling the flash may not only be applied after the user inputs the flash-on command, but also may be other application scenarios, for example, when taking a photo, using the flash to make the color of the photographed item be true. The color.
- the method further includes: receiving, by the terminal, a camera open command, and performing the step of detecting the ambient light spectrum by the spectral sensor after receiving the camera open command.
- the above steps S102-S108 are executed to turn on the color flash.
- a preview interface corresponding to the camera application is displayed on the display interface, and an image captured by the camera is displayed on the preview interface.
- a flash component is also displayed on the preview interface, and the user can select to turn on the flash or not to turn on the flash through the flash component, and the image displayed on the preview interface changes depending on whether the flash is turned on or not.
- FIG. 2 Also shown is a terminal provided with a spectral sensor and a color flash, and the terminal includes an ambient light spectrum detecting unit 102, a natural light reference spectrum acquiring unit 104, a compensation spectrum calculating unit 106, and a color flash control unit 108, among them:
- the ambient light spectrum detecting unit 102 is configured to detect an ambient light spectrum by the spectral sensor
- the natural light reference spectrum acquiring unit 104 is configured to acquire a natural light reference spectrum pre-stored in the terminal;
- the compensation spectrum calculation unit 106 is configured to calculate a difference between the ambient light spectrum and the natural light reference spectrum as a compensation spectrum
- the color flash control unit 108 is configured to determine the RGB color light emission intensity in the color flash according to the compensation spectrum and turn on the color flash.
- the terminal further includes a flash-on command receiving unit 110, configured to receive a flash-on command by the terminal, and invoke the call when the flash-on command is received.
- the ambient light spectrum detecting unit 102 is described.
- the terminal further includes a fine adjustment unit 112 configured to display a flash control interface on the display interface when the flash activation command is received, where the flash control is performed.
- the fine adjustment component is displayed on the interface; the input white balance adjustment instruction is received by the fine adjustment component, and the adjustment data in the white balance adjustment instruction is acquired; and the compensation spectrum is corrected according to the adjustment data, according to the correction
- the compensation spectrum determines the intensity of the RGB light emission in the color flash.
- the terminal further includes a camera open command receiving unit 114, configured to receive a camera open command by the terminal, and after receiving the camera open command, call the terminal
- the ambient light spectrum detecting unit 102 is described.
- the terminal further includes a preview image display unit 116, configured to display a preview interface of the photograph on the display interface, and obtain a preview image captured by the camera on the preview interface. Show it.
- a preview image display unit 116 configured to display a preview interface of the photograph on the display interface, and obtain a preview image captured by the camera on the preview interface. Show it.
- the spectrum corresponding to the ambient light is acquired by the spectral sensor in the terminal, and the spectrum corresponding to the ambient light is calculated between the spectrum corresponding to the standard white light.
- the difference and then determining the emission intensity of the corresponding color lights in the turned-on flash according to the difference, so that after the color flash is turned on, the spectral balance between the ambient light and the color flash is white balance, that is, Say, after the flash is turned on, the color that the user sees by the naked eye is the true color of the object, and there is color distortion or chromatic aberration. That is to say, after adopting the above method and terminal for controlling the flash, the authenticity of the color presented by the object is improved, the accuracy of the white balance effect is improved, and the user experience is improved.
- FIG. 3 illustrates a terminal 10 of a von Neumann system-based computer system that operates the above-described method of controlling a flash.
- the computer system can be a terminal device equipped with a spectrum sensor and a color flash, such as a smartphone, a tablet, a palmtop, a laptop, or a personal computer.
- an external input interface 1001, a processor 1002, a memory 1003, and an output interface 1004 connected through a system bus may be included.
- the external input interface 1001 can optionally include at least a network interface 10012.
- the memory 1003 may include an external memory 10032 (eg, a hard disk, an optical disk, or a floppy disk, etc.) and an internal memory 10034.
- the output interface 1004 can include at least a device such as a display 10042.
- the operation of the method is based on a computer program whose program file is stored in the external memory 10032 of the aforementioned von Neumann system-based computer system, loaded into the internal memory 10034 at runtime, and then After being compiled into a machine code, it is passed to the processor 1002 for execution, so that a logical ambient light spectrum detecting unit 102, a natural light reference spectrum acquiring unit 104, a compensation spectrum calculating unit 106, and a logical environment are formed in the von Neumann system-based computer system.
- the input parameters are all received through the external input interface 1001, and transferred to the buffer in the memory 1003, and then input to the processor 1002 for processing, and the processed result data is cached in the memory 1003. Subsequent processing is performed or passed to the output interface 1004 for output.
- the processor 1002 is configured to detect an ambient light spectrum by using the spectral sensor; acquire a natural light reference spectrum pre-stored in the terminal; calculate a difference between the ambient light spectrum and the natural light reference spectrum as a compensation spectrum;
- the compensation spectrum determines the intensity of the RGB light emission in the color flash and controls the color flash to be turned on.
- the external input interface 1001 receives a flash-on command
- the processor 1002 is further configured to: when the flash-on command is received, perform the ambient light spectrum detection by the spectral sensor.
- the processor 1002 is further configured to: when the flash activation command is received, display a flash control interface on the display interface, and display a fine adjustment component on the flash control interface;
- the fine adjustment component receives the input white balance adjustment command, acquires adjustment data in the white balance adjustment command, corrects the compensation spectrum according to the adjustment data, and determines RGB in the color flash according to the corrected compensation spectrum The intensity of the various colors of the light.
- the external input interface 1001 receives a camera open command
- the processor 1002 is further configured to perform the detecting ambient light spectrum by the spectral sensor after receiving the camera open command.
- the processor 1002 is further configured to display a preview interface of the photograph on the display interface, and obtain a preview image captured by the camera to display on the preview interface.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Human Computer Interaction (AREA)
- Color Television Image Signal Generators (AREA)
- Studio Devices (AREA)
- Processing Of Color Television Signals (AREA)
Abstract
一种控制闪光灯的方法,所述方法基于设置有光谱传感器和彩色闪光灯的终端;所述方法包括:通过所述光谱传感器检测环境光光谱(S102);获取在所述终端中预存的自然光参考光谱(S104);计算所述环境光光谱与所述自然光参考光谱的差值作为补偿光谱(S106);根据所述补偿光谱确定所述彩色闪光灯中RGB各色灯光发射强度并开启所述彩色闪光灯(S108)。此外,还公开了一种终端。采用本方法,可减少因环境光线引起的色彩失真。
Description
本申请要求于2016年9月29日提交中国专利局,申请号为201610866800.0、发明名称为“控制闪光灯的方法及终端”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本发明涉及计算机技术领域,尤其涉及一种控制闪光灯的方法及终端。
在生活中,商家经常会采用灯光效果对商店作氛围烘托,并对商品作色彩渲染,从而使得消费者在查看时对陈列的商品的色泽等更加满意或喜欢,以至消费者在购买商品时不能得到和判断商品的真实色泽和品质,容易出现在购买时觉得喜欢和满意,购买回家之后发现商品的颜色和品质与在商店看见时存在极大差别,买到的东西不是自己真正想要的。会出现上述问题的本质原因在于商家采用现场特定环境光线,对商品进行了渲染,从而误导了消费者。
也就是说,因为环境光线的影响,导致了用户肉眼看到的或者用摄像头拍下的照片或者影像中的色彩失去了白平衡,而不能展示其原本的色彩。为了还原被拍摄物的展示色彩,可以对照片进行一定的色彩还原或者色调处理等一系列的白平衡处理。但是,现有的白平衡处理仅限于在拍照之后对图像中的红蓝绿三色比例的调整或者用户手动的使用标准参考物之类的方式,前者达不到理想的白平衡效果,后者在使用的过程中非常不便,用户不可能每次都携带一定的标准参考物以及准备的摆放位置,从而使得其对应的白平衡效果也不理想。
也就是说,在现有的针对环境光线不是自然光谱的情况下的色彩失真的白平衡方法存在的白平衡效果的稳定性以及有效性不足的问题。
基于此,为解决传统技术中的针对环境光线不是自然光谱的情况下的色彩失真的白平衡方法存在的白平衡效果的稳定性以及有效性不足的技术问题,特提出了一种控制闪光灯的方法。
一种控制闪光灯的方法,所述方法基于设置有光谱传感器和彩色闪光灯的终端;
所述方法包括:
通过所述光谱传感器检测环境光光谱;
获取在所述终端中预存的自然光参考光谱;
计算所述环境光光谱与所述自然光参考光谱的差值作为补偿光谱;
根据所述补偿光谱确定所述彩色闪光灯中RGB各色灯光发射强度并开启所述彩色闪光灯。
可选的,在其中一个实施例中,所述方法还包括:
通过所述终端接收闪光灯开启指令,在接收到所述闪光灯开启指令时,执行所述通过所述光谱传感器检测环境光光谱的步骤。
可选的,在其中一个实施例中,所述方法还包括:
在接收到所述闪光灯开启指令时,在显示界面上展示闪光灯控制界面,在所述闪光灯控制界面上展示有微调组件;
通过所述微调组件接收输入的白平衡调节指令,获取所述白平衡调节指令中的调节数据;
根据所述调节数据对所述补偿光谱进行修正,根据所述修正后的补偿光谱确定所述彩色闪光灯中RGB各色灯光发射强度。
可选的,在其中一个实施例中,所述方法还包括:
通过所述终端接收相机开启指令,在接收到所述相机开启指令后,执行所述通过所述光谱传感器检测环境光光谱的步骤。
可选的,在其中一个实施例中,所述根据所述补偿光谱确定所述彩色闪光灯中RGB各色灯光发射强度并开启所述彩色闪光灯的步骤之后还包括:
在显示界面上展示拍照的预览界面,获取摄像头采集的预览图像在所述预览界面上进行展示。
此外,为解决传统技术中的针对环境光线不是自然光谱的情况下的色彩失真的白平衡方法存在的白平衡效果的稳定性以及有效性不足的技术问题,特提出了一种终端。
一种终端,所述终端设置有光谱传感器和彩色闪光灯;
所述终端还包括:
环境光光谱检测单元,设置为通过所述光谱传感器检测环境光光谱;
自然光参考光谱获取单元,设置为获取在所述终端中预存的自然光参考光谱;
补偿光谱计算单元,设置为计算所述环境光光谱与所述自然光参考光谱的差值作为补偿光谱;
彩色闪光灯控制单元,设置为根据所述补偿光谱确定所述彩色闪光灯中RGB各色灯光发射强度并开启所述彩色闪光灯。
可选的,在其中一个实施例中,所述终端还包括闪光灯开启指令接收单元,设置为通过所述终端接收闪光灯开启指令,在接收到所述闪光灯开启指令时,调用所述环境光光谱检测单元。
可选的,在其中一个实施例中,所述终端还包括微调单元,设置为在接收到所述闪光灯开启指令时,在显示界面上展示闪光灯控制界面,在所述闪光灯控制界面上展示有微调组件;通过所述微调组件接收输入的白平衡调节指令,获取所述白平衡调节指令中的调节数据;根据所述调节数据对所述补偿光谱进行修正,根据所述修正后的补偿光谱确定所述彩色闪光灯中RGB各色灯光发射强度。
可选的,在其中一个实施例中,所述终端还包括相机开启指令接收单元,设置为通过所述终端接收相机开启指令,在接收到所述相机开启指令后,调用所述环境光光谱检测单元。
可选的,在其中一个实施例中,所述终端还包括预览图像展示单元,设置为在显示界面上展示拍照的预览界面,获取摄像头采集的预览图像在所述预览界面上进行展示。
实施本发明实施例,将具有如下有益效果:
采用了上述控制闪光灯的方法和终端之后,在需要开启彩色闪光灯的情况下,通过终端中的光谱传感器获取环境光对应的光谱,并计算环境光对应的光谱与标准的白光对应的光谱之间的差值,然后根据这个差值来确定开启的闪光灯中对应的各色灯光的发射强度,从而使得在开启了彩色闪光灯之后,通过环境光与彩色闪光灯之间的光谱叠加之后是白平衡的,也就是说,在开启了闪光灯之后,用户肉眼所看到的物体所呈现出来的颜色是物体的真实颜色,并存在色彩失真或色差。也就是说,采用了上述控制闪光灯的方法和终端之后,提高了物体所呈现出来的色彩的真实性,提高了白平衡效果的准确度,提升了用户体验。
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
其中:
图1为一个实施例中一种控制闪光灯的方法的流程示意图;
图2为一个实施例中一种终端的结构示意图;
图3为一个实施例中运行前述控制闪光灯的方法的计算机设备的结构示意图。
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
为解决传统技术中的针对环境光线不是自然光谱的情况下的色彩失真的白平衡方法存在的白平衡效果的稳定性以及有效性不足的技术问题,在本实施例中,特提出了一种控制闪光灯的方法,该方法的实现可依赖于计算机程序,该计算机程序可运行于基于冯诺依曼体系的计算机系统之上,该计算机程序可以是终端上的闪光灯控制程序,例如,内置于相机应用中的闪光灯控制程序。该计算机系统可以是运行上述计算机程序的例如智能手机、平板电脑、个人电脑等服务器或终端。
需要说明的是,在本实施例中,上述控制闪光灯的方法所基于的终端中设置有光谱传感器和彩色闪光灯。具体的,光谱传感器可以检测环境光对应的光谱,即确定环境光光线在进行分光之后在各个波长或频率下的分布,或者,在进行分光之后在各个颜色下的分布。彩色闪光灯指的是在该闪光灯中设置有多个单色的闪光灯,例如,彩色闪光灯中包含了RGB所对应的红、绿、蓝三个颜色的单色闪光灯,通过对上述不同颜色的闪光灯对应的光强度的控制,可以使得彩色闪光灯最终可以呈现多种不同颜色的光线。
具体的,如图1所示,上述控制闪光灯的方法包括如下步骤S102-S108:
步骤S102:通过所述光谱传感器检测环境光光谱。
步骤S104:获取在所述终端中预存的自然光参考光谱。
步骤S106:计算所述环境光光谱与所述自然光参考光谱的差值作为补偿光谱。
如前所述,通过光谱传感器可以检测环境光对应的光谱,从而可知当前的环境光中是否存在除了自然光之外的其他光源,尤其是确定在环境光中存在的光源中是否包含了白平衡之外的彩色光源或者其他对白平衡有影响的光源。在终端中预存有标准的自然光下的自然光参考光谱,该自然光参考光谱对应的是白平衡状态下的标准白光光谱。
若环境光光谱与自然光参考光谱中存在差异,则说明当前在环境光中存在有影响白平衡的光源或者其他物品存在,也就是说,在当前环境下,用户肉眼所见的物品可能存在色彩失真的现象,或者,在当前的环境下拍摄的图像的色彩可能会与其真实的色彩之间存在色差。
上述色彩失真的程度或者色差的大小可以通过环境光光谱与自然光参考光谱之间的区别来确定。并且,因为本实施例是为了将环境光下的物品其原本的色彩进行呈现,因此需要确定应该在当前环境下添加怎样的管线才能使当前的环境下的光线呈现白平衡的状态。
具体的,根据环境光光谱与自然光参考光谱之间的差值,可以确定在当前环境下为了达到白平衡应该对环境光进行的补偿的光线的具体参数,即确定对环境光应当补偿的具体的补偿光谱。
步骤S108:根据所述补偿光谱确定所述彩色闪光灯中RGB各色灯光发射强度并开启所述彩色闪光灯。
需要说明的是,在本实施例中,补偿光谱即为实现白平衡应该在当前的环境下进行补偿的光源对应的具体的光谱参数,因为,根据补偿光谱可以确定在彩色闪光灯中各个颜色或者各个波长下的光源所对应的参数。例如,在彩色闪光灯为由RGB三色的闪光灯所构成的彩色闪光灯的情况下,根据补偿光谱可以确定RGB各色灯光所对应的发射强度,即确定补偿光源。
在本实施例中,在闪光灯中的各色灯光所对应的发射强度确定之后,可以根据上述对RGB中各色灯光的发射强度的设置开启闪光灯,在闪光灯开启之后,因为闪光灯是根据环境光光谱与自然光参考光谱之间的差值来确定的,因此,根据补偿光谱来设置和开启的闪光灯,可以调节因为在当前环境中存在的其他光源对环境光造成的影响,使得当前环境下所呈现出来的色彩是白平衡的,即不存在任何色彩失真或色差。
例如,在本实施例中,用户在商店或者其他地方,需要辨别某一物体的真是色彩或者确定当前所呈现出来的色彩是否存在色彩失真的情况下,可以通过开启上述彩色闪光灯的操作指令来开启闪光灯,并且使得在环境光和闪光灯的双重作用下,用户所关心的物体所呈现出来的色彩不存在色彩失真或者色差。
具体的,在一个可选的实施例中,上述闪光灯的控制方法还包括:通过所述终端接收闪光灯开启指令,在接收到所述闪光灯开启指令时,执行步骤S102-S108。
也就是说,在需要开启闪光灯时,通过终端输入闪光灯开启指令,终端在接收到用户输入的闪光灯开启指令之后,即可通过上述步骤S102-S108来开启对环境光的白平衡进行补偿的彩色闪光灯。
例如,用户可以通过与闪光灯开启对应的控件或者按钮等来输入闪光灯开启指令,例如,在智能手机的菜单栏下拉之后展示的页面上展示的闪光灯开启控件来输入闪光灯开启指令,以便用户在需要对环境光的白平衡进行调节或者需要确定某一物品对应的真实色彩时,通过上述操作来对环境光进行补偿并还原其在自然光下的色彩。
通过上述步骤可以对环境光进行补偿,从而通过环境光和彩色闪光灯的叠加呈现在自然光下的色彩展示,但是,上述闪光灯的色彩可能不是用户所需要的,或者,用户需要的是偏暖或者偏冷的色彩,也就是说,用户自己可能对光线也存在一些其他的需求。
具体的,在一个实施例中,上述闪光灯的控制方法还包括:在接收到所述闪光灯开启指令时,在显示界面上展示闪光灯控制界面,在所述闪光灯控制界面上展示有微调组件;通过所述微调组件接收输入的白平衡调节指令,获取所述白平衡调节指令中的调节数据;根据所述调节数据对所述补偿光谱进行修正,根据所述修正后的补偿光谱确定所述彩色闪光灯中RGB各色灯光发射强度。
也就是说,在终端的显示界面上,还展示有闪光灯控制界面,并且,该界面在终端接收到用户输入的闪光灯开启指令之后即可开启,也就是说,用户输入的闪光灯开启指令不仅触发了闪光灯的开启,还触发了闪光灯控制界面的展示。
在闪光灯控制界面中展示的组件包括闪光灯开关组件(用来控制闪光灯的开启和关闭)、微调组件(用户可以通过微调组件来对闪光灯的效果来进行调节)等控制组件。例如,在闪光灯已经开启的情况下,用户可以通过闪光灯开关组件来关闭已经开启的彩色闪光灯;再例如,在用户需要对彩色闪光灯的灯光效果进行调整时,可以通过展示在闪光灯控制界面上的微调组件来输入相应的调整方案。例如,用户需要色调偏暖,而当前的闪光灯的效果是白平衡的,用户可以通过点击微调组件展示的微调控制页面来输入具体的调整要求,即在用户输入的白平衡调节指令中对应的调节数据,并且,根据用户输入的调节数据可以确定闪光灯中各个颜色的灯光对应的对光发射强度。
需要说明的是,在本实施例中,用户不仅仅可以在环境光导致色彩失真的情况下开启彩色闪光灯,还可以根据自己的需求在任意的场景下开启需求的灯光效果的彩色闪光灯。
需要说明的是,上述控制闪光灯的方法不仅仅可以是在用户输入了闪光灯开启指令之后适用,还可以是其他的应用场景,例如,在进行拍照时,利用闪光灯使得拍摄物品呈现的颜色是其真实的色彩。
具体的,在一个实施例中,上述方法还包括:通过所述终端接收相机开启指令,在接收到所述相机开启指令后,执行所述通过所述光谱传感器检测环境光光谱的步骤。
也就是说,在接收到用户在终端上输入的相机开启指令之后,即执行上述步骤S102-S108来开启彩色闪光灯。例如,用户在终端上点击与相机应用对应的应用图标来开启相机,即向终端输入了相机开启指令。
进一步的,在开启了相机应用之后,在显示界面上还展示有与相机应用对应的拍照的预览界面,在预览界面上展示有通过摄像头采集的图像。需要说明的是,在预览界面上还展示有闪光灯组件,用户可以通过闪光灯组件选择开启闪光灯或不开启闪光灯,并且,在预览界面上展示的图像会根据是否开启了闪光灯而变化。
此外,为解决传统技术中的针对环境光线不是自然光谱的情况下的色彩失真的白平衡方法存在的白平衡效果的稳定性以及有效性不足的技术问题,在一个实施例中,如图2所示,还提出了一种终端,所述终端设置有光谱传感器和彩色闪光灯,并且该终端包括环境光光谱检测单元102、自然光参考光谱获取单元104、补偿光谱计算单元106以及彩色闪光灯控制单元108,其中:
环境光光谱检测单元102,设置为通过所述光谱传感器检测环境光光谱;
自然光参考光谱获取单元104,设置为获取在所述终端中预存的自然光参考光谱;
补偿光谱计算单元106,设置为计算所述环境光光谱与所述自然光参考光谱的差值作为补偿光谱;
彩色闪光灯控制单元108,设置为根据所述补偿光谱确定所述彩色闪光灯中RGB各色灯光发射强度并开启所述彩色闪光灯。
可选的,在一个实施例中,如图2所示,上述终端还包括闪光灯开启指令接收单元110,设置为通过所述终端接收闪光灯开启指令,在接收到所述闪光灯开启指令时,调用所述环境光光谱检测单元102。
可选的,在一个实施例中,如图2所示,上述终端还包括微调单元112,设置为在接收到所述闪光灯开启指令时,在显示界面上展示闪光灯控制界面,在所述闪光灯控制界面上展示有微调组件;通过所述微调组件接收输入的白平衡调节指令,获取所述白平衡调节指令中的调节数据;根据所述调节数据对所述补偿光谱进行修正,根据所述修正后的补偿光谱确定所述彩色闪光灯中RGB各色灯光发射强度。
可选的,在一个实施例中,如图2所示,上述终端还包括相机开启指令接收单元114,设置为通过所述终端接收相机开启指令,在接收到所述相机开启指令后,调用所述环境光光谱检测单元102。
可选的,在一个实施例中,如图2所示,上述终端还包括预览图像展示单元116,设置为在显示界面上展示拍照的预览界面,获取摄像头采集的预览图像在所述预览界面上进行展示。
实施本发明实施例,将具有如下有益效果:
采用了上述控制闪光灯的方法和终端之后,在需要开启彩色闪光灯的情况下,通过终端中的光谱传感器获取环境光对应的光谱,并计算环境光对应的光谱与标准的白光对应的光谱之间的差值,然后根据这个差值来确定开启的闪光灯中对应的各色灯光的发射强度,从而使得在开启了彩色闪光灯之后,通过环境光与彩色闪光灯之间的光谱叠加之后是白平衡的,也就是说,在开启了闪光灯之后,用户肉眼所看到的物体所呈现出来的颜色是物体的真实颜色,并存在色彩失真或色差。也就是说,采用了上述控制闪光灯的方法和终端之后,提高了物体所呈现出来的色彩的真实性,提高了白平衡效果的准确度,提升了用户体验。
在一个实施例中,如图3所示,图3展示了一种运行上述控制闪光灯的方法的基于冯诺依曼体系的计算机系统的终端10。该计算机系统可以是智能手机、平板电脑、掌上电脑、笔记本电脑或个人电脑等设置有光谱传感器和彩色闪光灯的终端设备。具体的,可包括通过系统总线连接的外部输入接口1001、处理器1002、存储器1003和输出接口1004。其中,外部输入接口1001可选的可至少包括网络接口10012。存储器1003可包括外存储器10032(例如硬盘、光盘或软盘等)和内存储器10034。输出接口1004可至少包括显示屏10042等设备。
在本实施例中,本方法的运行基于计算机程序,该计算机程序的程序文件存储于前述基于冯诺依曼体系的计算机系统的外存储器10032中,在运行时被加载到内存储器10034中,然后被编译为机器码之后传递至处理器1002中执行,从而使得基于冯诺依曼体系的计算机系统中形成逻辑上的环境光光谱检测单元102、自然光参考光谱获取单元104、补偿光谱计算单元106、彩色闪光灯控制单元108、闪光灯开启指令接收单元110、微调单元112、相机开启指令接收单元114以及预览图像展示单元116。且在上述控制闪光灯的方法执行过程中,输入的参数均通过外部输入接口1001接收,并传递至存储器1003中缓存,然后输入到处理器1002中进行处理,处理的结果数据或缓存于存储器1003中进行后续地处理,或被传递至输出接口1004进行输出。
具体的,处理器1002用于通过所述光谱传感器检测环境光光谱;获取在所述终端中预存的自然光参考光谱;计算所述环境光光谱与所述自然光参考光谱的差值作为补偿光谱;根据所述补偿光谱确定所述彩色闪光灯中RGB各色灯光发射强度并控制开启所述彩色闪光灯。
可选的,在一个实施例中,外部输入接口1001 接收闪光灯开启指令,处理器1002还用于在接收到所述闪光灯开启指令时,执行所述通过所述光谱传感器检测环境光光谱。
可选的,在一个实施例中,处理器1002还用于在接收到所述闪光灯开启指令时,在显示界面上展示闪光灯控制界面,在所述闪光灯控制界面上展示有微调组件;通过所述微调组件接收输入的白平衡调节指令,获取所述白平衡调节指令中的调节数据;根据所述调节数据对所述补偿光谱进行修正,根据所述修正后的补偿光谱确定所述彩色闪光灯中RGB各色灯光发射强度。
可选的,在一个实施例中,外部输入接口1001接收相机开启指令,处理器1002还用于在接收到所述相机开启指令后,执行所述通过所述光谱传感器检测环境光光谱。
可选的,在一个实施例中,处理器1002还用于在显示界面上展示拍照的预览界面,获取摄像头采集的预览图像在所述预览界面上进行展示。
以上所揭露的仅为本发明较佳实施例而已,当然不能以此来限定本发明之权利范围,因此依本发明权利要求所作的等同变化,仍属本发明所涵盖的范围。
Claims (10)
- 一种控制闪光灯的方法,其特征在于,所述方法基于设置有光谱传感器和彩色闪光灯的终端;所述方法包括:通过所述光谱传感器检测环境光光谱;获取在所述终端中预存的自然光参考光谱;计算所述环境光光谱与所述自然光参考光谱的差值作为补偿光谱;根据所述补偿光谱确定所述彩色闪光灯中RGB各色灯光发射强度并开启所述彩色闪光灯。
- 根据权利要求1所述的控制闪光灯的方法,其特征在于,所述方法还包括:通过所述终端接收闪光灯开启指令,在接收到所述闪光灯开启指令时,执行所述通过所述光谱传感器检测环境光光谱的步骤。
- 根据权利要求2所述的控制闪光灯的方法,其特征在于,所述方法还包括:在接收到所述闪光灯开启指令时,在显示界面上展示闪光灯控制界面,在所述闪光灯控制界面上展示有微调组件;通过所述微调组件接收输入的白平衡调节指令,获取所述白平衡调节指令中的调节数据;根据所述调节数据对所述补偿光谱进行修正,根据所述修正后的补偿光谱确定所述彩色闪光灯中RGB各色灯光发射强度。
- 根据权利要求1所述的控制闪光灯的方法,其特征在于,所述方法还包括:通过所述终端接收相机开启指令,在接收到所述相机开启指令后,执行所述通过所述光谱传感器检测环境光光谱的步骤。
- 根据权利要求4所述的控制闪光灯的方法,其特征在于,所述根据所述补偿光谱确定所述彩色闪光灯中RGB各色灯光发射强度并开启所述彩色闪光灯的步骤之后还包括:在显示界面上展示拍照的预览界面,获取摄像头采集的预览图像在所述预览界面上进行展示。
- 一种终端,其特征在于,所述终端设置有光谱传感器和彩色闪光灯;所述终端还包括:环境光光谱检测单元,设置为通过所述光谱传感器检测环境光光谱;自然光参考光谱获取单元,设置为获取在所述终端中预存的自然光参考光谱;补偿光谱计算单元,设置为计算所述环境光光谱与所述自然光参考光谱的差值作为补偿光谱;彩色闪光灯控制单元,设置为根据所述补偿光谱确定所述彩色闪光灯中RGB各色灯光发射强度并开启所述彩色闪光灯。
- 根据权利要求6所述的终端,其特征在于,所述终端还包括闪光灯开启指令接收单元,设置为通过所述终端接收闪光灯开启指令,在接收到所述闪光灯开启指令时,调用所述环境光光谱检测单元。
- 根据权利要求7所述的终端,其特征在于,所述终端还包括微调单元,设置为在接收到所述闪光灯开启指令时,在显示界面上展示闪光灯控制界面,在所述闪光灯控制界面上展示有微调组件;通过所述微调组件接收输入的白平衡调节指令,获取所述白平衡调节指令中的调节数据;根据所述调节数据对所述补偿光谱进行修正,根据所述修正后的补偿光谱确定所述彩色闪光灯中RGB各色灯光发射强度。
- 根据权利要求6所述的终端,其特征在于,所述终端还包括相机开启指令接收单元,设置为通过所述终端接收相机开启指令,在接收到所述相机开启指令后,调用所述环境光光谱检测单元。
- 根据权利要求9所述的终端,其特征在于,所述终端还包括预览图像展示单元,设置为在显示界面上展示拍照的预览界面,获取摄像头采集的预览图像在所述预览界面上进行展示。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610866800.0A CN106341615B (zh) | 2016-09-29 | 2016-09-29 | 控制闪光灯的方法及终端 |
| CN201610866800.0 | 2016-09-29 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2018058727A1 true WO2018058727A1 (zh) | 2018-04-05 |
Family
ID=57839575
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2016/103963 Ceased WO2018058727A1 (zh) | 2016-09-29 | 2016-10-31 | 控制闪光灯的方法及终端 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN106341615B (zh) |
| WO (1) | WO2018058727A1 (zh) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108225277A (zh) * | 2018-03-09 | 2018-06-29 | 深圳臻迪信息技术有限公司 | 无人机的图像获取方法、视觉定位方法、装置、无人机 |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20100177205A1 (en) * | 2009-01-08 | 2010-07-15 | Sony Corporation | Image pickup element and image pickup device |
| CN102170730A (zh) * | 2011-04-12 | 2011-08-31 | 惠州Tcl移动通信有限公司 | 一种移动终端及其闪光灯控制方法 |
| CN103685902A (zh) * | 2012-09-03 | 2014-03-26 | 联想(北京)有限公司 | 一种利用摄像头感光芯片控制闪光灯的手机 |
| CN103957363A (zh) * | 2014-05-16 | 2014-07-30 | 深圳市中兴移动通信有限公司 | 闪光拍摄方法和拍摄装置 |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR101786953B1 (ko) * | 2011-07-08 | 2017-10-18 | 삼성전자주식회사 | 발광 장치 및 이를 포함하는 카메라 시스템 |
| KR101953614B1 (ko) * | 2012-10-12 | 2019-05-22 | 삼성전자주식회사 | 카메라장치의 이미지처리장치 및 방법 |
-
2016
- 2016-09-29 CN CN201610866800.0A patent/CN106341615B/zh active Active
- 2016-10-31 WO PCT/CN2016/103963 patent/WO2018058727A1/zh not_active Ceased
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20100177205A1 (en) * | 2009-01-08 | 2010-07-15 | Sony Corporation | Image pickup element and image pickup device |
| CN102170730A (zh) * | 2011-04-12 | 2011-08-31 | 惠州Tcl移动通信有限公司 | 一种移动终端及其闪光灯控制方法 |
| CN103685902A (zh) * | 2012-09-03 | 2014-03-26 | 联想(北京)有限公司 | 一种利用摄像头感光芯片控制闪光灯的手机 |
| CN103957363A (zh) * | 2014-05-16 | 2014-07-30 | 深圳市中兴移动通信有限公司 | 闪光拍摄方法和拍摄装置 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN106341615A (zh) | 2017-01-18 |
| CN106341615B (zh) | 2018-10-26 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP5195430B2 (ja) | 画像処理方法、画像処理プログラム、画像処理装置、カメラ | |
| JP4056185B2 (ja) | カラー映像処理装置及び方法 | |
| US9514535B1 (en) | Color calibration method of camera module | |
| WO2018058873A1 (zh) | 拍照方法及装置 | |
| US20050093997A1 (en) | System and method for dual white balance compensation of images | |
| TW200833128A (en) | Method for performing chromatic adaptation while displaying image, and corresponding display circuit and device | |
| WO2015102203A1 (en) | Image processing apparatus, image processing method, and computer-readable recording medium | |
| CN109218561A (zh) | 多摄像头的同步方法及装置 | |
| CN111510693B (zh) | 投影系统及影像色彩校正方法 | |
| US20140368530A1 (en) | Illumination Synchronizer | |
| WO2016199992A1 (ko) | 광원 제어와 사진 보정을 수행하는 포토 생성 장치 | |
| WO2018058727A1 (zh) | 控制闪光灯的方法及终端 | |
| WO2016129796A1 (ko) | 컬러 테이블 생성 장치, 카메라 영상 보정/제어 장치 및 그 방법 | |
| CN107959842B (zh) | 图像处理方法及装置、计算机可读存储介质和计算机设备 | |
| CN113099191B (zh) | 一种图像处理方法及装置 | |
| US10154201B2 (en) | Method for adjusting photographic images to higher resolution | |
| JP3678706B2 (ja) | カラーディスプレイシステムとその色温度変換装置及び方法 | |
| JP2002163650A (ja) | 色抽出画像処理装置および色抽出方法 | |
| WO2010123171A1 (ko) | 카메라 색상 특성 곡선을 이용한 영상 밝기 변화에 따른 색 보정 방법 | |
| JPH1155688A (ja) | 画像の色変換方法および装置 | |
| CN115190282A (zh) | 一种避免高色温下摄像头模组白平衡失真的方法 | |
| WO2022183807A1 (zh) | 用于确定偏光片目标参数的方法及装置、偏光片及调试系统 | |
| JP2003259392A (ja) | ホワイトバランス補正方法 | |
| Birukov et al. | Correction of color saturation for tone mapping operator | |
| JP3543129B2 (ja) | ホワイトバランス制御装置 |
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: 16917474 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: 16917474 Country of ref document: EP Kind code of ref document: A1 |