aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThéo de la Hogue2023-02-20 09:56:09 +0100
committerThéo de la Hogue2023-02-20 09:56:09 +0100
commit051281dda49cf7de68dab863c3261def80ad9a8b (patch)
tree65a0d0c245c1223e92d08d144d86b8afc4565914
parent9ce64a6c47156fe28e484633e2c8932c682fbf85 (diff)
downloadargaze-051281dda49cf7de68dab863c3261def80ad9a8b.zip
argaze-051281dda49cf7de68dab863c3261def80ad9a8b.tar.gz
argaze-051281dda49cf7de68dab863c3261def80ad9a8b.tar.bz2
argaze-051281dda49cf7de68dab863c3261def80ad9a8b.tar.xz
Using numpy.ndarray instead of numpy.array to define attribute type in dataclass.
-rw-r--r--src/argaze/ArUcoMarkers/ArUcoCamera.py6
-rw-r--r--src/argaze/ArUcoMarkers/ArUcoMarker.py8
-rw-r--r--src/argaze/ArUcoMarkers/ArUcoScene.py4
-rw-r--r--src/argaze/TobiiGlassesPro2/TobiiData.py4
4 files changed, 11 insertions, 11 deletions
diff --git a/src/argaze/ArUcoMarkers/ArUcoCamera.py b/src/argaze/ArUcoMarkers/ArUcoCamera.py
index eea4393..4ed8f9f 100644
--- a/src/argaze/ArUcoMarkers/ArUcoCamera.py
+++ b/src/argaze/ArUcoMarkers/ArUcoCamera.py
@@ -19,13 +19,13 @@ class CalibrationData():
rms: float = field(default=0)
"""Root Mean Square error of calibration."""
- dimensions: numpy.array = field(default=numpy.array([0, 0]))
+ dimensions: numpy.ndarray = field(default=numpy.array([0, 0]))
"""Frame dimensions in pixels from which the calibration have been done."""
- K: numpy.array = field(default=K0)
+ K: numpy.ndarray = field(default=K0)
"""Intrinsic parameters matrix (focal lengths and principal point)."""
- D: numpy.array = field(default=D0)
+ D: numpy.ndarray = field(default=D0)
"""Distorsion coefficients vector."""
@classmethod
diff --git a/src/argaze/ArUcoMarkers/ArUcoMarker.py b/src/argaze/ArUcoMarkers/ArUcoMarker.py
index df82523..62da2ca 100644
--- a/src/argaze/ArUcoMarkers/ArUcoMarker.py
+++ b/src/argaze/ArUcoMarkers/ArUcoMarker.py
@@ -21,16 +21,16 @@ class ArUcoMarker():
size: float
"""Size of marker in centimeters."""
- corners: numpy.array = field(init=False, repr=False)
+ corners: numpy.ndarray = field(init=False, repr=False)
"""Estimated 2D corner positions in camera image referential."""
- translation: numpy.array = field(init=False, repr=False)
+ translation: numpy.ndarray = field(init=False, repr=False)
"""Estimated 3D center position in camera world referential."""
- rotation: numpy.array = field(init=False, repr=False)
+ rotation: numpy.ndarray = field(init=False, repr=False)
"""Estimated 3D marker rotation in camera world referential."""
- points: numpy.array = field(init=False, repr=False)
+ points: numpy.ndarray = field(init=False, repr=False)
"""Estimated 3D corners positions in camera world referential."""
@property
diff --git a/src/argaze/ArUcoMarkers/ArUcoScene.py b/src/argaze/ArUcoMarkers/ArUcoScene.py
index a54c100..c9d792b 100644
--- a/src/argaze/ArUcoMarkers/ArUcoScene.py
+++ b/src/argaze/ArUcoMarkers/ArUcoScene.py
@@ -26,10 +26,10 @@ ArUcoSceneType = TypeVar('ArUcoScene', bound="ArUcoScene")
class Place():
"""Define a place as a pose and a marker."""
- translation: numpy.array
+ translation: numpy.ndarray
"""Position in scene referential."""
- rotation: numpy.array
+ rotation: numpy.ndarray
"""Rotation in scene referential."""
marker: dict
diff --git a/src/argaze/TobiiGlassesPro2/TobiiData.py b/src/argaze/TobiiGlassesPro2/TobiiData.py
index 0e28054..87af44a 100644
--- a/src/argaze/TobiiGlassesPro2/TobiiData.py
+++ b/src/argaze/TobiiGlassesPro2/TobiiData.py
@@ -62,14 +62,14 @@ class Event():
class Accelerometer():
"""Define accelerometer data (ac)."""
- value: numpy.array
+ value: numpy.ndarray
"""Accelerometer value"""
@dataclass
class Gyroscope():
"""Define gyroscope data (gy)."""
- value: numpy.array
+ value: numpy.ndarray
"""Gyroscope value"""
@dataclass