From f03df1b3b3f93688ec24cdda93890c10dc597031 Mon Sep 17 00:00:00 2001 From: Joel Klimont Date: Fri, 18 Nov 2022 17:19:40 +0100 Subject: [PATCH] updated opencv documentation (camera module) added enabling of legacy support for the camera module to the postinstall script --- client/compLib/Camera.py | 4 +--- client/docs/source/lib/classes/Opencv.rst | 13 +++++++++++++ client/docs/source/lib/index.rst | 1 + client/postinstall.sh | 2 ++ 4 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 client/docs/source/lib/classes/Opencv.rst diff --git a/client/compLib/Camera.py b/client/compLib/Camera.py index 125fe8b..3a7d764 100644 --- a/client/compLib/Camera.py +++ b/client/compLib/Camera.py @@ -1,7 +1,5 @@ import sys -from typing import Tuple, Any - -import numpy as np +from typing import Any # build image is somehow different from raspberry image? opencv-python is installed to a directory which is not in the pythonpath by default.... sys.path.append("/usr/lib/python3.9/site-packages") diff --git a/client/docs/source/lib/classes/Opencv.rst b/client/docs/source/lib/classes/Opencv.rst new file mode 100644 index 0000000..bd299c1 --- /dev/null +++ b/client/docs/source/lib/classes/Opencv.rst @@ -0,0 +1,13 @@ +.. _lib_camera: + +Camera und OpenCV +******************* + +Dokumentation des Camera Moduls +================================ + +.. autoclass:: compLib.Camera.Marker + :members: + +.. autoclass:: compLib.Camera.Camera + :members: diff --git a/client/docs/source/lib/index.rst b/client/docs/source/lib/index.rst index 4ca5dec..d781e5e 100644 --- a/client/docs/source/lib/index.rst +++ b/client/docs/source/lib/index.rst @@ -9,3 +9,4 @@ compLib classes/IRSensor classes/Seeding classes/DoubleElimination + classes/Opencv diff --git a/client/postinstall.sh b/client/postinstall.sh index 2612645..a6a94da 100644 --- a/client/postinstall.sh +++ b/client/postinstall.sh @@ -9,6 +9,8 @@ pip3 install requests flask echo "Setting up nginx rtmp server" sudo /etc/init.d/nginx start +sudo raspi-config nonint do_legacy 0 + { echo 'load_module "modules/ngx_rtmp_module.so";' echo 'worker_processes auto;'