jim-easterbrook / python-gphoto2

Python interface to libgphoto2
GNU Lesser General Public License v3.0
362 stars 59 forks source link

Lengthy delay in capturing image #22

Closed brenthaas closed 7 years ago

brenthaas commented 8 years ago

I am trying to capture an image within a short time window from another action, (i.e. open shutter 50ms after event x) but I am finding that there is a consistent delay between when the call is made and when the shutter is opened. Is there a way to "immediately" trigger the shutter release?

I setup like this:

        self.context = gp.gp_context_new()
        self.camera = gp.check_result(gp.gp_camera_new())
        gp.check_result(gp.gp_camera_init(self.camera, self.context))

And this is the call that takes roughly 1.5 seconds to open the shutter:

        self.file_path = gp.check_result(
            gp.gp_camera_capture(self.camera, gp.GP_CAPTURE_IMAGE, self.context)
        )

Is there any way around this delay?

jim-easterbrook commented 8 years ago

Do you get a similar delay when using the gphoto2 command line program, or a C program making similar libgphoto2 calls? If so, then it's not a problem with the Python interface itself. It might be worth asking on the gphoto2 user mailing list - there may be someone there with the same model of camera who's already solved the problem.