geo3d.geometry.transforms ========================= .. py:module:: geo3d.geometry.transforms Classes ------- .. autoapisummary:: geo3d.geometry.transforms.Translate geo3d.geometry.transforms.MinNormalize geo3d.geometry.transforms.MeanNormalize geo3d.geometry.transforms.Scale geo3d.geometry.transforms.Jitter geo3d.geometry.transforms.Drop geo3d.geometry.transforms.Flip geo3d.geometry.transforms.Rotate Module Contents --------------- .. py:class:: Translate(vector: tuple[float, float, float]) Class to translate a point cloud. .. py:attribute:: vector .. py:method:: __call__(data: numpy.typing.NDArray[numpy.floating]) -> numpy.typing.NDArray[numpy.floating] Apply the translation to a 3D array. :param data: An array of shape (n, 3). :type data: np.ndarray :returns: The transformed array of shape (n, 3). :rtype: np.ndarray .. py:class:: MinNormalize Class to normalize a point cloud by its minimum values. .. py:method:: __call__(data: numpy.typing.NDArray[numpy.floating]) -> numpy.typing.NDArray[numpy.floating] Apply the normalization to a 3D array.. :param data: An array of shape (n, 3). :type data: np.ndarray :returns: The normalized array of shape (n, 3). :rtype: np.ndarray .. py:class:: MeanNormalize Class to normalize a point cloud by its mean values. .. py:method:: __call__(data: numpy.typing.NDArray[numpy.floating]) -> numpy.typing.NDArray[numpy.floating] Apply the normalization to a 3D array. :param data: An array of shape (n, 3). :type data: np.ndarray :returns: The normalized array of shape (n, 3). :rtype: np.ndarray .. py:class:: Scale(range: tuple[float, float] = (0.8, 1.2)) Class to scale a point cloud. .. py:attribute:: range :value: (0.8, 1.2) .. py:method:: __call__(data: numpy.typing.NDArray[numpy.floating]) -> numpy.typing.NDArray[numpy.floating] Apply the scaling to a 3D array.. :param data: An array of shape (n, 3) :type data: np.ndarray :returns: The scaled array of shape (n, 3). :rtype: np.ndarray .. py:class:: Jitter(sigma: float = 0.01, clip: float = 0.05) Class to jitter a point cloud. The Jitter is designed to add random noise to a point cloud. The noise is a Gaussian noise scaled by a sigma value and limited by a clip value. .. py:attribute:: sigma :value: 0.01 .. py:attribute:: clip :value: 0.05 .. py:method:: __call__(data: numpy.typing.NDArray[numpy.floating]) -> numpy.typing.NDArray[numpy.floating] Apply the jittering to a 3D array. :param data: An array of shape (n, 3) :type data: np.ndarray :returns: The jittered array of shape (n, 3). :rtype: np.ndarray .. py:class:: Drop(ratio: float = 0.3) Class to drop points of a point cloud. .. py:attribute:: ratio :value: 0.3 .. py:method:: __call__(data: numpy.typing.NDArray[numpy.floating]) -> tuple[numpy.typing.NDArray[numpy.floating], numpy.typing.NDArray] Apply the dropping to a 3D array. :param data: An array of shape (n, 3) :type data: np.ndarray :returns: A tuple of the dropped points and their relative indices. :rtype: (np.ndarray, np.ndarray) .. py:class:: Flip Class to flip points between axes x to y of a point cloud. .. py:method:: __call__(data: numpy.typing.NDArray[numpy.floating]) -> numpy.typing.NDArray[numpy.floating] Apply the flip to a 3D array. :param data: An array of shape (n, 3) :type data: np.ndarray :returns: The flipped array of shape (n, 3). :rtype: np.ndarray .. py:class:: Rotate(angle: float, rotation_centered: bool = False) Class to rotate a point cloud around the Z-axis. .. py:attribute:: angle .. py:attribute:: rotation_centered :value: False .. py:method:: __call__(data: numpy.typing.NDArray[numpy.floating]) -> numpy.typing.NDArray[numpy.floating] Apply the rotation to a 3D array. :param data: An array of shape (n, 3) :type data: np.ndarray :returns: The rotated array of shape (n, 3). :rtype: np.ndarray