CN105430289A - A Method of Detecting LED Flashing Frequency Based on CMOS Image Sensor - Google Patents

A Method of Detecting LED Flashing Frequency Based on CMOS Image Sensor Download PDF

Info

Publication number
CN105430289A
CN105430289A CN201510809219.0A CN201510809219A CN105430289A CN 105430289 A CN105430289 A CN 105430289A CN 201510809219 A CN201510809219 A CN 201510809219A CN 105430289 A CN105430289 A CN 105430289A
Authority
CN
China
Prior art keywords
row
value
led
frequency
image
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.)
Granted
Application number
CN201510809219.0A
Other languages
Chinese (zh)
Other versions
CN105430289B (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.)
Sun Yat Sen University
SYSU CMU Shunde International Joint Research Institute
Original Assignee
Sun Yat Sen University
SYSU CMU Shunde International Joint Research Institute
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 Sun Yat Sen University, SYSU CMU Shunde International Joint Research Institute filed Critical Sun Yat Sen University
Priority to CN201510809219.0A priority Critical patent/CN105430289B/en
Publication of CN105430289A publication Critical patent/CN105430289A/en
Application granted granted Critical
Publication of CN105430289B publication Critical patent/CN105430289B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/745Detection of flicker frequency or suppression of flicker wherein the flicker is caused by illumination, e.g. due to fluorescent tube illumination or pulsed LED illumination

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Studio Devices (AREA)
  • Transforming Light Signals Into Electric Signals (AREA)

Abstract

The invention discloses a method for detecting the flicker frequency of an LED based on a CMOS image sensor. The method comprises the steps of: obtaining a strip image of a light source area, converting the strip image into a gray image; calculating an average gray value for all pixels in each line of the strip image, supposing that the gray image with bright and dark strips has M lines, storing M average gray values into an array IAverage(n), wherein n is equal to 0, 1, ..., M-1; performing M point DFT operation on the IAverage(n) to work out a frequency response value R(k) of the IAverage(n), wherein R(k) is equal to FORMULA, k is not less than 0 and not more than M-1, and W<nk>M is a Fourier coefficient; detecting K values corresponding to peaks in the R(k) except low frequency components, and setting K values to be KN, which namely is the number of strips in the strip image; dividing total number of lines M by KN to obtain pixel line numbers of bright and dark strip widths, which namely are the regularly varied periodic value of the pixel gray value in each line, setting Row_N to be equal to M/KN; and working out the flicker frequency of the LED fLED which is equal to frow/ROW_N, wherein frow is the line scanning frequency of the CMOS image sensor. According to the method, corresponding relationship between each characteristic value of the image with bright and dark strips and the flicker frequency of the LED is obtained, detection on the flicker frequency of the LED with high reliability is achieved, and good practical application value is provided.

Description

一种基于CMOS图像传感器检测LED闪烁频率的方法A Method of Detecting LED Flashing Frequency Based on CMOS Image Sensor

技术领域technical field

本发明面向LED可见光通信(VLC)定位领域,提出了一种基于CMOS图像传感器检测LED闪烁频率的方法。The invention faces the field of LED visible light communication (VLC) positioning, and proposes a method for detecting LED flickering frequency based on a CMOS image sensor.

背景技术Background technique

采用带有CMOS图像传感器(CIS)的手机接收LED光信号,可以通过检测闪烁LED形成的明暗条纹图片,实现低速率信息传输。为使闪烁LED在成像平面上形成明暗条纹图片,CMOS图像传感器应采用卷帘式快门。有现有技术1提出了一种可见光通信系统,如图1所示,其发射机采用开关键控(OOK)调制驱动的LED光源,接收机采用CMOS图像传感器形成明暗条纹图片,通过对明暗条纹图片进行图像处理来解调OOK信号。该论文所提出的系统和解码方法在短距离通信(几十厘米)和无背景环境光干扰的环境下,可以获得一定的通信性能。但是,如果将现有技术1提出的系统和方法应用在实际常见的室内照明环境中,即实现2-6米的通信距离且存在环境光干扰时,其通信性能将变得很差,无法满足实际应用。Using a mobile phone with a CMOS image sensor (CIS) to receive the LED light signal can realize low-rate information transmission by detecting the light and dark stripe pictures formed by the flashing LED. In order to make the blinking LEDs form a light and dark fringe picture on the imaging plane, the CMOS image sensor should use a rolling shutter. There is a prior art 1 that proposes a visible light communication system, as shown in Figure 1, the transmitter uses an LED light source driven by on-off keying (OOK) modulation, and the receiver uses a CMOS image sensor to form a picture of light and dark stripes. The picture undergoes image processing to demodulate the OOK signal. The system and decoding method proposed in this paper can achieve certain communication performance in short-distance communication (tens of centimeters) and without background ambient light interference. However, if the system and method proposed in prior art 1 are applied to the actual common indoor lighting environment, that is, to achieve a communication distance of 2-6 meters and there is ambient light interference, its communication performance will become very poor and cannot meet the requirements of practical application.

有现有技术2公开了一种可见光信号传输解码方法。其基本思想是发射端采用LED光源灯具以不同的频率进行闪烁,接收端采用CMOS图像传感器获取闪烁光信号形成不同明暗条纹宽度的条纹图片。条纹图片的明暗条纹宽度取决于LED光源的闪烁频率。发射机通过频移开关键控(FSOOK)调制驱动LED灯具顺序发出闪烁频率信息,每一种频率代表若干位比特的数据。接收端的CMOS图像传感器采用等间隔时间拍照获取若干幅明暗条纹图片,然后对明暗条纹图片进行条纹数目检测。由于不同的条纹数目代表不同的闪烁频率,进而解码出二进制数据;现有技术2所提出的可见光通信系统如图2所示。Existing technology 2 discloses a visible light signal transmission decoding method. The basic idea is that the transmitting end uses LED light source lamps to flicker at different frequencies, and the receiving end uses a CMOS image sensor to obtain flickering light signals to form fringe pictures with different widths of bright and dark fringes. The width of the light and dark stripes of the fringe picture depends on the flickering frequency of the LED light source. The transmitter drives the LED lamps to send flashing frequency information sequentially through frequency shift on-off keying (FSOOK) modulation, and each frequency represents several bits of data. The CMOS image sensor at the receiving end takes pictures at equal intervals to obtain several light and dark fringe pictures, and then detects the number of fringes on the light and dark fringe pictures. Since different numbers of stripes represent different flicker frequencies, binary data can be decoded; the visible light communication system proposed in prior art 2 is shown in FIG. 2 .

如图2所示,基于FSOOK调制的可见光通信(VLC)系统实现可靠信息传输的关键是对不同宽度的明暗条纹图片进行解码而获得LED闪烁频率。现有技术2提出的检测条纹图片条纹数目的方法具体思路是:首先将有效光源区条纹图片进一步缩减为发光面矩形,对发光面矩形图片灰度值进行灰度值二元化,然后对二值矩形图片的每一行求和,再对和值求一阶或二阶偏导,最后对每行的偏导值进行处理得到图片的条纹数目。As shown in Figure 2, the key to reliable information transmission in the visible light communication (VLC) system based on FSOOK modulation is to decode the light and dark stripe pictures of different widths to obtain the LED flicker frequency. The specific idea of the method for detecting the number of stripes in the fringe picture proposed in prior art 2 is: firstly, the fringe picture in the effective light source area is further reduced to a rectangle of the light-emitting surface, and the gray-scale value of the rectangle picture of the light-emitting surface is binarized, and then the two Each row of the value rectangle picture is summed, and then the first-order or second-order partial derivative is calculated for the sum value, and finally the partial derivative value of each row is processed to obtain the number of stripes of the picture.

然而,通过实际实验验证,现有技术2提出的这种检测图片条纹数目的方法可靠性并不理想。而且如果CMOS图像传感器与LED光源(闪烁频率保持不变)之间的距离发生变化后,有效光源区的条纹数目会发生变化,并不能得到条纹数目与LED闪烁频率之间的对应关系。However, as verified by actual experiments, the reliability of the method for detecting the number of stripes in a picture proposed in prior art 2 is not ideal. Moreover, if the distance between the CMOS image sensor and the LED light source (the flickering frequency remains unchanged) changes, the number of stripes in the effective light source area will change, and the corresponding relationship between the number of stripes and the LED flickering frequency cannot be obtained.

发明内容Contents of the invention

本发明为克服上述现有技术所述的至少一种缺陷(不足),提供一种基于CMOS图像传感器检测LED闪烁频率的方法。该方法通过对可见光通信系统进行数学建模,得到了明暗条纹图片的某个特征值与LED闪烁频率之间的对应关系,并由此来实现可靠性高的LED闪烁频率检测,具有较好的实际应用价值。In order to overcome at least one defect (deficiency) of the above-mentioned prior art, the present invention provides a method for detecting LED flicker frequency based on a CMOS image sensor. By mathematically modeling the visible light communication system, this method obtains the correspondence between a certain characteristic value of the bright and dark fringe picture and the LED flicker frequency, and thus realizes the reliable detection of the LED flicker frequency. practical application value.

为解决上述技术问题,本发明的技术方案如下:In order to solve the problems of the technologies described above, the technical solution of the present invention is as follows:

一种基于CMOS图像传感器检测LED闪烁频率的方法,包括:A method for detecting LED flashing frequency based on a CMOS image sensor, comprising:

S1、获取光源区条纹图片,将条纹图片转换成灰度图片;S1. Obtain the fringe image of the light source area, and convert the fringe image into a grayscale image;

S2、针对条纹图片每一行的所有像素计算平均灰度值,假定灰度明暗条纹图片共有M行,将M个平均灰度值存储在数组IAverage(n),n=0,1,…,M-1中;S2. Calculate the average gray value for all pixels in each row of the stripe picture, assuming that the gray-scale light and dark stripe picture has M rows in total, and store M average gray values in the array I Average (n), n=0, 1,..., M-1;

S3、对IAverage(n)进行M点DFT运算,求IAverage(n)的频率响应值R(k);S3, carry out M point DFT operation to I Average (n), ask the frequency response value R (k) of I Average (n);

其中 R ( k ) = D F T &lsqb; I A v e r a g e ( n ) &rsqb; = &Sigma; n = 0 M - 1 I A v e r a g e ( n ) W M n k , 0≤k≤M-1,为傅立叶系数;in R ( k ) = D. f T &lsqb; I A v e r a g e ( no ) &rsqb; = &Sigma; no = 0 m - 1 I A v e r a g e ( no ) W m no k , 0≤k≤M-1, is the Fourier coefficient;

S4、检测R(k)中除低频分量以外的峰值(极大值)所对应的K值,设为KN,KN即条纹图片中的条纹数目;再用总行数M除以KN得到明暗条纹宽度的像素行数,即条纹图片每行像素灰度值的变化规律的周期值,设为Row_N=M/KNS4, detect the K value corresponding to the peak value (maximum value) except the low-frequency component in R(k), set it as K N , K N is the number of stripes in the stripe picture; then divide the total row number M by K N to get The number of pixel rows of the light and dark stripe width, i.e. the periodic value of the variation law of the pixel gray value of each row of the stripe picture, is set as Row_N=M/K N ;

S5、求出LED的闪烁频率fLED=frow/ROW_N;其中frow为CMOS图像传感器的行扫描频率。S5. Obtain the blinking frequency fLED of the LED =f row /ROW_N; wherein f row is the row scanning frequency of the CMOS image sensor.

本发明通过对FSOOK调制驱动的LED灯具和CMOS图像传感器组合的VLC通信系统进行数学建模,可知所拍摄的明暗条纹图片每行像素灰度值的变化规律是周期性的,即用CMOS图像传感器的行扫描频率除以这个周期值即为LED的闪烁频率。In the present invention, by mathematically modeling the VLC communication system combined with FSOOK modulation-driven LED lamps and a CMOS image sensor, it can be known that the change rule of the pixel gray value of each row of the captured light and dark stripe pictures is periodic, that is, using a CMOS image sensor The line scanning frequency divided by this cycle value is the LED blinking frequency.

与现有技术相比,本发明技术方案的有益效果是:Compared with the prior art, the beneficial effects of the technical solution of the present invention are:

本发明提出的针对明暗条纹图片检测LED闪烁频率的方法,可有效提高此类VLC通信定位系统的低速率信息传输的可靠性,降低误码率,提高抗各种环境光干扰的能力,同时算法简洁明了,可大幅提高明暗条纹图片的处理速度,具有较大的应用价值。The method proposed by the present invention for detecting LED flickering frequency for bright and dark stripe pictures can effectively improve the reliability of low-rate information transmission of this type of VLC communication positioning system, reduce the bit error rate, and improve the ability to resist various ambient light interferences. It is concise and clear, can greatly improve the processing speed of light and dark stripe pictures, and has great application value.

附图说明Description of drawings

图1是现有技术1提出的可见光通信系统示意图。FIG. 1 is a schematic diagram of a visible light communication system proposed in prior art 1.

图2是现有技术2所提出的可见光通信系统示意图。Fig. 2 is a schematic diagram of a visible light communication system proposed in prior art 2.

图3是采用华为智能手机CMOS摄像头对LED灯具拍照所形成的明暗条纹图。Figure 3 is a light and dark fringe diagram formed by taking pictures of LED lamps with a Huawei smartphone CMOS camera.

图4是CIS对闪烁的LED灯具采用卷帘式快门拍照成像过程示意图。Figure 4 is a schematic diagram of the imaging process of CIS using rolling shutter to take pictures of flashing LED lamps.

图5是针对图1的条纹图片处理得到的每行像素平均灰度值的幅度波形图。FIG. 5 is an amplitude waveform diagram of the average gray value of each row of pixels obtained by processing the fringe image in FIG. 1 .

图6是检测方法的具体实施过程流程图。Fig. 6 is a flow chart of the specific implementation process of the detection method.

图7是针对图3条纹图片处理得到的每行像素平均灰度值的频谱响应图。FIG. 7 is a spectrum response diagram of the average gray value of each row of pixels obtained by processing the stripe image in FIG. 3 .

具体实施方式detailed description

附图仅用于示例性说明,不能理解为对本专利的限制;为了更好说明本实施例,附图某些部件会有省略、放大或缩小,并不代表实际产品的尺寸;The drawings are for illustrative purposes only, and should not be construed as limitations on this patent; in order to better illustrate this embodiment, some parts in the drawings will be omitted, enlarged or reduced, and do not represent the size of the actual product;

对于本领域技术人员来说,附图中某些公知结构及其说明可能省略是可以理解的。下面结合附图和实施例对对明暗条纹图片的成像过程进行阐述。For those skilled in the art, it is understandable that some well-known structures and descriptions thereof may be omitted in the drawings. The imaging process of the bright and dark fringe pictures will be described below in conjunction with the accompanying drawings and embodiments.

以目前常见的光摄像机通信(OCC)系统为例,发射机一般可使用FSOOK调制驱动的LED灯具,并可加装灯罩以控制光照区域。假定LED灯具的闪烁频率为fLED,闪烁周期为LED灯具发出占空比为0.5的方波信号,则LED发光强度的时域表达式可用下式表示:Taking the current common optical camera communication (OCC) system as an example, the transmitter can generally use LED lamps driven by FSOOK modulation, and can be equipped with a lampshade to control the illumination area. Assume that the flicker frequency of the LED lamp is f LED , and the flicker period is The LED lamp sends out a square wave signal with a duty ratio of 0.5, then the time-domain expression of the LED luminous intensity can be expressed by the following formula:

E(t)=E0(t+kT0)(1)E(t)=E 0 (t+kT 0 )(1)

其中:in:

EE. 00 (( tt )) == EE. mm ,, 00 &le;&le; tt << TT 00 22 00 ,, TT 00 22 &le;&le; tt << TT 00 -- -- -- (( 22 ))

其中Em为光强度峰值。另一方面,接收机可采用卷帘快门机制的CIS。在实际场景的拍摄条件下,有效光源区内光强分布是不一样的,在中心将形成高光区,往外延伸光强会逐渐降低。图3为使用华为智能手机的CIS对闪烁LED灯具采用卷帘式快门拍照成像的实例图。从图中可见,图片可分为两个层次,第一层是成像所得到的LED灯具图片(高光区),还有一层是卷帘快门所形成的明暗条纹图片。若在光强分布均匀的理想假设情况下,有效光源区内的成像图片将只剩下由卷帘快门所形成的明暗条纹图片。Where E m is the peak light intensity. Alternatively, the receiver may employ a CIS with a rolling shutter mechanism. Under the shooting conditions of the actual scene, the light intensity distribution in the effective light source area is different. A high light area will be formed in the center, and the light intensity will gradually decrease when it extends outward. Figure 3 is an example diagram of using the CIS of a Huawei smartphone to take pictures of flashing LED lamps with a rolling shutter. It can be seen from the figure that the picture can be divided into two layers. The first layer is the image of the LED lamp (high light area) obtained by imaging, and the other layer is the image of the light and dark stripes formed by the rolling shutter. Under the ideal assumption that the light intensity distribution is uniform, only the light and dark fringe pictures formed by the rolling shutter will remain in the imaging picture in the effective light source area.

假设LED灯具的成像图片的行数为M,每行有N个像素。根据卷帘快门式CIS的特点,每一行的N个像素的曝光时间Te是一样的,而相邻两行在曝光时会相隔一个固定的行间隔时间Trow。在滚动卷帘式曝光控制中,保持相邻行曝光之间的间隔时间Trow是必要的。这是因为,每行中的每一个像素需要一定的读出时间Tpix,而只有当满足Trow>NTpix的情况下,才能完全正确地读出每行所有像素的光信号。图4给出了CIS对闪烁的LED灯具采用卷帘式快门拍照成像过程的示意图。Assume that the number of rows of the imaging picture of the LED lamp is M, and each row has N pixels. According to the characteristics of the rolling shutter CIS, the exposure time T e of the N pixels in each row is the same, and two adjacent rows will be separated by a fixed row interval time T row during exposure. In rolling shutter exposure control, it is necessary to maintain the interval time T row between exposures of adjacent rows. This is because each pixel in each row requires a certain readout time T pix , and only when T row >NT pix is satisfied, can the optical signals of all pixels in each row be completely and correctly read out. Figure 4 shows a schematic diagram of the imaging process of CIS using a rolling shutter to take pictures of flickering LED lamps.

在图4中,假定进行一次新的拍照的起始时间为t0,并假定光在自由空间和光学系统中的光能损耗系数为Kop,设KRC为CIS成像电路比例常数。对于由一台CIS和一台LED灯具组成的OCC系统而言,可以预先设置LED闪烁频率以及CIS的曝光时间Te。例如,可将LED灯具的闪烁周期T0设置成行间隔时间Trow的整数倍,即T0=nTrow,其中n为正整数且满足n>1,行扫描频率为则CIS成像图片的像素阵列的第i行输出信号可表示为:In Fig. 4, it is assumed that the start time of taking a new photograph is t 0 , and the light energy loss coefficient of light in free space and optical system is K op , and K RC is the proportional constant of the CIS imaging circuit. For an OCC system consisting of one CIS and one LED lamp, the LED flashing frequency can be preset and the exposure time T e of the CIS. For example, the flashing period T 0 of the LED lamp can be set to an integer multiple of the row interval time T row , that is, T 0 = nT row , where n is a positive integer and satisfies n>1, and the row scanning frequency is Then the i-th row output signal of the pixel array of the CIS imaging picture can be expressed as:

VV (( ii )) == VV SS (( ii )) ++ VV NN (( ii )) == KK oo pp KK RR CC &Integral;&Integral; tt 00 ++ (( ii -- 11 )) TT rr oo ww tt 00 ++ (( ii -- 11 )) TT rr oo ww ++ TT ee EE. (( tt )) dd tt ++ VV NN (( ii )) == KK oo pp KK RR CC &Integral;&Integral; tt 00 ++ (( ii -- 11 )) TT rr oo ww tt 00 ++ (( ii -- 11 )) TT rr oo ww ++ TT ee EE. 00 (( tt ++ knTkT rr oo ww )) dd tt ++ VV NN (( ii )) -- -- -- (( 33 ))

其中,公式(3)的第一项VS(i)表示由卷帘式快门拍摄成像所形成的第i行电压(电流)信号,第二项VN(i)是一个非负值信号,表示所拍摄的LED灯芯在第i行形成的高光干扰噪声。图5显示了图1所示条纹图像的每行像素平均灰度值的幅度波形图,由该图可见,在130行至230行区间内具有较大的高光干扰值,将V(i)信号抬升至高处。Among them, the first term V S (i) of the formula (3) represents the i-th line voltage (current) signal formed by the rolling shutter imaging, and the second term V N (i) is a non-negative signal, Indicates the high light interference noise formed by the captured LED wick in the i-th row. Figure 5 shows the amplitude waveform diagram of the average gray value of each row of pixels in the fringe image shown in Figure 1. It can be seen from the figure that there is a large highlight interference value in the interval from 130 rows to 230 rows, and the V(i) signal Raised to a high place.

由上式可知,当Te=T0=n·Trow时,则VS(i)信号幅度大小均相同,表明在此情况下有效光源区内不会产生明暗条纹图片。当Te≠T0时,则有VS(i)=VS[i+k(n+1)],此时表明每行的输出信号是周期为n的周期性波形。在实际的拍照过程中,CIS选取的曝光时间需与LED光源的闪烁周期相匹配,从而在有效光源区内形成符合统计规律的明暗条纹。本项目将根据LED闪烁频率与明暗条纹的数学关系,研究采用特定的数字滤波器实现对条纹的信号处理,从而计算得到LED闪烁频率的新型检测算法,并对该算法的性能进行仿真和实测验证。It can be seen from the above formula that when T e =T 0 =n·T row , the signal amplitudes of V S (i) are all the same, indicating that in this case no bright and dark fringe images will be generated in the effective light source area. When T e ≠T 0 , V S (i)=V S [i+k(n+1)], which means that the output signal of each row is a periodic waveform with a period of n. In the actual photographing process, the exposure time selected by CIS needs to match the flickering cycle of the LED light source, so that light and dark stripes conforming to statistical laws are formed in the effective light source area. According to the mathematical relationship between LED flicker frequency and light and dark stripes, this project will study the use of specific digital filters to realize the signal processing of fringes, so as to calculate the new detection algorithm of LED flicker frequency, and carry out simulation and actual measurement verification of the performance of the algorithm .

在实际的拍照过程中,CMOS图像传感器选取的曝光时间要大于LED光源的闪烁周期,因此在有效光源区内形成的明暗条纹图片的每一行平均像素灰度值相对于“行数”变量则是一个被截取的周期性波形。如图3所示,观测图3有12个明暗条纹,则表明这幅图片截取了12个周期的周期性波形。In the actual photographing process, the exposure time selected by the CMOS image sensor is longer than the flickering period of the LED light source, so the average pixel gray value of each row of the light and dark stripe image formed in the effective light source area is relative to the "number of rows" variable. A truncated periodic waveform. As shown in Figure 3, observing that there are 12 light and dark stripes in Figure 3 indicates that this picture captures a periodic waveform of 12 periods.

为更充分地阐述本发明所具有的有益效果,以下结合图3所示的具体例子进行仿真分析,进一步对本发明的有效性和先进性予以说明。图6给出了本发明的具体实施流程,简述如下:In order to more fully illustrate the beneficial effects of the present invention, a simulation analysis is performed below in conjunction with the specific example shown in FIG. 3 , to further illustrate the effectiveness and advancement of the present invention. Fig. 6 has provided the concrete implementation process of the present invention, briefly described as follows:

第1步:获取光源区条纹图片,条纹图片的一个实例如图3所示,再将明暗条纹图片转换成灰度图片;Step 1: Obtain the fringe image of the light source area. An example of the fringe image is shown in Figure 3, and then convert the light and dark fringe image into a grayscale image;

第2步:计算每一行所有的像素灰度值的平均灰度值,灰度值在0-255范围之间,将其存储在一个数组中,形成一个平均灰度值幅度波形。例如,对图3中的条纹图片进行处理后得到的平均灰度值幅度波形如图5所示;Step 2: Calculate the average gray value of all the pixel gray values in each row, the gray value is in the range of 0-255, and store it in an array to form an average gray value amplitude waveform. For example, the average gray value amplitude waveform obtained after processing the stripe picture in Figure 3 is shown in Figure 5;

第3步:对平均灰度值幅度波形进行M点DFT变换,其中M是条纹图片的总行数,求出每行像素平均灰度值的频谱响应值R(k)。例如,对图3条纹图片进行处理,可得到的每行像素平均灰度值的频谱响应图如图7所示;Step 3: Perform M-point DFT transformation on the amplitude waveform of the average gray value, where M is the total number of rows of the stripe image, and obtain the spectral response value R(k) of the average gray value of each row of pixels. For example, by processing the stripe picture in Figure 3, the spectral response diagram of the average gray value of each row of pixels can be obtained as shown in Figure 7;

第4步:检测R(k)中除低频分量以外的峰值(极大值)所对应的K值,设为KN,则KN即条纹图片中的条纹数目。用总行数M除以KN得到明暗条纹宽度的像素行数,即条纹图片每行像素灰度值的变化规律的周期值,设为Row_N=M/KNStep 4: Detect the K value corresponding to the peak value (maximum value) in R(k) except the low-frequency component, and set it as K N , then K N is the number of stripes in the stripe picture. Divide the number of pixels by K N with the total number of rows M to obtain the number of pixel rows of the light and dark stripe width, that is, the periodic value of the variation law of the pixel gray value of each row of the stripe picture, set Row_N=M/K N ;

第5步:求出LED的闪烁频率fLED=frow/ROW_N,其中frow为CMOS图像传感器的行扫描频率。Step 5: Obtain the blinking frequency f LED of the LED = f row /ROW_N, where f row is the row scanning frequency of the CMOS image sensor.

显然,本发明的上述实施例仅仅是为清楚地说明本发明所作的举例,而并非是对本发明的实施方式的限定。对于所属领域的普通技术人员来说,在上述说明的基础上还可以做出其它不同形式的变化或变动。这里无需也无法对所有的实施方式予以穷举。凡在本发明的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本发明权利要求的保护范围之内。Apparently, the above-mentioned embodiments of the present invention are only examples for clearly illustrating the present invention, rather than limiting the implementation of the present invention. For those of ordinary skill in the art, other changes or changes in different forms can be made on the basis of the above description. It is not necessary and impossible to exhaustively list all the implementation manners here. All modifications, equivalent replacements and improvements made within the spirit and principles of the present invention shall be included within the protection scope of the claims of the present invention.

Claims (1)

1.一种基于CMOS图像传感器检测LED闪烁频率的方法,其特征在于,包括以下步骤:1. A method for detecting LED flicker frequency based on CMOS image sensor, is characterized in that, comprises the following steps: S1、获取光源区条纹图片,将条纹图片转换成灰度图片;S1. Obtain the fringe image of the light source area, and convert the fringe image into a grayscale image; S2、针对条纹图片中每一行的所有像素计算平均灰度值,假定灰度明暗条纹图片共有M行,将M个平均灰度值存储在数组IAverage(n),n=0,1,…,M-1中;S2. Calculate the average gray value for all the pixels in each line of the stripe picture, assuming that the gray light and dark stripe picture has M rows in total, and store the M average gray values in the array I Average (n), n=0, 1, ... , M-1; S3、对IAverage(n)进行M点DFT运算,求IAverage(n)的频率响应值R(k);S3, carry out M point DFT operation to I Average (n), seek the frequency response value R (k) of I Average (n); 其中 R ( k ) = D F T &lsqb; I A v e r a g e ( n ) &rsqb; = &Sigma; n = 0 M - 1 I A v e r a g e ( n ) W M n k , 0 &le; k &le; M - 1 , 为傅立叶系数;in R ( k ) = D. f T &lsqb; I A v e r a g e ( no ) &rsqb; = &Sigma; no = 0 m - 1 I A v e r a g e ( no ) W m no k , 0 &le; k &le; m - 1 , is the Fourier coefficient; S4、检测R(k)中除低频分量以外的峰值所对应的K值,设为KN,KN即条纹图片中的条纹数目;再用总行数M除以KN得到明暗条纹宽度的像素行数,即条纹图片每行像素灰度值的变化规律的周期值,设为Row_N=M/KNS4, detect the K value corresponding to the peak value except the low-frequency component in R(k), set it as K N , K N is the number of stripes in the stripe picture; then divide the total number of rows M by K N to obtain the pixels of the width of the light and dark stripes The number of rows, i.e. the periodic value of the change law of the pixel gray value of each row of the stripe picture, is set as Row_N=M/K N ; S5、求出LED的闪烁频率fLED=frow/ROW_N;其中frow为CMOS图像传感器的行扫描频率。S5. Obtain the blinking frequency fLED of the LED =f row /ROW_N; wherein f row is the row scanning frequency of the CMOS image sensor.
CN201510809219.0A 2015-11-19 2015-11-19 A kind of method based on cmos image sensor detection LED flicker frequencies Active CN105430289B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510809219.0A CN105430289B (en) 2015-11-19 2015-11-19 A kind of method based on cmos image sensor detection LED flicker frequencies

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510809219.0A CN105430289B (en) 2015-11-19 2015-11-19 A kind of method based on cmos image sensor detection LED flicker frequencies

Publications (2)

Publication Number Publication Date
CN105430289A true CN105430289A (en) 2016-03-23
CN105430289B CN105430289B (en) 2018-05-15

Family

ID=55508191

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510809219.0A Active CN105430289B (en) 2015-11-19 2015-11-19 A kind of method based on cmos image sensor detection LED flicker frequencies

Country Status (1)

Country Link
CN (1) CN105430289B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107104730A (en) * 2017-03-07 2017-08-29 广东顺德中山大学卡内基梅隆大学国际联合研究院 The fringe counting method and infomation detection algorithm positioned for visual light imaging
CN107153188A (en) * 2017-05-18 2017-09-12 广东工业大学 A kind of indoor orientation method and system
CN107169952A (en) * 2017-03-07 2017-09-15 广东顺德中山大学卡内基梅隆大学国际联合研究院 A kind of fringe counting method and information detecting method positioned for visual light imaging
CN107453811A (en) * 2017-08-23 2017-12-08 佛山市南海区广工大数控装备协同创新研究院 A kind of method of the unmanned plane collaboration SLAM based on photopic vision communication
CN109478237A (en) * 2017-06-21 2019-03-15 广东虚拟现实科技有限公司 Light source identification method and device
CN110325872A (en) * 2016-07-14 2019-10-11 广东虚拟现实科技有限公司 The recognition methods of flasher and device
CN110531318A (en) * 2019-09-03 2019-12-03 北京理工大学 A method of luminescence unit ID is extended for visual light imaging indoor positioning
CN112532888A (en) * 2019-09-19 2021-03-19 杭州海康慧影科技有限公司 Method and device for inhibiting image striation phenomenon
CN114167477A (en) * 2021-12-08 2022-03-11 电子科技大学 Stroboscopic detection system based on thin film detector and design and manufacturing method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1437389A (en) * 2001-12-27 2003-08-20 夏普公司 Scintillation correction apparatus, scintillation correction method and recording medium for storing scintillation correction program
WO2004047427A1 (en) * 2002-11-18 2004-06-03 Sony Corporation Flicker reduction method, image pickup device, and flicker reduction circuit
CN103916185A (en) * 2013-04-09 2014-07-09 珠海横琴华策光通信科技有限公司 Optical signal decoding method, device and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1437389A (en) * 2001-12-27 2003-08-20 夏普公司 Scintillation correction apparatus, scintillation correction method and recording medium for storing scintillation correction program
WO2004047427A1 (en) * 2002-11-18 2004-06-03 Sony Corporation Flicker reduction method, image pickup device, and flicker reduction circuit
CN103916185A (en) * 2013-04-09 2014-07-09 珠海横琴华策光通信科技有限公司 Optical signal decoding method, device and system

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110325872A (en) * 2016-07-14 2019-10-11 广东虚拟现实科技有限公司 The recognition methods of flasher and device
CN107169952B (en) * 2017-03-07 2021-07-23 广东顺德中山大学卡内基梅隆大学国际联合研究院 A fringe recognition and information detection method for visible light imaging positioning
CN107169952A (en) * 2017-03-07 2017-09-15 广东顺德中山大学卡内基梅隆大学国际联合研究院 A kind of fringe counting method and information detecting method positioned for visual light imaging
CN107104730B (en) * 2017-03-07 2019-08-02 广东顺德中山大学卡内基梅隆大学国际联合研究院 Fringe counting method and infomation detection algorithm for visual light imaging positioning
CN107104730A (en) * 2017-03-07 2017-08-29 广东顺德中山大学卡内基梅隆大学国际联合研究院 The fringe counting method and infomation detection algorithm positioned for visual light imaging
CN107153188A (en) * 2017-05-18 2017-09-12 广东工业大学 A kind of indoor orientation method and system
CN109478237A (en) * 2017-06-21 2019-03-15 广东虚拟现实科技有限公司 Light source identification method and device
CN109478237B (en) * 2017-06-21 2022-02-22 广东虚拟现实科技有限公司 Light source identification method and device
CN107453811A (en) * 2017-08-23 2017-12-08 佛山市南海区广工大数控装备协同创新研究院 A kind of method of the unmanned plane collaboration SLAM based on photopic vision communication
CN110531318A (en) * 2019-09-03 2019-12-03 北京理工大学 A method of luminescence unit ID is extended for visual light imaging indoor positioning
CN112532888A (en) * 2019-09-19 2021-03-19 杭州海康慧影科技有限公司 Method and device for inhibiting image striation phenomenon
CN112532888B (en) * 2019-09-19 2022-10-04 杭州海康慧影科技有限公司 Method and device for inhibiting image striation phenomenon
CN114167477A (en) * 2021-12-08 2022-03-11 电子科技大学 Stroboscopic detection system based on thin film detector and design and manufacturing method

Also Published As

Publication number Publication date
CN105430289B (en) 2018-05-15

Similar Documents

Publication Publication Date Title
CN105430289B (en) A kind of method based on cmos image sensor detection LED flicker frequencies
JP4207490B2 (en) Optical communication device, optical communication data output method, optical communication data analysis method, and computer program
US9479251B2 (en) Light detection system and method
CN107104730B (en) Fringe counting method and infomation detection algorithm for visual light imaging positioning
TWI532331B (en) Transmitting and receiving apparatus and method for light communication, and the light communication system and method thereof
Thieu et al. Optical-RoI-signaling for vehicular communications
CN107255524B (en) Method for detecting frequency of LED light source based on mobile equipment camera
CN105515657A (en) Visible camera communication system employing LED lamp MIMO array configuration
CN104041191A (en) Visible light communication using remote control
CN107169952A (en) A kind of fringe counting method and information detecting method positioned for visual light imaging
JP2016530745A (en) Modulation of the encoded light component
Nguyen et al. The impact of camera parameters on optical camera communication
JP6455518B2 (en) REPRODUCTION DEVICE, REPRODUCTION METHOD, PROGRAM, AND SYSTEM
JP7213494B2 (en) Information transmission system
CN105301562A (en) Wireless positioning system of visible light communication
KR101706849B1 (en) Apparatus and method for transceiving data using a visible light communication system
Banik et al. Regression analysis for LED color detection of visual-MIMO system
Li et al. Space-time-multiplexed multi-image visible light positioning system exploiting pseudo-miller-coding for smart phones
CN105230002A (en) Detect encoded light
CN104320189A (en) Visible optical signal transmission control method, transmission control device and transmission equipment
Liu et al. Design guidelines for optical camera communication systems: A tutorial
CN109586791B (en) Method and device for visible light communication
Ohira et al. Novel demodulation scheme based on blurred images for image-sensor-based visible light communication
Majlesein et al. Underwater optical camera communications based on a multispectral camera and spectral variations of the LED emission
Vu et al. Survey of indoor optical camera communication (OCC) systems for the Internet of lights

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