Buildin' a Sentry!

Miscellaneous Forums/General Discussion/Buildin' a Sentry!

http://kotaku.com/5027053/tf2-%252B-legos--amazle

Oh, and in case you haven't seen it, the other story that references:
http://youtube.com/watch?v=RxBa5bQfTGc

Although it would be cool to meet a girl
Nuf said...
..although this IS really cool...
wonder if the missus would let me have one in the front porch :/

That paintball sentry is incredible. How does it recognize movement to that degree of accuracy?

Well, I'm assuming the camera on the sentry's nose and the camera it's using for tracking aren't the same camera, because it appears to be able to spot the guy when he's out of view.

That being the case...

Since the camera isn't moving, you would just need to do the following:


Subtract the current frame from the last frame, and with a little magic you'll have a grayscale image where white indicates the greatest difference, ie, the portions of the image which have changed the most. We'll call this a difference image.

This difference image would have two large white areas, and random noise. The white areas would be where you were in the last frame, and where you are in the current frame. Because you dissapeared from one location and reappered in another. Though depending on aperature speed you could be blurred as well.

To determine which white area we need to aim at what you then need to do is take the difference image you calculated on the last update, and subtract that from the current difference frame. That will make one of the white spots turn black, so what we're left with is an image which has one big white blob and maybe some smaller ones and some noise.


Now, there's any number of ways you might calculate the center of the biggest mass of white pixels, but the most accurate method would probably be to do a weighted average of all the pixel locations using the difference as the weight. However, using this method would result in a turet which would shoot between two targets in view rather than at either individual.

Another method you might use would be to just decide on a rectangle of a certain size, and move it over the image and find the location where the greatest difference lies. You could even perform this check multiple times, starting with a square of one size and inreasing that size until you don't get multiple regions of max difference.


Now.. assuming you could get the still camera working, getting a moving one working would involve the same techniques as the above combined with techniques used to stabilize video. But I'm not gonna try to explain that in an easy to understand manner. :-) That sort of thing is much harder to do.


Anyway, I'm pretty confident I could make the still camera version work, once I figured out how to connect servos to a PC and read the positional data. And there's probably kits out there for that.

Some insight into what he's doing:

http://www.turretsentry.com/faq.html

It looks like he is shooting at the center of all motion.

Thats very interesting, between this and the mule robot from another post, I kind of wish I was going into robotics.

this kid would build it out of cardboard :)