EDSDK To Remote Control Your Canon Camera

I was checking out how to do time lapse photography after browsing through YouTube earlier this week.  They have a million videos showing time lapse, this one of a thunderstorm is pretty cool. So, I got to thinking that there ought to be some software that would be able to automagically take the photographs at a given interval.  After checking out a few packages, I didn't feel like paying the money to purchase them, so I got to thinking that if there is software to do it, there ought to be an API to programatically do it myself.

So I found EDSDK, Canon's SDK for interfacing with its cameras.  The download includes all the DLLs you need if developing for Windows, and a separate download if you're developing for the Mac.  It also includes a class in C#, VB.NET, and Visual C++ that act as a bridge for manipulating the camera through the binary DLLs.  The included classes aren't anything much as far as an object oriented class goes, it's mostly just a prototype class from which safer classes can be created.

Which is what I've done.  I have the beginnings of a C# wrapper that encapsulates the EDSDK binaries into a type safe, easy to use module.  As a proof of concept, I created my own Windows Forms application that initializes the wrapper, loads up the connected cameras, and allows you to take photographs.  The other idea that I had for this was to be able to take photographs with a IR remote (like the ones that come with Windows Media Center), but decided that I had an even better device: an iPod Touch.  I then created a socket server and client that allows an ASP.NET application to send a message to the Windows Forms app and take photographs as well.  This allowed me to take pictures using Safari on my iPod Touch.

Later this week I will post my source code, but in order for it to work, you will have to obtain your own copy of the SDK DLLs.  The process was very quick and I received turnaround within a couple of hours (yes, a real person is going to look at your application).  Stay tuned.

UPDATE 09 JAN 2009 16:47
You can download the source code here (265KB). Standard disclaimers apply (I don't claim it does anything, won't break anything, cause the world to implode, etc. Use at your own risk, enjoy. If you break something, you get to hold all the pieces).  Remember, I haven't included EDSDK DLLs, you'll need to download your own copy and put them into the 'bin' directory of the CanonCameraApp and CanonCameraAppLib folders.

UPDATE 20 OCT 2009 16:52
Please, before you email me complaining about how your camera does not get detected, check to make sure that  your camera is compatible with EDSDK.  Here's a FAQ put together by Canon on which are compatible.  As a general rule of thumb, EDSDK is only compatible with DSLR cameras like the XT, XTi, XS, XSi, 5D Mark II, etc.  Your dinky little PowerShot? Not compatible.  I know, it sucks, but since I don't own one of those cameras, it makes it difficult to write and test code against them.

Print | posted on Wednesday, January 07, 2009 11:15 PM

Comments on this post

# re: EDSDK To Remote Control Your Canon Camera

Requesting Gravatar...
Waw!

This code take me half way of heaven!

I'm expanding the wrapper and the CameraApp to get a full functional camera driver for my EOS350D.



Saludos, OSCAR.
Left by Oscar on Jan 13, 2009 7:06 AM

# re: EDSDK To Remote Control Your Canon Camera

Requesting Gravatar...
Hi.

I'm looking for someone to create a VB6 class wrapper for said Canon EDSDK.
I only require basic functions, such as
- Connect
- TakePicture
- RetrieveLastPicture
- SetFocus

Do you think this is something you could help me with as a paid project?

Stu.
Left by Stuart Landreth on Feb 27, 2009 7:28 AM

# re: EDSDK To Remote Control Your Canon Camera

Requesting Gravatar...
Hi,

Maybe you can help me. After registration for the SDK they said that it doesn't exists for Mac. What possible am I doing wrong or where can I get ED SDK for Mac?
Thank you.

(sorry for my English)
Left by Yury on Apr 06, 2009 4:30 PM

# re: EDSDK To Remote Control Your Canon Camera

Requesting Gravatar...
Hi !
What Version of EDSDK is it?
I search EDSDK 2.5.2 dll.

Thanks and Regards
Peter
Left by Peter on May 08, 2009 5:11 AM

# re: EDSDK To Remote Control Your Canon Camera

Requesting Gravatar...
Hi,

First of all I'd like to say: "awesome wrapper!"

I'm having a problem with the objectEventHandler, my EOS450D doesn't seem to call that handler when taking a photograph. I'd like to save the image to my pc but the app. never executes the handler. No errors btw.

Can you help me?

Grtz,
D@n.
Left by D@n on May 23, 2009 5:20 AM

# re: EDSDK To Remote Control Your Canon Camera

Requesting Gravatar...
I followed the link to the source, but got a zip file with the compiled files instead of the source. I have an earlier version of the source, but it's not fully implemented.
Left by Charles Crawford on Jul 13, 2009 8:54 PM

# re: EDSDK To Remote Control Your Canon Camera

Requesting Gravatar...
Hello;

Is it working in Canon EOS D1000? I have copied my own dll EDSDK 2.6, but it said that no camera detected. Can you help me?

Thx
Left by eksu05 on Sep 30, 2009 10:55 PM

# software developer

Requesting Gravatar...
That was an inspiring post, such advanced in technology make this possible, its worked fantasticly for me.



Keep up the good work
Left by software developer on Oct 01, 2009 9:42 AM

# re: EDSDK To Remote Control Your Canon Camera

Requesting Gravatar...
Hi,

I'm planning on using the Canon SDK myself. It's great to see that you've already made this wrapper class that gets great reviews. I've just tried to launch it but I keep getting the message "No cameras found." What could possibly be the cause of this? I made sure it is plugged in and switched on, I can access it directly by Explorer.

I'm using a powershot A640 and the EDSDK2.6

I hope you could enlight me a bit or point me to some documentation.

Many thanks in advance,

Yves.
Left by Yves C. on Oct 20, 2009 10:04 AM

# re: EDSDK To Remote Control Your Canon Camera

Requesting Gravatar...
Have you encountered an issue with connecting to multiple cameras on windows Vista using the ED-SDK? We have found that if you try and do this, you always connect to the first camera... works fine on XP though...

We have been trying to figure out whether it's an issue with the canon driver's on Vista\Windows 7, or if it's a bug in the SDK. just wondered if you happened to know?

Thanks.
Left by dug on Oct 28, 2009 9:37 AM

# re: EDSDK To Remote Control Your Canon Camera

Requesting Gravatar...
Hi, how could we go through the camera's storage system and retrieve images?

Thanks
Left by Croydon on Nov 23, 2009 11:08 AM

# re: EDSDK To Remote Control Your Canon Camera

Requesting Gravatar...
Hi,
Can you give me example how to get Live View Camera, Please

Thanks
Left by LMR on Dec 14, 2009 7:36 PM

# re: EDSDK To Remote Control Your Canon Camera

Left by sam on Dec 17, 2009 12:18 AM

# re: EDSDK To Remote Control Your Canon Camera

Requesting Gravatar...
To dug: 2 cameras support works on XP, it doesn't work under Vista. We contacted Canon and an customer service representative told us that he doesn't know but he thinks that it will never be fixed, it is not in the interest of Canon company. They want 1 camera applications. Screw them!
Left by sty21um on Jan 07, 2010 4:01 PM

# re: EDSDK To Remote Control Your Canon Camera

Requesting Gravatar...
Hi, did you try to use your code with 2.7 version of EDSDK? It is working fine with 2.6, but failing for me on EdsDownload with "read stream" error.
Thanks
Left by Brian on Jan 20, 2010 7:53 AM

# Intensity in Candela

Requesting Gravatar...
Hi,

Is it possible to calculate (using EDSDK.dll) the Intensity of area of picture taken using Cannon 1000D?

Thanks,
Shrini
Left by Shrini on Jan 28, 2010 3:52 AM

# re: EDSDK To Remote Control Your Canon Camera

Requesting Gravatar...
Hi Wayne Hartman.

Hi Wayne Hartman.

Thank u very much for your application! I have used it as a development basis for my own application! I am using it to control the number, the settings and the schedules of the pictures.

Thanks!

Pedro

Left by Pedro Correia da Silva on Feb 15, 2010 8:13 AM

# Stream Read Error SDK 2.7

Requesting Gravatar...
Hi,

Brian told about the Stream Read Error. I have the same error by using the version 2.7. Unfortunately, I have a brand new EOS 7D and can't access it! It's really bad! Did anybody found a solution?

Mike
Left by Mike on Feb 20, 2010 9:07 AM

# re: EDSDK To Remote Control Your Canon Camera

Requesting Gravatar...
Dug, Were you able to fix the problem of the second camera in Windows7.

Thanks,
Raum
Left by Raum Pattikonda on Feb 25, 2010 2:32 AM

Your comment:

 (will show your gravatar)
 
Please add 6 and 4 and type the answer here: