OpenCV for Unity 2.6.5
Enox Software / Please refer to OpenCV official document ( http://docs.opencv.org/4.10.0/index.html ) for the details of the argument of the method.
Loading...
Searching...
No Matches
OpenCVForUnity.Dnn_superresModule.DnnSuperResImpl Class Reference

A class to upscale images via convolutional neural networks. The following four models are implemented: More...

Public Member Functions

string getAlgorithm ()
 Returns the scale factor of the model:
 
IntPtr getNativeObjAddr ()
 
int getScale ()
 Returns the scale factor of the model:
 
void readModel (string path)
 Read the model from the given path.
 
void setModel (string algo, int scale)
 Set desired model.
 
void setPreferableBackend (int backendId)
 Set computation backend.
 
void setPreferableTarget (int targetId)
 Set computation target.
 
void upsample (Mat img, Mat result)
 Upsample via neural network.
 
void upsampleMultioutput (Mat img, List< Mat > imgs_new, MatOfInt scale_factors, List< string > node_names)
 Upsample via neural network of multiple outputs.
 
- Public Member Functions inherited from OpenCVForUnity.DisposableObject
void Dispose ()
 
void ThrowIfDisposed ()
 

Static Public Member Functions

static DnnSuperResImpl __fromPtr__ (IntPtr addr)
 
static DnnSuperResImpl create ()
 Empty constructor for python.
 
- Static Public Member Functions inherited from OpenCVForUnity.DisposableObject
static IntPtr ThrowIfNullIntPtr (IntPtr ptr)
 

Protected Member Functions

override void Dispose (bool disposing)
 
- Protected Member Functions inherited from OpenCVForUnity.DisposableOpenCVObject
 DisposableOpenCVObject ()
 
 DisposableOpenCVObject (bool isEnabledDispose)
 
 DisposableOpenCVObject (IntPtr ptr)
 
 DisposableOpenCVObject (IntPtr ptr, bool isEnabledDispose)
 
- Protected Member Functions inherited from OpenCVForUnity.DisposableObject
 DisposableObject ()
 
 DisposableObject (bool isEnabledDispose)
 

Additional Inherited Members

- Package Attributes inherited from OpenCVForUnity.DisposableOpenCVObject
- Properties inherited from OpenCVForUnity.DisposableObject
bool IsDisposed [get, protected set]
 
bool IsEnabledDispose [get, set]
 

Detailed Description

A class to upscale images via convolutional neural networks. The following four models are implemented:

  • edsr
  • espcn
  • fsrcnn
  • lapsrn

Member Function Documentation

◆ __fromPtr__()

static DnnSuperResImpl OpenCVForUnity.Dnn_superresModule.DnnSuperResImpl.__fromPtr__ ( IntPtr addr)
static

◆ create()

static DnnSuperResImpl OpenCVForUnity.Dnn_superresModule.DnnSuperResImpl.create ( )
static

Empty constructor for python.

◆ Dispose()

override void OpenCVForUnity.Dnn_superresModule.DnnSuperResImpl.Dispose ( bool disposing)
protectedvirtual

◆ getAlgorithm()

string OpenCVForUnity.Dnn_superresModule.DnnSuperResImpl.getAlgorithm ( )

Returns the scale factor of the model:

Returns
Current algorithm.

◆ getNativeObjAddr()

IntPtr OpenCVForUnity.Dnn_superresModule.DnnSuperResImpl.getNativeObjAddr ( )

◆ getScale()

int OpenCVForUnity.Dnn_superresModule.DnnSuperResImpl.getScale ( )

Returns the scale factor of the model:

Returns
Current scale factor.

◆ readModel()

void OpenCVForUnity.Dnn_superresModule.DnnSuperResImpl.readModel ( string path)

Read the model from the given path.

Parameters
pathPath to the model file.

◆ setModel()

void OpenCVForUnity.Dnn_superresModule.DnnSuperResImpl.setModel ( string algo,
int scale )

Set desired model.

Parameters
algoString containing one of the desired models:
  • edsr
  • espcn
  • fsrcnn
  • lapsrn
scaleInteger specifying the upscale factor

◆ setPreferableBackend()

void OpenCVForUnity.Dnn_superresModule.DnnSuperResImpl.setPreferableBackend ( int backendId)

Set computation backend.

◆ setPreferableTarget()

void OpenCVForUnity.Dnn_superresModule.DnnSuperResImpl.setPreferableTarget ( int targetId)

Set computation target.

◆ upsample()

void OpenCVForUnity.Dnn_superresModule.DnnSuperResImpl.upsample ( Mat img,
Mat result )

Upsample via neural network.

Parameters
imgImage to upscale
resultDestination upscaled image

◆ upsampleMultioutput()

void OpenCVForUnity.Dnn_superresModule.DnnSuperResImpl.upsampleMultioutput ( Mat img,
List< Mat > imgs_new,
MatOfInt scale_factors,
List< string > node_names )

Upsample via neural network of multiple outputs.

Parameters
imgImage to upscale
imgs_newDestination upscaled images
scale_factorsScaling factors of the output nodes
node_namesNames of the output nodes in the neural network

The documentation for this class was generated from the following file: