aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/argaze/ArFeatures.py10
-rw-r--r--src/argaze/ArUcoMarkers/ArUcoCamera.py2
2 files changed, 9 insertions, 3 deletions
diff --git a/src/argaze/ArFeatures.py b/src/argaze/ArFeatures.py
index 02da0fe..1b24957 100644
--- a/src/argaze/ArFeatures.py
+++ b/src/argaze/ArFeatures.py
@@ -1239,13 +1239,14 @@ class ArScene():
raise NotImplementedError('estimate_pose() method not implemented')
- def project(self, tvec: numpy.array, rvec: numpy.array, visual_hfov: float = 0.) -> Tuple[str, AOI2DScene.AOI2DScene]:
- """Project layers according estimated pose and optional horizontal field of view clipping angle.
+ def project(self, tvec: numpy.array, rvec: numpy.array, visual_hfov: float = 0., visual_vfov: float = 0.) -> Tuple[str, AOI2DScene.AOI2DScene]:
+ """Project layers according estimated pose and optional field of view clipping angles.
Parameters:
tvec: translation vector
rvec: rotation vector
visual_hfov: horizontal field of view clipping angle
+ visual_vfov: vertical field of view clipping angle
Returns:
layer_name: name of projected layer
@@ -1255,6 +1256,7 @@ class ArScene():
for name, layer in self.layers.items():
# Clip AOI out of the visual horizontal field of view (optional)
+ # TODO: use HFOV and VFOV and don't use vision_cone method
if visual_hfov > 0:
# Transform layer aoi scene into camera referential
@@ -1293,9 +1295,13 @@ class ArCamera(ArFrame):
Parameters:
scenes: all scenes to project into camera frame
+ visual_hfov: Optional angle in degree to clip scenes projection according visual horizontal field of view (HFOV).
+ visual_vfov: Optional angle in degree to clip scenes projection according visual vertical field of view (VFOV).
"""
scenes: dict = field(default_factory=dict)
+ visual_hfov: float = field(default=0.)
+ visual_vfov: float = field(default=0.)
def __post_init__(self):
diff --git a/src/argaze/ArUcoMarkers/ArUcoCamera.py b/src/argaze/ArUcoMarkers/ArUcoCamera.py
index 33f5b37..f39c516 100644
--- a/src/argaze/ArUcoMarkers/ArUcoCamera.py
+++ b/src/argaze/ArUcoMarkers/ArUcoCamera.py
@@ -196,7 +196,7 @@ class ArUcoCamera(ArFeatures.ArCamera):
tvec, rmat, _, _ = scene.estimate_pose(self.aruco_detector.detected_markers)
# Project scene into camera frame according estimated pose
- for layer_name, layer_projection in scene.project(tvec, rmat):
+ for layer_name, layer_projection in scene.project(tvec, rmat, self.visual_hfov, self.visual_vfov):
try: