blob: 3dfe3dac8951c09adc2c1f421975b87a207da192 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
from time import sleep
from pymba import Vimba
from examples.camera.display_frame import display_frame
if __name__ == '__main__':
with Vimba() as vimba:
camera = vimba.camera(0)
camera.open()
# arm the camera and provide a function to be called upon frame ready
camera.arm('Continuous', display_frame)
camera.start_frame_acquisition()
# stream images for a while...
sleep(5)
# stop frame acquisition
# start_frame_acquisition can simply be called again if the camera is still armed
camera.stop_frame_acquisition()
camera.disarm()
camera.close()
|