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
stringString containing one of the desired models: "edsr", "espcn", "fsrcnn", "lapsrn"
scale
intInteger specifying the upscale factor
Properties
Algorithm
Get the name of the algorithm.
public string Algorithm { get; }
Property Value
Scale
Get the scale factor of the model.
public int Scale { get; }
Property Value
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
stringPath to the model file.
ReadModel(string, string)
Read the model from the given path.
public void ReadModel(string weight, string definition)
Parameters
SetModel(string, int)
Set desired model.
public void SetModel(string algorithm, int scale)
Parameters
algorithm
stringString containing one of the desired models: "edsr", "espcn", "fsrcnn", "lapsrn"
scale
intInteger specifying the upscale factor
SetPreferableBackend(Backend)
Set computation backend.
public void SetPreferableBackend(Backend backendId)
Parameters
backendId
BackendThe computation backend.
SetPreferableTarget(Target)
Set computation target.
public void SetPreferableTarget(Target targetId)
Parameters
targetId
TargetThe computation target.
Upsample(IInputArray, IOutputArray)
Upsample via neural network.
public void Upsample(IInputArray img, IOutputArray result)
Parameters
img
IInputArrayImage to upscale
result
IOutputArrayDestination upscaled image