Category Archives: Being a Father

The invisible harp!

It was bring your kid to office day at TI and my daughter’s bday was coming up soon as well.  I thought I should do something to spook a few kids with some magic. Given the choc-o-bloc schedule these days, I did not want to spend more time than 2-3 hours. Fortunately for me, my team at TI makes a secret ingredient for lots of magic – A 3D sensor.

I started with a OPT8241-CDK (Camera Development Kit). The kit provides a point cloud of 320 x 240 points. Point cloud is nothing but a collection of X, Y, Z and I (intensity) for each pixel in the camera. For example, this is what the point cloud of a lamp looks like –

Point cloud of a Lamp. Courtesy : TI VoxelViewer user guide
Point cloud of a Lamp. Courtesy : TI VoxelViewer user guide

After some thought, I decided to make a simple invisible musical instrument that even toddlers can appreciate (my daughter just turned 3). The 3D camera was to face up so that kids can move their hands over the camera to generate musical sounds. The distance of the hand from the camera would fix the amplitude and the lateral position of the hand would fix the note.

The code simply identifies the nearest blob in the scene and it’s 3D position. The ‘Z’ co-ordinate is used for the amplitude, The ‘X’ co-ordinate is digitized and used for the selecting the note. Since I decided to do everything in python, the midi-synthesis was just another line of import statement. All in all, as planned, I was able to complete the code under 2 hours. But the midi library was interesting and I ended up spending another 2 hours just playing with the various instruments available. Seriously, fluidsynth library is fun. The python code is hosted here.  If you have an OPT8241-CDK with you and Voxel-SDK up on linux, all you need to do is run the python code.

The results (At my daughter’s school) :

Color Jump

If you ever find yourself wondering what to do next with your high energy toddler, this game could come in handy. All it needs is 3-4 colored crayons and 4′ x 2′ of space.

Draw some colored circles on the floor (Squares work too). Be sure to keep it symmetric on at the least one axis to keep it simple. Toddlers can imagine mirroring more easily than rotation.

Example Circles
Example Circles

Stand in any of the circles and make your kid stand in the opposite one of the same color. You are all set! The rest is best explained through this video –

It is easy to add more complications. Adding more circles is one way of doing it. One can add different shapes too. Encourage your toddler to memorize the color-position association so that he/she need not look before taking a jump. The memorization helps to train spatial memory.