Here is my attempt to make detector working, first without tracking (only printing Rectangle coordinates)

HERE is the second attempt, with tracking (findcontours sends coordinates to lk opticaltrack)

The problem to fix is that if squares disappear because i don't move, coordinates stop to be showed also if i start moving again....


[[Detector.py]]


[[Detector2.py]]

GroG

10 years 10 months ago

Awesome Alessandruino !
It's barely out of the oven and your already doing what everyone wants to do !

Scripts work - but I had to change the second camera to Pipeline - no one but you can open 2 OpenCV instances on the same camera :)

When you pipeline, you can grab the input where you want - I grabbed it after Pyramid down - so the Detector doesn't need to PyramidDown again..

Here it's pyramid down'd twice :)

GroG

10 years 10 months ago

I haven't figured why it's not workin immediately on my system yet, but I had a design suggestion.  LKOptical is one of the lowest resource filters - (takes very little processing - so it's fast).  I think for tracking you usually want the fastest filter stack processing the camera data directly - So "eye" should have the camera and the "opencv" tab should be pipelined to eye.

GroG

10 years 10 months ago

I understand now, why you didn't want stuff to disappear !!!  Its because you pipelined LKOptical after the Detector.

If you did it the other way - LKOptical first - then pipeline the Detector - then LKOptical points would continue to persist regardless if the Detector detected anything - your points are being set only if Detection happens !