Table of Contents

Class OpenCVHelper

Namespace
Bonsai.ML.Torch
Assembly
Bonsai.ML.Torch.dll

Helper class to convert between OpenCV mats, images and Torch tensors.

public static class OpenCVHelper
Inheritance
OpenCVHelper
Inherited Members

Methods

ToImage(Tensor, Device)

Converts a Torch tensor to an OpenCV image.

ToMat(Tensor, Device)

Converts a Torch tensor to an OpenCV mat.

ToTensor(IplImage, Device)

Converts an OpenCV image to a Torch tensor.

ToTensor(Mat, Device)

Converts an OpenCV mat to a Torch tensor.