This will be a somewhat unusual HOWTO compared to those typically on this site. In an effort to lose weight, I decided I wanted to take a photo of myself, once per day so I could track and further motivate the progress of regular exercise. I then wanted to overlay the date each photo was taken as well as my weight on that day. Finally, I wanted animate these daily photos into a GIF and upload it to my website so I can remind myself anywhere of my objective of losing weight. The trick is I wanted to automate this entire process. This meant I needed to find a solution for the following:
- Remotely control my camera to be able to take a picture and download it from an automated script
- Be able to programmatically crop the image from the camera to remove everything except the white background and myself
- Have a mechanism to be able to overlay text onto an existing image so I can add the current date any my weight data
- Obtain my latest weight from my Garmin Index scale via Garmin Connect and append it to the image
- Combine all of the previous images into an animated gif so I can watch my progress
- Automatically upload the animated gif to my website so I can view it anywhere
To complete this project, I decided to try and leverage my Canon S100 which I purchased as Canon’s top-end prosumer camera in 2012. As I researched my options however, I discovered that Canon disabled any kind of remote control capabilities for this camera. Fortunately I discovered that some very smart people created an alternative firmware for many popular Canon cameras including mine. This firmware is called the CHDK or “Canon Hackers Developer Kit”. This provides all sorts of additional features that are otherwise only available in Canon’s DSLR professional series cameras. The one that I’m most interested in however is that the firmware provided the option to remote control my Canon S100.