@@ -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('--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('--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
args=parser.parse_args()
...
...
@@ -47,6 +48,7 @@ ipv4 = args.ipv4
port=args.port
camera=int(args.camera)
headless=bool(int(args.headless))
mode=bool(int(args.mode))
defnothing(x):
# any operation
...
...
@@ -74,6 +76,7 @@ async def main():
result_stack=[]
current_shape=0.0
ifnotmode:
# init camera
cap=cv2.VideoCapture(camera)
font=cv2.FONT_HERSHEY_COMPLEX
...
...
@@ -97,6 +100,7 @@ async def main():
# recognition. Thus give (roughly) some CPU time so both can work together.