aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/argaze/ArUcoMarkers/ArUcoCamera.py6
-rw-r--r--src/argaze/ArUcoMarkers/ArUcoDetector.py2
-rw-r--r--src/argaze/ArUcoMarkers/ArUcoMarker.py8
-rw-r--r--src/argaze/ArUcoMarkers/ArUcoMarkersDictionary.py2
-rw-r--r--src/argaze/ArUcoMarkers/ArUcoScene.py4
-rw-r--r--src/argaze/AreaOfInterest/AOIFeatures.py2
-rw-r--r--src/argaze/TobiiGlassesPro2/TobiiData.py4
7 files changed, 14 insertions, 14 deletions
diff --git a/src/argaze/ArUcoMarkers/ArUcoCamera.py b/src/argaze/ArUcoMarkers/ArUcoCamera.py
index 4ed8f9f..b2e4614 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.ndarray = field(default=numpy.array([0, 0]))
+ dimensions: numpy.array = field(default_factory=numpy.array([0, 0]))
"""Frame dimensions in pixels from which the calibration have been done."""
- K: numpy.ndarray = field(default=K0)
+ K: numpy.array = field(default_factory=K0)
"""Intrinsic parameters matrix (focal lengths and principal point)."""
- D: numpy.ndarray = field(default=D0)
+ D: numpy.array = field(default_factory=D0)
"""Distorsion coefficients vector."""
@classmethod
diff --git a/src/argaze/ArUcoMarkers/ArUcoDetector.py b/src/argaze/ArUcoMarkers/ArUcoDetector.py
index 53f56ff..0ce1753 100644
--- a/src/argaze/ArUcoMarkers/ArUcoDetector.py
+++ b/src/argaze/ArUcoMarkers/ArUcoDetector.py
@@ -32,7 +32,7 @@ class DetectorParameters():
.. note:: More details on [opencv page](https://docs.opencv.org/4.x/d1/dcd/structcv_1_1aruco_1_1DetectorParameters.html)
"""
- __parameters = aruco.DetectorParameters_create()
+ __parameters = aruco.DetectorParameters()
__parameters_names = [
'adaptiveThreshConstant',
'adaptiveThreshWinSizeMax',
diff --git a/src/argaze/ArUcoMarkers/ArUcoMarker.py b/src/argaze/ArUcoMarkers/ArUcoMarker.py
index 62da2ca..df82523 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.ndarray = field(init=False, repr=False)
+ corners: numpy.array = field(init=False, repr=False)
"""Estimated 2D corner positions in camera image referential."""
- translation: numpy.ndarray = field(init=False, repr=False)
+ translation: numpy.array = field(init=False, repr=False)
"""Estimated 3D center position in camera world referential."""
- rotation: numpy.ndarray = field(init=False, repr=False)
+ rotation: numpy.array = field(init=False, repr=False)
"""Estimated 3D marker rotation in camera world referential."""
- points: numpy.ndarray = field(init=False, repr=False)
+ points: numpy.array = field(init=False, repr=False)
"""Estimated 3D corners positions in camera world referential."""
@property
diff --git a/src/argaze/ArUcoMarkers/ArUcoMarkersDictionary.py b/src/argaze/ArUcoMarkers/ArUcoMarkersDictionary.py
index 4f87881..9be895b 100644
--- a/src/argaze/ArUcoMarkers/ArUcoMarkersDictionary.py
+++ b/src/argaze/ArUcoMarkers/ArUcoMarkersDictionary.py
@@ -84,7 +84,7 @@ class ArUcoMarkersDictionary():
self.__number = int(dict_name_split[2])
- self.__aruco_dict = aruco.Dictionary_get(all_aruco_markers_dictionaries[self.__name])
+ self.__aruco_dict = aruco.getPredefinedDictionary(all_aruco_markers_dictionaries[self.__name])
@property
def name(self)-> str:
diff --git a/src/argaze/ArUcoMarkers/ArUcoScene.py b/src/argaze/ArUcoMarkers/ArUcoScene.py
index 47e30df..63aa136 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.ndarray
+ translation: numpy.array
"""Position in scene referential."""
- rotation: numpy.ndarray
+ rotation: numpy.array
"""Rotation in scene referential."""
marker: dict
diff --git a/src/argaze/AreaOfInterest/AOIFeatures.py b/src/argaze/AreaOfInterest/AOIFeatures.py
index c1df8f1..583c755 100644
--- a/src/argaze/AreaOfInterest/AOIFeatures.py
+++ b/src/argaze/AreaOfInterest/AOIFeatures.py
@@ -17,7 +17,7 @@ AreaOfInterestType = TypeVar('AreaOfInterest', bound="AreaOfInterest")
class AreaOfInterest(numpy.ndarray):
"""Define Area Of Interest as an array of points of any dimension."""
- def __new__(cls, points: numpy.ndarray = numpy.empty(0)) -> AreaOfInterestType:
+ def __new__(cls, points: numpy.array = numpy.empty(0)) -> AreaOfInterestType:
"""View casting inheritance."""
return numpy.array(points).view(AreaOfInterest)
diff --git a/src/argaze/TobiiGlassesPro2/TobiiData.py b/src/argaze/TobiiGlassesPro2/TobiiData.py
index 87af44a..0e28054 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.ndarray
+ value: numpy.array
"""Accelerometer value"""
@dataclass
class Gyroscope():
"""Define gyroscope data (gy)."""
- value: numpy.ndarray
+ value: numpy.array
"""Gyroscope value"""
@dataclass