def del_keypoint(self, kp: KeyPoint) -> None: """ Remove a keypoint from the project :param kp: Keypoint to remove from the project :type kp: KeyPoint :return: """ assert kp._project is self.__project # Verify that no layers use the keypoint assert len(kp.layer_positions) == 0 kp._project = None self.__keypoints.remove(kp)
def add_keypoint(self, kp: KeyPoint) -> None: assert kp._project is None or kp._project is self.__project kp._project = self.__project self.__keypoints.append(kp)