@Namespace(value="cv::dnn") @NoOffset public static class opencv_dnn.Net extends Pointer
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator| Constructor and Description |
|---|
opencv_dnn.Net()
Default constructor.
|
opencv_dnn.Net(long size)
Native array allocator.
|
opencv_dnn.Net(Pointer p)
Pointer cast constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
addLayer(BytePointer name,
BytePointer type,
opencv_dnn.LayerParams params)
\brief Adds new layer to the net.
|
int |
addLayer(String name,
String type,
opencv_dnn.LayerParams params) |
int |
addLayerToPrev(BytePointer name,
BytePointer type,
opencv_dnn.LayerParams params)
\brief Adds new layer and connects its first input to the first output of previously added layer.
|
int |
addLayerToPrev(String name,
String type,
opencv_dnn.LayerParams params) |
void |
connect(BytePointer outPin,
BytePointer inpPin)
\brief Connects output of the first layer to input of the second layer.
|
void |
connect(int outLayerId,
int outNum,
int inpLayerId,
int inpNum)
\brief Connects #\p outNum output of the first layer to #\p inNum input of the second layer.
|
void |
connect(String outPin,
String inpPin) |
void |
deleteLayer(opencv_dnn.DictValue layer)
\brief Delete layer for the network (not implemented yet)
|
void |
forward()
\brief Runs forward pass for the whole network
|
void |
forward(opencv_dnn.DictValue toLayer)
\brief Runs forward pass to compute output of layer \p toLayer
|
opencv_dnn.Blob |
getBlob(BytePointer outputName)
\brief Returns the layer output blob.
|
opencv_dnn.Blob |
getBlob(String outputName) |
int |
getLayerId(BytePointer layer)
\brief Converts string name of the layer to the integer identifier.
|
int |
getLayerId(String layer) |
opencv_dnn.Blob |
getParam(opencv_dnn.DictValue layer) |
opencv_dnn.Blob |
getParam(opencv_dnn.DictValue layer,
int numParam)
\brief Returns parameter blob of the layer.
|
opencv_dnn.Net |
position(long position) |
void |
setBlob(BytePointer outputName,
opencv_dnn.Blob blob)
\brief Sets the new value for the layer output blob
|
void |
setBlob(String outputName,
opencv_dnn.Blob blob) |
void |
setNetInputs(opencv_core.StringVector inputBlobNames)
\brief Sets ouputs names of the network input pseudo layer.
|
address, asBuffer, asByteBuffer, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, hashCode, isNull, limit, limit, maxBytes, memchr, memcmp, memcpy, memmove, memset, offsetof, position, put, setNull, sizeof, toString, totalBytes, withDeallocator, zeropublic opencv_dnn.Net(Pointer p)
Pointer.Pointer(Pointer).public opencv_dnn.Net(long size)
Pointer.position(long).public opencv_dnn.Net()
public opencv_dnn.Net position(long position)
public int addLayer(@opencv_core.Str BytePointer name, @opencv_core.Str BytePointer type, @ByRef opencv_dnn.LayerParams params)
name - unique name of the adding layer.type - typename of the adding layer (type must be registered in LayerRegister).params - parameters which will be used to initialize the creating layer.public int addLayer(@opencv_core.Str String name, @opencv_core.Str String type, @ByRef opencv_dnn.LayerParams params)
public int addLayerToPrev(@opencv_core.Str BytePointer name, @opencv_core.Str BytePointer type, @ByRef opencv_dnn.LayerParams params)
addLayer()public int addLayerToPrev(@opencv_core.Str String name, @opencv_core.Str String type, @ByRef opencv_dnn.LayerParams params)
public int getLayerId(@opencv_core.Str BytePointer layer)
public int getLayerId(@opencv_core.Str String layer)
public void deleteLayer(@ByVal@Cast(value="cv::dnn::Net::LayerId*") opencv_dnn.DictValue layer)
public void connect(@opencv_core.Str BytePointer outPin, @opencv_core.Str BytePointer inpPin)
outPin - descriptor of the first layer output.inpPin - descriptor of the second layer input.
Descriptors have the following template <layer_name>[.input_number]:
- the first part of the template layer_name is sting name of the added layer.
If this part is empty then the network input pseudo layer will be used;
- the second optional part of the template input_number
is either number of the layer input, either label one.
If this part is omitted then the first layer input will be used.setNetInputs(), Layer::inputNameToIndex(), Layer::outputNameToIndex()public void connect(@opencv_core.Str String outPin, @opencv_core.Str String inpPin)
public void connect(int outLayerId,
int outNum,
int inpLayerId,
int inpNum)
outLayerId - identifier of the first layerinpLayerId - identifier of the second layeroutNum - number of the first layer outputinpNum - number of the second layer inputpublic void setNetInputs(@Const@ByRef opencv_core.StringVector inputBlobNames)
public void forward()
public void forward(@ByVal@Cast(value="cv::dnn::Net::LayerId*") opencv_dnn.DictValue toLayer)
public void setBlob(@opencv_core.Str BytePointer outputName, @Const@ByRef opencv_dnn.Blob blob)
outputName - descriptor of the updating layer output blob.blob - new blob.to know format of the descriptor.
\note If updating blob is not empty then \p blob must have the same shape,
because network reshaping is not implemented yet.public void setBlob(@opencv_core.Str String outputName, @Const@ByRef opencv_dnn.Blob blob)
@ByVal public opencv_dnn.Blob getBlob(@opencv_core.Str BytePointer outputName)
outputName - the descriptor of the returning layer output blob.connect(String, String)@ByVal public opencv_dnn.Blob getBlob(@opencv_core.Str String outputName)
@ByVal public opencv_dnn.Blob getParam(@ByVal@Cast(value="cv::dnn::Net::LayerId*") opencv_dnn.DictValue layer, int numParam)
layer - name or id of the layer.numParam - index of the layer parameter in the Layer::blobs array.Layer::blobs@ByVal public opencv_dnn.Blob getParam(@ByVal@Cast(value="cv::dnn::Net::LayerId*") opencv_dnn.DictValue layer)
Copyright © 2016. All rights reserved.