MDSTk Libraries  1.1.0
Medical Data Segmentation Toolkit
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes
mds::img::COpticalFlow< I > Class Template Reference

#include <mdsLucasKanade.h>

Inheritance diagram for mds::img::COpticalFlow< I >:
Inheritance graph
[legend]

List of all members.

Public Types

enum  { TEMPLATE_PARAMETER_IS_NOT_IMAGE = I::CLASS_IMAGE }
 Check that I is an image. More...
enum  { CLASS_OBJECT }
 Templates that require members of the CObject class can use this enum to check the existence. More...
enum  { HEAP_OBJECT = 0x70616568 }
 Signature used to recognize objects on the heap. More...
typedef I::tImage tImage
 Image type.
typedef I::tSmartPtr tImageSmartPtr
 Smart pointer to image.
typedef I::tPixel tPixel
 Image pixel type.
typedef mds::img::CPyramid
< tImage
tPyramid
 Image pyramid.

Public Member Functions

void clear ()
 Clears the motion vector.
bool compute (const tPyramid &First, const tPyramid &Second)
 Estimates optical flow between two given images.
 COpticalFlow (tSize WindowSize=DEFAULT_WINDOW)
 Constructor.
 COpticalFlow (mds::img::tCoordinate x, mds::img::tCoordinate y, tSize WindowSize=DEFAULT_WINDOW)
 Constructor.
CVector3DgetMotion ()
 Returns reference to the estimated motion.
const CVector3DgetMotion () const
CPoint3DgetPosition ()
 Returns reference to the current point position.
const CPoint3DgetPosition () const
int getReferencesCount () const
 Returns the number of references.
int getWindowSize () const
 Returns size of the used window.
bool isOnHeap () const
 Returns true if the object is allocated on the heap.
 MDS_SHAREDPTR (COpticalFlow)
 Smart pointer type.
bool visualize (tImage &Image)
 Visualizes the estimated optical flow.
void warp ()
 Moves point in the direction of the previously estimated optical flow.
virtual ~COpticalFlow ()
 Destructor.

Static Public Member Functions

static void * operator new (std::size_t Size)
 Allocates a new object on the heap.

Static Public Attributes

static const tSize DEFAULT_WINDOW = 13
 Default size of the window that is used to estimate optical flow.

Protected Member Functions

void addReference () const
 Increase the reference counter.
bool delReference () const
 Decrease the reference counter.

Protected Attributes

int m_iHeapObject
 Flag initialized if the object is on the heap.
int m_iReferences
 The number of references to the object.
mds::math::CDMatrix m_It
mds::math::CDMatrix m_Ix
 Helper matrixes.
mds::math::CDMatrix m_Iy
CVector3D m_Motion
 Estimated optical flow.
CPoint3D m_Point
 Subpixel point position.
tSize m_WindowSize
 Size of the window.

template<class I>
class mds::img::COpticalFlow< I >


Member Typedef Documentation

template<class I >
typedef I::tImage mds::img::COpticalFlow< I >::tImage

Image type.

template<class I >
typedef I::tSmartPtr mds::img::COpticalFlow< I >::tImageSmartPtr

Smart pointer to image.

template<class I >
typedef I::tPixel mds::img::COpticalFlow< I >::tPixel

Image pixel type.

template<class I >
typedef mds::img::CPyramid<tImage> mds::img::COpticalFlow< I >::tPyramid

Image pyramid.


Member Enumeration Documentation

template<class I >
anonymous enum

Check that I is an image.

You will see name of this enum somewhere in compiler error message if the type I is not image.

Enumerator:
TEMPLATE_PARAMETER_IS_NOT_IMAGE 
anonymous enum [inherited]

Templates that require members of the CObject class can use this enum to check the existence.

Enumerator:
CLASS_OBJECT 
anonymous enum [inherited]

Signature used to recognize objects on the heap.

Enumerator:
HEAP_OBJECT 

Constructor & Destructor Documentation

template<class I >
mds::img::COpticalFlow< I >::COpticalFlow ( tSize  WindowSize = DEFAULT_WINDOW)

Constructor.

Constructor.

  • Initial subpixel point position and window size.
template<class I >
virtual mds::img::COpticalFlow< I >::~COpticalFlow ( ) [virtual]

Destructor.


Member Function Documentation

void mds::base::CObject::addReference ( ) const [protected, inherited]

Increase the reference counter.

template<class I >
void COpticalFlow::clear ( )

Clears the motion vector.

template<class I >
bool COpticalFlow::compute ( const tPyramid First,
const tPyramid Second 
)

Estimates optical flow between two given images.

  • Both images are represented by the image pyramid.
bool mds::base::CObject::delReference ( ) const [protected, inherited]

Decrease the reference counter.

  • Returns true if the decremented number of references is lower or equal to zero and object must be deleted.
template<class I >
CVector3D& mds::img::COpticalFlow< I >::getMotion ( )

Returns reference to the estimated motion.

template<class I >
const CVector3D& mds::img::COpticalFlow< I >::getMotion ( ) const
template<class I >
CPoint3D& mds::img::COpticalFlow< I >::getPosition ( )

Returns reference to the current point position.

template<class I >
const CPoint3D& mds::img::COpticalFlow< I >::getPosition ( ) const

Returns the number of references.

template<class I >
int mds::img::COpticalFlow< I >::getWindowSize ( ) const

Returns size of the used window.

bool mds::base::CObject::isOnHeap ( ) const [inherited]

Returns true if the object is allocated on the heap.

template<class I >
mds::img::COpticalFlow< I >::MDS_SHAREDPTR ( COpticalFlow< I >  )

Smart pointer type.

  • declares type tPointer.
static void* mds::base::CObject::operator new ( std::size_t  Size) [static, inherited]

Allocates a new object on the heap.

template<class I >
bool COpticalFlow::visualize ( tImage Image)

Visualizes the estimated optical flow.

  • Draws a simple white line representing the estimated motion vector.
template<class I >
void COpticalFlow::warp ( )

Moves point in the direction of the previously estimated optical flow.


Member Data Documentation

template<class I >
const tSize COpticalFlow::DEFAULT_WINDOW = 13 [static]

Default size of the window that is used to estimate optical flow.

int mds::base::CObject::m_iHeapObject [mutable, protected, inherited]

Flag initialized if the object is on the heap.

int mds::base::CObject::m_iReferences [mutable, protected, inherited]

The number of references to the object.

  • Zero if there is no reference.
template<class I >
mds::math::CDMatrix mds::img::COpticalFlow< I >::m_It [protected]
template<class I >
mds::math::CDMatrix mds::img::COpticalFlow< I >::m_Ix [protected]

Helper matrixes.

template<class I >
mds::math::CDMatrix mds::img::COpticalFlow< I >::m_Iy [protected]
template<class I >
CVector3D mds::img::COpticalFlow< I >::m_Motion [protected]

Estimated optical flow.

template<class I >
CPoint3D mds::img::COpticalFlow< I >::m_Point [protected]

Subpixel point position.

template<class I >
tSize mds::img::COpticalFlow< I >::m_WindowSize [protected]

Size of the window.


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