Ask Your Question

Infrared Led tracking with frequency

asked 2015-06-26 11:57:10 -0500

Boyadjian gravatar image

Hello everybody,

First of all, i would like to say that i'm new on OpenCV so please don't laugh at me, and I'm sorry for my english I'm a french student..

In my project, I have got 3 circles of 7 LED which are moving. I have got a camera above them and each circle are blinking at differents frequency ( so 3 differents frequencies). I would like to track each circle and then recognize their frequency.

I'm using Community Core Vision as software, so I already detect blobs. But I would like to ignore all the others noise around it and then track only the LED. That's means, if something is moving next to the LED it needs to be ignore.

I checked on internet and I readed that is easy to detect LED and ignore the others object by using a filter with the frequency that I want to detect.

Is that true ? And if so, do you have any advices for my project ? What library should I use ? And if there a program which already exist for this ?

Thanks you for you answer and please feel free to comment.

edit retag flag offensive close merge delete



If you mean light frequency (IR led 940 nm for example) you can select using an optical filter center at led light frequency. After blinking frequency it's another problem if your circle are moving

LBerger gravatar imageLBerger ( 2015-06-26 12:26:46 -0500 )edit

This is blinking frequency, so it will be harder ? They are not moving really fast, like 5cm in one second. Thank you for your answer.

Boyadjian gravatar imageBoyadjian ( 2015-06-26 14:35:58 -0500 )edit

When you track an object in video shape and brightness don't change (or change are small). With a blinking led that's not true. there is an another post about that sort of project

LBerger gravatar imageLBerger ( 2015-06-26 15:12:03 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2015-06-26 12:35:17 -0500

pklab gravatar image

FilteFilter means optical filter for your lens. Means a band pass filter tuned on emitting light frequency of your led. If I right understood you have to measure the on/off frequency not the emitting freq. If it's so you don't need of this kind of filter

Because when the led is on it will bright a lot you can binarize the image using an high level threshold and detect the ON state. Use a timer or a counter to calculate the frequency.

Finally From FAQ:

Questions about your homework and school projects. Please do not beg for code, instead try some tutorials and tell us what is going wrong

edit flag offensive delete link more


Thanks you for your answer. Yes exactly, I need to detect the frequency of the PWM of my LED. So, what I need is calculate the numbers of frame when the LED are ON and the numbers of frame when the LED are OFF ?

My camera detects perfectly when the LED blink for low frequency, there is no problem for this. But what library should I use to track my LED when they are moving ? I have seen some projects and videos where the camera can follow easily the moving of the LED. But they don't explain how they do it and what code they wrote.

I'm a french studend but I'm actually working for a company in the UK which have no link with my university that's why I asked for code. My mistake, I understand the confusion. Thanks you for your quick answer.

Boyadjian gravatar imageBoyadjian ( 2015-06-26 14:11:23 -0500 )edit
  • If your cam uses fixed FPS you can count the frame and convert it to time using FPS (time = counter/FPS, freq = FPS/counter), otherwise you have to use timer in your code.

  • Regards to frequency level, do you have problem to detect high frequency ? Remember Shannon theorem your sampling frequency should be at least 2x of system frequency than FPS >= 2*blink frequency and your code should be fast enough to process all frames.

  • Regards to movement I don't understand your problem because I think you can find the led in your frame to check if it's on or off. Do you have to move your camera to follow the moving led ?

pklab gravatar imagepklab ( 2015-06-27 06:22:31 -0500 )edit

Hi, I am working on similar project. Did you figure out the solution?

Prem gravatar imagePrem ( 2015-07-27 20:50:33 -0500 )edit

Question Tools

1 follower


Asked: 2015-06-26 11:57:10 -0500

Seen: 2,544 times

Last updated: Jun 26 '15