@@ -40,6 +40,7 @@ a('--ipv4', help='The IPv4 address on which the OPC UA server runs', default="0.
...
@@ -40,6 +40,7 @@ a('--ipv4', help='The IPv4 address on which the OPC UA server runs', default="0.
a('--port',help='The port on which the OPC UA server runs',default="4840")
a('--port',help='The port on which the OPC UA server runs',default="4840")
a('--camera',help='The index of the camera (i.e. indxed in /dev/videoX)',default=0)
a('--camera',help='The index of the camera (i.e. indxed in /dev/videoX)',default=0)
a('--headless',help='Run without screen in a headless mode (boolean, default=0)',default=False)
a('--headless',help='Run without screen in a headless mode (boolean, default=0)',default=False)
a('--mode',help='Mode of operation. The default is to read data from camera device. If set to 1 do NOT read data from camera device. (default=0)',default=0)
# XXX: allow to specify from CLI DEFAULT_LH & friends
# XXX: allow to specify from CLI DEFAULT_LH & friends
args=parser.parse_args()
args=parser.parse_args()
...
@@ -47,6 +48,7 @@ ipv4 = args.ipv4
...
@@ -47,6 +48,7 @@ ipv4 = args.ipv4
port=args.port
port=args.port
camera=int(args.camera)
camera=int(args.camera)
headless=bool(int(args.headless))
headless=bool(int(args.headless))
mode=bool(int(args.mode))
defnothing(x):
defnothing(x):
# any operation
# any operation
...
@@ -74,6 +76,7 @@ async def main():
...
@@ -74,6 +76,7 @@ async def main():
result_stack=[]
result_stack=[]
current_shape=0.0
current_shape=0.0
ifnotmode:
# init camera
# init camera
cap=cv2.VideoCapture(camera)
cap=cv2.VideoCapture(camera)
font=cv2.FONT_HERSHEY_COMPLEX
font=cv2.FONT_HERSHEY_COMPLEX
...
@@ -97,6 +100,7 @@ async def main():
...
@@ -97,6 +100,7 @@ async def main():
# recognition. Thus give (roughly) some CPU time so both can work together.
# recognition. Thus give (roughly) some CPU time so both can work together.