robokudo.annotators.sift_annotator ================================== .. py:module:: robokudo.annotators.sift_annotator Classes ------- .. autoapisummary:: robokudo.annotators.sift_annotator.SIFTAnnotator Module Contents --------------- .. py:class:: SIFTAnnotator(name: str = 'SIFTAnnotator') Bases: :py:obj:`robokudo.annotators.core.ThreadedAnnotator` Annotator for SIFT feature extraction and matching using OpenCV. .. py:attribute:: _sift :type: cv2.SIFT SIFT feature extractor. .. py:method:: compute() -> py_trees.common.Status Compute the SIFT features of the current image and match them to the last image. :return: The status of the computation. .. py:method:: _draw_visualization(color_image: numpy.typing.NDArray[numpy.uint8], vis_image: numpy.typing.NDArray[numpy.uint8], current_kp: typing_extensions.Sequence[cv2.KeyPoint]) -> numpy.typing.NDArray[numpy.uint8] Add visualizations to the image. :param color_image: The current color image. :param vis_image: The image to add visualizations to. :param current_kp: The keypoints from the current image. :return: The image with visualizations. .. py:method:: _keypoints_to_point_cloud(keypoints: typing_extensions.List[cv2.KeyPoint], depth_image: numpy.typing.NDArray, intrinsics: open3d.camera.PinholeCameraIntrinsic, depth_ratio: typing_extensions.Tuple[float, float] = (1.0, 1.0), depth_scale: float = 1000.0, max_depth: float = 3.0) -> open3d.geometry.PointCloud Project the keypoints to a 3D point cloud. :param keypoints: The keypoints to project to 3D. :param depth_image: The depth image used for projection. :param intrinsics: The camera intrinsics used for projection. :param depth_ratio: The ratio of the depth image to the color image. :param depth_scale: The depth scale of the depth image. :param max_depth: The maximum depth to project. :return: The 3D point cloud. .. py:method:: _keypoint_colors(keypoints: typing_extensions.List[cv2.KeyPoint], responses: numpy.typing.NDArray) -> numpy.typing.NDArray[numpy.float64] :staticmethod: Get rgb colors for keypoints based on their responses and angles. :param keypoints: The keypoints. :param responses: The keypoints responses. :return: The rgb colors.