React Native OCR - v0.11.0
    Preparing search index...

    Function rotateTensor

    • Rotates a uint8 [height, width, channels] image tensor clockwise by 90, 180 or 270 degrees.

      Runs cv::rotate natively; the result is a new tensor of shape [width, height, channels] for 90 and 270 and [height, width, channels] for 180. The caller owns both tensors.

      Parameters

      • image: Tensor

        The image to rotate.

      • degrees: RotationDegrees

        The clockwise rotation.

      Returns Tensor

      A newly allocated tensor holding the rotated image.

      With code INVALID_ARGUMENT when image is not a uint8 rank-3 tensor.