Multiple cameras and long exposures problem #146
-
The problem of controlling long exposures of multiple cameras can be approached by controlling a loop that first opens all the shutters, and after a given amount of seconds, closes the shutters and stores the image files. To trigger almost simultaneous all the camera exposures, a python code can loop over the camera port addresses and send a 'Press Full’(or ‘Immediate’) to open each shutter. In the sample code below, the shutter unexpectedly closes immediately after the ‘Press Full’ command sent to a set of Canon EOS 5D-Mark III cameras preset to Bulb. What can be done to prevent the shutter from closing without waiting for a Release Full command from a second loop?
|
Beta Was this translation helpful? Give feedback.
Replies: 8 comments 1 reply
-
I've no idea. I've never tried to do anything like this. |
Beta Was this translation helpful? Give feedback.
-
One thought - you are selecting your camera in the |
Beta Was this translation helpful? Give feedback.
-
You are making an excellent point. I totally agree with you. What if I
define an array that keeps reference of each camera, port number and state.
This way the code not only can monitor if a camera goes out of scope but
also can be easily adjusted in the case of cameras of different types.
…On Fri, Nov 4, 2022 at 3:49 AM Jim Easterbrook ***@***.***> wrote:
One thought - you are selecting your camera in the _do_expose method, but
I'd expect that to be done in the class __init__. You need one object per
camera which will keep a reference to that camera. If the camera goes out
of scope I would expect the exposure to end.
—
Reply to this email directly, view it on GitHub
<#146 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AD5BKNU6EMQUMW3OHWDRJJ3WGS5ZBANCNFSM6AAAAAARWOVGR4>
.
You are receiving this because you authored the thread.Message ID:
<jim-easterbrook/python-gphoto2/repo-discussions/146/comments/4054294@
github.com>
--
Dr. Alex Coletti <http://www.linkedin.com/pub/alex-coletti/b/6bb/535>
Mobile: (301) 920-6669
Linkedin <http://www.linkedin.com/pub/alex-coletti/b/6bb/535>
|
Beta Was this translation helpful? Give feedback.
-
Whatever you're comfortable with. I would use a more object oriented approach, defining a class to represent a camera, with methods such as
|
Beta Was this translation helpful? Give feedback.
-
Thanks! I like it more pythonic! I made a similar code that I tested on
one single camera and works fine (the shutter stays open). The only
difference is in the portion that searches for the camera
…On Fri, Nov 4, 2022 at 6:09 AM Jim Easterbrook ***@***.***> wrote:
Whatever you're comfortable with. I would use a more object oriented
approach, defining a class to represent a camera, with methods such as
start_exposure and stop_exposure. Then have an array of instances of that
class. You could also have derived classes for different camera types. I
don't think you need to hang on to the port number once you've connected to
the camera though.
for c in camera_list:
c.start_exposure()
time.sleep(30)
for c in camera_list:
c.stop_exposure()
—
Reply to this email directly, view it on GitHub
<#146 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AD5BKNS6JHFF5X6KT7RPDUDWGTOGLANCNFSM6AAAAAARWOVGR4>
.
You are receiving this because you authored the thread.Message ID:
<jim-easterbrook/python-gphoto2/repo-discussions/146/comments/4055402@
github.com>
--
Dr. Alex Coletti <http://www.linkedin.com/pub/alex-coletti/b/6bb/535>
Mobile: (301) 920-6669
Linkedin <http://www.linkedin.com/pub/alex-coletti/b/6bb/535>
|
Beta Was this translation helpful? Give feedback.
-
One more question though. Without a usb/port number, how can 'c' find the
right camera for the start_exposure and stop_exposure methods? Are you
thinking of adding in each method a search for the serial number?
…On Fri, Nov 4, 2022 at 6:09 AM Jim Easterbrook ***@***.***> wrote:
Whatever you're comfortable with. I would use a more object oriented
approach, defining a class to represent a camera, with methods such as
start_exposure and stop_exposure. Then have an array of instances of that
class. You could also have derived classes for different camera types. I
don't think you need to hang on to the port number once you've connected to
the camera though.
for c in camera_list:
c.start_exposure()
time.sleep(30)
for c in camera_list:
c.stop_exposure()
—
Reply to this email directly, view it on GitHub
<#146 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AD5BKNS6JHFF5X6KT7RPDUDWGTOGLANCNFSM6AAAAAARWOVGR4>
.
You are receiving this because you authored the thread.Message ID:
<jim-easterbrook/python-gphoto2/repo-discussions/146/comments/4055402@
github.com>
--
Dr. Alex Coletti <http://www.linkedin.com/pub/alex-coletti/b/6bb/535>
Mobile: (301) 920-6669
Linkedin <http://www.linkedin.com/pub/alex-coletti/b/6bb/535>
|
Beta Was this translation helpful? Give feedback.
-
It finds the camera when you create an instance of your class. Then keeps a reference to the python-gphoto2 Camera object which is used for all subsequent interactions. |
Beta Was this translation helpful? Give feedback.
-
Wow! Thanks
…On Fri, Nov 4, 2022 at 9:57 AM Jim Easterbrook ***@***.***> wrote:
It finds the camera when you create an instance of your class. Then keeps
a reference to the python-gphoto2 Camera object which is used for all
subsequent interactions.
—
Reply to this email directly, view it on GitHub
<#146 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AD5BKNUTDTHX4LBQXYBOG3DWGUI47ANCNFSM6AAAAAARWOVGR4>
.
You are receiving this because you authored the thread.Message ID:
<jim-easterbrook/python-gphoto2/repo-discussions/146/comments/4057147@
github.com>
--
Dr. Alex Coletti <http://www.linkedin.com/pub/alex-coletti/b/6bb/535>
Mobile: (301) 920-6669
Linkedin <http://www.linkedin.com/pub/alex-coletti/b/6bb/535>
|
Beta Was this translation helpful? Give feedback.
It finds the camera when you create an instance of your class. Then keeps a reference to the python-gphoto2 Camera object which is used for all subsequent interactions.