Transform an image to tensor using libtorch

Hello everyone. I’m am using the c++ version of Pytorch called libtorch. Do you know a standard way to convert an image into a tensor with libtorch?

You could load and process an image with OpenCV and transform it to a tensor via torch::from_blob.

OK. I see. Thank you Sir