cutcutcodec.core.io.read_image.read_image
- cutcutcodec.core.io.read_image.read_image(filename: str | bytes | Path) Tensor[source]
Read the image and make it compatible with Video Frame.
Parameters
- filenamepathlike
The pathlike of the image file.
Returns
- imagetorch.Tensor
The image in uint8 or float32 of shape (height, width, channels).
Raises
- cutcutcodec.core.exceptions.DecodeError
If it fails to read the image.