diff options
author | Theo De La Hogue | 2023-09-23 07:22:23 +0200 |
---|---|---|
committer | Theo De La Hogue | 2023-09-23 07:22:23 +0200 |
commit | 23fa1a7835b3c7cfd976b1d160878289b1f0657c (patch) | |
tree | acc107a975536f5d57ae269063efe7b613e6bc84 /src | |
parent | b947573f7dbccb5b2b13b64677192145f2dbb864 (diff) | |
download | argaze-23fa1a7835b3c7cfd976b1d160878289b1f0657c.zip argaze-23fa1a7835b3c7cfd976b1d160878289b1f0657c.tar.gz argaze-23fa1a7835b3c7cfd976b1d160878289b1f0657c.tar.bz2 argaze-23fa1a7835b3c7cfd976b1d160878289b1f0657c.tar.xz |
Fixing code annotation. Removing useless documentation section. Fixing documentation cross reference.
Diffstat (limited to 'src')
-rw-r--r-- | src/argaze/ArFeatures.py | 8 | ||||
-rw-r--r-- | src/argaze/ArUcoMarkers/ArUcoCamera.py | 6 | ||||
-rw-r--r-- | src/argaze/AreaOfInterest/AOI2DScene.py | 9 |
3 files changed, 13 insertions, 10 deletions
diff --git a/src/argaze/ArFeatures.py b/src/argaze/ArFeatures.py index ad17df2..54ef918 100644 --- a/src/argaze/ArFeatures.py +++ b/src/argaze/ArFeatures.py @@ -1044,7 +1044,7 @@ class ArFrame(): return image - def image(self, **kwargs) -> numpy.array: + def image(self, **kwargs: dict) -> numpy.array: """ Get frame image. @@ -1248,7 +1248,7 @@ class ArScene(): return ArScene(new_scene_name, new_layers, new_frames, **scene_data) - def estimate_pose(self, detected_features) -> Tuple[numpy.array, numpy.array]: + def estimate_pose(self, detected_features: Any) -> Tuple[numpy.array, numpy.array]: """Define abstract estimate scene pose method. Parameters: @@ -1298,7 +1298,7 @@ class ArScene(): # Project layer aoi scene yield name, aoi_scene_copy.project(tvec, rvec, self.parent.aruco_detector.optic_parameters.K) - def draw(self, image: numpy.array, **kwargs): + def draw(self, image: numpy.array, **kwargs: dict): """ Draw scene into image. @@ -1495,7 +1495,7 @@ class ArCamera(ArFrame): # Unlock camera frame exploitation self._frame_lock.release() - def image(self, **kwargs) -> numpy.array: + def image(self, **kwargs: dict) -> numpy.array: """ Get frame image. diff --git a/src/argaze/ArUcoMarkers/ArUcoCamera.py b/src/argaze/ArUcoMarkers/ArUcoCamera.py index 4f555fb..4c3f042 100644 --- a/src/argaze/ArUcoMarkers/ArUcoCamera.py +++ b/src/argaze/ArUcoMarkers/ArUcoCamera.py @@ -73,7 +73,7 @@ class ArUcoCamera(ArFeatures.ArCamera): return output @classmethod - def from_dict(self, aruco_camera_data, working_directory: str = None) -> ArUcoCameraType: + def from_dict(self, aruco_camera_data: dict, working_directory: str = None) -> ArUcoCameraType: """ Load ArUcoCamera from dictionary. @@ -211,7 +211,7 @@ class ArUcoCamera(ArFeatures.ArCamera): # Return dection time and exceptions return detection_time, exceptions - def __image(self, draw_detected_markers: dict = None, draw_scenes: dict = None, draw_optic_parameters_grid: dict = None, **kwargs) -> numpy.array: + def __image(self, draw_detected_markers: dict = None, draw_scenes: dict = None, draw_optic_parameters_grid: dict = None, **kwargs: dict) -> numpy.array: """Get frame image with ArUco detection visualisation. Parameters: @@ -253,7 +253,7 @@ class ArUcoCamera(ArFeatures.ArCamera): return image - def image(self, **kwargs) -> numpy.array: + def image(self, **kwargs: dict) -> numpy.array: """ Get frame image. diff --git a/src/argaze/AreaOfInterest/AOI2DScene.py b/src/argaze/AreaOfInterest/AOI2DScene.py index f6b8dcb..564f65c 100644 --- a/src/argaze/AreaOfInterest/AOI2DScene.py +++ b/src/argaze/AreaOfInterest/AOI2DScene.py @@ -125,20 +125,23 @@ class AOI2DScene(AOIFeatures.AOIScene): return aoi2D_scene ''' - def dimensionalize(self, frame_3d: AOIFeatures.AreaOfInterest, size: tuple) -> AOI3DSceneType: + def dimensionalize(self, rectangle_3d: AOIFeatures.AreaOfInterest, size: tuple) -> AOI3DSceneType: """ Convert to 3D scene considering it is inside of 3D rectangular frame. Parameters: - aoi_frame_3d: rectangle 3D AOI to use as referential plane + rectangle_3d: rectangle 3D AOI to use as referential plane size: size of the frame in pixel Returns: AOI 3D scene """ + assert(rectangle_3d.dimension == 3) + assert(rectangle_3d.points_number == 4) + # Vectorize outter_axis function - vfunc = numpy.vectorize(frame_3d.outter_axis) + vfunc = numpy.vectorize(rectangle_3d.outter_axis) # Prepare new AOI 3D scene aoi3D_scene = AOI3DScene.AOI3DScene() |