aboutsummaryrefslogtreecommitdiff
path: root/src/argaze/ArFeatures.py
diff options
context:
space:
mode:
authorThéo de la Hogue2023-10-10 18:09:02 +0200
committerThéo de la Hogue2023-10-10 18:09:02 +0200
commitb8ea27be0fdaba40c49b93a2e84756fb00c6cde5 (patch)
treec6732acbcb99890e4ae686c27bf1e9d836b1a47f /src/argaze/ArFeatures.py
parentd7107ed868229b9665ee7432dcdc1da90c97c75a (diff)
downloadargaze-b8ea27be0fdaba40c49b93a2e84756fb00c6cde5.zip
argaze-b8ea27be0fdaba40c49b93a2e84756fb00c6cde5.tar.gz
argaze-b8ea27be0fdaba40c49b93a2e84756fb00c6cde5.tar.bz2
argaze-b8ea27be0fdaba40c49b93a2e84756fb00c6cde5.tar.xz
Adding visual HFOV and VFOV parameter to ArCamera. Using them into ArScene project method and ArUcoCamera class.
Diffstat (limited to 'src/argaze/ArFeatures.py')
-rw-r--r--src/argaze/ArFeatures.py10
1 files changed, 8 insertions, 2 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):