forked from SintefManufacturing/python-aravis
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstreaming-plot.py
More file actions
31 lines (28 loc) · 973 Bytes
/
Copy pathstreaming-plot.py
File metadata and controls
31 lines (28 loc) · 973 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
from aravis import Camera
import time
import matplotlib
#from pylab import bar, plot, show, legend, axis, subplot
import matplotlib.pyplot as plt
if __name__ == "__main__":
#cam = ar.get_camera("Prosilica-02-2130A-06106")
cam = Camera("AT-Automation Technology GmbH-20805103")
cam.set_feature("GevSCPSPacketSize", 1500)
cam.start_acquisition_continuous()
try:
start = True
while True:
frame = cam.pop_frame()
print(frame.shape)
plt.clf()
plt.plot(frame.T)
if start:
print("showing")
plt.show(block=False)
start = False
else:
plt.draw()
#from IPython.frontend.terminal.embed import InteractiveShellEmbed
#ipshell = InteractiveShellEmbed( banner1="\nStarting IPython shell, robot object is available\n")
#ipshell(local_ns=locals())
finally:
cam.stop_acquisition()