Answer the question
In order to leave comments, you need to log in
How to parallelize control of Canon cameras in EDSDK via QThread?
Good afternoon.
The situation is as follows - there are two Canon EOS550D cameras connected to the same computer, which you want to make take pictures as simultaneously as possible.
Management is carried out using EDSDK 2.10.
For this purpose, classes of threads based on QThread were created, the task of which is to send a photographing command to the camera and save the resulting image to disk.
When trying to start, if one camera cannot focus for some time, the second one does nothing, although the threads, judging by the issuance of debug messages, go honestly in parallel.
Is this a limitation of the SDK itself that cannot be bypassed or am I doing something wrong?
Answer the question
In order to leave comments, you need to log in
For this, thread classes based on QThread were created.
With parallelism in Qt, I just started to understand, maybe I really misunderstood something. It looks like this:
There are two thread objects in the control class, if you need to take a snapshot, the following function is called
void CameraController::testShot()
{
leftCameraThread->setPath(path1);
leftCameraThread->start();
rightCameraThread->setPath(path2);
rightCameraThread->start();
}
void CameraControlThread::run()
{
EdsSendCommand(_camera, kEdsCameraCommand_TakePicture , 0);
}
It may be too late, but:
Your cameras must support the Picture Transfer Protocol, try to organize interaction through it. Here there are links to libraries for working with such cameras, there is also a console utility where you can test. There is also a Java library.
In addition, if you are working on OS X, there is a framework that allows you to work with PTP cameras, perform simple operations (take a picture) and send “raw” PTP commands to the device.
Through PTP (if the camera supports it), you can adjust shooting parameters such as shutter speed, aperture, sensitivity, etc.
For a demonstration of the possibilities, try Icarus Camera Control - sourceforge.net/projects/camctl/
Hope it helps.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question