Skip to main content

imread_gray

Function imread_gray 

Source
pub fn imread_gray(path: impl AsRef<Path>) -> Result<Tensor, ImgProcError>
Expand description

Read an image file as grayscale ImageU8. Read an image as grayscale and return it as a [H, W, 1] f32 tensor with values in [0, 1].

Accepts any path-like type (&str, String, &Path, PathBuf, etc.).