Do you have cats? I do – red-point Siamese twins – Bovril and Marmite.
Have you ever teased your cats with a laser pointer, watching them manically charge around a room chasing a dot of light? Me too! It looks like they’re having so much fun. Can you see where this is going?
Here’s my initial design thoughts:
- Raspberry Pi camera slung underneath HoG pointing at floor
- The lens is equivalent to a 35mm DLSR lens, so quite a wide point of view – something like a meter square from the same height.
- Set the camera up to shoot very low resolution 32 * 32 pixel pictures in YUV mode where Y is the luminance / brightness
- For each ‘photo’, average all the Y values to get an ambient light levels.
- Compare each pixel Y value again the ambient light level to see if there are any significant bright spots
- If all pixels are within some arbitrary range, just hover like a good kitty.
- If a small cluster of pixels stand out as much brighter, move towards them.
Most of the image processing can be done by the GPU combined with the picamera python library, so it should not have significant impact on the looping speed of HoGs flight controller code; the position of the brightest pixel provides direction / speed values in quadcopter frame coordinates that can be used as the targets for the motion processing PIDs.
Sounds easy, doesn’t it? More importantly, it sounds fun too. And I have a couple of spare Raspi Cams kicking around along with a laser pointer or two, so near zero cost.
But let’s not get carried away – first I need HoG to prove her worth. Weather is looking good for her 2nd flight tomorrow.