summaryrefslogtreecommitdiff
path: root/test-cli/test/helpers/camara.py
diff options
context:
space:
mode:
authorManel Caro <mcaro@iatec.biz>2020-10-02 15:33:12 +0200
committerManel Caro <mcaro@iatec.biz>2020-10-02 15:33:12 +0200
commit5771dcc8acabd2f4f560768cf45615e929409f6e (patch)
treeaabda0a3a7f7853d87c8373c00082a1690f9e157 /test-cli/test/helpers/camara.py
parent48322d3c7d79b025dad02b6fd0466ac115f6f59a (diff)
downloadboard-5771dcc8acabd2f4f560768cf45615e929409f6e.zip
board-5771dcc8acabd2f4f560768cf45615e929409f6e.tar.gz
board-5771dcc8acabd2f4f560768cf45615e929409f6e.tar.bz2
fix execution camera setup script path not correct
Diffstat (limited to 'test-cli/test/helpers/camara.py')
-rw-r--r--test-cli/test/helpers/camara.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/test-cli/test/helpers/camara.py b/test-cli/test/helpers/camara.py
index afe8112..bcb1df7 100644
--- a/test-cli/test/helpers/camara.py
+++ b/test-cli/test/helpers/camara.py
@@ -4,6 +4,7 @@ import sh
class Camara(object):
__device_name = None
__device = None
+ __setupScriptPath = ''
__w = 1280
__h = 720
__contrast = 0.0
@@ -12,10 +13,11 @@ class Camara(object):
__hue = 0.0
__exposure = 166
- def __init__(self, device="video0", width=1280, height=720):
+ def __init__(self, setup_script_path, device="video0", width=1280, height=720):
self.__device_name = device
self.__w = width
self.__h = height
+ self.__setupScriptPath = setup_script_path;
def Close(self):
if self.__device is not None:
@@ -62,7 +64,8 @@ class Camara(object):
def __configure(self):
self.__w = self.__setCamVar(cv2.CAP_PROP_FRAME_WIDTH, self.__w)
self.__h = self.__setCamVar(cv2.CAP_PROP_FRAME_HEIGHT, self.__h)
- sh.bash("../scripts/v4l-cam.sh")
+ sh.bash(self.__setupScriptPath + '/test/scripts/v4l-cam.sh')
+ # sh.bash("../scripts/v4l-cam.sh")
def __setCamVar(self, key, val):
valold = cv2.VideoCapture.get(self.__device, key)