public class opencv_dnn extends opencv_dnn
Modifier and Type | Field and Description |
---|---|
static int |
DNN_BACKEND_CUDA
enum cv::dnn::Backend
|
static int |
DNN_BACKEND_DEFAULT
enum cv::dnn::Backend
|
static int |
DNN_BACKEND_HALIDE
enum cv::dnn::Backend
|
static int |
DNN_BACKEND_INFERENCE_ENGINE
enum cv::dnn::Backend
|
static int |
DNN_BACKEND_OPENCV
enum cv::dnn::Backend
|
static int |
DNN_BACKEND_VKCOM
enum cv::dnn::Backend
|
static int |
DNN_TARGET_CPU
enum cv::dnn::Target
|
static int |
DNN_TARGET_CUDA
enum cv::dnn::Target
|
static int |
DNN_TARGET_CUDA_FP16
enum cv::dnn::Target
|
static int |
DNN_TARGET_FPGA
enum cv::dnn::Target
|
static int |
DNN_TARGET_MYRIAD
enum cv::dnn::Target
|
static int |
DNN_TARGET_OPENCL
enum cv::dnn::Target
|
static int |
DNN_TARGET_OPENCL_FP16
enum cv::dnn::Target
|
static int |
DNN_TARGET_VULKAN
enum cv::dnn::Target
|
static int |
OPENCV_DNN_API_VERSION
Use with major OpenCV version only.
|
Constructor and Description |
---|
opencv_dnn() |
Modifier and Type | Method and Description |
---|---|
static Mat |
blobFromImage(GpuMat image) |
static Mat |
blobFromImage(GpuMat image,
double scalefactor,
Size size,
Scalar mean,
boolean swapRB,
boolean crop,
int ddepth) |
static void |
blobFromImage(GpuMat image,
GpuMat blob) |
static void |
blobFromImage(GpuMat image,
GpuMat blob,
double scalefactor,
Size size,
Scalar mean,
boolean swapRB,
boolean crop,
int ddepth) |
static Mat |
blobFromImage(Mat image) |
static Mat |
blobFromImage(Mat image,
double scalefactor,
Size size,
Scalar mean,
boolean swapRB,
boolean crop,
int ddepth)
\brief Creates 4-dimensional blob from image.
|
static void |
blobFromImage(Mat image,
Mat blob) |
static void |
blobFromImage(Mat image,
Mat blob,
double scalefactor,
Size size,
Scalar mean,
boolean swapRB,
boolean crop,
int ddepth)
\brief Creates 4-dimensional blob from image.
|
static Mat |
blobFromImage(UMat image) |
static Mat |
blobFromImage(UMat image,
double scalefactor,
Size size,
Scalar mean,
boolean swapRB,
boolean crop,
int ddepth) |
static void |
blobFromImage(UMat image,
UMat blob) |
static void |
blobFromImage(UMat image,
UMat blob,
double scalefactor,
Size size,
Scalar mean,
boolean swapRB,
boolean crop,
int ddepth) |
static Mat |
blobFromImages(GpuMatVector images) |
static Mat |
blobFromImages(GpuMatVector images,
double scalefactor,
Size size,
Scalar mean,
boolean swapRB,
boolean crop,
int ddepth) |
static void |
blobFromImages(GpuMatVector images,
GpuMat blob) |
static void |
blobFromImages(GpuMatVector images,
GpuMat blob,
double scalefactor,
Size size,
Scalar mean,
boolean swapRB,
boolean crop,
int ddepth) |
static void |
blobFromImages(GpuMatVector images,
Mat blob) |
static void |
blobFromImages(GpuMatVector images,
Mat blob,
double scalefactor,
Size size,
Scalar mean,
boolean swapRB,
boolean crop,
int ddepth) |
static void |
blobFromImages(GpuMatVector images,
UMat blob) |
static void |
blobFromImages(GpuMatVector images,
UMat blob,
double scalefactor,
Size size,
Scalar mean,
boolean swapRB,
boolean crop,
int ddepth) |
static Mat |
blobFromImages(MatVector images) |
static Mat |
blobFromImages(MatVector images,
double scalefactor,
Size size,
Scalar mean,
boolean swapRB,
boolean crop,
int ddepth)
\brief Creates 4-dimensional blob from series of images.
|
static void |
blobFromImages(MatVector images,
GpuMat blob) |
static void |
blobFromImages(MatVector images,
GpuMat blob,
double scalefactor,
Size size,
Scalar mean,
boolean swapRB,
boolean crop,
int ddepth) |
static void |
blobFromImages(MatVector images,
Mat blob) |
static void |
blobFromImages(MatVector images,
Mat blob,
double scalefactor,
Size size,
Scalar mean,
boolean swapRB,
boolean crop,
int ddepth)
\brief Creates 4-dimensional blob from series of images.
|
static void |
blobFromImages(MatVector images,
UMat blob) |
static void |
blobFromImages(MatVector images,
UMat blob,
double scalefactor,
Size size,
Scalar mean,
boolean swapRB,
boolean crop,
int ddepth) |
static Mat |
blobFromImages(UMatVector images) |
static Mat |
blobFromImages(UMatVector images,
double scalefactor,
Size size,
Scalar mean,
boolean swapRB,
boolean crop,
int ddepth) |
static void |
blobFromImages(UMatVector images,
GpuMat blob) |
static void |
blobFromImages(UMatVector images,
GpuMat blob,
double scalefactor,
Size size,
Scalar mean,
boolean swapRB,
boolean crop,
int ddepth) |
static void |
blobFromImages(UMatVector images,
Mat blob) |
static void |
blobFromImages(UMatVector images,
Mat blob,
double scalefactor,
Size size,
Scalar mean,
boolean swapRB,
boolean crop,
int ddepth) |
static void |
blobFromImages(UMatVector images,
UMat blob) |
static void |
blobFromImages(UMatVector images,
UMat blob,
double scalefactor,
Size size,
Scalar mean,
boolean swapRB,
boolean crop,
int ddepth) |
static int |
clamp(int ax,
int dims) |
static int |
clamp(int ax,
IntPointer shape) |
static Range |
clamp(Range r,
int axisSize) |
static IntPointer |
concat(IntPointer a,
IntPointer b) |
static IntIntPairVector |
getAvailableBackends() |
static IntPointer |
getAvailableTargets(int be) |
static Mat |
getPlane(Mat m,
int n,
int cn) |
static void |
imagesFromBlob(Mat blob_,
GpuMatVector images_) |
static void |
imagesFromBlob(Mat blob_,
MatVector images_)
\brief Parse a 4D blob and output the images it contains as 2D arrays through a simpler data structure
(std::vector
|
static void |
imagesFromBlob(Mat blob_,
UMatVector images_) |
static boolean |
is_neg(int i) |
static void |
NMSBoxes(Rect2dVector bboxes,
float[] scores,
float score_threshold,
float nms_threshold,
int[] indices) |
static void |
NMSBoxes(Rect2dVector bboxes,
float[] scores,
float score_threshold,
float nms_threshold,
int[] indices,
float eta,
int top_k) |
static void |
NMSBoxes(Rect2dVector bboxes,
FloatBuffer scores,
float score_threshold,
float nms_threshold,
IntBuffer indices) |
static void |
NMSBoxes(Rect2dVector bboxes,
FloatBuffer scores,
float score_threshold,
float nms_threshold,
IntBuffer indices,
float eta,
int top_k) |
static void |
NMSBoxes(Rect2dVector bboxes,
FloatPointer scores,
float score_threshold,
float nms_threshold,
IntPointer indices) |
static void |
NMSBoxes(Rect2dVector bboxes,
FloatPointer scores,
float score_threshold,
float nms_threshold,
IntPointer indices,
float eta,
int top_k) |
static void |
NMSBoxes(RectVector bboxes,
float[] scores,
float score_threshold,
float nms_threshold,
int[] indices) |
static void |
NMSBoxes(RectVector bboxes,
float[] scores,
float score_threshold,
float nms_threshold,
int[] indices,
float eta,
int top_k) |
static void |
NMSBoxes(RectVector bboxes,
FloatBuffer scores,
float score_threshold,
float nms_threshold,
IntBuffer indices) |
static void |
NMSBoxes(RectVector bboxes,
FloatBuffer scores,
float score_threshold,
float nms_threshold,
IntBuffer indices,
float eta,
int top_k) |
static void |
NMSBoxes(RectVector bboxes,
FloatPointer scores,
float score_threshold,
float nms_threshold,
IntPointer indices) |
static void |
NMSBoxes(RectVector bboxes,
FloatPointer scores,
float score_threshold,
float nms_threshold,
IntPointer indices,
float eta,
int top_k)
\brief Performs non maximum suppression given boxes and corresponding scores.
|
static void |
NMSBoxesRotated(RotatedRect bboxes,
float[] scores,
float score_threshold,
float nms_threshold,
int[] indices) |
static void |
NMSBoxesRotated(RotatedRect bboxes,
float[] scores,
float score_threshold,
float nms_threshold,
int[] indices,
float eta,
int top_k) |
static void |
NMSBoxesRotated(RotatedRect bboxes,
FloatBuffer scores,
float score_threshold,
float nms_threshold,
IntBuffer indices) |
static void |
NMSBoxesRotated(RotatedRect bboxes,
FloatBuffer scores,
float score_threshold,
float nms_threshold,
IntBuffer indices,
float eta,
int top_k) |
static void |
NMSBoxesRotated(RotatedRect bboxes,
FloatPointer scores,
float score_threshold,
float nms_threshold,
IntPointer indices) |
static void |
NMSBoxesRotated(RotatedRect bboxes,
FloatPointer scores,
float score_threshold,
float nms_threshold,
IntPointer indices,
float eta,
int top_k) |
static void |
print(IntPointer shape) |
static void |
print(IntPointer shape,
BytePointer name) |
static void |
print(IntPointer shape,
String name) |
static Net |
readNet(BytePointer model) |
static Net |
readNet(BytePointer framework,
byte[] bufferModel) |
static Net |
readNet(BytePointer framework,
byte[] bufferModel,
byte[] bufferConfig) |
static Net |
readNet(BytePointer framework,
ByteBuffer bufferModel) |
static Net |
readNet(BytePointer framework,
ByteBuffer bufferModel,
ByteBuffer bufferConfig) |
static Net |
readNet(BytePointer framework,
BytePointer bufferModel)
\brief Read deep learning network represented in one of the supported formats.
|
static Net |
readNet(BytePointer model,
BytePointer config,
BytePointer framework)
\brief Read deep learning network represented in one of the supported formats.
|
static Net |
readNet(String model) |
static Net |
readNet(String framework,
byte[] bufferModel) |
static Net |
readNet(String framework,
byte[] bufferModel,
byte[] bufferConfig) |
static Net |
readNet(String framework,
ByteBuffer bufferModel) |
static Net |
readNet(String framework,
ByteBuffer bufferModel,
ByteBuffer bufferConfig) |
static Net |
readNet(String framework,
BytePointer bufferModel) |
static Net |
readNet(String framework,
BytePointer bufferModel,
BytePointer bufferConfig) |
static Net |
readNet(String model,
String config,
String framework) |
static Net |
readNetFromCaffe(byte[] bufferProto) |
static Net |
readNetFromCaffe(byte[] bufferProto,
byte[] bufferModel) |
static Net |
readNetFromCaffe(ByteBuffer bufferProto) |
static Net |
readNetFromCaffe(ByteBuffer bufferProto,
ByteBuffer bufferModel)
\brief Reads a network model stored in Caffe model in memory.
|
static Net |
readNetFromCaffe(BytePointer prototxt) |
static Net |
readNetFromCaffe(BytePointer prototxt,
BytePointer caffeModel)
\brief Reads a network model stored in Caffe framework's format.
|
static Net |
readNetFromCaffe(BytePointer bufferProto,
long lenProto) |
static Net |
readNetFromCaffe(BytePointer bufferProto,
long lenProto,
BytePointer bufferModel,
long lenModel)
\brief Reads a network model stored in Caffe model in memory.
|
static Net |
readNetFromCaffe(String prototxt) |
static Net |
readNetFromCaffe(String bufferProto,
long lenProto) |
static Net |
readNetFromCaffe(String bufferProto,
long lenProto,
String bufferModel,
long lenModel) |
static Net |
readNetFromCaffe(String prototxt,
String caffeModel) |
static Net |
readNetFromDarknet(byte[] bufferCfg) |
static Net |
readNetFromDarknet(byte[] bufferCfg,
byte[] bufferModel) |
static Net |
readNetFromDarknet(ByteBuffer bufferCfg) |
static Net |
readNetFromDarknet(ByteBuffer bufferCfg,
ByteBuffer bufferModel)
\brief Reads a network model stored in Darknet model files.
|
static Net |
readNetFromDarknet(BytePointer cfgFile) |
static Net |
readNetFromDarknet(BytePointer cfgFile,
BytePointer darknetModel)
\brief Reads a network model stored in Darknet model files.
|
static Net |
readNetFromDarknet(BytePointer bufferCfg,
long lenCfg) |
static Net |
readNetFromDarknet(BytePointer bufferCfg,
long lenCfg,
BytePointer bufferModel,
long lenModel)
\brief Reads a network model stored in Darknet model files.
|
static Net |
readNetFromDarknet(String cfgFile) |
static Net |
readNetFromDarknet(String bufferCfg,
long lenCfg) |
static Net |
readNetFromDarknet(String bufferCfg,
long lenCfg,
String bufferModel,
long lenModel) |
static Net |
readNetFromDarknet(String cfgFile,
String darknetModel) |
static Net |
readNetFromModelOptimizer(byte[] bufferModelConfig,
byte[] bufferWeights) |
static Net |
readNetFromModelOptimizer(byte[] bufferModelConfigPtr,
long bufferModelConfigSize,
byte[] bufferWeightsPtr,
long bufferWeightsSize) |
static Net |
readNetFromModelOptimizer(ByteBuffer bufferModelConfig,
ByteBuffer bufferWeights)
\brief Load a network from Intel's Model Optimizer intermediate representation.
|
static Net |
readNetFromModelOptimizer(ByteBuffer bufferModelConfigPtr,
long bufferModelConfigSize,
ByteBuffer bufferWeightsPtr,
long bufferWeightsSize) |
static Net |
readNetFromModelOptimizer(BytePointer xml,
BytePointer bin)
\brief Load a network from Intel's Model Optimizer intermediate representation.
|
static Net |
readNetFromModelOptimizer(BytePointer bufferModelConfigPtr,
long bufferModelConfigSize,
BytePointer bufferWeightsPtr,
long bufferWeightsSize)
\brief Load a network from Intel's Model Optimizer intermediate representation.
|
static Net |
readNetFromModelOptimizer(String xml,
String bin) |
static Net |
readNetFromONNX(byte[] buffer) |
static Net |
readNetFromONNX(ByteBuffer buffer)
\brief Reads a network model from ONNX
in-memory buffer.
|
static Net |
readNetFromONNX(BytePointer onnxFile)
\brief Reads a network model ONNX.
|
static Net |
readNetFromONNX(BytePointer buffer,
long sizeBuffer)
\brief Reads a network model from ONNX
in-memory buffer.
|
static Net |
readNetFromONNX(String onnxFile) |
static Net |
readNetFromONNX(String buffer,
long sizeBuffer) |
static Net |
readNetFromTensorflow(byte[] bufferModel) |
static Net |
readNetFromTensorflow(byte[] bufferModel,
byte[] bufferConfig) |
static Net |
readNetFromTensorflow(ByteBuffer bufferModel) |
static Net |
readNetFromTensorflow(ByteBuffer bufferModel,
ByteBuffer bufferConfig)
\brief Reads a network model stored in TensorFlow framework's format.
|
static Net |
readNetFromTensorflow(BytePointer model) |
static Net |
readNetFromTensorflow(BytePointer model,
BytePointer config)
\brief Reads a network model stored in TensorFlow framework's format.
|
static Net |
readNetFromTensorflow(BytePointer bufferModel,
long lenModel) |
static Net |
readNetFromTensorflow(BytePointer bufferModel,
long lenModel,
BytePointer bufferConfig,
long lenConfig)
\brief Reads a network model stored in TensorFlow framework's format.
|
static Net |
readNetFromTensorflow(String model) |
static Net |
readNetFromTensorflow(String bufferModel,
long lenModel) |
static Net |
readNetFromTensorflow(String bufferModel,
long lenModel,
String bufferConfig,
long lenConfig) |
static Net |
readNetFromTensorflow(String model,
String config) |
static Net |
readNetFromTorch(BytePointer model) |
static Net |
readNetFromTorch(BytePointer model,
boolean isBinary,
boolean evaluate)
\brief Reads a network model stored in Torch7 framework's format.
|
static Net |
readNetFromTorch(String model) |
static Net |
readNetFromTorch(String model,
boolean isBinary,
boolean evaluate) |
static Mat |
readTensorFromONNX(BytePointer path)
\brief Creates blob from .pb file.
|
static Mat |
readTensorFromONNX(String path) |
static Mat |
readTorchBlob(BytePointer filename) |
static Mat |
readTorchBlob(BytePointer filename,
boolean isBinary)
\brief Loads blob which was serialized as torch.Tensor object of Torch7 framework.
|
static Mat |
readTorchBlob(String filename) |
static Mat |
readTorchBlob(String filename,
boolean isBinary) |
static IntPointer |
shape(int a0) |
static IntPointer |
shape(int[] dims,
int n) |
static IntPointer |
shape(IntBuffer dims,
int n) |
static IntPointer |
shape(int a0,
int a1,
int a2,
int a3) |
static IntPointer |
shape(IntPointer dims,
int n) |
static IntPointer |
shape(Mat mat) |
static IntPointer |
shape(MatSize sz) |
static IntPointer |
shape(UMat mat) |
static Pointer |
shiftLeft(Pointer out,
IntPointer shape) |
static void |
shrinkCaffeModel(BytePointer src,
BytePointer dst) |
static void |
shrinkCaffeModel(BytePointer src,
BytePointer dst,
StringVector layersTypes)
\brief Convert all weights of Caffe network to half precision floating point.
|
static void |
shrinkCaffeModel(String src,
String dst) |
static void |
shrinkCaffeModel(String src,
String dst,
StringVector layersTypes) |
static Mat |
slice(Mat m,
_Range r0,
_Range r1,
_Range r2,
_Range r3) |
static Mat |
slice(Mat m,
_Range r0,
_Range r1,
_Range r2) |
static Mat |
slice(Mat m,
_Range r0,
_Range r1) |
static Mat |
slice(Mat m,
_Range r0)
\}
\}
|
static BytePointer |
toString(IntPointer shape) |
static BytePointer |
toString(IntPointer shape,
BytePointer name) |
static String |
toString(IntPointer shape,
String name) |
static int |
total(IntPointer shape) |
static int |
total(IntPointer shape,
int start,
int end) |
static void |
writeTextGraph(BytePointer model,
BytePointer output)
\brief Create a text representation for a binary network stored in protocol buffer format.
|
static void |
writeTextGraph(String model,
String output) |
map
public static final int OPENCV_DNN_API_VERSION
public static final int DNN_BACKEND_DEFAULT
public static final int DNN_BACKEND_HALIDE
public static final int DNN_BACKEND_INFERENCE_ENGINE
public static final int DNN_BACKEND_OPENCV
public static final int DNN_BACKEND_VKCOM
public static final int DNN_BACKEND_CUDA
public static final int DNN_TARGET_CPU
public static final int DNN_TARGET_OPENCL
public static final int DNN_TARGET_OPENCL_FP16
public static final int DNN_TARGET_MYRIAD
public static final int DNN_TARGET_VULKAN
public static final int DNN_TARGET_FPGA
public static final int DNN_TARGET_CUDA
public static final int DNN_TARGET_CUDA_FP16
@Namespace(value="cv::dnn") @ByVal @Cast(value="std::vector<std::pair<cv::dnn::Backend,cv::dnn::Target> >*") public static IntIntPairVector getAvailableBackends()
@Namespace(value="cv::dnn") @Cast(value="cv::dnn::Target*") @StdVector public static IntPointer getAvailableTargets(@Cast(value="cv::dnn::Backend") int be)
@Namespace(value="cv::dnn") @ByVal public static Net readNetFromDarknet(@opencv_core.Str BytePointer cfgFile, @opencv_core.Str BytePointer darknetModel)
cfgFile
- path to the .cfg file with text description of the network architecture.darknetModel
- path to the .weights file with learned network.@Namespace(value="cv::dnn") @ByVal public static Net readNetFromDarknet(@opencv_core.Str BytePointer cfgFile)
@Namespace(value="cv::dnn") @ByVal public static Net readNetFromDarknet(@opencv_core.Str String cfgFile, @opencv_core.Str String darknetModel)
@Namespace(value="cv::dnn") @ByVal public static Net readNetFromDarknet(@opencv_core.Str String cfgFile)
@Namespace(value="cv::dnn") @ByVal public static Net readNetFromDarknet(@Cast(value="uchar*") @StdVector ByteBuffer bufferCfg, @Cast(value="uchar*") @StdVector ByteBuffer bufferModel)
bufferCfg
- A buffer contains a content of .cfg file with text description of the network architecture.bufferModel
- A buffer contains a content of .weights file with learned network.@Namespace(value="cv::dnn") @ByVal public static Net readNetFromDarknet(@Cast(value="uchar*") @StdVector ByteBuffer bufferCfg)
@Namespace(value="cv::dnn") @ByVal public static Net readNetFromDarknet(@Cast(value="uchar*") @StdVector byte[] bufferCfg, @Cast(value="uchar*") @StdVector byte[] bufferModel)
@Namespace(value="cv::dnn") @ByVal public static Net readNetFromDarknet(@Cast(value="uchar*") @StdVector byte[] bufferCfg)
@Namespace(value="cv::dnn") @ByVal public static Net readNetFromDarknet(@Cast(value="const char*") BytePointer bufferCfg, @Cast(value="size_t") long lenCfg, @Cast(value="const char*") BytePointer bufferModel, @Cast(value="size_t") long lenModel)
bufferCfg
- A buffer contains a content of .cfg file with text description of the network architecture.lenCfg
- Number of bytes to read from bufferCfgbufferModel
- A buffer contains a content of .weights file with learned network.lenModel
- Number of bytes to read from bufferModel@Namespace(value="cv::dnn") @ByVal public static Net readNetFromDarknet(@Cast(value="const char*") BytePointer bufferCfg, @Cast(value="size_t") long lenCfg)
@Namespace(value="cv::dnn") @ByVal public static Net readNetFromDarknet(String bufferCfg, @Cast(value="size_t") long lenCfg, String bufferModel, @Cast(value="size_t") long lenModel)
@Namespace(value="cv::dnn") @ByVal public static Net readNetFromDarknet(String bufferCfg, @Cast(value="size_t") long lenCfg)
@Namespace(value="cv::dnn") @ByVal public static Net readNetFromCaffe(@opencv_core.Str BytePointer prototxt, @opencv_core.Str BytePointer caffeModel)
prototxt
- path to the .prototxt file with text description of the network architecture.caffeModel
- path to the .caffemodel file with learned network.@Namespace(value="cv::dnn") @ByVal public static Net readNetFromCaffe(@opencv_core.Str BytePointer prototxt)
@Namespace(value="cv::dnn") @ByVal public static Net readNetFromCaffe(@opencv_core.Str String prototxt, @opencv_core.Str String caffeModel)
@Namespace(value="cv::dnn") @ByVal public static Net readNetFromCaffe(@opencv_core.Str String prototxt)
@Namespace(value="cv::dnn") @ByVal public static Net readNetFromCaffe(@Cast(value="uchar*") @StdVector ByteBuffer bufferProto, @Cast(value="uchar*") @StdVector ByteBuffer bufferModel)
bufferProto
- buffer containing the content of the .prototxt filebufferModel
- buffer containing the content of the .caffemodel file@Namespace(value="cv::dnn") @ByVal public static Net readNetFromCaffe(@Cast(value="uchar*") @StdVector ByteBuffer bufferProto)
@Namespace(value="cv::dnn") @ByVal public static Net readNetFromCaffe(@Cast(value="uchar*") @StdVector byte[] bufferProto, @Cast(value="uchar*") @StdVector byte[] bufferModel)
@Namespace(value="cv::dnn") @ByVal public static Net readNetFromCaffe(@Cast(value="uchar*") @StdVector byte[] bufferProto)
@Namespace(value="cv::dnn") @ByVal public static Net readNetFromCaffe(@Cast(value="const char*") BytePointer bufferProto, @Cast(value="size_t") long lenProto, @Cast(value="const char*") BytePointer bufferModel, @Cast(value="size_t") long lenModel)
bufferProto
- buffer containing the content of the .prototxt filelenProto
- length of bufferProtobufferModel
- buffer containing the content of the .caffemodel filelenModel
- length of bufferModel@Namespace(value="cv::dnn") @ByVal public static Net readNetFromCaffe(@Cast(value="const char*") BytePointer bufferProto, @Cast(value="size_t") long lenProto)
@Namespace(value="cv::dnn") @ByVal public static Net readNetFromCaffe(String bufferProto, @Cast(value="size_t") long lenProto, String bufferModel, @Cast(value="size_t") long lenModel)
@Namespace(value="cv::dnn") @ByVal public static Net readNetFromCaffe(String bufferProto, @Cast(value="size_t") long lenProto)
@Namespace(value="cv::dnn") @ByVal public static Net readNetFromTensorflow(@opencv_core.Str BytePointer model, @opencv_core.Str BytePointer config)
model
- path to the .pb file with binary protobuf description of the network architectureconfig
- path to the .pbtxt file that contains text graph definition in protobuf format.
Resulting Net object is built by text graph using weights from a binary one that
let us make it more flexible.@Namespace(value="cv::dnn") @ByVal public static Net readNetFromTensorflow(@opencv_core.Str BytePointer model)
@Namespace(value="cv::dnn") @ByVal public static Net readNetFromTensorflow(@opencv_core.Str String model, @opencv_core.Str String config)
@Namespace(value="cv::dnn") @ByVal public static Net readNetFromTensorflow(@opencv_core.Str String model)
@Namespace(value="cv::dnn") @ByVal public static Net readNetFromTensorflow(@Cast(value="uchar*") @StdVector ByteBuffer bufferModel, @Cast(value="uchar*") @StdVector ByteBuffer bufferConfig)
bufferModel
- buffer containing the content of the pb filebufferConfig
- buffer containing the content of the pbtxt file@Namespace(value="cv::dnn") @ByVal public static Net readNetFromTensorflow(@Cast(value="uchar*") @StdVector ByteBuffer bufferModel)
@Namespace(value="cv::dnn") @ByVal public static Net readNetFromTensorflow(@Cast(value="uchar*") @StdVector byte[] bufferModel, @Cast(value="uchar*") @StdVector byte[] bufferConfig)
@Namespace(value="cv::dnn") @ByVal public static Net readNetFromTensorflow(@Cast(value="uchar*") @StdVector byte[] bufferModel)
@Namespace(value="cv::dnn") @ByVal public static Net readNetFromTensorflow(@Cast(value="const char*") BytePointer bufferModel, @Cast(value="size_t") long lenModel, @Cast(value="const char*") BytePointer bufferConfig, @Cast(value="size_t") long lenConfig)
bufferModel
- buffer containing the content of the pb filelenModel
- length of bufferModelbufferConfig
- buffer containing the content of the pbtxt filelenConfig
- length of bufferConfig@Namespace(value="cv::dnn") @ByVal public static Net readNetFromTensorflow(@Cast(value="const char*") BytePointer bufferModel, @Cast(value="size_t") long lenModel)
@Namespace(value="cv::dnn") @ByVal public static Net readNetFromTensorflow(String bufferModel, @Cast(value="size_t") long lenModel, String bufferConfig, @Cast(value="size_t") long lenConfig)
@Namespace(value="cv::dnn") @ByVal public static Net readNetFromTensorflow(String bufferModel, @Cast(value="size_t") long lenModel)
@Namespace(value="cv::dnn") @ByVal public static Net readNetFromTorch(@opencv_core.Str BytePointer model, @Cast(value="bool") boolean isBinary, @Cast(value="bool") boolean evaluate)
model
- path to the file, dumped from Torch by using torch.save() function.isBinary
- specifies whether the network was serialized in ascii mode or binary.evaluate
- specifies testing phase of network. If true, it's similar to evaluate() method in Torch.long
type of C language,
which has various bit-length on different systems.
The loading file must contain serialized nn.Module object
with importing network. Try to eliminate a custom objects from serialazing data to avoid importing errors.
List of supported layers (i.e. object instances derived from Torch nn.Module class):
- nn.Sequential
- nn.Parallel
- nn.Concat
- nn.Linear
- nn.SpatialConvolution
- nn.SpatialMaxPooling, nn.SpatialAveragePooling
- nn.ReLU, nn.TanH, nn.Sigmoid
- nn.Reshape
- nn.SoftMax, nn.LogSoftMax
Also some equivalents of these classes from cunn, cudnn, and fbcunn may be successfully imported.@Namespace(value="cv::dnn") @ByVal public static Net readNetFromTorch(@opencv_core.Str BytePointer model)
@Namespace(value="cv::dnn") @ByVal public static Net readNetFromTorch(@opencv_core.Str String model, @Cast(value="bool") boolean isBinary, @Cast(value="bool") boolean evaluate)
@Namespace(value="cv::dnn") @ByVal public static Net readNetFromTorch(@opencv_core.Str String model)
@Namespace(value="cv::dnn") @ByVal public static Net readNet(@opencv_core.Str BytePointer model, @opencv_core.Str BytePointer config, @opencv_core.Str BytePointer framework)
model
- [in] Binary file contains trained weights. The following file
extensions are expected for models from different frameworks:
* *.caffemodel
(Caffe, http://caffe.berkeleyvision.org/)
* *.pb
(TensorFlow, https://www.tensorflow.org/)
* *.t7
| *.net
(Torch, http://torch.ch/)
* *.weights
(Darknet, https://pjreddie.com/darknet/)
* *.bin
(DLDT, https://software.intel.com/openvino-toolkit)
* *.onnx
(ONNX, https://onnx.ai/)config
- [in] Text file contains network configuration. It could be a
file with the following extensions:
* *.prototxt
(Caffe, http://caffe.berkeleyvision.org/)
* *.pbtxt
(TensorFlow, https://www.tensorflow.org/)
* *.cfg
(Darknet, https://pjreddie.com/darknet/)
* *.xml
(DLDT, https://software.intel.com/openvino-toolkit)framework
- [in] Explicit framework name tag to determine a format.@Namespace(value="cv::dnn") @ByVal public static Net readNet(@opencv_core.Str BytePointer model)
@Namespace(value="cv::dnn") @ByVal public static Net readNet(@opencv_core.Str String model, @opencv_core.Str String config, @opencv_core.Str String framework)
@Namespace(value="cv::dnn") @ByVal public static Net readNet(@opencv_core.Str String model)
@Namespace(value="cv::dnn") @ByVal public static Net readNet(@opencv_core.Str BytePointer framework, @Cast(value="uchar*") @StdVector BytePointer bufferModel)
framework
- [in] Name of origin framework.bufferModel
- [in] A buffer with a content of binary file with weightsbufferConfig
- [in] A buffer with a content of text file contains network configuration.@Namespace(value="cv::dnn") @ByVal public static Net readNet(@opencv_core.Str String framework, @Cast(value="uchar*") @StdVector ByteBuffer bufferModel, @Cast(value="uchar*") @StdVector ByteBuffer bufferConfig)
@Namespace(value="cv::dnn") @ByVal public static Net readNet(@opencv_core.Str String framework, @Cast(value="uchar*") @StdVector ByteBuffer bufferModel)
@Namespace(value="cv::dnn") @ByVal public static Net readNet(@opencv_core.Str BytePointer framework, @Cast(value="uchar*") @StdVector byte[] bufferModel, @Cast(value="uchar*") @StdVector byte[] bufferConfig)
@Namespace(value="cv::dnn") @ByVal public static Net readNet(@opencv_core.Str BytePointer framework, @Cast(value="uchar*") @StdVector byte[] bufferModel)
@Namespace(value="cv::dnn") @ByVal public static Net readNet(@opencv_core.Str String framework, @Cast(value="uchar*") @StdVector BytePointer bufferModel, @Cast(value="uchar*") @StdVector BytePointer bufferConfig)
@Namespace(value="cv::dnn") @ByVal public static Net readNet(@opencv_core.Str String framework, @Cast(value="uchar*") @StdVector BytePointer bufferModel)
@Namespace(value="cv::dnn") @ByVal public static Net readNet(@opencv_core.Str BytePointer framework, @Cast(value="uchar*") @StdVector ByteBuffer bufferModel, @Cast(value="uchar*") @StdVector ByteBuffer bufferConfig)
@Namespace(value="cv::dnn") @ByVal public static Net readNet(@opencv_core.Str BytePointer framework, @Cast(value="uchar*") @StdVector ByteBuffer bufferModel)
@Namespace(value="cv::dnn") @ByVal public static Net readNet(@opencv_core.Str String framework, @Cast(value="uchar*") @StdVector byte[] bufferModel, @Cast(value="uchar*") @StdVector byte[] bufferConfig)
@Namespace(value="cv::dnn") @ByVal public static Net readNet(@opencv_core.Str String framework, @Cast(value="uchar*") @StdVector byte[] bufferModel)
@Namespace(value="cv::dnn") @ByVal public static Mat readTorchBlob(@opencv_core.Str BytePointer filename, @Cast(value="bool") boolean isBinary)
@Namespace(value="cv::dnn") @ByVal public static Mat readTorchBlob(@opencv_core.Str BytePointer filename)
@Namespace(value="cv::dnn") @ByVal public static Mat readTorchBlob(@opencv_core.Str String filename, @Cast(value="bool") boolean isBinary)
@Namespace(value="cv::dnn") @ByVal public static Mat readTorchBlob(@opencv_core.Str String filename)
@Namespace(value="cv::dnn") @ByVal public static Net readNetFromModelOptimizer(@opencv_core.Str BytePointer xml, @opencv_core.Str BytePointer bin)
xml
- [in] XML configuration file with network's topology.bin
- [in] Binary file with trained weights.@Namespace(value="cv::dnn") @ByVal public static Net readNetFromModelOptimizer(@opencv_core.Str String xml, @opencv_core.Str String bin)
@Namespace(value="cv::dnn") @ByVal public static Net readNetFromModelOptimizer(@Cast(value="uchar*") @StdVector ByteBuffer bufferModelConfig, @Cast(value="uchar*") @StdVector ByteBuffer bufferWeights)
bufferModelConfig
- [in] Buffer contains XML configuration with network's topology.bufferWeights
- [in] Buffer contains binary data with trained weights.@Namespace(value="cv::dnn") @ByVal public static Net readNetFromModelOptimizer(@Cast(value="uchar*") @StdVector byte[] bufferModelConfig, @Cast(value="uchar*") @StdVector byte[] bufferWeights)
@Namespace(value="cv::dnn") @ByVal public static Net readNetFromModelOptimizer(@Cast(value="const uchar*") BytePointer bufferModelConfigPtr, @Cast(value="size_t") long bufferModelConfigSize, @Cast(value="const uchar*") BytePointer bufferWeightsPtr, @Cast(value="size_t") long bufferWeightsSize)
bufferModelConfigPtr
- [in] Pointer to buffer which contains XML configuration with network's topology.bufferModelConfigSize
- [in] Binary size of XML configuration data.bufferWeightsPtr
- [in] Pointer to buffer which contains binary data with trained weights.bufferWeightsSize
- [in] Binary size of trained weights data.@Namespace(value="cv::dnn") @ByVal public static Net readNetFromModelOptimizer(@Cast(value="const uchar*") ByteBuffer bufferModelConfigPtr, @Cast(value="size_t") long bufferModelConfigSize, @Cast(value="const uchar*") ByteBuffer bufferWeightsPtr, @Cast(value="size_t") long bufferWeightsSize)
@Namespace(value="cv::dnn") @ByVal public static Net readNetFromModelOptimizer(@Cast(value="const uchar*") byte[] bufferModelConfigPtr, @Cast(value="size_t") long bufferModelConfigSize, @Cast(value="const uchar*") byte[] bufferWeightsPtr, @Cast(value="size_t") long bufferWeightsSize)
@Namespace(value="cv::dnn") @ByVal public static Net readNetFromONNX(@opencv_core.Str BytePointer onnxFile)
onnxFile
- path to the .onnx file with text description of the network architecture.@Namespace(value="cv::dnn") @ByVal public static Net readNetFromONNX(@opencv_core.Str String onnxFile)
@Namespace(value="cv::dnn") @ByVal public static Net readNetFromONNX(@Cast(value="const char*") BytePointer buffer, @Cast(value="size_t") long sizeBuffer)
buffer
- memory address of the first byte of the buffer.sizeBuffer
- size of the buffer.@Namespace(value="cv::dnn") @ByVal public static Net readNetFromONNX(String buffer, @Cast(value="size_t") long sizeBuffer)
@Namespace(value="cv::dnn") @ByVal public static Net readNetFromONNX(@Cast(value="uchar*") @StdVector ByteBuffer buffer)
buffer
- in-memory buffer that stores the ONNX model bytes.@Namespace(value="cv::dnn") @ByVal public static Net readNetFromONNX(@Cast(value="uchar*") @StdVector byte[] buffer)
@Namespace(value="cv::dnn") @ByVal public static Mat readTensorFromONNX(@opencv_core.Str BytePointer path)
path
- to the .pb file with input tensor.@Namespace(value="cv::dnn") @ByVal public static Mat readTensorFromONNX(@opencv_core.Str String path)
@Namespace(value="cv::dnn") @ByVal public static Mat blobFromImage(@ByVal Mat image, double scalefactor, @Const @ByRef(nullValue="cv::Size()") Size size, @Const @ByRef(nullValue="cv::Scalar()") Scalar mean, @Cast(value="bool") boolean swapRB, @Cast(value="bool") boolean crop, int ddepth)
image
- input image (with 1-, 3- or 4-channels).size
- spatial size for output imagemean
- scalar with mean values which are subtracted from channels. Values are intended
to be in (mean-R, mean-G, mean-B) order if \p image has BGR ordering and \p swapRB is true.scalefactor
- multiplier for \p image values.swapRB
- flag which indicates that swap first and last channels
in 3-channel image is necessary.crop
- flag which indicates whether image will be cropped after resize or notddepth
- Depth of output blob. Choose CV_32F or CV_8U.
\details if \p crop is true, input image is resized so one side after resize is equal to corresponding
dimension in \p size and another one is equal or larger. Then, crop from the center is performed.
If \p crop is false, direct resize without cropping and preserving aspect ratio is performed.@Namespace(value="cv::dnn") @ByVal public static Mat blobFromImage(@ByVal UMat image, double scalefactor, @Const @ByRef(nullValue="cv::Size()") Size size, @Const @ByRef(nullValue="cv::Scalar()") Scalar mean, @Cast(value="bool") boolean swapRB, @Cast(value="bool") boolean crop, int ddepth)
@Namespace(value="cv::dnn") @ByVal public static Mat blobFromImage(@ByVal GpuMat image, double scalefactor, @Const @ByRef(nullValue="cv::Size()") Size size, @Const @ByRef(nullValue="cv::Scalar()") Scalar mean, @Cast(value="bool") boolean swapRB, @Cast(value="bool") boolean crop, int ddepth)
@Namespace(value="cv::dnn") @ByVal public static Mat blobFromImage(@ByVal GpuMat image)
@Namespace(value="cv::dnn") public static void blobFromImage(@ByVal Mat image, @ByVal Mat blob, double scalefactor, @Const @ByRef(nullValue="cv::Size()") Size size, @Const @ByRef(nullValue="cv::Scalar()") Scalar mean, @Cast(value="bool") boolean swapRB, @Cast(value="bool") boolean crop, int ddepth)
@Namespace(value="cv::dnn") public static void blobFromImage(@ByVal Mat image, @ByVal Mat blob)
@Namespace(value="cv::dnn") public static void blobFromImage(@ByVal UMat image, @ByVal UMat blob, double scalefactor, @Const @ByRef(nullValue="cv::Size()") Size size, @Const @ByRef(nullValue="cv::Scalar()") Scalar mean, @Cast(value="bool") boolean swapRB, @Cast(value="bool") boolean crop, int ddepth)
@Namespace(value="cv::dnn") public static void blobFromImage(@ByVal UMat image, @ByVal UMat blob)
@Namespace(value="cv::dnn") public static void blobFromImage(@ByVal GpuMat image, @ByVal GpuMat blob, double scalefactor, @Const @ByRef(nullValue="cv::Size()") Size size, @Const @ByRef(nullValue="cv::Scalar()") Scalar mean, @Cast(value="bool") boolean swapRB, @Cast(value="bool") boolean crop, int ddepth)
@Namespace(value="cv::dnn") public static void blobFromImage(@ByVal GpuMat image, @ByVal GpuMat blob)
@Namespace(value="cv::dnn") @ByVal public static Mat blobFromImages(@ByVal MatVector images, double scalefactor, @ByVal(nullValue="cv::Size()") Size size, @Const @ByRef(nullValue="cv::Scalar()") Scalar mean, @Cast(value="bool") boolean swapRB, @Cast(value="bool") boolean crop, int ddepth)
images
- input images (all with 1-, 3- or 4-channels).size
- spatial size for output imagemean
- scalar with mean values which are subtracted from channels. Values are intended
to be in (mean-R, mean-G, mean-B) order if \p image has BGR ordering and \p swapRB is true.scalefactor
- multiplier for \p images values.swapRB
- flag which indicates that swap first and last channels
in 3-channel image is necessary.crop
- flag which indicates whether image will be cropped after resize or notddepth
- Depth of output blob. Choose CV_32F or CV_8U.
\details if \p crop is true, input image is resized so one side after resize is equal to corresponding
dimension in \p size and another one is equal or larger. Then, crop from the center is performed.
If \p crop is false, direct resize without cropping and preserving aspect ratio is performed.@Namespace(value="cv::dnn") @ByVal public static Mat blobFromImages(@ByVal MatVector images)
@Namespace(value="cv::dnn") @ByVal public static Mat blobFromImages(@ByVal UMatVector images, double scalefactor, @ByVal(nullValue="cv::Size()") Size size, @Const @ByRef(nullValue="cv::Scalar()") Scalar mean, @Cast(value="bool") boolean swapRB, @Cast(value="bool") boolean crop, int ddepth)
@Namespace(value="cv::dnn") @ByVal public static Mat blobFromImages(@ByVal UMatVector images)
@Namespace(value="cv::dnn") @ByVal public static Mat blobFromImages(@ByVal GpuMatVector images, double scalefactor, @ByVal(nullValue="cv::Size()") Size size, @Const @ByRef(nullValue="cv::Scalar()") Scalar mean, @Cast(value="bool") boolean swapRB, @Cast(value="bool") boolean crop, int ddepth)
@Namespace(value="cv::dnn") @ByVal public static Mat blobFromImages(@ByVal GpuMatVector images)
@Namespace(value="cv::dnn") public static void blobFromImages(@ByVal MatVector images, @ByVal Mat blob, double scalefactor, @ByVal(nullValue="cv::Size()") Size size, @Const @ByRef(nullValue="cv::Scalar()") Scalar mean, @Cast(value="bool") boolean swapRB, @Cast(value="bool") boolean crop, int ddepth)
@Namespace(value="cv::dnn") public static void blobFromImages(@ByVal MatVector images, @ByVal Mat blob)
@Namespace(value="cv::dnn") public static void blobFromImages(@ByVal UMatVector images, @ByVal Mat blob, double scalefactor, @ByVal(nullValue="cv::Size()") Size size, @Const @ByRef(nullValue="cv::Scalar()") Scalar mean, @Cast(value="bool") boolean swapRB, @Cast(value="bool") boolean crop, int ddepth)
@Namespace(value="cv::dnn") public static void blobFromImages(@ByVal UMatVector images, @ByVal Mat blob)
@Namespace(value="cv::dnn") public static void blobFromImages(@ByVal GpuMatVector images, @ByVal Mat blob, double scalefactor, @ByVal(nullValue="cv::Size()") Size size, @Const @ByRef(nullValue="cv::Scalar()") Scalar mean, @Cast(value="bool") boolean swapRB, @Cast(value="bool") boolean crop, int ddepth)
@Namespace(value="cv::dnn") public static void blobFromImages(@ByVal GpuMatVector images, @ByVal Mat blob)
@Namespace(value="cv::dnn") public static void blobFromImages(@ByVal MatVector images, @ByVal UMat blob, double scalefactor, @ByVal(nullValue="cv::Size()") Size size, @Const @ByRef(nullValue="cv::Scalar()") Scalar mean, @Cast(value="bool") boolean swapRB, @Cast(value="bool") boolean crop, int ddepth)
@Namespace(value="cv::dnn") public static void blobFromImages(@ByVal MatVector images, @ByVal UMat blob)
@Namespace(value="cv::dnn") public static void blobFromImages(@ByVal UMatVector images, @ByVal UMat blob, double scalefactor, @ByVal(nullValue="cv::Size()") Size size, @Const @ByRef(nullValue="cv::Scalar()") Scalar mean, @Cast(value="bool") boolean swapRB, @Cast(value="bool") boolean crop, int ddepth)
@Namespace(value="cv::dnn") public static void blobFromImages(@ByVal UMatVector images, @ByVal UMat blob)
@Namespace(value="cv::dnn") public static void blobFromImages(@ByVal GpuMatVector images, @ByVal UMat blob, double scalefactor, @ByVal(nullValue="cv::Size()") Size size, @Const @ByRef(nullValue="cv::Scalar()") Scalar mean, @Cast(value="bool") boolean swapRB, @Cast(value="bool") boolean crop, int ddepth)
@Namespace(value="cv::dnn") public static void blobFromImages(@ByVal GpuMatVector images, @ByVal UMat blob)
@Namespace(value="cv::dnn") public static void blobFromImages(@ByVal MatVector images, @ByVal GpuMat blob, double scalefactor, @ByVal(nullValue="cv::Size()") Size size, @Const @ByRef(nullValue="cv::Scalar()") Scalar mean, @Cast(value="bool") boolean swapRB, @Cast(value="bool") boolean crop, int ddepth)
@Namespace(value="cv::dnn") public static void blobFromImages(@ByVal MatVector images, @ByVal GpuMat blob)
@Namespace(value="cv::dnn") public static void blobFromImages(@ByVal UMatVector images, @ByVal GpuMat blob, double scalefactor, @ByVal(nullValue="cv::Size()") Size size, @Const @ByRef(nullValue="cv::Scalar()") Scalar mean, @Cast(value="bool") boolean swapRB, @Cast(value="bool") boolean crop, int ddepth)
@Namespace(value="cv::dnn") public static void blobFromImages(@ByVal UMatVector images, @ByVal GpuMat blob)
@Namespace(value="cv::dnn") public static void blobFromImages(@ByVal GpuMatVector images, @ByVal GpuMat blob, double scalefactor, @ByVal(nullValue="cv::Size()") Size size, @Const @ByRef(nullValue="cv::Scalar()") Scalar mean, @Cast(value="bool") boolean swapRB, @Cast(value="bool") boolean crop, int ddepth)
@Namespace(value="cv::dnn") public static void blobFromImages(@ByVal GpuMatVector images, @ByVal GpuMat blob)
@Namespace(value="cv::dnn") public static void imagesFromBlob(@Const @ByRef Mat blob_, @ByVal MatVector images_)
blob_
- [in] 4 dimensional array (images, channels, height, width) in floating point precision (CV_32F) from
which you would like to extract the images.images_
- [out] array of 2D Mat containing the images extracted from the blob in floating point precision
(CV_32F). They are non normalized neither mean added. The number of returned images equals the first dimension
of the blob (batch size). Every image has a number of channels equals to the second dimension of the blob (depth).@Namespace(value="cv::dnn") public static void imagesFromBlob(@Const @ByRef Mat blob_, @ByVal UMatVector images_)
@Namespace(value="cv::dnn") public static void imagesFromBlob(@Const @ByRef Mat blob_, @ByVal GpuMatVector images_)
@Namespace(value="cv::dnn") public static void shrinkCaffeModel(@opencv_core.Str BytePointer src, @opencv_core.Str BytePointer dst, @Const @ByRef(nullValue="std::vector<cv::String>()") StringVector layersTypes)
src
- Path to origin model from Caffe framework contains single
precision floating point weights (usually has .caffemodel
extension).dst
- Path to destination model with updated weights.layersTypes
- Set of layers types which parameters will be converted.
By default, converts only Convolutional and Fully-Connected layers'
weights.
\note Shrinked model has no origin float32 weights so it can't be used
in origin Caffe framework anymore. However the structure of data
is taken from NVidia's Caffe fork: https://github.com/NVIDIA/caffe.
So the resulting model may be used there.@Namespace(value="cv::dnn") public static void shrinkCaffeModel(@opencv_core.Str BytePointer src, @opencv_core.Str BytePointer dst)
@Namespace(value="cv::dnn") public static void shrinkCaffeModel(@opencv_core.Str String src, @opencv_core.Str String dst, @Const @ByRef(nullValue="std::vector<cv::String>()") StringVector layersTypes)
@Namespace(value="cv::dnn") public static void shrinkCaffeModel(@opencv_core.Str String src, @opencv_core.Str String dst)
@Namespace(value="cv::dnn") public static void writeTextGraph(@opencv_core.Str BytePointer model, @opencv_core.Str BytePointer output)
model
- [in] A path to binary network.output
- [in] A path to output text file to be created.
\note To reduce output file size, trained weights are not included.@Namespace(value="cv::dnn") public static void writeTextGraph(@opencv_core.Str String model, @opencv_core.Str String output)
@Namespace(value="cv::dnn") public static void NMSBoxes(@Const @ByRef RectVector bboxes, @StdVector FloatPointer scores, float score_threshold, float nms_threshold, @StdVector IntPointer indices, float eta, int top_k)
bboxes
- a set of bounding boxes to apply NMS.scores
- a set of corresponding confidences.score_threshold
- a threshold used to filter boxes by score.nms_threshold
- a threshold used in non maximum suppression.indices
- the kept indices of bboxes after NMS.eta
- a coefficient in adaptive threshold formula: nms\_threshold_{i+1}=eta\cdot nms\_threshold_i
.top_k
- if >0
, keep at most \p top_k picked indices.@Namespace(value="cv::dnn") public static void NMSBoxes(@Const @ByRef RectVector bboxes, @StdVector FloatPointer scores, float score_threshold, float nms_threshold, @StdVector IntPointer indices)
@Namespace(value="cv::dnn") public static void NMSBoxes(@Const @ByRef RectVector bboxes, @StdVector FloatBuffer scores, float score_threshold, float nms_threshold, @StdVector IntBuffer indices, float eta, int top_k)
@Namespace(value="cv::dnn") public static void NMSBoxes(@Const @ByRef RectVector bboxes, @StdVector FloatBuffer scores, float score_threshold, float nms_threshold, @StdVector IntBuffer indices)
@Namespace(value="cv::dnn") public static void NMSBoxes(@Const @ByRef RectVector bboxes, @StdVector float[] scores, float score_threshold, float nms_threshold, @StdVector int[] indices, float eta, int top_k)
@Namespace(value="cv::dnn") public static void NMSBoxes(@Const @ByRef RectVector bboxes, @StdVector float[] scores, float score_threshold, float nms_threshold, @StdVector int[] indices)
@Namespace(value="cv::dnn") public static void NMSBoxes(@Const @ByRef Rect2dVector bboxes, @StdVector FloatPointer scores, float score_threshold, float nms_threshold, @StdVector IntPointer indices, float eta, int top_k)
@Namespace(value="cv::dnn") public static void NMSBoxes(@Const @ByRef Rect2dVector bboxes, @StdVector FloatPointer scores, float score_threshold, float nms_threshold, @StdVector IntPointer indices)
@Namespace(value="cv::dnn") public static void NMSBoxes(@Const @ByRef Rect2dVector bboxes, @StdVector FloatBuffer scores, float score_threshold, float nms_threshold, @StdVector IntBuffer indices, float eta, int top_k)
@Namespace(value="cv::dnn") public static void NMSBoxes(@Const @ByRef Rect2dVector bboxes, @StdVector FloatBuffer scores, float score_threshold, float nms_threshold, @StdVector IntBuffer indices)
@Namespace(value="cv::dnn") public static void NMSBoxes(@Const @ByRef Rect2dVector bboxes, @StdVector float[] scores, float score_threshold, float nms_threshold, @StdVector int[] indices, float eta, int top_k)
@Namespace(value="cv::dnn") public static void NMSBoxes(@Const @ByRef Rect2dVector bboxes, @StdVector float[] scores, float score_threshold, float nms_threshold, @StdVector int[] indices)
@Namespace(value="cv::dnn") @Name(value="NMSBoxes") public static void NMSBoxesRotated(@StdVector RotatedRect bboxes, @StdVector FloatPointer scores, float score_threshold, float nms_threshold, @StdVector IntPointer indices, float eta, int top_k)
@Namespace(value="cv::dnn") @Name(value="NMSBoxes") public static void NMSBoxesRotated(@StdVector RotatedRect bboxes, @StdVector FloatPointer scores, float score_threshold, float nms_threshold, @StdVector IntPointer indices)
@Namespace(value="cv::dnn") @Name(value="NMSBoxes") public static void NMSBoxesRotated(@StdVector RotatedRect bboxes, @StdVector FloatBuffer scores, float score_threshold, float nms_threshold, @StdVector IntBuffer indices, float eta, int top_k)
@Namespace(value="cv::dnn") @Name(value="NMSBoxes") public static void NMSBoxesRotated(@StdVector RotatedRect bboxes, @StdVector FloatBuffer scores, float score_threshold, float nms_threshold, @StdVector IntBuffer indices)
@Namespace(value="cv::dnn") @Name(value="NMSBoxes") public static void NMSBoxesRotated(@StdVector RotatedRect bboxes, @StdVector float[] scores, float score_threshold, float nms_threshold, @StdVector int[] indices, float eta, int top_k)
@Namespace(value="cv::dnn") @Name(value="NMSBoxes") public static void NMSBoxesRotated(@StdVector RotatedRect bboxes, @StdVector float[] scores, float score_threshold, float nms_threshold, @StdVector int[] indices)
@Namespace(value="cv::dnn") @ByVal public static Mat slice(@Const @ByRef Mat m, @Const @ByRef _Range r0)
@Namespace(value="cv::dnn") @ByVal public static Mat slice(@Const @ByRef Mat m, @Const @ByRef _Range r0, @Const @ByRef _Range r1)
@Namespace(value="cv::dnn") @ByVal public static Mat slice(@Const @ByRef Mat m, @Const @ByRef _Range r0, @Const @ByRef _Range r1, @Const @ByRef _Range r2)
@Namespace(value="cv::dnn") @ByVal public static Mat slice(@Const @ByRef Mat m, @Const @ByRef _Range r0, @Const @ByRef _Range r1, @Const @ByRef _Range r2, @Const @ByRef _Range r3)
@Namespace(value="cv::dnn") @ByVal public static Mat getPlane(@Const @ByRef Mat m, int n, int cn)
@Namespace(value="cv::dnn") @StdVector @ByVal public static IntPointer shape(@Const IntPointer dims, int n)
@Namespace(value="cv::dnn") @StdVector @ByVal public static IntPointer shape(@Const IntBuffer dims, int n)
@Namespace(value="cv::dnn") @StdVector @ByVal public static IntPointer shape(@Const int[] dims, int n)
@Namespace(value="cv::dnn") @StdVector @ByVal public static IntPointer shape(@Const @ByRef Mat mat)
@Namespace(value="cv::dnn") @StdVector @ByVal public static IntPointer shape(@Const @ByRef MatSize sz)
@Namespace(value="cv::dnn") @StdVector @ByVal public static IntPointer shape(@Const @ByRef UMat mat)
@Namespace(value="cv::dnn") @Cast(value="bool") public static boolean is_neg(int i)
@Namespace(value="cv::dnn") @StdVector @ByVal public static IntPointer shape(int a0, int a1, int a2, int a3)
@Namespace(value="cv::dnn") @StdVector @ByVal public static IntPointer shape(int a0)
@Namespace(value="cv::dnn") public static int total(@Const @StdVector @ByRef IntPointer shape, int start, int end)
@Namespace(value="cv::dnn") public static int total(@Const @StdVector @ByRef IntPointer shape)
@Namespace(value="cv::dnn") @StdVector @ByVal public static IntPointer concat(@Const @StdVector @ByRef IntPointer a, @Const @StdVector @ByRef IntPointer b)
@Namespace(value="cv::dnn") @StdString public static BytePointer toString(@Const @StdVector @ByRef IntPointer shape, @opencv_core.Str BytePointer name)
@Namespace(value="cv::dnn") @StdString public static BytePointer toString(@Const @StdVector @ByRef IntPointer shape)
@Namespace(value="cv::dnn") @StdString public static String toString(@Const @StdVector @ByRef IntPointer shape, @opencv_core.Str String name)
@Namespace(value="cv::dnn") public static void print(@Const @StdVector @ByRef IntPointer shape, @opencv_core.Str BytePointer name)
@Namespace(value="cv::dnn") public static void print(@Const @StdVector @ByRef IntPointer shape)
@Namespace(value="cv::dnn") public static void print(@Const @StdVector @ByRef IntPointer shape, @opencv_core.Str String name)
@Namespace(value="cv::dnn") @Cast(value="std::ostream*") @ByRef @Name(value="operator <<") public static Pointer shiftLeft(@Cast(value="std::ostream*") @ByRef Pointer out, @Const @StdVector @ByRef IntPointer shape)
@Namespace(value="cv::dnn") public static int clamp(int ax, int dims)
@Namespace(value="cv::dnn") public static int clamp(int ax, @Const @StdVector @ByRef IntPointer shape)
Copyright © 2020. All rights reserved.