decentropy / SentryTurret

A robot to visually track and target an object. (RaspberryPi2 + RaspiCam + OpenCV + Dlib + servos/driver)
54 stars 40 forks source link

Question about camera #1

Closed matt-desmarais closed 8 years ago

matt-desmarais commented 8 years ago

Do you get a better framerate with the rpi camera as opposed to the USB camera? I have modified your project to use an airsoft gun

decentropy commented 8 years ago

Airsoft...Nice!

I haven't run specific comparison on USB vs raspicam... because I upgraded both from RPI -> RPi2 & USBcam -> Raspicam simultaneously (which gave me 2-3 times faster framerate)

From what I've read however... the raspicam should be faster than USBcam, because it doesn't require the overhead of USB (which frees up resources for your other work)

Thanks for sharing about your effort. I pushed my latest updates last week (mostly organizing the modules better, plus adding Bluetooth & voice, and a few other enhancements).

The main problems I'd like to tackle is making the tracking more reliable:

1) The robot is a little "jittery", and I think this is because I'm not accounting for a variable framerate. I need to read up on kalman filters, interpolation, plus all those things I slept through in school.

2) Color tracking is pretty primitive. It doesn't work well unless it's a plain background with consistent lighting. The RPI2 is limited speed, but I'd like to try combining in other assistance methods, e.g.: training (e.g. robot maps environment, so it can tell what's a foreign object), tracking besides color (various methods here, but will take testing what RPi2 can handle). It's especially challenging tracking an object when the camera is moving... because moving images can be blurred, plus it's harder to differ foreground from background. However, it's just not a useful sentry turret robot unless it can look around... so I'm committed to that design.

Any improvements you have, please share & I'll be sure to merge them... Cheers

matt-desmarais commented 8 years ago

I started with the rpi 2 and adafruit's servo hat, modified your code and added manual controls. The gun is currently broken, when I fix it and change to the rpi camera I'll let you know