-
Notifications
You must be signed in to change notification settings - Fork 33
Home
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:
- It only works in windows - mac support is painful and currently crashes
- We are not allowed to include the required dll's for the SDK, please apply for a download yourself. It might take a few days...
- Parts of the code is based on the openframeworks classes for ofxCanonCameraWrapper.
First you need to apply and download the EDSK, it might take a few days and you may not be accepted if you are trying to use this for personal use only.
Once you have the download copy the EDSDK folder into this project, you should see this:
edsdk4j
- EDSDK
- dll
- Header
After those two steps import the project in eclipse, all the required files are included.
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 working mac version yet. See https://github.com/kritzikratzi/edsdk4j/issues/23 These steps are necessary:
- change all occurences of StdCallCallback (StdCallbackLibrary) to Callback (Library)
- remove all reference to windows api's. should be easy to find because they make your app crash when you launch :)
- remove the dispatch message calls (peekMessage/dispatchMessage/translateMessage)
- copy the edsdk framework to /Library/Frameworks or /System/Library/Frameworks
- ✓ fiddle with the library loading a bit.
- if you would like to use callbacks (e.g. for downloading images) make sure to have some awt window open. calling
new Frame().dispose();
seems to be enough to get the nsapplication loop going. - ✓ The
-d32
JVM arguments to force 32bit mode doesn't help anymore since JDK 7. The latest edsdk is 64bit mode and needs to be used . good luck :)
Until 2016 the build environment for this project was ant which is now deprecated. You might want to use maven to get more mileage.
To build the jar file run
mvn package
The ant build.xml is deprecated and might need some fiddling to get it work again
ant
mvn test
<!-- https://mvnrepository.com/artifact/com.nativelibs4java/maven-jnaerator-plugin -->
<dependency>
<groupId>com.nativelibs4java</groupId>
<artifactId>maven-jnaerator-plugin</artifactId>
<version>0.12</version>
</dependency>
pre 2010 - who?: 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 ...-
2010 kritikratzi (Hansi Raber):
since 2014-08 at github:
- https://github.com/kritzikratzi/edsdk4j 14 other Forks e.g.
- https://github.com/yeroc/edsdk4j
2014/2015: Ananta Palani
- Added most of the missing constants and commands
- Cleaned and improved the project all around
2016 Wolfgang Fahl:
- https://github.com/BITPlan/edsdk4j/ merged here on 2016-08-23