Showing posts with label canon. Show all posts
Showing posts with label canon. Show all posts

Friday, November 13, 2009

Underwater Casing for Canon EOS 400 Digital SLR

I passed by V-Mall after work to buy the underwater DICAPAC (Digital Camera Pack?) casing. Its a generic plastic casing that uses ziploc-style seals combined with velcro to prevent water from seeping in. It can fit pretty much any time of digital SLR camera with regular lenses. I guess those really long-range, fancy zoom lenses would not fit. But since I'm still using the good-ol' kit lens, its not really an issue.



The pack costs PHP3,500 and is sold by Abacus Computer. I saw it a few months ago and have been planning on getting one. Since we're off to Busuanga tomorrow, I decided its finally time to get it. Just think of it as my advance birthday gift to myself.

Everytime we go to the beach, we always think of buying a disposable underwater camera. I figure the one-time cost of this pack should be cheaper than buying disposable cameras in the future. Its certainly cheaper than buying those new underwater point-and-shoot cameras by Canon, Olympus, etc.

Upon getting home, I performed the waterproof test suggested by the store. Put tissue inside and submerge the casing under water. If the tissue shows wetness afterwards, there must be a hole in the casing so return it for warranty. But then, since we're already leaving tomorrow for our trip, I just have to hope that nothing goes wrong with this unit. Will be posting my underwater photos from Busuanga soon!

Thursday, May 28, 2009

Programming with Canon without an SDK

I've been looking at a photobooth software called Photoboof upon the recommendation of a friend.  It sells for something like USD600 with a fully-functional trial version that just displays some watermark on the printout.  I've been thinking on-and-off of writing a photobooth software myself.  In fact, that was the main impetus why I looked into programming for my Canon EOS using the EOS Development Kit (EDK).

Photoboof claims it can work with Canon Powershots, EOS DSLR's, Nikon DSLR's, and even regular webcams.  I've been wondering how Photoboof can pull off supporting all these cameras.  Did it have to link the libraries specific to each camera model?  Well, as it turns out, it doesn't really talk directly to the camera's firmware.  Instead, it works with the camera's existing bundled software to handle the actual remote photo-shooting.  Then it just picks up the jpg files from some local folder.

I have to admit its an ingenious solution.  For Canon EOS DSLR's, it uses the bundled EOS Utility software to handle actual communication with the camera and the remote shooting part.  The EOS Utility even support "tethered" shooting, or shooting from the camera and having the image sent directly to the PC via USB, without saving a copy first on the CF Card inside the camera.

Photoboof uses the popular Irfanview image viewer software to handle the actual rendering of the image to the printer.  Again, very ingenious.  The author didn't have to do the dirty work of communicating with the printer.

Saturday, March 8, 2008

CSA Family Fun Day

Its a Saturday morning but we had to get up early to go to Colegio de San Agustin (CSA). Its Family Fun Day today and the parents get to join the kids in a sportsfest. We got to school around 8:00am and were assembled at the covered basketball courts. Today is the Fun Day for the different Nursery sections -- all five of them. Caitlin's section (Compassion) is the green team. So Cols and I had to wear green shirts also.

The day started with a prayer, an oath for sportsmanship and some warm-ups. The more active parents joined the torch-lighting ceremony amidst a background music from Chariots of Fire. The contestants were divided into two groups. The first one comprises of sections A to C (including Compassion). The second was for sections D and E, which had a much larger student population as compared to the total of A to C (not sure why).

The first contest was a simple race relay with two contestants running holding a baton together. There were a total of about 12 pairs. Student pairs and parent pairs alternated. Cols and I did not join this race. Caitlin was partnered with Francine, who was much smaller than her, so Caitlin was kind of dragging her along. The Compassion team handily won this contest.

I joined the second contest which was kinda similar in concept. It was also a relay race with the kids running to a table at the end of the relay and stacking up some blocks. Then the parent would run to the same place and un-stack the blocks. The cycle repeats until all parents and students finish. Our Compassion team won first place again on this one.

I got to experiment a bit with taking "action" or motion shots on my Canon EOS 400D. I just used the kit lens at aperture priority setting. Then I focused on the moving subject while panning the camera along and pressing the shutter button. The result is still a bit blurry but gives the desired effect I want.

To see the other shots of the CSA Fun Day, visit my web album by clicking the image below.

Tuesday, January 22, 2008

Programming with the Canon Digital Camera Part 2

I got my Canon EOS Digital Software Development Kit (ED-SDK 2.1) back in December but have not gotten much time to experiment with it. I wrote some quick-and-dirty program today just to test out the different SDK function calls. I opted to test with my Canon EOS 400D instead of the Digital IXUS 400 primarily because the EOS Development Kit (EDK) already came with a C-Sharp wrapper called EDSDK.cs. So I didn't have to download some other 3rd party library wrapper just to integrate with the CD-SDK.

The C Sharp wrapper bundled with the EDK is pretty basic. In fact, I would not really call it a class in the OOP sense. Its more of like a traditional C struct. It enumerates all the different constants and data structures supported by the EDK, which is a big help since I would not want to re-type that. The development library can be either statically linked through the provided EDSDK.lib file, or by dynamic linking by referring to the EDSDK.dll. The C Sharp class file uses the latter method (since I don't think there is any way of linking directly to a .lib file with C#). The EDSDK.cs wrapper file provides the convenient function prototypes already also.

The program flow is very straightforward. You call EdsInitializeSDK() to startup the library and EdsTerminateSDK() to shut it down. Then in-between that's where you do all the neat stuffs -- like query the camera for its properties and settings; modify the settings; take a picture; go through the camera's storage system and retrieve images. The EDK pretty much lets you change all the settings that can be modified -- the ISO speed, AE mode, aperture, shutter speed, JPEG quality/compression level, and so much more. Anything that you can set using the camera's LCD menu, can be programmatically set as well. The EDK provides you with functions to lock the User Interface so that while the application is in control of the camera, it cannot be manually overridden by a human operator.

I think in theory you can connect multiple cameras to a PC via the provided USB cable and control them from a single application (this setup of EOS cameras is pretty amazing). The EDK just mentions some notes about concurrency issues that might cause problems. In any case, I have no plans of attaching more than one camera so that should not be an issue. The SDK does provide you with functions to list the cameras attached, or are available, and lets you select which one you want to work with. Once you've selected your camera, you would open a session with it by calling EdsOpenSession(). Then you would use the EdsSendCommand() mainly to do everything else like doing a remote capture.

I've gotten as far as the following:
  1. Initialize the SDK
  2. Enumerate the cameras attached and select the 1st one (my EOS 400D in this case)
  3. Open a session with the camera
  4. Retrieve its settings and properties
  5. Perform a remote capture (aka. Take a Picture)
  6. Close the camera session
  7. Terminate the SDK

The images taken by step 5 currently remains on the camera. I have to do more experimentation next time on how to do image transfers from the camera to the PC. Of course, the SDK provides all of those functions as well. Its just a matter of figuring out how to use them correctly. I will need to define postback functions for sure. For now, I'm purely doing synchronous programming. However, the programming model that the Canon EDK uses is asynchronous and postback-based.

Friday, December 21, 2007

Programming with the Canon IXUS and EOS Digital Camera

I recently came across a business model which I thought was very interesting. Its essentially a mobile photo studio (or a photo booth) that can be setup easily in events or venues such as birthday parties, event launchings, weddings and many more. They basically charge a fixed fee (anywhere from P10k to P20k) for a finite number of hours (2 to 5 hrs). During that period, the event/party guests can ham it up in front of the camera and they get free souvenir prints.

In the event that I first saw this setup, I took a peek inside the contraption and saw a Canon EOS 20D. Aha! There must be a way to programmatically control a camera from a PC; retrieve the still images that it captures; lay it out in a memory bitmap; then dump it out to a photo printer. Sounds like an interesting project!

So I Googled around to know what tools are out there. First, I found an open-source project in Sourceforge under the GNU General Public License (GPL):

http://canoncam.sourceforge.net/

It seems to be a bunch of command-line utilities which can control a Canon digital camera. However, in order to use it, one has to have the Canon RC SDK. Hmm.... what could that be? Doing more Google searches, I found out that Canon offers the SDK to allow application developers to talk to their camera. Best of all, its for free! One just has to go through the application process:

http://www.canon-asia.com/index.jsp?fuseaction=dev_prog&prod_type=digital_imaging

So I diligently filled up the forms. I figure I would need the standard Canon Digital Camera Software Development Kit (CD-SDK 7.3.0) to support the older Powershot and IXUS lines, and the newer Canon EOS Digital Software Development Kit (ED-SDK 2.1) for the digital SLR lines. My old IXUS 400 (aka Powershot SD400) is supported by the older CD-SDK, while my EOS 400D (aka Digital Rebel XTi) would be supported by the newer ED-SDK.

Based on the website, the libraries are written in Windows C. But some guys seem to have made a C# wrapper around it.

  1. Elias Torres made a C# wrapper around the CD-SDK. But it seems very dated. And for sure, it does not support the newer ED-SDK.
  2. Christian Graus and Benjamin Liedblad came out with a unified version for the CDSDK and PRSDK (a newer version of the CDSDK), but also no mention of the ED-SDK.

Well, my CD from Canon Singapore arrived the other day (after about a 3-week wait). I tried plugging in my old IXUS 400 to my PC. Couldn't seem to get the CD-SDK sample programs to detect it. I wonder if its because I did not really install the entire drivers CD of the IXUS 400. My PC only has the drivers/programs installed from my EOS 400D camera. This will take some more tests.

On the bright side, I found out that the EDSDK came shipped with a C# class file! There's no documentation whatsoever, but it doesn't seem too difficult to figure out since its basically just a class that defines entry points to the EDSDK.DLL. I think I'll focus my development on the EDSDK and forget about the older CDSDK. Of course, this means that whatever application I develop will have to use an EOS Digital Camera and not a lower-end IXUS. Will update this blog more as I find out more also about the EDSDK.