节点文献
基于智能手机的便携光谱测量系统研究
Research on Portable Spectrum Measuring System Based on Smartphone
【作者】 王峰;
【导师】 朱丽虹;
【作者基本信息】 厦门大学 , 电子与通信工程, 2019, 硕士
【摘要】 如今,照明与显示设备蓬勃发展,LED灯具、VR设备、电视屏幕等发光器件都需要进行相关的光学检测。其中最主要的检测设备就是光谱仪,利用光谱仪对光源进行光谱测量,就可以得到光源的光学参数。如今的主流光谱仪,存在价格高昂、设备庞大、操作繁琐等缺点,其余的小型光谱仪也存在价格过高、需与电脑相连、数据处理不便的问题。在日常生活中,移动式的便携光谱测量可以被广泛的使用于灯具的光源检测、超市的食品检测等应用场景,但因为光谱仪的成本、体积等因素制约并未实际推广。本文针对现有光谱测量仪器中的不足之处,开发了一种基于智能手机进行光谱测量的便携系统。该系统利用智能手机中的摄像头与CPU很好的代替了光谱仪中的探测器与上位机,有效降低了硬件成本。通过图像算法解决不同型号手机对测试装置的适配问题,实现了图像处理和测试装置的分离,方便携带。采用成像式光路配合手机图像算法可以实现不同场景下实时实地快速光谱测试。研究的具体内容为:1.设计并搭建智能手机光谱测量装置。该装置由入射狭缝、平凸透镜、反射式闪耀光栅、柱面透镜、标准白板构成。入射狭缝用于滤除目标光源外的杂散光,平凸透镜用于将入射光准直为平行光,闪耀光栅将平行光色散为单色光,柱面透镜将单色光放大,标准白板用于对色散图像进行成像。通过合理选用元件进行光路搭建,该测量装置可以给智能手机提供目标光源的清晰色散图像。2.基于Android智能手机操作系统,编写与测试装置配套的移动APP。该软件集成了相机参数调节、图像处理算法、光谱标定算法、光谱数据显示、文件存储、参数设置等功能。通过相机参数调节来控制智能手机摄像头的焦距、曝光、色温等参数获得准确光谱图像,通过OpenCV中的高斯滤波、canny边缘检测、梯度算法、形态学操作进行图像裁剪,通过光谱标定算法确定图像中像素点与波长、强度的对应关系。最后可以对光谱曲线进行显示与存储。3.对直插式LED、冷白LED、暖白LED三种常见照明光源进行光谱测试,并将其结果与IS光谱测试系统测量所得的结果进行比较,其光谱曲线基本吻合,光度色度参数与IS系统测量结果对比,其中相关色温最大偏差为2.5%,显色指数最大偏差为9.8%,色坐标x最大偏差0.0074、色坐标y最大偏差0.0259,相对积分强度最大偏差9.8%,说明基于智能手机的光谱仪可以在移动环境中满足光谱测量需求。
【Abstract】 Nowadays,lighting and display devices are booming,and light-emitting devices such as LED lamps,VR devices,and television screens require related optical inspection.The most important detection device is the spectrometer.The spectrometer is used to measure the spectrum to obtain the optical parameters of the light source.Today’s mainstream spectrometers have the disadvantages of high price,large equipment,and cumbersome operation.The other small spectrometers also have problems of high price and inconvenient data processing.In daily life,portable spectrometer can be widely used in light source detection of lamps,food detection in supermarkets,etc.,but it is not actually popularized because of the high cost and big volume.In this paper,a portable system based on smartphone for spectrum measurement is developed for the shortcomings of existing spectrometers.The camera and CPU in the smartphone,which will reduce the hardware cost effectively,.take the replace of the detector and the host computer in the traditional spectrometer system.The image algorithm is used to solve the adaptation problem between different types of mobile phones and the measure device.The separation of image processing and measure device is realized,which is convenient to carry.The real-time field spectral measurement in different scenarios can be realized rapidly.The main content as follows:1.Design and build a smartphone spectrum measuring device.The device consists of an entrance slit,a plano-convex-lens,a reflective blazed grating,a cylindrical lens,and a standard whiteboard.The entrance slit is used to filter out stray light outside the target light source,the plano-convex-lens is used to collimate the incident light into parallel light,the blazed grating disperses the parallel light into monochromatic light,and the cylindrical lens amplifies the monochromatic light,and the standard whiteboard is used for imaging the dispersive images.By selecting components reasonably for optical path construction,the measuring device can provide a clear dispersion image of the target light source to the smartphone.2.Based on the Android smartphone operating system,write a mobile app that is compatible with the test device.The software integrates camera parameter adjustment,image processing algorithms,spectral calibration algorithms,spectral data display,file storage,parameter settings and more.The camera parameters are adjusted to control the focal length,exposure,color temperature and other parameters of the smartphone camera to obtain accurate spectral images.The image is cropped by Gaussian filtering,canny edge detection,gradient algorithm and morphological operation in OpenCV,and the image is determined by the spectral calibration algorithm.The correspondence between pixel points and wavelength intensity.Finally,the spectral curve can be displayed and stored.3.Perform spectral tests on three common illumination sources:in-line LED,cool white LED,and warm white LED,and compare the results with the results measured by the IS spectrum test system.The spectral curves are basically consistent,and the luminosity parameters are luminosity.Compared with the measurement results of IS system,the maximum deviation of correlation color temperature is 2.5%,the maximum deviation of color index is 9.8%,the maximum deviation of color coordinate x is 0.0074,the maximum deviation of color coordinate y is 0.0259,and the maximum deviation of relative integral intensity is 9.8%.It shows that the spectrometer based on smart phone can meet the needs of spectral measurement in mobile environment.