I’m new here, I’ve ordered the CamH7 and a have a first question.
I’ve seen in the examples that for acquiring a video, one takes several snapshots.
In my project (pick and place machine), I want to take a snapshot from a moving part that pass in front of the cam (say from left to right). For this I need a precise triggering of the sensor, I can’t afford a millisecond time delay, only a few microsecond.
Is it possible to have for example the function snapshot() that hangs until the camera receive a trigger (exposure) signal and fill the buffer?
Yes, you just make a loop that spins until an I/O pin goes high:
Then call snapshot afterwards.
I wouldn’t count of getting microsecond accuracy… but, this should give you sub-millisecond level.
Disable the frame buffer BTW when doing this. The camera always jpeg compresses an image before capturing a new one. So, that will mess up your timing. Then you need to put the MT9V034 in triggered mode.
Thank you for your response.
But my idea was precisely to not doing like this because it falls under the interpreter: while(!pin.value()): pass. And my fear is that it will take too much time.
I was thinking about a blocking snapshot() that wait until it receive an image and the cam to be triggered via an external signal.
Hence the exposure will be done exactly at a rising edge of a pulse, and then the image is transferred to buffer.
I think this can be a good feature to synchronize precisely the exposure with an external event.
This could be something to add to snapshot. Like a parameter. Open an issue for it on our github as a feature request.
Ok thanks, I’ll before play a bit with the devices I’ve just received