Ask Your Question

claudiop's profile - activity

2015-08-07 16:38:56 -0600 commented question Detect laser on shooting target

@FooBar Thanks for the comment. OpenCV being low-level (well C++ is, sort of) means it only runs on a single core unless specifically programmed to create several threads, is that correct? Do you really think that 90 vga frames can be processed at a single core of a pi, every second? That seems like a lot of pixels for a small processor. (just making sure it is enough) The laser pointer is half centimeter wide, so should be fairly simple to detect since the target is 17 cm wide. Is it possible to do so in less than 100 ms without lots of optimizations? (the camera probably has a capture delay of some tens of ms, I think I read about it somewhere)

Make it an answer, I'll accept it, and start doing it ;)

2015-08-07 13:49:07 -0600 asked a question Detect laser on shooting target

Hi. I building a laser shooting target. A photodiode detects the shot by its modulation, and a camera detects its position (during the 15ms it is on). Since im new to C++ and OpenCV, I just thought it would be better to ask for the ideal and simpler way to do my detection algorithm.

To begin with, the target is 17 cm by 17 cm, in which it has 10 rings, (from 1 to 11) and requires a precision of a tenth of ring. If I record at 60fps it should be fast enough (~16ms per frame), but is 320x240 enough (~2pixels per tenth of ring)? Does 640x480 become a bottleneck to my RPi (v2) ? (~4 pixels per tenth of ring)?

As an algorithm Im thinking about making a binary image to find the black contour of the target, by looking up the highest point, the lowest, sides, and making it an elipse. After calculating which zone is which value, begin recording a binary image looking for bright red spots. Whenever one is detected and the photodiode confirms, calculate its position.

Its this the correct, most efficient procedure that an amateur can do? Is 60 fps guaranteed not to miss the shots? (can 90fps be avoided)

Side question: The red looks "redish" in the camera. Is there any proper way to calibrate colors like there is to calibrate distortion (cheeseboard trick)?

Thanks