Fighting with computers

Computers are not always friendly.

Sunday, January 30, 2011

Roomba: It does the work!


This year we've got for Christmas our very first home robot. I was a bit reluctant to buy an expensive item just to figure out later it might work elsewhere but not at our home. This has not been the case. Since day one, our Roomba performed nicely and the only trouble we've got is that it does not like our low-profile doorstoppers.

We've made the comparison between them amount of dirt picked up by us and the one we remove from Roomba. I've to say the robot wins in the "who picked more dirt" game. The only extra work we're doing in preparation for Roomba to clean a room is to remove as many objects as possible that might interfere (i.e. chairs, trash bins, etc). I'd say it's been money well spent (as far as the robot keeps the performance level for a couple of years).

What is a plus is that the robot may return to the charge station by itself (sometimes) when battery needs to be recharged. I'd day this is not a feature to trust on, as I'm afraid it may not work in some cases. Apparently if it detects the proximity of the recharging station while the battery is low, then it will go to be recharged. But I won't say it will actively try to find the recharge station by roaming around the house. That means that sometimes Roomba may just power itself off somewhere in the house after doing its job for quite a while (I'd say it may run for more than an hour before battery is depleted).

We all find amusing just looking at Roomba do the cleaning and, even more interesting is the docking process (the return to the charge station to be recharged). The not so good point is that is noisy: You do not want to have in the living room when you're watching TV.

Tuesday, January 18, 2011

Geo-tagging with Canon Powershot S95


No, geo-tagging is not a built-in feature on Canon Powershot S95. However, there is an interesting technology for doing that with your favourite camera. I was introduced to that three years ago by googler Mano Marks (of AppEngine fame) but I was not too impressed at the time (as I was not sure how to store that info). However, once I started using iPhoto I saw that application was aware of geo-location information and therefore it could be useful to have it in my pictures. This Christmas I've got a 2GB Geo Eye-Fi SD card as a present. I'm happy to report that it works nicely with my Powershot S95, where each image is shown as uploaded or not uploaded by means of an icon (Eye-Fi cards can wirelessly upload your pictures using wifi networks).

Uploaded images contain geo-location information, so when you import them into iPhoto they will include location information on where each picture was taken. This cards use the same Skyhook database used by other devices to pinpoint location based on the available wifi networks nearby. Therefore, you get no useful information when you are on the forest or dessert (as there are no nearby wifi networks there). This system is ok urban areas though.

And the beauty of it is that you can use it your existing camera as far as it supports SD memory cards (or compact flash cards, as there are adapters available for that too). Ranging from $30 to $190 these cards are more expensive than regular SD cards, but the extra features may come in handy. Please note that the feature set of each model is kind of tricky, so make sure the card you're buying performs as you expect (i.e. only Pro models will wirelessly upload RAW files).
Update: For reasons I did not understood all the pictures taken on a trip did not get any geotagging. In some cases I was positive it was an area rich of wifi networks. What was wrong? Well, eye-fi cards need to be powered on for a while before they can geotag. If you, like me, power the camera off as soon as you're done taking the picture and you do not power it on many seconds before the first shot there is a chance you won't get any geotagging at all. Card manufacturer says that the longer the card is powered the better chance your picture be geotagged (bump). Given the fact that eye-fi cards are much more power hungry than regular SD cards this "desired" usage pattern will have a big impact on battery time.

Powershot S95 has a good handling of this card, showing useful icons on the display to inform you when there is wifi activity and whether each photo has been uploaded or not. However, a second dissapointment has been the poor coverage of the Eye-fi card once inside the S95. I need to move the camera to the same room where my access point is for pictures to be uploaded to my computer. Transfer time could be better too but I'd say it is acceptable.

Yet another source of disappointment is the fact that location information is ignored if you take the card out of your camera and plug it in your computer. Location information is only ok if the image file is wirelessly uploaded to your computer.

Finally, the last nail in the coffin is the fact that Eye-Fi tells you to shell out more money if you want to upload your pictures to any on-line service (like Flickr or Picasa). It seems the 'x2' versions of their cards do include a lifetime free service but not the 2GB Geo. So the only free wireless upload is to your own computer and, while they say they are iPhoto compatible, uploads won't happen to your iPhoto library automatically. You need to import the pictures from the upload folder to iPhoto application.

Because all of the above I cannot recommend this product or technology. It is a good idea but I am not happy with the final result. The worst part is that you only learn location information is missing at the very end of the process (once you've imported the pictures to iPhoto).

Wednesday, January 05, 2011

Silhouette extraction algorithm



As shown in the video above I have been working on an algorithm to extract a person's silhouette for an arts installation I am working on. The main idea is to use the depth map provided by Microsoft's Kinect so only a small range of distances are used to identify the person standing on a certain spot marked on the floor. By discarding those pixels that are too far away and those too close what is left is the person or other obstacles placed a that desired distance from the camera.

It is a bit tricky to make depth and RGB cameras to match exactly the same image (as they are located a few inches apart) so video shows some discrepancy between the dancing user and the drawn contour line.

Code was written in Processing using Daniel Shiffman's kinect library for Macs, OpenCV library and MovieMaker library to create an output video file of the action. In the mean time I was developing this, Daniel updated his library and some changes were needed. Unfortunately, OpenCV for Processing only includes some functions and simplifyDP was missing, so I was forced to implement my own version of Douglas-Peucker polyline simplification algorithm.