Crate rten_imageio

Crate rten_imageio 

Source
Expand description

Provides utilities for loading, saving and preprocessing images for use with RTen.

The APIs are limited to keep them simple for the most common use cases. If you need more flexibility from a function, copy and adjust the implementation.

Enums§

ReadImageError
Errors reported when creating a tensor from an image.
WriteImageError
Errors returned when writing a tensor to an image.

Functions§

image_to_tensor
Convert an image into a CHW tensor with 3 channels and values in the range [0, 1].
read_image
Read an image from a file into a CHW tensor.
write_image
Convert a CHW tensor to an image and write it to a PNG file.