c++cameraedsdkcanon-sdk

Some questions about Canon Edsdk 2.14API with C++


I am a new programmer in C++ with the EDSDK 2.14. I am using a Canon EOS 5D Mark II and i have some questions to do (i'm starting the api, camera session, handlers, set capacity,my program take photos, set the correct parameters to the camera and i'm using windows message to treat some events) :

1) I need to save the photos in the host pc, i am doing this correct, but the camera only permits like 8 photos in the internal buffer and i need to test some combinations of parameters (AV,TV and ISO SPEED). I make a loop to take 10 photos when i press 's' (with windows message, callback), and only 8 photos was taken, the others have busy error, so i guess that is the internal buffer. How can i take more than 8 photos, changing the parameters correct with one windows event? ps: I tried to reopensession (close and open session with camera again) but was not a good idea, because the event handle of transfer (download image) was only set with the release of the object.

2) I tried to get one photo and download, but was not possible, when i press 's', the program wait to take the 8 photos, and after that the camera send the event callback to the handle for download all images. I want to press 's', and the program take one photo, download and take the others, if it is possible, how could i do this?

3) If i make a method to set the AV, TV , ISO Speed parameters, this will be sent to the camera in time to take the photo, or i need to wait something like a callback of the camera. If i need something like that, what event i need to use? ps: my program is all asynchronous, i am not using threads, only callbacks and windows event.

4) I search in internet about to put the correct focus, but some people said that is only possible in live view, and i can't use this in my application. It is possible to change focus without live view? ps: Because i need a good photo and the autofocus of the camera with my program, is not doing the same quality of images like the EOS Utility, and i am thinking if they have a pos-processing in the image taken or not

If i have more questions or i resolved the questions i will answer to all the community, because this too many guys are using this API and it's not too trivial. Sorry about my english, i am not native in this language, but i am trying to do my best.


Solution

  • ad 1) you need to download the image before the camera's internal buffer overflow, like you try in 2

    ad 2) make sure your program, after sending the first shot commands, somehow comes back in the 'global' event loop. This should give the EDSDK a chance to process camera events and send "download available" events to your callbacks. Take it from there

    ad 3) no guarantees whether these events are applied, you'd rather attach to a property change event (kEdsPropertyEvent_PropertyChanged) or poll some time after

    ad 4) you can use liveview and lens-based AF. For the latter, explore kEdsCameraCommand_ShutterButton_Halfway

    Care to share the goal of your project?