OpenCV  3.2.0-dev
Open Source Computer Vision
cv::superres::SuperResolution Class Referenceabstract

Base class for Super Resolution algorithms. More...

#include "superres.hpp"

Inheritance diagram for cv::superres::SuperResolution:
Collaboration diagram for cv::superres::SuperResolution:

Public Member Functions

virtual void clear ()
 Clears the algorithm state. More...
 
virtual void collectGarbage ()
 Clear all inner buffers. More...
 
virtual bool empty () const
 Returns true if the Algorithm is empty (e.g. More...
 
virtual double getAlpha () const =0
 Parameter of spacial distribution in Bilateral-TV. More...
 
virtual int getBlurKernelSize () const =0
 Gaussian blur kernel size. More...
 
virtual double getBlurSigma () const =0
 Gaussian blur sigma. More...
 
virtual String getDefaultName () const
 Returns the algorithm string identifier. More...
 
virtual int getIterations () const =0
 Iterations count. More...
 
virtual int getKernelSize () const =0
 Kernel size of Bilateral-TV filter. More...
 
virtual double getLabmda () const =0
 Weight parameter to balance data term and smoothness term. More...
 
virtual Ptr< cv::superres::DenseOpticalFlowExtgetOpticalFlow () const =0
 Dense optical flow algorithm. More...
 
virtual int getScale () const =0
 Scale factor. More...
 
virtual double getTau () const =0
 Asymptotic value of steepest descent method. More...
 
virtual int getTemporalAreaRadius () const =0
 Radius of the temporal search area. More...
 
void nextFrame (OutputArray frame)
 Process next frame from input and return output result. More...
 
virtual void read (const FileNode &fn)
 Reads algorithm parameters from a file storage. More...
 
void reset ()
 
virtual void save (const String &filename) const
 Saves the algorithm to a file. More...
 
virtual void setAlpha (double val)=0
 Parameter of spacial distribution in Bilateral-TV. More...
 
virtual void setBlurKernelSize (int val)=0
 Gaussian blur kernel size. More...
 
virtual void setBlurSigma (double val)=0
 Gaussian blur sigma. More...
 
void setInput (const Ptr< FrameSource > &frameSource)
 Set input frame source for Super Resolution algorithm. More...
 
virtual void setIterations (int val)=0
 Iterations count. More...
 
virtual void setKernelSize (int val)=0
 Kernel size of Bilateral-TV filter. More...
 
virtual void setLabmda (double val)=0
 Weight parameter to balance data term and smoothness term. More...
 
virtual void setOpticalFlow (const Ptr< cv::superres::DenseOpticalFlowExt > &val)=0
 Dense optical flow algorithm. More...
 
virtual void setScale (int val)=0
 Scale factor. More...
 
virtual void setTau (double val)=0
 Asymptotic value of steepest descent method. More...
 
virtual void setTemporalAreaRadius (int val)=0
 Radius of the temporal search area. More...
 
virtual void write (FileStorage &fs) const
 Stores algorithm parameters in a file storage. More...
 

Static Public Member Functions

template<typename _Tp >
static Ptr< _Tp > load (const String &filename, const String &objname=String())
 Loads algorithm from the file. More...
 
template<typename _Tp >
static Ptr< _Tp > loadFromString (const String &strModel, const String &objname=String())
 Loads algorithm from a String. More...
 
template<typename _Tp >
static Ptr< _Tp > read (const FileNode &fn)
 Reads algorithm from the file node. More...
 

Protected Member Functions

 SuperResolution ()
 
virtual void initImpl (Ptr< FrameSource > &frameSource)=0
 
virtual void processImpl (Ptr< FrameSource > &frameSource, OutputArray output)=0
 
void writeFormat (FileStorage &fs) const
 

Protected Attributes

bool isUmat_
 

Detailed Description

Base class for Super Resolution algorithms.

The class is only used to define the common interface for the whole family of Super Resolution algorithms.

Constructor & Destructor Documentation

cv::superres::SuperResolution::SuperResolution ( )
protected

Member Function Documentation

virtual void cv::Algorithm::clear ( )
inlinevirtualinherited

Clears the algorithm state.

Reimplemented in cv::FlannBasedMatcher, cv::DescriptorMatcher, and cv::cuda::DescriptorMatcher.

virtual void cv::superres::SuperResolution::collectGarbage ( )
virtual

Clear all inner buffers.

virtual bool cv::Algorithm::empty ( ) const
inlinevirtualinherited

Returns true if the Algorithm is empty (e.g.

in the very beginning or after unsuccessful read

Reimplemented in cv::DescriptorMatcher, cv::ml::StatModel, cv::Feature2D, cv::BaseCascadeClassifier, and cv::cuda::DescriptorMatcher.

virtual double cv::superres::SuperResolution::getAlpha ( ) const
pure virtual

Parameter of spacial distribution in Bilateral-TV.

See also
setAlpha
virtual int cv::superres::SuperResolution::getBlurKernelSize ( ) const
pure virtual

Gaussian blur kernel size.

See also
setBlurKernelSize
virtual double cv::superres::SuperResolution::getBlurSigma ( ) const
pure virtual

Gaussian blur sigma.

See also
setBlurSigma
virtual String cv::Algorithm::getDefaultName ( ) const
virtualinherited

Returns the algorithm string identifier.

This string is used as top level xml/yml node tag when the object is saved to a file or string.

virtual int cv::superres::SuperResolution::getIterations ( ) const
pure virtual

Iterations count.

See also
setIterations
virtual int cv::superres::SuperResolution::getKernelSize ( ) const
pure virtual

Kernel size of Bilateral-TV filter.

See also
setKernelSize
virtual double cv::superres::SuperResolution::getLabmda ( ) const
pure virtual

Weight parameter to balance data term and smoothness term.

See also
setLabmda
virtual Ptr<cv::superres::DenseOpticalFlowExt> cv::superres::SuperResolution::getOpticalFlow ( ) const
pure virtual

Dense optical flow algorithm.

See also
setOpticalFlow
virtual int cv::superres::SuperResolution::getScale ( ) const
pure virtual

Scale factor.

See also
setScale
virtual double cv::superres::SuperResolution::getTau ( ) const
pure virtual

Asymptotic value of steepest descent method.

See also
setTau
virtual int cv::superres::SuperResolution::getTemporalAreaRadius ( ) const
pure virtual

Radius of the temporal search area.

See also
setTemporalAreaRadius
virtual void cv::superres::SuperResolution::initImpl ( Ptr< FrameSource > &  frameSource)
protectedpure virtual
template<typename _Tp >
static Ptr<_Tp> cv::Algorithm::load ( const String filename,
const String objname = String() 
)
inlinestaticinherited

Loads algorithm from the file.

Parameters
filenameName of the file to read.
objnameThe optional name of the node to read (if empty, the first top-level node will be used)

This is static template method of Algorithm. It's usage is following (in the case of SVM):

Ptr<SVM> svm = Algorithm::load<SVM>("my_svm_model.xml");

In order to make this method work, the derived class must overwrite Algorithm::read(const FileNode& fn).

References cv::Ptr< T >::empty(), cv::FileNode::empty(), cv::FileStorage::getFirstTopLevelNode(), and cv::FileStorage::READ.

Here is the call graph for this function:

template<typename _Tp >
static Ptr<_Tp> cv::Algorithm::loadFromString ( const String strModel,
const String objname = String() 
)
inlinestaticinherited

Loads algorithm from a String.

Parameters
strModelThe string variable containing the model you want to load.
objnameThe optional name of the node to read (if empty, the first top-level node will be used)

This is static template method of Algorithm. It's usage is following (in the case of SVM):

Ptr<SVM> svm = Algorithm::loadFromString<SVM>(myStringModel);

References CV_WRAP, cv::Ptr< T >::empty(), cv::FileNode::empty(), cv::FileStorage::getFirstTopLevelNode(), cv::FileStorage::MEMORY, and cv::FileStorage::READ.

Here is the call graph for this function:

void cv::superres::SuperResolution::nextFrame ( OutputArray  frame)
virtual

Process next frame from input and return output result.

Parameters
frameOutput result

Implements cv::superres::FrameSource.

virtual void cv::superres::SuperResolution::processImpl ( Ptr< FrameSource > &  frameSource,
OutputArray  output 
)
protectedpure virtual
virtual void cv::Algorithm::read ( const FileNode fn)
inlinevirtualinherited

Reads algorithm parameters from a file storage.

Reimplemented in cv::FlannBasedMatcher, cv::DescriptorMatcher, and cv::Feature2D.

template<typename _Tp >
static Ptr<_Tp> cv::Algorithm::read ( const FileNode fn)
inlinestaticinherited

Reads algorithm from the file node.

This is static template method of Algorithm. It's usage is following (in the case of SVM):

cv::FileStorage fsRead("example.xml", FileStorage::READ);
Ptr<SVM> svm = Algorithm::read<SVM>(fsRead.root());

In order to make this method work, the derived class must overwrite Algorithm::read(const FileNode& fn) and also have static create() method without parameters (or with all the optional parameters)

References cv::Ptr< T >::empty().

Here is the call graph for this function:

void cv::superres::SuperResolution::reset ( )
virtual
virtual void cv::Algorithm::save ( const String filename) const
virtualinherited

Saves the algorithm to a file.

In order to make this method work, the derived class must implement Algorithm::write(FileStorage& fs).

virtual void cv::superres::SuperResolution::setAlpha ( double  val)
pure virtual

Parameter of spacial distribution in Bilateral-TV.

See also
getAlpha
virtual void cv::superres::SuperResolution::setBlurKernelSize ( int  val)
pure virtual

Gaussian blur kernel size.

See also
getBlurKernelSize
virtual void cv::superres::SuperResolution::setBlurSigma ( double  val)
pure virtual

Gaussian blur sigma.

See also
getBlurSigma
void cv::superres::SuperResolution::setInput ( const Ptr< FrameSource > &  frameSource)

Set input frame source for Super Resolution algorithm.

Parameters
frameSourceInput frame source
virtual void cv::superres::SuperResolution::setIterations ( int  val)
pure virtual

Iterations count.

See also
getIterations
virtual void cv::superres::SuperResolution::setKernelSize ( int  val)
pure virtual

Kernel size of Bilateral-TV filter.

See also
getKernelSize
virtual void cv::superres::SuperResolution::setLabmda ( double  val)
pure virtual

Weight parameter to balance data term and smoothness term.

See also
getLabmda
virtual void cv::superres::SuperResolution::setOpticalFlow ( const Ptr< cv::superres::DenseOpticalFlowExt > &  val)
pure virtual

Dense optical flow algorithm.

See also
getOpticalFlow
virtual void cv::superres::SuperResolution::setScale ( int  val)
pure virtual

Scale factor.

See also
getScale
virtual void cv::superres::SuperResolution::setTau ( double  val)
pure virtual

Asymptotic value of steepest descent method.

See also
getTau
virtual void cv::superres::SuperResolution::setTemporalAreaRadius ( int  val)
pure virtual

Radius of the temporal search area.

See also
getTemporalAreaRadius
virtual void cv::Algorithm::write ( FileStorage fs) const
inlinevirtualinherited

Stores algorithm parameters in a file storage.

Reimplemented in cv::FlannBasedMatcher, cv::DescriptorMatcher, and cv::Feature2D.

void cv::Algorithm::writeFormat ( FileStorage fs) const
protectedinherited

Member Data Documentation

bool cv::superres::SuperResolution::isUmat_
protected

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