[go: up one dir, main page]

CN105973466B - Method and terminal for spectral detection - Google Patents

Method and terminal for spectral detection Download PDF

Info

Publication number
CN105973466B
CN105973466B CN201610270423.4A CN201610270423A CN105973466B CN 105973466 B CN105973466 B CN 105973466B CN 201610270423 A CN201610270423 A CN 201610270423A CN 105973466 B CN105973466 B CN 105973466B
Authority
CN
China
Prior art keywords
response curve
spectral response
terminal
spectral
measured
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.)
Active
Application number
CN201610270423.4A
Other languages
Chinese (zh)
Other versions
CN105973466A (en
Inventor
郭姗
韩睿谱
刘登宽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201610270423.4A priority Critical patent/CN105973466B/en
Publication of CN105973466A publication Critical patent/CN105973466A/en
Application granted granted Critical
Publication of CN105973466B publication Critical patent/CN105973466B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01JMEASUREMENT OF INTENSITY, VELOCITY, SPECTRAL CONTENT, POLARISATION, PHASE OR PULSE CHARACTERISTICS OF INFRARED, VISIBLE OR ULTRAVIOLET LIGHT; COLORIMETRY; RADIATION PYROMETRY
    • G01J3/00Spectrometry; Spectrophotometry; Monochromators; Measuring colours
    • G01J3/28Investigating the spectrum

Landscapes

  • Physics & Mathematics (AREA)
  • Spectroscopy & Molecular Physics (AREA)
  • General Physics & Mathematics (AREA)
  • Investigating Or Analysing Materials By Optical Means (AREA)
  • Spectrometry And Color Measurement (AREA)

Abstract

一种用于光谱检测的方法和终端,能够提高终端的光谱检测的效率。包括:终端通过光传感器获取待测物体在光源和当前环境光下的第一光谱响应曲线;终端确定当前环境光的第二光谱响应曲线;终端根据第一光谱响应曲线以及第二光谱响应曲线,确定第三光谱响应曲线,第三光谱响应曲线为待测物体的滤除当前环境光的干扰之后的光谱响应曲线;终端根据第三光谱响应曲线,确定待测物体的目标属性的第四光谱响应曲线。

A method and terminal for spectral detection can improve the spectral detection efficiency of the terminal. Including: the terminal obtains the first spectral response curve of the object to be measured under the light source and the current ambient light through the light sensor; the terminal determines the second spectral response curve of the current ambient light; the terminal according to the first spectral response curve and the second spectral response curve, Determine a third spectral response curve, where the third spectral response curve is the spectral response curve of the object to be measured after filtering out the interference of the current ambient light; the terminal determines the fourth spectral response of the target attribute of the object to be measured according to the third spectral response curve curve.

Description

用于光谱检测的方法和终端Method and terminal for spectral detection

技术领域technical field

本发明涉及终端领域,尤其涉及终端领域中用于光谱检测的方法和终端。The present invention relates to the field of terminals, and in particular, to a method and terminal for spectrum detection in the field of terminals.

背景技术Background technique

当前光谱检测技术已用于美容界的皮肤检测中,美容界中的皮肤检测仪在检测皮肤区域时,为了获取皮肤区域在照射光源下的光谱响应结果,应尽可能防止环境光线对被测皮肤区域在照射光源下的频谱干扰,所以现有技术通常在皮肤检测仪的光谱传感器前增加了一圈筒状的遮光封闭圈设计,以获取不受环境光线干扰的被测皮肤区域的光谱响应结果。The current spectral detection technology has been used in skin detection in the beauty industry. When the skin detector in the beauty industry detects the skin area, in order to obtain the spectral response result of the skin area under the illumination light source, the ambient light should be prevented as much as possible from the skin to be tested. The spectral interference of the area under the illumination light source, so the existing technology usually adds a cylindrical shading closed ring design in front of the spectral sensor of the skin detector to obtain the spectral response result of the measured skin area that is not disturbed by ambient light. .

随着智能终端的发展和传感器技术的发展,器件的小型化使得美容界的专业应用有向消费领域发展的可能。例如,将皮肤检测的功能集成在智能终端之中。但是现有的皮肤检测设备或仪器必须采用遮光罩将皮肤被测区域封闭,以隔绝环境光的影响,然后对皮肤参数(例如肤色)进行测量以及后台计算。而将遮光罩应用于智能终端之上并不符合终端小型化和便捷的发展方向,即传统的方案从组成及原理上并不利于智能终端的应用。而单纯简单的去掉遮光罩去进行光谱检测,则会因为环境光线的干扰影响检测结果,降低了用户体验度。With the development of smart terminals and sensor technology, the miniaturization of devices makes it possible for professional applications in the beauty industry to develop into the consumer field. For example, the function of skin detection is integrated into the smart terminal. However, the existing skin detection equipment or instruments must use a light hood to close the area to be measured on the skin to isolate the influence of ambient light, and then measure skin parameters (such as skin color) and perform background calculations. However, applying the hood to the smart terminal does not conform to the development direction of terminal miniaturization and convenience, that is, the traditional solution is not conducive to the application of the smart terminal in terms of composition and principle. Simply removing the hood for spectral detection will affect the detection results due to the interference of ambient light, reducing the user experience.

发明内容SUMMARY OF THE INVENTION

本发明提供了一种用于光谱检测的方法和终端,以提高终端的光谱检测的效率。The present invention provides a method and a terminal for spectral detection to improve the spectral detection efficiency of the terminal.

第一方面,提供了一种用于光谱检测的方法,包括:终端通过光传感器获取待测物体在光源和当前环境光下的第一光谱响应曲线;所述终端确定所述当前环境光的第二光谱响应曲线;所述终端根据所述第一光谱响应曲线以及所述第二光谱响应曲线,确定第三光谱响应曲线,所述第三光谱响应曲线为所述待测物体的滤除所述当前环境光的干扰之后的光谱响应曲线;所述终端根据所述第三光谱响应曲线,确定所述待测物体的目标属性的第四光谱响应曲线。In a first aspect, a method for spectral detection is provided, comprising: a terminal acquiring a first spectral response curve of an object to be measured under a light source and current ambient light through a light sensor; the terminal determining the first spectral response curve of the current ambient light; Two spectral response curves; the terminal determines a third spectral response curve according to the first spectral response curve and the second spectral response curve, and the third spectral response curve is the filter of the object to be tested. The spectral response curve after the interference of the current ambient light; the terminal determines the fourth spectral response curve of the target attribute of the object to be measured according to the third spectral response curve.

在获得待测物体的第一光谱响应曲线之后,通过确定环境光的第二光谱响应曲线,并根据所述第二光谱响应曲线,消除第一光谱响应曲线中环境光的干扰,得到光谱特性更准确的光谱响应结果,提高了终端的光谱检测的效率。After the first spectral response curve of the object to be measured is obtained, the second spectral response curve of the ambient light is determined, and the interference of the ambient light in the first spectral response curve is eliminated according to the second spectral response curve, so as to obtain a better spectral characteristic. Accurate spectral response results improve the spectral detection efficiency of the terminal.

在一种可能的实现方式中,所述终端确定所述当前环境光的第二光谱响应曲线,包括:所述终端通过所述光传感器获取所述待测物体在所述当前环境光下的所述第二光谱响应曲线。In a possible implementation manner, the determining, by the terminal, the second spectral response curve of the current ambient light includes: the terminal acquiring, by the light sensor, all of the object to be measured under the current ambient light. the second spectral response curve.

在一种可能的实现方式中,所述终端根据所述第三光谱响应曲线,确定所述待测物体的目标属性的第四光谱响应曲线,包括:所述终端根据所述第三光谱响应曲线,所述光传感器的滤波函数模型、所述待测物体的目标属性的反射模型、所述光源的能量分布函数,确定所述第四光谱响应曲线。In a possible implementation manner, the terminal determines, according to the third spectral response curve, a fourth spectral response curve of the target attribute of the object to be measured, including: the terminal according to the third spectral response curve , the filter function model of the light sensor, the reflection model of the target attribute of the object to be measured, and the energy distribution function of the light source determine the fourth spectral response curve.

在一种可能的实现方式中,所述终端根据所述第三光谱响应曲线,所述光传感器的滤波函数模型、所述待测物体的目标属性的反射模型、所述光源的能量分布函数,确定所述第四光谱响应曲线,包括:所述终端根据公式Y(λ)=∫F(λ)R(λ)I(λ)dλ,确定所述第四光谱响应曲线,其中Y(λ)表示所述第三光谱响应曲线,F(λ)表示所述光传感器的滤波函数模型,所述R(λ)表示所述待测物体的目标属性的反射模型,所述I(λ)表示所述光源的能量分布函数。In a possible implementation manner, the terminal uses the third spectral response curve, the filter function model of the light sensor, the reflection model of the target attribute of the object to be measured, and the energy distribution function of the light source, Determining the fourth spectral response curve includes: the terminal determines the fourth spectral response curve according to the formula Y(λ)=∫F(λ)R(λ)I(λ)dλ, where Y(λ) represents the third spectral response curve, F(λ) represents the filter function model of the light sensor, the R(λ) represents the reflection model of the target attribute of the object to be measured, and the I(λ) represents the The energy distribution function of the light source.

在一种可能的实现方式中,该方法还包括:所述终端确定目标光照场景;所述终端根据所述目标光照场景,确定所述第四光谱曲线与CIE XYZ域之间的光照映射模型;所述终端根据所述光照映射模型,确定所述第四光谱曲线映射至CIE XYZ域的值。In a possible implementation manner, the method further includes: the terminal determining a target illumination scene; the terminal determining, according to the target illumination scene, an illumination mapping model between the fourth spectral curve and the CIE XYZ domain; The terminal determines, according to the illumination mapping model, the value of the fourth spectral curve mapped to the CIE XYZ domain.

根据目标光照场景确定光照映射模型,进而确定第四光谱曲线映射至CIE XYZ域的值,从而得到与目标光照场景对应的CIE XYZ域的值,提高终端的光谱检测的效率。Determine the illumination mapping model according to the target illumination scene, and then determine the value of the fourth spectral curve mapped to the CIE XYZ domain, so as to obtain the value of the CIE XYZ domain corresponding to the target illumination scene, and improve the spectral detection efficiency of the terminal.

在一种可能的实现方式中,所述终端确定目标光照场景,包括:所述终端获取用户的输入信息,所述输入信息用于指示所述目标光照场景;所述终端根据所述输入信息,从多个候选光照场景中确定所述目标光照场景,所述多个候选光照场景与多个光照映射模型之间具有对应关系;所述终端根据所述目标光照场景,确定所述第四光谱曲线与CIE XYZ域之间的光照映射模型,包括:所述终端根据所述对应关系,确定所述目标光照场景对应的所述光照映射模型。In a possible implementation manner, the determining, by the terminal, the target lighting scene includes: acquiring, by the terminal, user input information, where the input information is used to indicate the target lighting scene; and, according to the input information, the terminal, The target lighting scene is determined from a plurality of candidate lighting scenes, and the plurality of candidate lighting scenes have a corresponding relationship with a plurality of lighting mapping models; the terminal determines the fourth spectral curve according to the target lighting scene The illumination mapping model between the CIE XYZ domain and the CIE XYZ domain includes: the terminal determining the illumination mapping model corresponding to the target illumination scene according to the corresponding relationship.

在一种可能的实现方式中,所述光传感器为多光谱传感器。In a possible implementation manner, the light sensor is a multispectral sensor.

第二方面,提供了一种终端,所述终端包括用于执行第一方面的方法的模块。基于同一发明构思,由于该终端解决问题的原理与第一方面的方法设计中的方案对应,因此该终端的实施可以参见方法的实施,重复之处不再赘述。In a second aspect, a terminal is provided, the terminal including means for performing the method of the first aspect. Based on the same inventive concept, since the principle of the terminal for solving the problem corresponds to the solution in the method design of the first aspect, the implementation of the terminal can refer to the implementation of the method, and the repetition will not be repeated.

第三方面,提供了一种终端,所述终端包括存储器、处理器。所述存储器用于存储程序,所述处理器用于执行程序。当所述程序被执行时,所述处理器用于执行第一方面的方法。基于同一发明构思,由于该终端解决问题的原理与第一方面的方法设计中的方案对应,因此该终端的实施可以参见方法的实施,重复之处不再赘述。In a third aspect, a terminal is provided, where the terminal includes a memory and a processor. The memory is used for storing programs, and the processor is used for executing programs. When the program is executed, the processor is configured to perform the method of the first aspect. Based on the same inventive concept, since the principle of the terminal for solving the problem corresponds to the solution in the method design of the first aspect, the implementation of the terminal can refer to the implementation of the method, and the repetition will not be repeated.

第四方面,提供了一种系统芯片,包括输入接口、输出接口、至少一个处理器、存储器,所述输入接口、输出接口、所述处理器以及存储器直接通过总线相连,所述处理器用于执行所述存储器中的代码,当所述代码被执行时,所述处理器实现第一方面中的方法。基于同一发明构思,由于该系统芯片解决问题的原理与第一方面的方法设计中的方案对应,因此该系统芯片的实施可以参见方法的实施,重复之处不再赘述。In a fourth aspect, a system chip is provided, including an input interface, an output interface, at least one processor, and a memory, wherein the input interface, the output interface, the processor, and the memory are directly connected through a bus, and the processor is used for executing The code in the memory, when executed, the processor implements the method of the first aspect. Based on the same inventive concept, since the principle of solving the problem of the system chip corresponds to the solution in the method design of the first aspect, the implementation of the system chip can refer to the implementation of the method, and the repetition will not be repeated.

第五方面,提供了一种计算机可读介质,所述计算机可读介质存储用于终端执行的程序代码,所述程序代码用于执行第一方面的方法的指令,基于同一发明构思,由于该系统芯片解决问题的原理与第一方面的方法设计中的方案对应,因此该系统芯片的实施可以参见方法的实施,重复之处不再赘述。In a fifth aspect, a computer-readable medium is provided, the computer-readable medium stores a program code for execution by a terminal, the program code is used for executing the instructions of the method of the first aspect, based on the same inventive concept, due to the The principle of the system chip for solving the problem corresponds to the solution in the method design of the first aspect. Therefore, the implementation of the system chip can refer to the implementation of the method, and the repetition will not be repeated.

附图说明Description of drawings

为了更清楚地说明本发明实施例的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions of the embodiments of the present invention more clearly, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some of the present invention. In the embodiments, for those of ordinary skill in the art, other drawings can also be obtained according to these drawings without any creative effort.

图1是现有技术中的皮肤检测仪的示意图。FIG. 1 is a schematic diagram of a skin detector in the prior art.

图2是本发明实施例的终端的框架示意图。FIG. 2 is a schematic frame diagram of a terminal according to an embodiment of the present invention.

图3是本发明实施例的用于光谱检测的方法的流程图。FIG. 3 is a flowchart of a method for spectral detection according to an embodiment of the present invention.

图4是本发明另一实施例的用于光谱检测的方法的流程图。FIG. 4 is a flowchart of a method for spectral detection according to another embodiment of the present invention.

图5是本发明又一实施例的终端的框架示意图。FIG. 5 is a schematic frame diagram of a terminal according to another embodiment of the present invention.

图6是本发明又一实施例的终端的框架示意图。FIG. 6 is a schematic frame diagram of a terminal according to another embodiment of the present invention.

图7是本发明又一实施例的终端的框架示意图。FIG. 7 is a schematic frame diagram of a terminal according to another embodiment of the present invention.

具体实施方式Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明的一部分实施例,而不是全部实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都应属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of 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.

应理解,本发明实施例的技术方案可以应用于各种通信系统,例如:全球移动通讯(Global System of Mobile communication,简称为“GSM”)系统、码分多址(CodeDivision Multiple Access,简称为“CDMA”)系统、宽带码分多址(Wideband CodeDivision Multiple Access,简称为“WCDMA”)系统、通用分组无线业务(General PacketRadio Service,简称为“GPRS”)、长期演进(Long Term Evolution,简称为“LTE”)系统、LTE频分双工(Frequency Division Duplex,简称为“FDD”)系统、LTE时分双工(Time DivisionDuplex,简称为“TDD”)、通用移动通信系统(Universal Mobile TelecommunicationSystem,简称为“UMTS”)或全球互联微波接入(Worldwide Interoperability forMicrowave Access,简称为“WiMAX”)通信系统等。It should be understood that the technical solutions of the embodiments of the present invention can be applied to various communication systems, such as: Global System of Mobile communication (referred to as "GSM") system, Code Division Multiple Access (Code Division Multiple Access, referred to as "" CDMA") system, Wideband Code Division Multiple Access (WCDMA for short) system, General Packet Radio Service (General Packet Radio Service, referred to as "GPRS"), Long Term Evolution (Long Term Evolution, referred to as "" LTE") system, LTE Frequency Division Duplex ("FDD") system, LTE Time Division Duplex ("TDD"), Universal Mobile Telecommunication System ("Universal Mobile Telecommunication System") UMTS") or Worldwide Interoperability for Microwave Access (Widely Interoperability for Microwave Access, referred to as "WiMAX") communication system, etc.

还应理解,在本发明实施例中,终端可以包括手机、平板电脑、PDA(PersonalDigital Assistant,个人数字助理)、POS(Point of Sales,销售终端)、车载电脑等。It should also be understood that, in this embodiment of the present invention, the terminal may include a mobile phone, a tablet computer, a PDA (Personal Digital Assistant, personal digital assistant), a POS (Point of Sales, a sales terminal), a vehicle-mounted computer, and the like.

如上文所述,现有技术中用于光谱检测的仪器中通常设置有遮光罩,以屏蔽环境光对待测物体的光谱检测结果的干扰。例如,图1是现有技术中的用于检测皮肤的光谱检测仪器的示例。由图1可知,无论是医学/科研所用的皮肤检测仪或者是化妆柜台使用的便携式皮肤检测仪,其在传感器前都增加有遮光封闭圈的设计,以避免环境光的干扰。在可能将光谱检测的方法应用于终端的前景下,由于终端本身简单化和便携化的要求,传统的遮光罩的设计不适合应用于终端中,而单纯简单的去掉遮光罩去进行光谱检测,则会因为环境光线的干扰影响检测结果,降低了用户体验度。As mentioned above, a light shield is usually provided in the instrument for spectral detection in the prior art to shield the interference of the spectral detection result of the object to be measured by ambient light. For example, Figure 1 is an example of a prior art spectroscopic detection instrument for detecting skin. As can be seen from Figure 1, whether it is a skin detector used in medicine/scientific research or a portable skin detector used in a makeup counter, a light-shielding sealing ring is added in front of the sensor to avoid interference from ambient light. In the prospect that the spectral detection method may be applied to the terminal, due to the requirements of simplicity and portability of the terminal itself, the traditional design of the light shield is not suitable for use in the terminal, and the light shield is simply removed for spectral detection. The detection result will be affected by the interference of ambient light, and the user experience will be reduced.

本发明针对上述问题,提出了一种用于光谱检测的方法。该方法可以由终端执行。其主要思想是:在没有遮光罩的情况下,通过光传感器获取待测物体在光源和当前环境光下的第一光谱响应曲线,并确定当前环境光的第二光谱响应曲线,并根据第一光谱响应曲线以及第二光谱响应曲线获取滤除环境光干扰后的第三光谱响应曲线。从而得到待测物体没有受到环境光线干扰的第三光谱响应曲线。并根据该第三光谱曲线获取待测物体的目标属性的第四光谱曲线。In view of the above problems, the present invention proposes a method for spectral detection. The method can be executed by the terminal. The main idea is: in the absence of a hood, the first spectral response curve of the object to be measured under the light source and the current ambient light is obtained through the light sensor, and the second spectral response curve of the current ambient light is determined, and according to the first spectral response curve. The spectral response curve and the second spectral response curve obtain a third spectral response curve after filtering out ambient light interference. Thus, a third spectral response curve in which the object to be tested is not disturbed by ambient light is obtained. and acquiring a fourth spectral curve of the target attribute of the object to be measured according to the third spectral curve.

在本发明实施例中,在获得待测物体的第一光谱响应曲线之后,通过确定环境光的第二光谱响应曲线,并根据所述第二光谱响应曲线,消除第一光谱响应曲线中环境光的干扰,得到光谱特性更准确的光谱响应结果,提高了终端光谱检测的效率。In the embodiment of the present invention, after the first spectral response curve of the object to be tested is obtained, the second spectral response curve of the ambient light is determined, and according to the second spectral response curve, the ambient light in the first spectral response curve is eliminated Therefore, more accurate spectral response results with spectral characteristics are obtained, and the efficiency of terminal spectral detection is improved.

本发明实施例提供的用于光谱检测的方法,可以减少环境光对待测物体的光谱响应曲线的干扰,获得光谱特性更准确的光谱响应结果,提高用户体验度。The method for spectral detection provided by the embodiment of the present invention can reduce the interference of the spectral response curve of the object to be measured by ambient light, obtain spectral response results with more accurate spectral characteristics, and improve user experience.

需要说明的是,在现有技术中,光谱检测仪器通常采用XYZ传感器或者红绿蓝(RedGreen Blue,RGB)传感器等三色光谱器件获取待测物体的光谱响应信息,其采集的频谱信息的频谱范围有限。在本发明实施例中,作为一个优选的实施例,可以通过在终端中设置多光谱传感器(或者说,高光谱传感器),利用多光谱传感器采集比常规的XYZ传感器或RGB传感器更丰富的频谱信息,从而获得比使用XYZ传感器频谱信息更多的第一光谱响应曲线,进而根据第一光谱响应曲线以及第二光谱响应曲线进行算法的处理,得到待测物体在滤除环境光干扰后的第三光谱响应曲线。通过多光谱传感器能够获得待测物体更准确的光谱响应信息。应理解,多光谱传感器的可接受波长范围可以包括传统的XYZ或传统RGB传感器的波长范围。It should be noted that, in the prior art, a spectral detection instrument usually uses a tricolor spectral device such as an XYZ sensor or a red-green-blue (RedGreen Blue, RGB) sensor to obtain the spectral response information of the object to be measured, and the spectrum of the collected spectral information is Limited scope. In the embodiment of the present invention, as a preferred embodiment, a multi-spectral sensor (or hyperspectral sensor) can be set in the terminal, and the multi-spectral sensor can be used to collect more abundant spectral information than the conventional XYZ sensor or RGB sensor. , so as to obtain a first spectral response curve with more spectral information than using the XYZ sensor, and then perform algorithm processing according to the first spectral response curve and the second spectral response curve to obtain the third spectral response of the object to be measured after filtering out ambient light interference. Spectral response curve. More accurate spectral response information of the object to be measured can be obtained through multispectral sensors. It should be understood that acceptable wavelength ranges for multispectral sensors may include the wavelength ranges of conventional XYZ or conventional RGB sensors.

图2示出了本发明实施例的终端的示意性框图。如图1所示,该终端100包括光传感器101和光源102。该光传感器可以是XYZ传感器、RGB传感器或者多光谱传感器,作为一个优选的方案,下文将以多光谱传感器为例描述。多光谱传感器的工作范围包括多个波段。其中,可以根据待测物体对不同波段的光的反射特性不同,选择不同波段的多光谱传感器,例如,在待测物体为人脸皮肤或物体表面颜色的情况下,可以选择接收波长范围覆盖为400~800nm(或者470nm-630nm),在待测物体为食物或者物体材料的情况下,可以选择接收波长范围为700nm~1050nm的多光谱传感器。其中,根据多光谱传感器的分辨率,可以选择多个波长进检测待测物体的光谱,例如,可以在波长范围内选择480nm,520nm,560nm、600ms、660nm、710nm、750nm、780nm、820nm、880nm、900nm、950nm、1000nm等波长检测待测物体的光谱。本发明实施例的多光谱传感器也包括其他波长范围的多光谱传感器。本发明对多光谱传感器不作具体限定。另外,为了便于智能终端集成,光源可以是终端通常使用的的发光二极管(Light Emitting Diode,LED)灯。FIG. 2 shows a schematic block diagram of a terminal according to an embodiment of the present invention. As shown in FIG. 1 , the terminal 100 includes a light sensor 101 and a light source 102 . The light sensor may be an XYZ sensor, an RGB sensor or a multi-spectral sensor. As a preferred solution, the following will take a multi-spectral sensor as an example to describe. The working range of multispectral sensors includes multiple bands. Among them, multi-spectral sensors of different wavelength bands can be selected according to the different reflection characteristics of the object to be measured for light of different wavelength bands. ~800nm (or 470nm-630nm), when the object to be measured is food or object material, a multispectral sensor with a receiving wavelength range of 700nm to 1050nm can be selected. Among them, according to the resolution of the multi-spectral sensor, multiple wavelengths can be selected to detect the spectrum of the object to be measured, for example, 480nm, 520nm, 560nm, 600ms, 660nm, 710nm, 750nm, 780nm, 820nm, 880nm can be selected in the wavelength range , 900nm, 950nm, 1000nm and other wavelengths to detect the spectrum of the object to be tested. The multispectral sensors of the embodiments of the present invention also include multispectral sensors in other wavelength ranges. The present invention does not specifically limit the multispectral sensor. In addition, in order to facilitate the integration of the smart terminal, the light source may be a light emitting diode (Light Emitting Diode, LED) lamp commonly used in the terminal.

另外,该终端100还包括射频(Radio Frequency,RF)电路110、存储器120、显示屏140、音频电路160、I/O子系统170、处理器180、以及电源190等部件。本领域技术人员可以理解,图2中示出的终端结构并不构成对终端的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。In addition, the terminal 100 further includes components such as a radio frequency (Radio Frequency, RF) circuit 110 , a memory 120 , a display screen 140 , an audio circuit 160 , an I/O subsystem 170 , a processor 180 , and a power supply 190 . Those skilled in the art can understand that the terminal structure shown in FIG. 2 does not constitute a limitation on the terminal, and may include more or less components than those shown in the figure, or combine some components, or separate some components, or Different component arrangements.

其中,现有技术中的智能终端中用于拍摄的光传感器通常为RGB传感器,作为一个示例,图2中的多光谱传感器101可以和RGB传感器集成在一块芯片上,即多光谱传感器的器件范围包括RGB传感器。或者,多光谱传感器101也可以作为一个独立的传感器和RGB传感器分别位于不同芯片上。Wherein, the light sensor used for shooting in the smart terminal in the prior art is usually an RGB sensor. As an example, the multispectral sensor 101 in FIG. 2 can be integrated with the RGB sensor on one chip, that is, the device range of the multispectral sensor is RGB sensor included. Alternatively, the multispectral sensor 101 can also be located on different chips as an independent sensor and the RGB sensor.

图3是本发明实施例的用于光谱检测的方法的示意性流程图,如图3所示,该方法可以由终端执行,该方法300包括:FIG. 3 is a schematic flowchart of a method for spectrum detection according to an embodiment of the present invention. As shown in FIG. 3 , the method may be executed by a terminal, and the method 300 includes:

301,终端通过光传感器获取待测物体在光源和当前环境光下的第一光谱响应曲线。301. The terminal obtains, through a light sensor, a first spectral response curve of the object to be measured under the light source and the current ambient light.

本领域的技术人员可以理解,本发明实施例中的光谱响应曲线,也可以称作光谱、光谱信息或者频谱响应曲线等。应理解,本发明实施例中的第一光谱响应曲线,可以指在光源和当前环境光照射下的待测物体的反射光的光谱。Those skilled in the art may understand that the spectral response curve in the embodiment of the present invention may also be referred to as spectrum, spectral information, or spectral response curve or the like. It should be understood that the first spectral response curve in the embodiment of the present invention may refer to the spectrum of the reflected light of the object to be tested under the illumination of the light source and the current ambient light.

可选地,该光源可以设置在终端中,例如,该光源可以为终端中的LED灯。可选地,该光传感器可以为多光谱传感器。Optionally, the light source may be provided in the terminal, for example, the light source may be an LED lamp in the terminal. Optionally, the light sensor may be a multispectral sensor.

可选地,上述待测物体可以为人脸皮肤,也可以为食物或者其他材质的物体。Optionally, the above-mentioned object to be measured may be human face skin, or an object of food or other materials.

例如,当待测物体为人脸皮肤时,终端可以开启光源,在终端靠近待测皮肤的区域的情况下,通过多光谱传感器获取被测皮肤在光源以及当前环境光下的第一光谱响应曲线。For example, when the object to be measured is human face skin, the terminal can turn on the light source, and when the terminal is close to the area of the skin to be measured, the first spectral response curve of the skin to be measured under the light source and the current ambient light is obtained through the multispectral sensor.

302,所述终端确定所述当前环境光的第二光谱响应曲线。302. The terminal determines a second spectral response curve of the current ambient light.

本领域技术人员可以理解,当前环境光是指该待测物体当前所在环境的环境光。Those skilled in the art can understand that the current ambient light refers to the ambient light of the environment where the object to be measured is currently located.

可选地,确定所述第二光谱响应曲线,可以是所述终端通过所述光传感器获取所述待测物体在当前环境光下的第二光谱响应曲线。Optionally, determining the second spectral response curve may be that the terminal obtains the second spectral response curve of the object to be measured under current ambient light through the light sensor.

例如,终端可以在关闭所述光源的情况下获取所述待测物体在当前环境个的第二光谱响应曲线。For example, the terminal may acquire the second spectral response curve of the object to be measured in the current environment when the light source is turned off.

可选地,确定环境光的第二光谱响应曲线,可以是终端根据用户的输入确定第二光谱响应曲线。例如,终端中可以预先存储多个常用环境对应的第二光谱响应曲线,如办公室、商场、卧室等。或者也可以按照光照条件区分场景,如日光、白炽灯、钨灯等,预先测量并存储不同场景典型的第二光谱响应曲线。在获取用户的用于指示当前环境的输入信息后,从存储的多个常用环境中确定当前环境,进而将当前环境对应的第二光谱响应曲线确定为当前环境光的第二光谱响应曲线。Optionally, to determine the second spectral response curve of the ambient light, the terminal may determine the second spectral response curve according to the user's input. For example, the second spectral response curves corresponding to multiple common environments, such as offices, shopping malls, bedrooms, etc., may be pre-stored in the terminal. Alternatively, scenes can also be distinguished according to lighting conditions, such as sunlight, incandescent lamps, tungsten lamps, etc., and the typical second spectral response curves of different scenes can be measured and stored in advance. After acquiring the user's input information for indicating the current environment, the current environment is determined from a plurality of stored common environments, and then the second spectral response curve corresponding to the current environment is determined as the second spectral response curve of the current ambient light.

303,所述终端根据所述第一光谱响应曲线以及所述第二光谱响应曲线,确定第三光谱响应曲线,所述第三光谱响应曲线为所述待测物体在滤除所述环境光的干扰之后的光谱响应曲线。303. The terminal determines, according to the first spectral response curve and the second spectral response curve, a third spectral response curve, where the third spectral response curve is the effect of the object under test filtering out the ambient light. Spectral response curve after interference.

可选地,所述终端根据所述第一光谱响应曲线以及所述第二光谱响应曲线,确定第三光谱响应曲线,包括:所述终端将所述第一光谱响应曲线和所述第二光谱响应曲线进行噪声对消处理,获取不受环境光干扰的第四光谱响应曲线。本发明实施例对噪声对消处理的具体方法不作限定,例如上述噪声对消处理可以采用矢量运算方法。Optionally, the terminal determining a third spectral response curve according to the first spectral response curve and the second spectral response curve, comprising: the terminal combining the first spectral response curve and the second spectral response curve. Noise cancellation processing is performed on the response curve to obtain a fourth spectral response curve that is not disturbed by ambient light. The embodiment of the present invention does not limit the specific method of noise cancellation processing. For example, the above noise cancellation processing may adopt a vector operation method.

304,所述终端根据所述第三光谱响应曲线,确定所述待测物体的目标属性的第四光谱响应曲线。304. The terminal determines, according to the third spectral response curve, a fourth spectral response curve of the target attribute of the object to be measured.

其中,所述待测物体的目标属性可以是所述待测物体的属性。例如,所述待测物体可以是人脸皮肤,所述目标属性可以是人脸皮肤的肤色或者人脸皮肤的油性。Wherein, the target attribute of the object to be measured may be the attribute of the object to be measured. For example, the object to be detected may be human face skin, and the target attribute may be the skin color of the human face skin or the oiliness of the human face skin.

可选地,确定所述第四光谱响应曲线,可以是所述终端根据所述第三光谱响应曲线,所述光传感器的滤波函数模型、所述待测物体的目标属性的反射模型、所述光源的能量分布函数,确定所述第四光谱响应曲线。Optionally, determining the fourth spectral response curve may be the filter function model of the optical sensor, the reflection model of the target attribute of the object to be measured, the The energy distribution function of the light source determines the fourth spectral response curve.

其中,所述待测物体的目标属性的反射模型,可以指所述待测物体的目标属性的光学反射模型。该待测物体的目标属性的反射模型可以是通过第三方器件或模组检测待测物体的属性参数,构建的反射模型。例如,在待测物体为人脸皮肤的情况下,可以获取第三方器件或模组检测被测对象的皮肤血管、皮脂、纹理等参数,构建被测对象本人的皮肤参数模型。此类模型具有个体化特性。或者,也可以获取经典的皮肤模型,例如库伯卡-曼克反射(Kubelka-Munk)模型作为人脸皮肤的反射模型。Wherein, the reflection model of the target attribute of the object to be measured may refer to an optical reflection model of the target attribute of the object to be measured. The reflection model of the target attribute of the object to be measured may be a reflection model constructed by detecting the attribute parameters of the object to be measured through a third-party device or module. For example, when the object to be measured is human face skin, a third-party device or module can be obtained to detect parameters such as skin blood vessels, sebum, and texture of the measured object, and a skin parameter model of the measured object can be constructed. Such models are individualized. Alternatively, a classical skin model, such as the Kubelka-Munk model, can also be obtained as the reflection model of the human face skin.

其中,上述光源的能量分布函数,可以是预先确定的光源的能量分布函数。例如,若光源为某种规格的LED灯时,其能量分布函数可以预先经过统一的试验检测得到。在一些情况下,由于LED灯在制造上不能保证所有器件完全一致,允许实际的光强分布与预先获得的能量分布函数存在一定误差,并可以通过算法补偿误差,以避免后续计算的不准确性。作为一个优选的方案,可以将光源与多光谱传感器封装在一起,根据光源与多光谱传感器的响应的调校,设定光源的光强分布。The energy distribution function of the above-mentioned light source may be a predetermined energy distribution function of the light source. For example, if the light source is an LED lamp of a certain specification, its energy distribution function can be obtained through a unified test in advance. In some cases, due to the fact that LED lamps cannot guarantee that all devices are completely consistent in manufacturing, it is allowed to have a certain error between the actual light intensity distribution and the pre-obtained energy distribution function, and the error can be compensated by an algorithm to avoid the inaccuracy of subsequent calculations. . As a preferred solution, the light source and the multi-spectral sensor can be packaged together, and the light intensity distribution of the light source can be set according to the adjustment of the response of the light source and the multi-spectral sensor.

可选地,所述终端根据所述第三光谱响应曲线,所述光传感器的滤波函数模型、所述待测物体的目标属性的反射模型、所述光源的能量分布函数,确定所述第四光谱响应曲线,包括:所述终端根据公式Optionally, the terminal determines the fourth spectral response curve according to the third spectral response curve, the filter function model of the light sensor, the reflection model of the target attribute of the object to be measured, and the energy distribution function of the light source. Spectral response curve, including: the terminal according to the formula

Y(λ)=∫F(λ)R(λ)I(λ)dλ, (1)Y(λ)=∫F(λ)R(λ)I(λ)dλ, (1)

确定所述第四光谱响应曲线,其中Y(λ)表示所述第三光谱响应曲线,F(λ)表示所述光传感器的滤波函数模型,所述R(λ)表示所述待测物体的目标属性的反射模型,所述I(λ)表示所述光源的能量分布函数。Determine the fourth spectral response curve, wherein Y(λ) represents the third spectral response curve, F(λ) represents the filter function model of the light sensor, and the R(λ) represents the object to be measured. The reflection model of the target property, the I(λ) represents the energy distribution function of the light source.

其中,上述根据公式(1),确定第四光谱响应曲线,可以是根据第三光谱响应曲线和公式(1),通过学习获得第四光谱响应曲线。Wherein, the above-mentioned determination of the fourth spectral response curve according to formula (1) may be to obtain the fourth spectral response curve through learning according to the third spectral response curve and formula (1).

可选地,I(λ)是光源的能量分布函数,可以通过补偿算法获取更准确的光源的能量分布函数,例如,在具体实现中可以采用后台预先对装置与专业频谱仪的相应进行训练或校正。例如,可以根据如公式(2)获取校正后的I(λ)Optionally, I(λ) is the energy distribution function of the light source, and a more accurate energy distribution function of the light source can be obtained through a compensation algorithm. Correction. For example, the corrected I(λ) can be obtained according to formula (2)

I(λ)=Iapprox(λ)*SI(λ) (2)I(λ)=I approx (λ)*SI(λ) (2)

其中Iapprox(λ)表示校正前的光源的能量分布函数。I(λ)表示校正后的光源的能量分布函数。SI(λ)表示在在对应波长下的校正系数函数,可以是结合本发明实施例中的光谱传感器模组对各个波长光谱的响应特性,与专业频谱仪相互映射,学习出来的。where I approx (λ) represents the energy distribution function of the light source before correction. I(λ) represents the energy distribution function of the corrected light source. SI(λ) represents the correction coefficient function at the corresponding wavelength, which can be learned by combining the response characteristics of the spectrum sensor module in the embodiment of the present invention to each wavelength spectrum and mapping with a professional spectrum analyzer.

可选地,本发明实施例的方法300还包括:Optionally, the method 300 in this embodiment of the present invention further includes:

305,所述终端确定目标光照场景;所述终端根据所述目标光照场景,确定所述第四光谱曲线与CIE XYZ域的光照映射模型;所述终端根据所述光照映射模型,确定所述第四光谱曲线映射至CIE XYZ域的值。305. The terminal determines a target lighting scene; the terminal determines, according to the target lighting scene, the fourth spectral curve and the lighting mapping model of the CIE XYZ domain; the terminal determines the fourth spectral curve according to the lighting mapping model. Four spectral curves map to values in the CIE XYZ domain.

本发明实施例根据目标光照场景确定光照映射模型,进而确定第四光谱曲线映射至CIE XYZ域的值,从而得到与目标光照场景对应的CIE XYZ域的值,提高终端的光谱检测的效率以及用户的体验度。The embodiment of the present invention determines the illumination mapping model according to the target illumination scene, and further determines the value of the fourth spectral curve mapped to the CIE XYZ domain, thereby obtaining the value of the CIE XYZ domain corresponding to the target illumination scene, improving the spectral detection efficiency of the terminal and the user experience.

应理解,上述光照映射模型可以指第四光谱曲线与CIE XYZ域的映射关系。根据目标光照场景不同,第四光谱曲线与CIE XYZ域的光照映射模型不同。It should be understood that the above-mentioned illumination mapping model may refer to the mapping relationship between the fourth spectral curve and the CIE XYZ domain. Depending on the target lighting scene, the fourth spectral curve is different from the lighting mapping model of the CIE XYZ domain.

可选地,上述终端确定目标光照场景,包括:所述终端获取用户的输入信息,所述输入信息用于指示所述目标光照场景;所述终端根据所述输入信息,从多个候选光照场景中确定所述目标光照场景,所述多个候选光照场景与多个光照映射模型之间具有对应关系;所述终端根据所述对应关系,确定所述目标光照场景对应的所述光照映射模型。Optionally, determining the target lighting scene by the terminal includes: acquiring, by the terminal, input information from a user, where the input information is used to indicate the target lighting scene; and, according to the input information, the terminal selecting from multiple candidate lighting scenes The target lighting scene is determined in the above, and the multiple candidate lighting scenes and multiple lighting mapping models have correspondences; the terminal determines the lighting mapping model corresponding to the target lighting scene according to the correspondences.

其中,该多个候选光照场景可以如上文所说的日光、白炽灯、钨灯等不同光照条件下的场景。用户的输入信息可以用于指示待测物体的目标光照场景。例如,在终端获取用户的输入信息之前,可以通过人机界面向用户显示多个候选光照场景的选项,并通过用户的输入信息确定用户从多个候选光照场景中选择的目标光照场景。进而确定目标光照场景对应的光照映射模型。Wherein, the multiple candidate lighting scenes may be the scenes under different lighting conditions such as sunlight, incandescent lamps, and tungsten lamps mentioned above. The user's input information can be used to indicate the target lighting scene of the object to be measured. For example, before the terminal acquires the user's input information, it may display options of multiple candidate lighting scenes to the user through the man-machine interface, and determine the target lighting scene selected by the user from the multiple candidate lighting scenes through the user's input information. Then, the illumination mapping model corresponding to the target illumination scene is determined.

下文结合图4所示的具体例子,更加详细地介绍本发明实施例。应注意,图4的实施例仅仅是为了帮助本领域技术人员理解本发明实施例。而非要将本发明实施例限于所例示的具体数值或具体场景。本领域技术人员根据所给出的图4的例子,显然可以进行各种等价的修改或变化,这样的修改和变化也落入本发明实施例的范围内。The following describes the embodiment of the present invention in more detail with reference to the specific example shown in FIG. 4 . It should be noted that the embodiment of FIG. 4 is only for helping those skilled in the art to understand the embodiment of the present invention. It is not intended that the embodiments of the present invention be limited to the exemplified specific numerical values or specific scenarios. Those skilled in the art can obviously make various equivalent modifications or changes according to the given example of FIG. 4 , and such modifications and changes also fall within the scope of the embodiments of the present invention.

作为一个示例,图4是本发明实施例的方法用于检测人脸皮肤的肤色的方法的示意性流程图。其中,假设光源为位于终端中的LED灯。光传感器为多光谱传感器如图4示,该方法包括:As an example, FIG. 4 is a schematic flowchart of a method for detecting the skin color of human face skin by a method according to an embodiment of the present invention. Among them, it is assumed that the light source is an LED lamp located in the terminal. The light sensor is a multispectral sensor as shown in Figure 4, and the method includes:

步骤1、终端接收用户的指示信息,开启LED灯,并在终端靠近待测皮肤区域的情况下,获取被测皮肤在LED灯和当前环境光下的第一光谱响应曲线;Step 1. The terminal receives the user's instruction information, turns on the LED light, and obtains the first spectral response curve of the tested skin under the LED light and the current ambient light when the terminal is close to the skin area to be tested;

其中,通用的LED光源的产品能量分布响应已知,但由于LED的制造上不能保证所有器件完全一致,允许实际能量分布与已知特性存在一定的误差。需要通过算法来补偿,来避免后续计算的不准确性;其中,上述补偿算法的实现,可以通过后台预先对装置与专业频谱仪的响应进行训练或校正。Among them, the product energy distribution response of the general LED light source is known, but because the LED manufacturing cannot guarantee that all devices are completely consistent, it is allowed to have a certain error between the actual energy distribution and the known characteristics. It needs to be compensated by an algorithm to avoid the inaccuracy of subsequent calculations; wherein, the implementation of the above compensation algorithm can pre-train or correct the response of the device and the professional spectrum analyzer through the background.

本步骤中提及的终端用近距离或贴近拍摄皮肤区域的方式进行检测,可以在终端中集成多光谱传感器或集成有多光谱采集功能的其它传感器,以采集比终端中常规集成的RGB传感器更丰富的频谱信息,用于肤色识别。The terminal mentioned in this step is detected by the method of shooting the skin area at a close distance or close to the skin area, and a multi-spectral sensor or other sensors with integrated multi-spectral acquisition function can be integrated in the terminal, so as to collect more data than the conventionally integrated RGB sensor in the terminal. Rich spectral information for skin color recognition.

步骤2、终端关闭LED灯,获取待测皮肤在当前环境光下的第二光谱响应曲线。Step 2, the terminal turns off the LED light, and obtains the second spectral response curve of the skin to be tested under the current ambient light.

应理解,第一光谱响应曲线和第二光谱响应曲线相当于待测皮肤在两种光照下的光谱响应曲线。一种光照是在光源和环境光,另一种光照是仅在环境光下。It should be understood that the first spectral response curve and the second spectral response curve are equivalent to the spectral response curves of the skin to be tested under two kinds of illumination. One light is on the light source and ambient light, and the other light is on the ambient light only.

步骤3、终端将第一光谱响应曲线和第二光谱响应曲线进行噪声对消处理,获取滤除掉环境光干扰后的第三频谱响应曲线。例如,包括但不限于采用矢量运算进行噪声对消处理。Step 3: The terminal performs noise cancellation processing on the first spectral response curve and the second spectral response curve, and obtains a third spectral response curve after filtering out ambient light interference. For example, including but not limited to noise cancellation processing using vector operations.

步骤4、终端根据LED灯的光强分布信息(或者说,能量分布函数)、已知的多光谱传感器的滤波函数模型、人脸皮肤的光照反射模型,修正并计算出人脸的光谱响应曲线。Step 4. The terminal corrects and calculates the spectral response curve of the face according to the light intensity distribution information (or energy distribution function) of the LED lamp, the filter function model of the known multispectral sensor, and the light reflection model of the face skin. .

例如,可以通过第三光谱响应曲线和公式Y(λ)=∫F(λ)R(λ)I(λ)dλ,通过学习得到被测皮肤的肤色的第四光谱响应曲线。For example, through the third spectral response curve and the formula Y(λ)=∫F(λ)R(λ)I(λ)dλ, the fourth spectral response curve of the skin color of the tested skin can be obtained by learning.

其中,F(λ)为多光谱传感器的滤波函数,或者说光传感器本身在波长λ下的响应函数,可以通过滤波响应模型校正;R(λ)在本步骤中可以是人脸皮肤的光照反射模型函数,现有技术中可以存在多种建模;I(λ)是光源的能量分布函数(即光强分布信息)。Y(λ)是第三光谱响应曲线的频域表达式。Among them, F(λ) is the filter function of the multispectral sensor, or the response function of the light sensor itself at the wavelength λ, which can be corrected by the filter response model; R(λ) can be the light reflection of the face skin in this step. Model function, there are many kinds of modeling in the prior art; I(λ) is the energy distribution function of the light source (ie, the light intensity distribution information). Y(λ) is the frequency domain expression of the third spectral response curve.

步骤5、终端获取用户输入信息,该输入信息用于指示目标光照环境。Step 5: The terminal acquires user input information, where the input information is used to indicate the target lighting environment.

例如,该目标光照环境可以包括日光、白炽灯、钨灯等不同光照下的光照环境。For example, the target lighting environment may include lighting environments under different lighting conditions such as sunlight, incandescent lamps, and tungsten lamps.

例如,在终端获取用户的输入信息之前,可以通过人机界面向用户显示多个候选光照场景的选项,并通过用户的输入信息确定用户从多个候选光照场景中选择的目标光照场景。For example, before the terminal acquires the user's input information, it may display options of multiple candidate lighting scenes to the user through the man-machine interface, and determine the target lighting scene selected by the user from the multiple candidate lighting scenes through the user's input information.

步骤6、终端根据该目标光照环境,确定与该目标光照环境对应的光照映射模型。该光照映射模型用于指示第四光谱响应曲线与CIE XYZ域的映射关系。终端根据该光照映射模型,获取第四光谱响应曲线映射至CIE XYZ域的值。Step 6: The terminal determines an illumination mapping model corresponding to the target illumination environment according to the target illumination environment. The light mapping model is used to indicate the mapping relationship between the fourth spectral response curve and the CIE XYZ domain. The terminal obtains the value of the fourth spectral response curve mapped to the CIE XYZ domain according to the illumination mapping model.

例如,终端可以获取预先学习的多个候选光照环境下的光照映射模型。并根据用户选择的目标光照环境,从多个候选光照环境中选择所述目标光照环境,并根据目标光照环境对应的光照映射模型,获取所述第四光谱曲线映射至CIE XYZ域的值。For example, the terminal may acquire pre-learned illumination mapping models under multiple candidate illumination environments. According to the target lighting environment selected by the user, the target lighting environment is selected from a plurality of candidate lighting environments, and the value of the fourth spectral curve mapped to the CIE XYZ domain is obtained according to the lighting mapping model corresponding to the target lighting environment.

需要说明的是,步骤1至步骤4中对光谱信息的处理均在频域进行,并获得频域的光谱响应曲线。为了兼容或支持现有技术中光谱检测在传统的三色域的应用。最后可以将在频域的光谱响应结果转换至L*a*b域的值。例如,在本步骤中,也可以将频域的光谱响应曲线直接转换为L*a*b域的值。It should be noted that, in steps 1 to 4, the spectral information is processed in the frequency domain, and a spectral response curve in the frequency domain is obtained. In order to be compatible with or support the application of spectral detection in the traditional three-color gamut in the prior art. Finally, the spectral response results in the frequency domain can be converted to values in the L*a*b domain. For example, in this step, the spectral response curve in the frequency domain can also be directly converted into the value in the L*a*b domain.

作为一个优选的方案,由于CIE XYZ域与频域具有更好的线性关系,所以可以根据光照映射模型,先获取第四光谱响应曲线转换至CIE XYZ域的值,再将CIE XYZ域的值转换至L*a*b域的值。由此可以获得准确度更高,更接近待测物体本身色彩的L*a*b域的值。As a preferred solution, since the CIE XYZ domain has a better linear relationship with the frequency domain, according to the illumination mapping model, the fourth spectral response curve can be obtained and converted to the value of the CIE XYZ domain, and then the value of the CIE XYZ domain can be converted. to the value of the L*a*b domain. As a result, a value in the L*a*b domain with higher accuracy and closer to the color of the object to be measured can be obtained.

可选地,在图4的方案中,还包括:Optionally, in the scheme of Fig. 4, it also includes:

步骤7、终端在获得被测皮肤的肤色的第四光谱响应曲线的L*a*b域的值之后,终端可以将该第四光谱响应曲线对应的L*a*b域的值与多种美肤产品(例如,粉底液)的L*a*b值进行匹配,根据预定的匹配规则,选择出最匹配被测皮肤的肤色的色号的目标美肤产品,并对用户进行推荐。Step 7. After the terminal obtains the value of the L*a*b domain of the fourth spectral response curve of the skin color of the skin to be tested, the terminal can compare the value of the L*a*b domain corresponding to the fourth spectral response curve with a variety of values. The L*a*b values of the skin beautifying products (for example, liquid foundation) are matched, and according to a predetermined matching rule, the target skin beautifying product with the color number that best matches the skin color of the tested skin is selected, and the user is recommended.

可选地,可以在本地构建美肤产品在不同光照环境下的的数据库,对美肤产品的数据库构建也可采用图4中的步骤1-6。例如,可以采用图4的方法获取在不同光照环境下美肤产品的光谱响应曲线,并确定其映射到CIE XYZ域的值,再转化成L*a*b值。并且可以将多种美肤产品的检测结果(CIE XYZ值或者L*a*b值)保存在本地或云端的数据库中。Optionally, a database of skin-beautifying products under different lighting environments can be constructed locally, and steps 1-6 in FIG. 4 can also be used for the database construction of skin-beautifying products. For example, the method in Figure 4 can be used to obtain the spectral response curves of skin beautifying products under different lighting environments, and determine the values mapped to the CIE XYZ domain, and then convert them into L*a*b values. And the test results (CIE XYZ value or L*a*b value) of various skin care products can be saved in the local or cloud database.

其中,上述预定的匹配规则,可以是匹配算法。例如,可以采用如最小误差法,最短欧式距离法等匹配算法,本发明实施例对此不作限定。Wherein, the above-mentioned predetermined matching rule may be a matching algorithm. For example, a matching algorithm such as the minimum error method and the shortest Euclidean distance method may be used, which is not limited in this embodiment of the present invention.

上文结合图1至图4详细描述了本发明实施例的用于光谱检测的方法,下文将结合图5至图7详细描述本发明实施例的终端。The method for spectral detection according to the embodiment of the present invention is described in detail above with reference to FIG. 1 to FIG. 4 , and the terminal of the embodiment of the present invention will be described in detail below with reference to FIG. 5 to FIG. 7 .

图5是本发明实施例的终端的示意性框图。应理解,图5的终端500能够执行图2至图4中的方法的各个步骤,为了避免重复,此处不再详述,终端500包括:FIG. 5 is a schematic block diagram of a terminal according to an embodiment of the present invention. It should be understood that the terminal 500 in FIG. 5 can execute the steps of the methods in FIG. 2 to FIG. 4 . In order to avoid repetition, details are not described here. The terminal 500 includes:

获取模块510,用于通过光传感器获取待测物体在光源和当前环境光下的第一光谱响应曲线;an acquisition module 510, configured to acquire the first spectral response curve of the object to be measured under the light source and the current ambient light through the light sensor;

确定模块520,用于确定所述当前环境光的第二光谱响应曲线;A determination module 520, configured to determine the second spectral response curve of the current ambient light;

所述确定模块520还用于根据所述第一光谱响应曲线以及所述第二光谱响应曲线,确定第三光谱响应曲线,所述第三光谱响应曲线为所述待测物体的滤除所述当前环境光的干扰之后的光谱响应曲线;The determining module 520 is further configured to determine a third spectral response curve according to the first spectral response curve and the second spectral response curve, where the third spectral response curve is the filter of the object to be tested. The spectral response curve after the disturbance of the current ambient light;

所述确定模块520还用于根据所述第三光谱响应曲线,确定所述待测物体的目标属性的第四光谱响应曲线。The determining module 520 is further configured to determine a fourth spectral response curve of the target attribute of the object to be measured according to the third spectral response curve.

在获得待测物体的第一光谱响应曲线之后,通过确定环境光的第二光谱响应曲线,并根据所述第二光谱响应曲线,消除第一光谱响应曲线中环境光的干扰,得到光谱特性更准确的光谱响应结果,提高了终端光谱检测的效率。After the first spectral response curve of the object to be measured is obtained, the second spectral response curve of the ambient light is determined, and the interference of the ambient light in the first spectral response curve is eliminated according to the second spectral response curve, so as to obtain a better spectral characteristic. Accurate spectral response results improve the efficiency of terminal spectral detection.

基于同一发明构思,由于该移动终端解决问题的原理与本发明方法实施例中的方法相似,因此该终端的实施可以参见方法的实施,重复之处不再赘述。Based on the same inventive concept, since the principle of solving the problem of the mobile terminal is similar to the method in the method embodiment of the present invention, the implementation of the terminal can refer to the implementation of the method, and the repetition will not be repeated.

图6是本发明实施例的终端的示意性框图。应理解,图6中的终端能够执行图2至图4中的方法的各个步骤,为了避免重复,此处不再详述,终端600包括:FIG. 6 is a schematic block diagram of a terminal according to an embodiment of the present invention. It should be understood that the terminal in FIG. 6 can perform each step of the method in FIG. 2 to FIG. 4 . In order to avoid repetition, details are not described here, and the terminal 600 includes:

存储器610,用于存储程序;a memory 610 for storing programs;

处理器620,用于执行所述存储器610中存储的程序,当所述程序被执行时,所述处理器620用于通过光传感器获取待测物体在光源和当前环境光下的第一光谱响应曲线;确定所述当前环境光的第二光谱响应曲线;根据所述第一光谱响应曲线以及所述第二光谱响应曲线,确定第三光谱响应曲线,所述第三光谱响应曲线为所述待测物体的滤除所述当前环境光的干扰之后的光谱响应曲线;根据所述第三光谱响应曲线,确定所述待测物体的目标属性的第四光谱响应曲线。The processor 620 is configured to execute the program stored in the memory 610. When the program is executed, the processor 620 is configured to obtain the first spectral response of the object to be measured under the light source and the current ambient light through the light sensor curve; determine the second spectral response curve of the current ambient light; determine a third spectral response curve according to the first spectral response curve and the second spectral response curve, the third spectral response curve is the A spectral response curve of the object to be measured after filtering out the interference of the current ambient light; and a fourth spectral response curve of the target attribute of the object to be measured is determined according to the third spectral response curve.

在获得待测物体的第一光谱响应曲线之后,通过确定环境光的第二光谱响应曲线,并根据所述第二光谱响应曲线,消除第一光谱响应曲线中环境光的干扰,得到光谱特性更准确的光谱响应结果,提高了终端光谱检测的效率。After the first spectral response curve of the object to be measured is obtained, the second spectral response curve of the ambient light is determined, and the interference of the ambient light in the first spectral response curve is eliminated according to the second spectral response curve, so as to obtain a better spectral characteristic. Accurate spectral response results improve the efficiency of terminal spectral detection.

基于同一发明构思,由于该移动终端解决问题的原理与本发明方法实施例中的方法相似,因此该终端的实施可以参见方法的实施,重复之处不再赘述。Based on the same inventive concept, since the principle of solving the problem of the mobile terminal is similar to the method in the method embodiment of the present invention, the implementation of the terminal can refer to the implementation of the method, and the repetition will not be repeated.

图7是本发明实施例的系统芯片的示意性结构图。图7的系统芯片700包括输入接口710,输出接口720,至少一个处理器730,存储器740,所述输入接口710、输出接口720、所述处理器730以及存储器740之间通过总线相连,所述处理器730用于执行所述存储器740中的代码,当所述代码被执行时,所述处理器730实现图2至图4中的方法。基于同一发明构思,由于该移动终端解决问题的原理与本发明方法实施例中的方法相似,因此该终端的实施可以参见方法的实施,重复之处不再赘述。FIG. 7 is a schematic structural diagram of a system chip according to an embodiment of the present invention. The system chip 700 in FIG. 7 includes an input interface 710, an output interface 720, at least one processor 730, and a memory 740. The input interface 710, the output interface 720, the processor 730, and the memory 740 are connected through a bus. The processor 730 is configured to execute the code in the memory 740, and when the code is executed, the processor 730 implements the methods in FIGS. 2 to 4 . Based on the same inventive concept, since the principle of solving the problem of the mobile terminal is similar to the method in the method embodiment of the present invention, the implementation of the terminal can refer to the implementation of the method, and the repetition will not be repeated.

另外,本文中术语“系统”和“网络”在本文中常被可互换使用。本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。Additionally, the terms "system" and "network" are often used interchangeably herein. The term "and/or" in this article is only an association relationship to describe the associated objects, indicating that there can be three kinds of relationships, for example, A and/or B, it can mean that A exists alone, A and B exist at the same time, and A and B exist independently B these three cases. In addition, the character "/" in this document generally indicates that the related objects are an "or" relationship.

应理解,在本发明实施例中,“与A对应的B”表示B与A相关联,根据A可以确定B。但还应理解,根据A确定B并不意味着仅仅根据A确定B,还可以根据A和/或其它信息确定B。It should be understood that, in this embodiment of the present invention, "B corresponding to A" means that B is associated with A, and B can be determined according to A. However, it should also be understood that determining B according to A does not mean that B is only determined according to A, and B may also be determined according to A and/or other information.

本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. Interchangeability, the above description has generally described the components and steps of each example in terms of function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementations should not be considered beyond the scope of the present invention.

所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, for the specific working process of the above-described systems, devices and units, reference may be made to the corresponding processes in the foregoing method embodiments, and details are not repeated here.

在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口、装置或单元的间接耦合或通信连接,也可以是电的,机械的或其它的形式连接。In the several embodiments provided in this application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may also be electrical, mechanical or other forms of connection.

所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本发明实施例方案的目的。The units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solutions in the embodiments of the present invention.

另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以是两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.

所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分,或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-OnlyMemory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented in the form of a software functional unit and sold or used as an independent product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or a part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes: U disk, removable hard disk, Read-Only Memory (ROM, Read-Only Memory), Random Access Memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program codes.

以上某一实施例中的技术特征和描述,为了使申请文件简洁清楚,可以理解适用于其他实施例,在其他实施例不再一一赘述。In order to make the application documents concise and clear, the technical features and descriptions in one of the above embodiments can be understood to be applicable to other embodiments, and will not be repeated in other embodiments.

Claims (10)

1.一种用于光谱检测的方法,其特征在于,包括:1. a method for spectral detection, is characterized in that, comprises: 终端通过光传感器获取待测物体在光源和当前环境光下的第一光谱响应曲线,所述光源设置在所述终端中;The terminal obtains the first spectral response curve of the object to be measured under the light source and the current ambient light through the light sensor, and the light source is arranged in the terminal; 所述终端确定所述待测物体在所述当前环境光下的第二光谱响应曲线;determining, by the terminal, a second spectral response curve of the object to be measured under the current ambient light; 所述终端根据所述第一光谱响应曲线以及所述第二光谱响应曲线,确定第三光谱响应曲线,所述第三光谱响应曲线为所述待测物体的滤除所述当前环境光的干扰之后的光谱响应曲线;The terminal determines a third spectral response curve according to the first spectral response curve and the second spectral response curve, where the third spectral response curve is the interference of the object to be measured that filters out the current ambient light After the spectral response curve; 所述终端根据所述第三光谱响应曲线,确定所述待测物体的目标属性的第四光谱响应曲线;The terminal determines, according to the third spectral response curve, a fourth spectral response curve of the target attribute of the object to be measured; 其中,所述终端确定所述待测物体在所述当前环境光下的第二光谱响应曲线,包括:Wherein, the terminal determines the second spectral response curve of the object to be measured under the current ambient light, including: 所述终端通过所述光传感器获取所述待测物体在所述当前环境光下的所述第二光谱响应曲线;obtaining, by the terminal, the second spectral response curve of the object to be measured under the current ambient light through the light sensor; 所述光传感器为多光谱传感器。The light sensor is a multispectral sensor. 2.如权利要求1所述的方法,其特征在于,所述终端根据所述第三光谱响应曲线,确定所述待测物体的目标属性的第四光谱响应曲线,包括:2. The method of claim 1, wherein the terminal determines a fourth spectral response curve of the target attribute of the object to be measured according to the third spectral response curve, comprising: 所述终端根据所述第三光谱响应曲线、所述光传感器的滤波函数模型、所述待测物体的目标属性的反射模型和所述光源的能量分布函数,确定所述第四光谱响应曲线。The terminal determines the fourth spectral response curve according to the third spectral response curve, the filter function model of the light sensor, the reflection model of the target attribute of the object to be measured, and the energy distribution function of the light source. 3.如权利要求2所述的方法,其特征在于,所述终端根据所述第三光谱响应曲线、所述光传感器的滤波函数模型、所述待测物体的目标属性的反射模型和所述光源的能量分布函数,确定所述第四光谱响应曲线,包括:3 . The method according to claim 2 , wherein the terminal uses the third spectral response curve, the filter function model of the light sensor, the reflection model of the target attribute of the object to be measured, and the The energy distribution function of the light source determines the fourth spectral response curve, including: 所述终端根据公式Y(λ)=∫F(λ)R(λ)I(λ)dλ,确定所述第四光谱响应曲线,其中Y(λ)表示所述第三光谱响应曲线,F(λ)表示所述光传感器的滤波函数模型,所述R(λ)表示所述待测物体的目标属性的反射模型,所述I(λ)表示所述光源的能量分布函数。The terminal determines the fourth spectral response curve according to the formula Y(λ)=∫F(λ)R(λ)I(λ)dλ, where Y(λ) represents the third spectral response curve, F( λ) represents the filter function model of the light sensor, the R(λ) represents the reflection model of the target property of the object to be measured, and the I(λ) represents the energy distribution function of the light source. 4.如权利要求1至3中任一项所述的方法,其特征在于,所述方法还包括:4. The method according to any one of claims 1 to 3, wherein the method further comprises: 所述终端确定目标光照场景;The terminal determines the target lighting scene; 所述终端根据所述目标光照场景,确定所述第四光谱曲线与CIE XYZ域之间的光照映射模型;The terminal determines, according to the target illumination scene, an illumination mapping model between the fourth spectral curve and the CIE XYZ domain; 所述终端根据所述光照映射模型,确定所述第四光谱曲线映射至CIEXYZ域的值。The terminal determines, according to the illumination mapping model, the value of the fourth spectral curve mapped to the CIEXYZ domain. 5.如权利要求4所述的方法,其特征在于,所述终端确定目标光照场景,包括:5. The method according to claim 4, wherein determining the target lighting scene by the terminal comprises: 所述终端获取用户的输入信息,所述输入信息用于指示所述目标光照场景;obtaining, by the terminal, user input information, where the input information is used to indicate the target lighting scene; 所述终端根据所述输入信息,从多个候选光照场景中确定所述目标光照场景,所述多个候选光照场景与多个光照映射模型之间具有对应关系;The terminal determines the target illumination scene from a plurality of candidate illumination scenes according to the input information, and the plurality of candidate illumination scenes and a plurality of illumination mapping models have a corresponding relationship; 所述终端根据所述目标光照场景,确定所述第四光谱曲线与CIE XYZ域之间的光照映射模型,包括:The terminal determines, according to the target illumination scene, an illumination mapping model between the fourth spectral curve and the CIE XYZ domain, including: 所述终端根据所述对应关系,确定所述目标光照场景对应的所述光照映射模型。The terminal determines, according to the corresponding relationship, the illumination mapping model corresponding to the target illumination scene. 6.一种终端,其特征在于,包括:6. A terminal, characterized in that, comprising: 获取模块,用于通过光传感器获取待测物体在光源和当前环境光下的第一光谱响应曲线;an acquisition module, used for acquiring the first spectral response curve of the object to be measured under the light source and the current ambient light through the light sensor; 确定模块,用于确定所述待测物体在所述当前环境光下的第二光谱响应曲线;a determination module, configured to determine the second spectral response curve of the object to be measured under the current ambient light; 所述确定模块还用于根据所述第一光谱响应曲线以及所述第二光谱响应曲线,确定第三光谱响应曲线,所述第三光谱响应曲线为所述待测物体的滤除所述当前环境光的干扰之后的光谱响应曲线;The determining module is further configured to determine a third spectral response curve according to the first spectral response curve and the second spectral response curve, where the third spectral response curve is the filter of the object to be tested to remove the current spectral response curve. The spectral response curve after the interference of ambient light; 所述确定模块还用于根据所述第三光谱响应曲线,确定所述待测物体的目标属性的第四光谱响应曲线;The determining module is further configured to determine a fourth spectral response curve of the target attribute of the object to be measured according to the third spectral response curve; 其中,所述确定模块具体用于通过所述光传感器获取所述待测物体在所述当前环境光下的所述第二光谱响应曲线;Wherein, the determining module is specifically configured to obtain the second spectral response curve of the object to be measured under the current ambient light through the optical sensor; 所述光传感器为多光谱传感器。The light sensor is a multispectral sensor. 7.如权利要求6所述的终端,其特征在于,所述确定模块具体用于根据所述第三光谱响应曲线、所述光传感器的滤波函数模型、所述待测物体的目标属性的反射模型和所述光源的能量分布函数,确定所述第四光谱响应曲线。7 . The terminal according to claim 6 , wherein the determining module is specifically configured to reflect the third spectral response curve, the filter function model of the optical sensor, and the target attribute of the object to be measured. 8 . The model and the energy distribution function of the light source determine the fourth spectral response curve. 8.如权利要求7所述的终端,其特征在于,所述确定模块具体用于根据公式Y(λ)=∫F(λ)R(λ)I(λ)dλ,确定所述第四光谱响应曲线,其中Y(λ)表示所述第三光谱响应曲线,F(λ)表示所述光传感器的滤波函数模型,所述R(λ)表示所述待测物体的目标属性的反射模型,所述I(λ)表示所述光源的能量分布函数。8. The terminal according to claim 7, wherein the determining module is specifically configured to determine the fourth spectrum according to the formula Y(λ)=∫F(λ)R(λ)I(λ)dλ a response curve, wherein Y(λ) represents the third spectral response curve, F(λ) represents the filter function model of the light sensor, and R(λ) represents the reflection model of the target attribute of the object to be measured, The I(λ) represents the energy distribution function of the light source. 9.如权利要求6至8中任一项所述的终端,其特征在于,所述确定模块还用于确定目标光照场景;根据所述目标光照场景,确定所述第四光谱曲线与CIE XYZ域之间的光照映射模型;根据所述光照映射模型,确定所述第四光谱曲线映射至CIE XYZ域的值。9. The terminal according to any one of claims 6 to 8, wherein the determining module is further configured to determine a target lighting scene; according to the target lighting scene, determine the fourth spectral curve and the CIE XYZ an illumination mapping model between domains; according to the illumination mapping model, determine the value of the fourth spectral curve mapped to the CIE XYZ domain. 10.如权利要求9所述的终端,其特征在于,所述确定模块具体用于获取用户的输入信息,所述输入信息用于指示所述目标光照场景;根据所述输入信息,从多个候选光照场景中确定所述目标光照场景,所述多个候选光照场景与多个光照映射模型之间具有对应关系;根据所述对应关系,确定所述目标光照场景对应的所述光照映射模型。10. The terminal according to claim 9, wherein the determining module is specifically configured to acquire user input information, the input information being used to indicate the target lighting scene; The target lighting scene is determined from the candidate lighting scenes, and the multiple candidate lighting scenes and multiple lighting mapping models have correspondences; according to the correspondences, the lighting mapping models corresponding to the target lighting scenes are determined.
CN201610270423.4A 2016-04-27 2016-04-27 Method and terminal for spectral detection Active CN105973466B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610270423.4A CN105973466B (en) 2016-04-27 2016-04-27 Method and terminal for spectral detection

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610270423.4A CN105973466B (en) 2016-04-27 2016-04-27 Method and terminal for spectral detection

Publications (2)

Publication Number Publication Date
CN105973466A CN105973466A (en) 2016-09-28
CN105973466B true CN105973466B (en) 2019-07-23

Family

ID=56993325

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610270423.4A Active CN105973466B (en) 2016-04-27 2016-04-27 Method and terminal for spectral detection

Country Status (1)

Country Link
CN (1) CN105973466B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
RU2682593C1 (en) * 2018-03-30 2019-03-19 Самсунг Электроникс Ко., Лтд. Ultra-compact high-resolution spectrometer and its application method
US11330983B2 (en) 2018-03-30 2022-05-17 Samsung Electronics Co., Ltd. Electronic device for acquiring state information on object, and control method therefor
CN110580879B (en) * 2018-06-07 2021-07-20 华为技术有限公司 A terminal device and display control method
CN108924437A (en) * 2018-08-02 2018-11-30 清华大学 Overcome the video multispectral imaging method, apparatus and storage medium of ambient light interference
CN109269643B (en) * 2018-11-02 2021-05-11 天津津航技术物理研究所 Spectrum demodulation system and method based on mobile device screen light source
CN110132323A (en) * 2019-04-23 2019-08-16 深圳市志奋领科技有限公司 A kind of removing method and device of ambient light interference
CN110287809B (en) * 2019-06-03 2021-08-24 Oppo广东移动通信有限公司 Image processing method and related products
CN112362161A (en) * 2020-11-20 2021-02-12 中国矿业大学 Spectrum acquisition device based on spectrum analysis technology and correction method thereof
CN112816441B (en) * 2020-12-23 2022-09-02 华南农业大学 Method and device for detecting growth condition of facility horticultural crop
CN113358224B (en) * 2021-06-15 2023-09-26 杭州海康威视数字技术股份有限公司 Spectral reflectivity detection method and system
CN118857461A (en) * 2024-07-12 2024-10-29 武汉市聚芯微电子有限责任公司 Calibration method, calibration light source, electronic device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1519167A3 (en) * 2003-09-26 2005-06-01 X-Rite, Inc. Color measurement instrument
CN102192783A (en) * 2010-03-05 2011-09-21 日本电气株式会社 Light measuring apparatus and light measuring method
CN102331301A (en) * 2010-07-13 2012-01-25 卡尔斯特里姆保健公司 Teeth Shadow Mapping
CN104749155A (en) * 2013-12-27 2015-07-01 同方威视技术股份有限公司 Raman spectrum detection method for detecting sample in container
CN104749156A (en) * 2013-12-27 2015-07-01 同方威视技术股份有限公司 Raman spectrum detection method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1519167A3 (en) * 2003-09-26 2005-06-01 X-Rite, Inc. Color measurement instrument
CN102192783A (en) * 2010-03-05 2011-09-21 日本电气株式会社 Light measuring apparatus and light measuring method
CN102331301A (en) * 2010-07-13 2012-01-25 卡尔斯特里姆保健公司 Teeth Shadow Mapping
CN104749155A (en) * 2013-12-27 2015-07-01 同方威视技术股份有限公司 Raman spectrum detection method for detecting sample in container
CN104749156A (en) * 2013-12-27 2015-07-01 同方威视技术股份有限公司 Raman spectrum detection method

Also Published As

Publication number Publication date
CN105973466A (en) 2016-09-28

Similar Documents

Publication Publication Date Title
CN105973466B (en) Method and terminal for spectral detection
KR101903626B1 (en) Automatic white balancing with chromaticity measure of raw image data
US11284013B2 (en) Color detection method and terminal
JP5883949B2 (en) Spectral synthesis for image capture device processing.
CN113196288B (en) Method and apparatus for estimating scene illuminant based on skin reflectivity database
CN105891122A (en) Food component detection method and system of mobile terminal
CN106605400B (en) Digital system and method for paint color matching
CN103940511A (en) Spectrum line calibration method and device for hyper-spectrum acquisition system
CN109587466B (en) Method and apparatus for color shading correction
US20140267782A1 (en) Apparatus And Method For Automated Self-Training Of White Balance By Electronic Cameras
EP4053797A1 (en) Method and apparatus for determining light source infromation, electronic device, and storage medium
US20240187737A1 (en) Panoramic image capture for multispectral sensor
KR20180116704A (en) Electronic apparatus for correcting color temperature of an image using reference color information corresponding to external object and controlling method thereof
CN110909696B (en) Scene detection method and device, storage medium and terminal equipment
Molada-Teba et al. Towards colour-accurate documentation of anonymous expressions
JP2011095110A (en) Apparatus and method for estimation of light source
JP6023653B2 (en) Illumination light color estimation device, illumination light color estimation method and program
CN114216573A (en) Color temperature detection method and device, computer readable medium, electronic device
Nikkanen Color constancy by characterization of illumination chromaticity
US20130057680A1 (en) System and method for measuring a colour value of a target
CN115580760B (en) Image generation method, device and electronic equipment
US12250439B2 (en) Multi-sensor system
AU2021401669B2 (en) System and device for measuring a color value, and methods thereof
US20240348740A1 (en) Scalable rational color correction for an image
KR102596914B1 (en) Method, device, and computer-readable medium for colormetry considering external environment

Legal Events

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