Class OpenCVModel
Object
OpenCVModel
- All Implemented Interfaces:
AutoCloseable,ImageInferenceModel<org.opencv.core.Mat>,InferenceModel
A model that can be used for inference using OpenCV's DNN
module.
- Author:
- Owen Feehan
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
OpenCVModel
public OpenCVModel(org.opencv.dnn.Net model) Creates a newOpenCVModelinstance.- Parameters:
model- An OpenCV model used for inference.
-
-
Method Details
-
performInference
public <S> S performInference(org.opencv.core.Mat input, String inputName, List<String> outputNames, CheckedFunction<List<org.opencv.core.Mat>, S, OperationFailedException> convertFunction) throws OperationFailedException - Specified by:
performInferencein interfaceImageInferenceModel<org.opencv.core.Mat>- Throws:
OperationFailedException
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceInferenceModel
-