-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvision_camera_settings.py
29 lines (20 loc) · 1.05 KB
/
vision_camera_settings.py
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
from sentio_prober_control.Sentio.ProberSentio import SentioProber
from sentio_prober_control.Sentio.Enumerations import CameraMountPoint
from sentio_prober_control.Communication.CommunicatorTcpIp import CommunicatorTcpIp
def main():
try:
prober = SentioProber(CommunicatorTcpIp.create("127.0.0.1:35555"))
prober.vision.camera.set_light(CameraMountPoint.Scope, 200)
light_val: int = prober.vision.camera.get_light(CameraMountPoint.Scope)
print("Light: {0}".format(light_val))
prober.vision.camera.set_exposure(CameraMountPoint.Scope, 100)
exposure_val: int = prober.vision.camera.get_exposure(CameraMountPoint.Scope)
print("Exposure: {0}".format(exposure_val))
prober.vision.camera.set_gain(CameraMountPoint.Scope, 5)
gain_val: int = prober.vision.camera.get_gain(CameraMountPoint.Scope)
print("Gain: {0}".format(gain_val))
except Exception as e:
print("\n#### Error ##################################")
print("{0}".format(e))
if __name__ == "__main__":
main()