Catguard robot
Going back (the 2nd day) to edit up something to put on YouTube found my supposed-mpeg files from the truckbot mission were unreadable.
Funny — I was sure I’d managed to play them on the laptop 24 hrs earlier. But, regardless, they couldn’t be played or shoved into a video editor today.
So I had to go back and do it again.
Since the conversion seems to run on almost real time (i.e. 60 mins of video as an .VOB file takes 30-60 mins of time on the Win klaptop to make into an mpeg4 avi), I’ve only managed to edit together something that was also on the same DVD at the start — vision from my "catguard" experiments.
So that’s what I’m pointing at today.
Basically, the "catguard" (maybe later will mysteriously transform to a "kitchguard" or "houseguard") is meant to look after my kitten. Presently, some of the neighbouring toms have been following it into the house late at night either to steal its food or beat it up or both.
I managed to cook up a simple Bioloid that used IR and light sensors to detect suspicious commings and goings and make a noise and wave an arm if so.
Unfortunately, there was no way for that bot to decide which cat (or whether it was a cat) that was coming or going, so the relative success relied on the kitten becoming habituated to the movements and noises in the first few hours the bot was switched on, and that the toms were (a) not on their own ground when entering the house and therefore more likely to be afraid of the "punishment", and (b) thrown off by changing the kind of noise being produced.
But after a couple of weeks of this, at least one of the stragers seems to becoming bolder. Last night, e.g., there were a few probes of the defences around 4 am (i.e. I heard the noisemarker go off 2 or 3 times within a couple of mins — and it wasn’t the kitten who was elsewhere). It won’t be long before it won’t be deterred enough to keep out. (A second problem may become one of getting the thing to LEAVE since it’ll have to pass the same racket, flashing light and arm-waving on the way *out*).
So I’ve started making a vision-based system, plus beefing up the range of countermeasures I can deploy.
The first vid is the IR wifi cam connected in parallel to an avr32 and hacked-up wifi-based DVR.
The cam uses 9 IR leds to light up the scene, or can drop back to 4 Mp full-colour if there’s reasonable illumination. (It can actually see quite well at light levels that appear low to human eyes anyway).
The vid shows the "raw" cam output. Over the wifi link and after some of the crappy software it’s gone through to get to the DVD (and then converted from a .VOB to mpeg via more crappy s/w; then uploaded to YouTube and converted again), the image is not bad quality.
The 2nd half — at even lower quality — shows the output from the avr32 running a simple opencv program to look out for "a cat" (not worried about which cat, or whether > 1, at present).
The key feature I’m using is the outline of a near-vertical cat ear, whether light ear against dark bg, or vice-versa.
Since there seemed to be a few false hits on a single ear, I had to mod this idea to look for 2 ears with correct spacing (just 2 ears also got many false hits).
When a cat has been detcted with reasonable confidence, a circle is drawn around the approx location of the head (this will be important for the countermeasures ;), plus a date/time the detection was logged.
The s/w is very rough. To be dones include putting in some smoothing so a cluster of "detect" events are turned into a single, longer, event.
And I have to add some features to handle my kitten vs other cats before I can started to deploy the countermeasures, that will feature a cat-based scale of offensive weaponry, starting with "no" (you say "no" to the cat first), then loud noises (when it doesn’t respond to "no" you clap loudly), then some shoving (you try to push the cat away — if you’re wearing gardening gloves; not applicable to a bot
and a water spray as last resort (if it’s stopped responding to the claps).