This should have been my first post, but I wanted to make sure I captured the current state of affairs, such as they are.

A friend and I were talking a few months ago when the idea of making an animatronic / robotic zombie head came about.

Well, really, it was Dan’s idea, but I was all over it.

Dan’s got a lot of artistic talent, so much so he pays his rent by “drawin real purdy”. I’ve seen some of the sculptures he’s done, and they are flat out amazing. Halloween is a major gig.

I’ve got a background in electronics and some coding skills, so together our overlap should make for one hell of a display.

What we’re aiming for:

  • Full motion head
  • Tracks peoples faces (looks at you)
  • Proximity sensor
  • Moans, groans, and other zombie sounds

I’ve already got a 16 servo control board for the project, so based on our progress we might include:

  • Moving jaw
  • moving tongue
  • moving eye(s)
  • head tilt

We’re hoping to have this bastard ready for Halloween, and with 6.5 months to go I’ve got a fair amount of confidence. (knock on wood)

Stay tuned, and hopefully through all the swears, complaining, and (yes) tears, something glorious should be birthed.


OpenCV sounds better, asshole

So after ordering the Pi2 I ran across a very nice walk through on getting OpenCV up and working on the Pi2 and the Pi1.

Click here for the gory details.

It’s a bit to read through,  but after reading it switching to OpenCV is the only way to go. Sure it takes about 12 fucking hours to compile on a Pi (whut? much quicker on a pi2), and using OpenCV increases the complexity of the code a bit, but holy shit, it runs fast.

Adrian over 3-17-2015 2-59-15 PMat pyimagesearch is getting 32FPS with facial detection on the Pi 2. Kickass. Going to the trouble of getting it working on a Pi1 seems like an unnecessary exercise in self flagellation so I’ll probably just wait for the new pi.

It got me thinking though, with that kind upfront cost getting the software going wouldn’t it be faster (and more edifying) just to figure out how to do it in a VM? I could fire up the latest pi image in a vm and crush the bits on my desktop…




…and it actually doesn’t seem too god-awful. (the links are for getting this going in windows).

Famous last words.

With any luck the Pi will be here today and I can skip the unnecessary flagellation. The scrotal flagellation shall continue however.

Now that I’ve got some directions on getting the Pi software going in a VM, I’m just too damned curious to not try it out. It could be very handy in the future. You know, build up a custom Pi image on something with horsepower, then image it off to an SD card. We’ll see, we’ll see.

Raspberry Pi and SimpleVC

So I had to take a couple whacks at it, but it’s finally working. This all goes much smoother if you limit your alcohol intake prior to starting, BTW, but where’s the fun in that?

Anyways, the instructions they provide are close, but missing a simple (possible obvious) but crucial step. After following the instructions here, you *have* to runs apt-get update. Otherwise your fucked, and it won’t work.

To simplify:

  1. sudo apt-get install ipython python-opencv python-scipy python-numpy python-setuptools python-pip
  2. sudo pip install https://github.com/sightmachine/SimpleCV/zipball/master
  3. sudo apt-get update

That’s it. They really really do a good job of making this simple

Now I’m using a raspberry pi 1 B+, one of the first to roll off the line years ago, so the specs are what they are. The start time for the script is really long, and the frame rate (runningx) is pretty atrocious, like 1FPS atrocious.

Now granted, when this zombie head build is done, the board will be running headless, no desktop so we’ll save on some precious resources, but I’m very skeptical that even saving that will give us the speed needed to realistically track people. The thing would look like it’s a having a seizure. Like a poorly executed, hilariously botched, weak ass attempt. Probably be better off just leaving it a latex head.

Now, I’m just talking about grabbing a fucking picture from the camera… once I got the face tracking working the performance went to REAL shit. Like at least 10 seconds to process a single frame for a face.

Just, no. There is no fixing that. I love the Pi, but this is not gonna work.

Perhaps the Pi 2 will work. Faster procs, 4 cores and 1gig of Ram could really jazz the speed up. I’ll need to do multithreading anyways, definitely for sound, possibly for control (That remains to be seen).

It’s only $40 with shipping, so it’s worth a try. Worst case scenario I have 2 Pi’s collecting dust on my desk. If it’s unacceptable, it’d be time to really look around.

 I still do have a fair amount to learn about the computer vision stuff, how to tweak resolution, mess with color, etc. That all might have significant impacts on performance… maybe not.