[SOLVED]Multiple Laser Detection : OPENCV + Qt
Hello, I have a project wherein I need to detect multiple lasers that are PWM controlled. I have 10 lasers each with unique pulse widths. The camera frame rate is 200fps.
I am doing the following .
a. Using Qt + QConcurrent - I am able to capture the frames b. Converted the Image to Greyscale, Applied Gaussian Blur and Threshold the image to get binary image. c. Currently I am using Hough Circles to detect the number of circles and transmit the X,Y and framenumber. d. I am curious as to how to proceed further to discern the lasers based on the pulse widths.
Looking forward to receiving your valuable inputs.
Thanks and Regards
If you're successfully detecting the lasers, then that's the end of the OpenCV part of this, yeah? After this it's just data analysis, and that's always different for every problem. This isn't something we can help you with.
If you were having trouble getting good detections on the lasers or something like that, we can help, but not this.
thanks for your reply. My main doubt was whether Hough Circles was the way to go. In an earlier thread http://answers.opencv.org/question/56... posted, there is a comment on use of Kalman Filter with Hungarian method. I was wondering what would be the difference.
Specifically this comment by Foobar.
It will be hard to find 10 different colored lasers. Another source of information could be a timed pattern in the lasers. You could attach some Arduinos to the lasers and give each a different PWM-pattern. BonusPoints for time synchronized patterns. With this, each laser could use some kind of morse code to identify itself. So you need a tracking (Kalman with hungarian method as theodore proposed sounds perfect) and a good camera. A good camera
Ok, I'm starting to understand. So is the background dark, and the laser points bright? Or are both bright, and the lasers just a different color? Would there ever be anything else the same color?
Basically, is shape the only thing that lets you separate the lasers from the background? If so, then you should use the Hough Circles, otherwise, there's probably a better option.
Hello, Thanks for your reply.
Yes, the background is dark, In fact the camera is a monochrome camera, fitted with a day light filter, so only IR signals are passed through, in the captured video, we are seeing just the laser dots and nothing else. I can share with you the video and the source code for your reference.
Well the video would certainly be helpful.
You should be fine just using a threshold and connected components to give you the locations of the dots. Much faster than Hough Circles.
For the rest, you need to track the locations of each laser, then figure out which is which, right?
The Kalman Filter with the Hungarian method is for the tracking the locations of each laser. It lets you track multiple objects and keep track of which is which.
I apologize for the delay in my reply. Can you please provide me with an email, I will send the file to you.
Youtube or a filesharing site is more useful. Just put a link in your post, and anyone can help.