Open eghbalhosseini opened 6 years ago
cam.trigger.mode = "0"
cam.trigger.source = "0"
cam.trigger.active="True"`
does not make sense. Those are not strings. Please clean up your code and produce a minimal example.
Thanks, I updated the file and currently using this code, while sending a pulse to input zero of the Grasshopper GPIO line. The Frame output is alway none, if I try poll=False, it remain indefinitely to the capture state. I am wondering if there is an alternative way to capture for trigger mode, or if there is an example code I can start with.
cam=Camera()
modes=cam.modes
cam.mode=modes[1]
cam.mode.setup((360,360), (300,200), "MONO8") # head free setup
cam.exposure.active = False
cam.gamma.active = False
cam.trigger.mode = '0'
cam.trigger.source = '0'
cam.trigger.active=True
cam.trigger.source
cam.start_capture()
cam.start_video()
time.sleep(1)
frame=None
frame = cam.dequeue(poll=True)
cam.stop_video()
cam.stop_capture()
And you are sure trigger mode 0 and source 0 are what works with your camera and setup? What do sources()
and modes()
give you? Are you using the correct polarity?
I remember that mode 14 and source 0 worked fine with the chameleon 2.
I am using point gray grasshopper so I think the hardware setups are similar for sources I get:
[u'0', u'2', u'3', u'SOFTWARE']
and I use this as a reference : https://www.ptgrey.com/KB/10250 and for modes:
[<pydc1394.camera2.Format7 at 0x11656d4d0>,
<pydc1394.camera2.Format7 at 0x11656d510>,
<pydc1394.camera2.Format7 at 0x11656d550>]
is there a sample code for external trigger that I could look into
trigger.modes()
, not Camera.modes()
.
sorry about that
cam.trigger.modes()
[u'0', u'1', u'14', u'15']
Hmm. Then I don't know. I don't have access to those cameras anymore. Maybe someone else can provide the answer. In general pydc1394
is a very thin wrapper over libdc1394
. If you can do it over libdc1394
you can do it here as well.
Hi I am trying to run camera with external trigger, but when I use frame = cam.dequeue(poll=True) the output is always false. Here is how I initialize the camera:
I'd appreciate if I could have your help on this issue
Thanks, Eghbal