Due to the lack of a Canon SLR I currently do not maintain this project. Feel free to fork and play with it! Also: it seems the user yeroc has a newer version than me, you might fork that one instead …
Well, this is back to being maintained :)
The canon EDSDK is a great library to control pretty much any aspect of your canon SLR camera from any application.
Currently there are some very important limitations you shouldn’t forget:
1. It only works in windows
as I have now idea how dispatch messages on linux/mac os…. anyone? mac support is painful
2. Everything is in crazy development, things will change, a lot!
3. I’m not allowed allowed to include the required dll’s for the SDK, please apply for a download yourself. It might take a few days…
4. Parts of the code is based on the openframeworks classes for ofxCanonCameraWrapper.
First you need to apply and download the EDSK, it tooks four or five days for me.
Once you have the download copy the EDSDK folder into this project, you should see this:
edsdk4j - EDSDK - dll - Header
The examples inside src/gettingstarted should provide a good starting point.
You can either use the c-style api directly (example 1), but you won’t enjoy this (so look at examples 2, 3, …) instead :)
There is no mac version yet. These steps are necessary:
1. change all occurences of StdCallCallback (StdCallbackLibrary) to Callback (Library)
2. remove all reference to windows api’s. should be easy to find because they make your app crash when you launch :)
3. remove the dispatch message calls (peekMessage/dispatchMessage/translateMessage)
4. copy the edsdk framework to /Library/Frameworks or /System/Library/Frameworks
5. you’ll have to fiddle with the library loading a bit. it’s inside CanonCamera (i think)
6. if you would like to use callbacks (e.g. for downloading images) make sure to have some awt window open. calling
seems to be enough to get the nsapplication loop going.
to the JVM arguments to force 32bit mode. the edsdk isn’t 64bit mode yet