Table of Contents

Class DnnSuperResImpl

Namespace
Emgu.CV.DnnSuperres
Assembly
Emgu.CV.dll

A class to upscale images via convolutional neural networks. The following four models are implemented: "edsr", "espcn", "fsrcnn", "lapsrn"

public class DnnSuperResImpl : UnmanagedObject, IDisposable
Inheritance
DnnSuperResImpl
Implements
Inherited Members

Constructors

DnnSuperResImpl()

Empty constructor.

public DnnSuperResImpl()

DnnSuperResImpl(string, int)

Constructor which immediately sets the desired model.

public DnnSuperResImpl(string algorithm, int scale)

Parameters

algorithm string

String containing one of the desired models: "edsr", "espcn", "fsrcnn", "lapsrn"

scale int

Integer specifying the upscale factor

Properties

Algorithm

Get the name of the algorithm.

public string Algorithm { get; }

Property Value

string

Scale

Get the scale factor of the model.

public int Scale { get; }

Property Value

int

Methods

DisposeObject()

Release this memory associated with this Dnn super resolution model.

protected override void DisposeObject()

ReadModel(string)

Read the model from the given path.

public void ReadModel(string path)

Parameters

path string

Path to the model file.

ReadModel(string, string)

Read the model from the given path.

public void ReadModel(string weight, string definition)

Parameters

weight string

Path to the model weights file.

definition string

Path to the model definition file.

SetModel(string, int)

Set desired model.

public void SetModel(string algorithm, int scale)

Parameters

algorithm string

String containing one of the desired models: "edsr", "espcn", "fsrcnn", "lapsrn"

scale int

Integer specifying the upscale factor

SetPreferableBackend(Backend)

Set computation backend.

public void SetPreferableBackend(Backend backendId)

Parameters

backendId Backend

The computation backend.

SetPreferableTarget(Target)

Set computation target.

public void SetPreferableTarget(Target targetId)

Parameters

targetId Target

The computation target.

Upsample(IInputArray, IOutputArray)

Upsample via neural network.

public void Upsample(IInputArray img, IOutputArray result)

Parameters

img IInputArray

Image to upscale

result IOutputArray

Destination upscaled image