@Namespace(value="cv::dnn_superres") @NoOffset @Properties(inherit=opencv_dnn_superres.class) public class DnnSuperResImpl extends Pointer
/** \brief A class to upscale images via convolutional neural networks. The following four models are implemented:
- edsr - espcn - fsrcnn - lapsrn
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
DnnSuperResImpl() |
DnnSuperResImpl(BytePointer algo,
int scale)
\brief Constructor which immediately sets the desired model
|
DnnSuperResImpl(long size)
Native array allocator.
|
DnnSuperResImpl(Pointer p)
Pointer cast constructor.
|
DnnSuperResImpl(String algo,
int scale) |
Modifier and Type | Method and Description |
---|---|
static DnnSuperResImpl |
create()
\brief Empty constructor for python
|
BytePointer |
getAlgorithm()
\brief Returns the scale factor of the model:
|
int |
getScale()
\brief Returns the scale factor of the model:
|
DnnSuperResImpl |
position(long position) |
void |
readModel(BytePointer path)
\brief Read the model from the given path
|
void |
readModel(BytePointer weights,
BytePointer definition)
\brief Read the model from the given path
|
void |
readModel(String path) |
void |
readModel(String weights,
String definition) |
void |
setModel(BytePointer algo,
int scale)
\brief Set desired model
|
void |
setModel(String algo,
int scale) |
void |
upsample(GpuMat img,
GpuMat result) |
void |
upsample(Mat img,
Mat result)
\brief Upsample via neural network
|
void |
upsample(UMat img,
UMat result) |
void |
upsampleMultioutput(GpuMat img,
MatVector imgs_new,
int[] scale_factors,
StringVector node_names) |
void |
upsampleMultioutput(GpuMat img,
MatVector imgs_new,
IntBuffer scale_factors,
StringVector node_names) |
void |
upsampleMultioutput(GpuMat img,
MatVector imgs_new,
IntPointer scale_factors,
StringVector node_names) |
void |
upsampleMultioutput(Mat img,
MatVector imgs_new,
int[] scale_factors,
StringVector node_names) |
void |
upsampleMultioutput(Mat img,
MatVector imgs_new,
IntBuffer scale_factors,
StringVector node_names) |
void |
upsampleMultioutput(Mat img,
MatVector imgs_new,
IntPointer scale_factors,
StringVector node_names)
\brief Upsample via neural network of multiple outputs
|
void |
upsampleMultioutput(UMat img,
MatVector imgs_new,
int[] scale_factors,
StringVector node_names) |
void |
upsampleMultioutput(UMat img,
MatVector imgs_new,
IntBuffer scale_factors,
StringVector node_names) |
void |
upsampleMultioutput(UMat img,
MatVector imgs_new,
IntPointer scale_factors,
StringVector node_names) |
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, hashCode, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetof, parseBytes, physicalBytes, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, toString, totalBytes, totalPhysicalBytes, withDeallocator, zero
public DnnSuperResImpl(Pointer p)
Pointer.Pointer(Pointer)
.public DnnSuperResImpl(long size)
Pointer.position(long)
.public DnnSuperResImpl()
public DnnSuperResImpl(@opencv_core.Str BytePointer algo, int scale)
algo
- String containing one of the desired models:
- __edsr__
- __espcn__
- __fsrcnn__
- __lapsrn__scale
- Integer specifying the upscale factorpublic DnnSuperResImpl(@opencv_core.Str String algo, int scale)
public DnnSuperResImpl position(long position)
@opencv_core.Ptr public static DnnSuperResImpl create()
public void readModel(@opencv_core.Str BytePointer path)
path
- Path to the model file.public void readModel(@opencv_core.Str String path)
public void readModel(@opencv_core.Str BytePointer weights, @opencv_core.Str BytePointer definition)
weights
- Path to the model weights file.definition
- Path to the model definition file.public void readModel(@opencv_core.Str String weights, @opencv_core.Str String definition)
public void setModel(@opencv_core.Str BytePointer algo, int scale)
algo
- String containing one of the desired models:
- __edsr__
- __espcn__
- __fsrcnn__
- __lapsrn__scale
- Integer specifying the upscale factorpublic void setModel(@opencv_core.Str String algo, int scale)
public void upsample(@ByVal Mat img, @ByVal Mat result)
img
- Image to upscaleresult
- Destination upscaled imagepublic void upsampleMultioutput(@ByVal Mat img, @ByRef MatVector imgs_new, @StdVector IntPointer scale_factors, @Const @ByRef StringVector node_names)
img
- Image to upscaleimgs_new
- Destination upscaled imagesscale_factors
- Scaling factors of the output nodesnode_names
- Names of the output nodes in the neural networkpublic void upsampleMultioutput(@ByVal Mat img, @ByRef MatVector imgs_new, @StdVector IntBuffer scale_factors, @Const @ByRef StringVector node_names)
public void upsampleMultioutput(@ByVal Mat img, @ByRef MatVector imgs_new, @StdVector int[] scale_factors, @Const @ByRef StringVector node_names)
public void upsampleMultioutput(@ByVal UMat img, @ByRef MatVector imgs_new, @StdVector IntPointer scale_factors, @Const @ByRef StringVector node_names)
public void upsampleMultioutput(@ByVal UMat img, @ByRef MatVector imgs_new, @StdVector IntBuffer scale_factors, @Const @ByRef StringVector node_names)
public void upsampleMultioutput(@ByVal UMat img, @ByRef MatVector imgs_new, @StdVector int[] scale_factors, @Const @ByRef StringVector node_names)
public void upsampleMultioutput(@ByVal GpuMat img, @ByRef MatVector imgs_new, @StdVector IntPointer scale_factors, @Const @ByRef StringVector node_names)
public void upsampleMultioutput(@ByVal GpuMat img, @ByRef MatVector imgs_new, @StdVector IntBuffer scale_factors, @Const @ByRef StringVector node_names)
public void upsampleMultioutput(@ByVal GpuMat img, @ByRef MatVector imgs_new, @StdVector int[] scale_factors, @Const @ByRef StringVector node_names)
public int getScale()
@opencv_core.Str public BytePointer getAlgorithm()
Copyright © 2020. All rights reserved.