ncut::ElementProfile< IMG_ELM_TYPE, MSK_ELM_TYPE > Class Template Reference

ElementProfile handles the similarity information of the elements in a frame window. More...

#include <motionProfile.h>

Inheritance diagram for ncut::ElementProfile< IMG_ELM_TYPE, MSK_ELM_TYPE >:

ncut::Profile< IMG_ELM_TYPE, MSK_ELM_TYPE > List of all members.

Public Member Functions

const Image< IMG_ELM_TYPE > * frame (unsigned int num) const
 Get the n-th frame in this frame window.
const Image< MSK_ELM_TYPE > * mask (unsigned int num) const
 Get the n-th mask in this frame window.
const MSK_ELM_TYPE & mask (unsigned int num, unsigned int pxl) const
 Get a pixel in the n-th mask of this frame window.
const IMG_ELM_TYPE & frame (unsigned int num, unsigned int pxlelm) const
 Get a pixel in the n-th frame of this frame window.
unsigned int width () const
 Get the width of the frames.
unsigned int height () const
 Get the height of the frames.
unsigned int nChl () const
 Get the number of channels of the frames.
unsigned int nFrm () const
 Get the number of frames in the current frame window.
unsigned int wSize () const
 Get the preset size of the frame window in frames.
unsigned int nElm () const
 Get the number of elements in this profile.
const std::vector< std::vector<
unsigned int > > * 
pixels () const
 Get a list if pixels for each element.
const std::vector< unsigned
int > * 
pixels (unsigned int idx) const
 Get the pixels of an element.
unsigned int frameOf (unsigned int idx) const
 Get the frame containing the element with index idx.
const Matrixneighbors () const
 Get the neighbourhood matrix of this profile.
double hueVecX (unsigned int elm) const
 Get the mean hue vector x coordinate of an element.
double hueVecY (unsigned int elm) const
 Get the mean hue vector y coordinate of an element.
double lightness (unsigned int elm) const
 Get the mean lightness of an element.
double saturation (unsigned int elm) const
 Get the mean saturation of an element.
double intensity (unsigned int elm, unsigned int chl) const
 Get the mean intensity for one channel of an element.
double locationX (unsigned int elm) const
 Get the mean location x-coordinate of an element.
double locationY (unsigned int elm) const
 Get the mean location y-coordinate of an element.
double locationZ (unsigned int elm) const
 Get the mean location z-coordinate of an element (frame number).
unsigned int nPixels (unsigned int elm) const
 Get the number of pixels of an element.
unsigned int minIdx (unsigned int frm) const
 Get the minimum element index in the given frame.
unsigned int maxIdx (unsigned int frm) const
 Get the maximum element index in the given frame.
int push (const Image< IMG_ELM_TYPE > *frame, const Image< MSK_ELM_TYPE > *mask)
 Calculate element info of a new frame.
 ElementProfile (unsigned int wSize, const Setting *setting)
 ElementProfile is constucted passing a frame window size.
 ElementProfile (const ElementProfile &clone)
 ElementProfile copy constructor.
virtual ~ElementProfile ()
 ElementProfile destructor.
virtual ElementProfileoperator= (const ElementProfile &clone)
 ElementProfile assignment operator.

Public Attributes

const double normFac

Protected Attributes

Sequence< IMG_ELM_TYPE > frameSeq_
Sequence< MSK_ELM_TYPE > maskSeq_
unsigned int wSize_
unsigned int width_
unsigned int height_
unsigned int nChl_
unsigned int nElm_
std::vector< std::vector<
unsigned int > > 
pxls_
std::vector< unsigned int > maxElmIdx_
Matrix neighbors_
double * hue_
double * hueVariation_
double * hueVecX_
double * hueVecY_
double * lightness_
double * litVariation_
double * saturation_
double * satVariation_
double ** intensity_
double * locationX_
double * locationY_
double * locationZ_
unsigned int * nPixels_

Detailed Description

template<class IMG_ELM_TYPE = unsigned char, class MSK_ELM_TYPE = signed long>
class ncut::ElementProfile< IMG_ELM_TYPE, MSK_ELM_TYPE >

ElementProfile handles the similarity information of the elements in a frame window.

Segmentation is only done on a few frames (= frame window) of the sequence. The frame window is moved over the whole sequence to get a complete segmentation. An ElementProfile is used to store information about the elements in one frame window (= the frames that are used for one segmentation step). It is also used to calculate the similarity between those elements, which is then stored in the similarity matrix. ElementProfile administers the frame and mask sequences.


Constructor & Destructor Documentation

template<class IMG_ELM_TYPE, class MSK_ELM_TYPE>
ncut::ElementProfile< IMG_ELM_TYPE, MSK_ELM_TYPE >::ElementProfile unsigned int  wSize,
const Setting setting
 

ElementProfile is constucted passing a frame window size.

Parameters:
wSize The size of the frame window.
setting The parameters of the current segmentation.
A new empty ElementProfile is constructed. Use push until the frame window is filled to start info and similarity calculation.

template<class IMG_ELM_TYPE, class MSK_ELM_TYPE>
ncut::ElementProfile< IMG_ELM_TYPE, MSK_ELM_TYPE >::ElementProfile const ElementProfile< IMG_ELM_TYPE, MSK_ELM_TYPE > &  clone  ) 
 

ElementProfile copy constructor.

Parameters:
clone The ElementProfile to be cloned.


Member Function Documentation

template<class IMG_ELM_TYPE = unsigned char, class MSK_ELM_TYPE = signed long>
const IMG_ELM_TYPE& ncut::ElementProfile< IMG_ELM_TYPE, MSK_ELM_TYPE >::frame unsigned int  num,
unsigned int  pxlelm
const [inline]
 

Get a pixel in the n-th frame of this frame window.

Parameters:
num the number of the frame
pxlelm e.g. to get channel c of pixel p of an n-channel image use p*n+c
Returns:
the value of one channel of a pixel in the specified frame

template<class IMG_ELM_TYPE = unsigned char, class MSK_ELM_TYPE = signed long>
const Image<IMG_ELM_TYPE>* ncut::ElementProfile< IMG_ELM_TYPE, MSK_ELM_TYPE >::frame unsigned int  num  )  const [inline]
 

Get the n-th frame in this frame window.

Parameters:
num the number of the frame
Returns:
a pointer to the specified frame

template<class IMG_ELM_TYPE, class MSK_ELM_TYPE>
unsigned int ncut::ElementProfile< IMG_ELM_TYPE, MSK_ELM_TYPE >::frameOf unsigned int  idx  )  const
 

Get the frame containing the element with index idx.

Parameters:
idx The index of the element.
Returns:
The number of the frame containing the element.

template<class IMG_ELM_TYPE = unsigned char, class MSK_ELM_TYPE = signed long>
unsigned int ncut::ElementProfile< IMG_ELM_TYPE, MSK_ELM_TYPE >::height  )  const [inline]
 

Get the height of the frames.

Returns:
The height of the frames.

template<class IMG_ELM_TYPE = unsigned char, class MSK_ELM_TYPE = signed long>
double ncut::ElementProfile< IMG_ELM_TYPE, MSK_ELM_TYPE >::hueVecX unsigned int  elm  )  const [inline]
 

Get the mean hue vector x coordinate of an element.

Parameters:
elm The index of the element.
Returns:
The hue vector x coordinate of an element.

template<class IMG_ELM_TYPE = unsigned char, class MSK_ELM_TYPE = signed long>
double ncut::ElementProfile< IMG_ELM_TYPE, MSK_ELM_TYPE >::hueVecY unsigned int  elm  )  const [inline]
 

Get the mean hue vector y coordinate of an element.

Parameters:
elm The index of the element.
Returns:
The hue vector xycoordinate of an element.

template<class IMG_ELM_TYPE = unsigned char, class MSK_ELM_TYPE = signed long>
double ncut::ElementProfile< IMG_ELM_TYPE, MSK_ELM_TYPE >::intensity unsigned int  elm,
unsigned int  chl
const [inline]
 

Get the mean intensity for one channel of an element.

Parameters:
elm The index of the element.
chl The colour channel.
Returns:
The mean intensity of the element.

template<class IMG_ELM_TYPE = unsigned char, class MSK_ELM_TYPE = signed long>
double ncut::ElementProfile< IMG_ELM_TYPE, MSK_ELM_TYPE >::lightness unsigned int  elm  )  const [inline]
 

Get the mean lightness of an element.

Parameters:
elm The index of the element.
Returns:
The lightness of an element.

template<class IMG_ELM_TYPE = unsigned char, class MSK_ELM_TYPE = signed long>
double ncut::ElementProfile< IMG_ELM_TYPE, MSK_ELM_TYPE >::locationX unsigned int  elm  )  const [inline]
 

Get the mean location x-coordinate of an element.

Parameters:
elm The index of the element.
Returns:
The mean location x-coordinate of an element (in pixels).

template<class IMG_ELM_TYPE = unsigned char, class MSK_ELM_TYPE = signed long>
double ncut::ElementProfile< IMG_ELM_TYPE, MSK_ELM_TYPE >::locationY unsigned int  elm  )  const [inline]
 

Get the mean location y-coordinate of an element.

Parameters:
elm The index of the element.
Returns:
The mean location y-coordinate of an element (in pixels).

template<class IMG_ELM_TYPE = unsigned char, class MSK_ELM_TYPE = signed long>
double ncut::ElementProfile< IMG_ELM_TYPE, MSK_ELM_TYPE >::locationZ unsigned int  elm  )  const [inline]
 

Get the mean location z-coordinate of an element (frame number).

Parameters:
elm The index of the element.
Returns:
The mean location z-coordinate of an element (in frames). This function returns the "mean" frame number in this frame window. This number does not have to be an integer if the element spans multiple frames.

template<class IMG_ELM_TYPE = unsigned char, class MSK_ELM_TYPE = signed long>
const MSK_ELM_TYPE& ncut::ElementProfile< IMG_ELM_TYPE, MSK_ELM_TYPE >::mask unsigned int  num,
unsigned int  pxl
const [inline]
 

Get a pixel in the n-th mask of this frame window.

Parameters:
num the number of the mask
pxl the number of the pixel
Returns:
the element number of the element the pixel belongs to

template<class IMG_ELM_TYPE = unsigned char, class MSK_ELM_TYPE = signed long>
const Image<MSK_ELM_TYPE>* ncut::ElementProfile< IMG_ELM_TYPE, MSK_ELM_TYPE >::mask unsigned int  num  )  const [inline]
 

Get the n-th mask in this frame window.

Parameters:
num the number of the mask
Returns:
a pointer the specified mask

template<class IMG_ELM_TYPE = unsigned char, class MSK_ELM_TYPE = signed long>
unsigned int ncut::ElementProfile< IMG_ELM_TYPE, MSK_ELM_TYPE >::maxIdx unsigned int  frm  )  const [inline]
 

Get the maximum element index in the given frame.

Parameters:
frm The number of the frame in tghe current frame window.
Returns:
The maximum element index in the given frame.

template<class IMG_ELM_TYPE = unsigned char, class MSK_ELM_TYPE = signed long>
unsigned int ncut::ElementProfile< IMG_ELM_TYPE, MSK_ELM_TYPE >::minIdx unsigned int  frm  )  const [inline]
 

Get the minimum element index in the given frame.

Parameters:
frm The number of the frame in tghe current frame window.
Returns:
The minimum element index in the given frame.

template<class IMG_ELM_TYPE = unsigned char, class MSK_ELM_TYPE = signed long>
unsigned int ncut::ElementProfile< IMG_ELM_TYPE, MSK_ELM_TYPE >::nChl  )  const [inline]
 

Get the number of channels of the frames.

Returns:
The number of channels of the frames.

template<class IMG_ELM_TYPE = unsigned char, class MSK_ELM_TYPE = signed long>
const Matrix* ncut::ElementProfile< IMG_ELM_TYPE, MSK_ELM_TYPE >::neighbors  )  const [inline]
 

Get the neighbourhood matrix of this profile.

Returns:
The neighbourhood matrix of this profile.

template<class IMG_ELM_TYPE = unsigned char, class MSK_ELM_TYPE = signed long>
unsigned int ncut::ElementProfile< IMG_ELM_TYPE, MSK_ELM_TYPE >::nElm  )  const [inline]
 

Get the number of elements in this profile.

Returns:
The number of elements in this profile.

template<class IMG_ELM_TYPE = unsigned char, class MSK_ELM_TYPE = signed long>
unsigned int ncut::ElementProfile< IMG_ELM_TYPE, MSK_ELM_TYPE >::nFrm  )  const [inline]
 

Get the number of frames in the current frame window.

Returns:
The number of frames in the current frame window. note: this may be smaller than wSize if the frame window is not completely filled yet.

template<class IMG_ELM_TYPE = unsigned char, class MSK_ELM_TYPE = signed long>
unsigned int ncut::ElementProfile< IMG_ELM_TYPE, MSK_ELM_TYPE >::nPixels unsigned int  elm  )  const [inline]
 

Get the number of pixels of an element.

Parameters:
elm The index of the element.
Returns:
The number of pixels of an element.

template<class IMG_ELM_TYPE, class MSK_ELM_TYPE>
ElementProfile< IMG_ELM_TYPE, MSK_ELM_TYPE > & ncut::ElementProfile< IMG_ELM_TYPE, MSK_ELM_TYPE >::operator= const ElementProfile< IMG_ELM_TYPE, MSK_ELM_TYPE > &  clone  )  [virtual]
 

ElementProfile assignment operator.

Parameters:
clone The ElementProfile to be cloned.

template<class IMG_ELM_TYPE = unsigned char, class MSK_ELM_TYPE = signed long>
const std::vector<unsigned int>* ncut::ElementProfile< IMG_ELM_TYPE, MSK_ELM_TYPE >::pixels unsigned int  idx  )  const [inline]
 

Get the pixels of an element.

Parameters:
idx The index of the element.
Returns:
A list of pixel numbers for an element.

template<class IMG_ELM_TYPE = unsigned char, class MSK_ELM_TYPE = signed long>
const std::vector<std::vector<unsigned int> >* ncut::ElementProfile< IMG_ELM_TYPE, MSK_ELM_TYPE >::pixels  )  const [inline]
 

Get a list if pixels for each element.

Returns:
A list of pixels for each element. This function returns a vector containing vectors of pixel numbers. Vector number i holds the pixel numbers of element i.

template<class IMG_ELM_TYPE, class MSK_ELM_TYPE>
int ncut::ElementProfile< IMG_ELM_TYPE, MSK_ELM_TYPE >::push const Image< IMG_ELM_TYPE > *  frame,
const Image< MSK_ELM_TYPE > *  mask
 

Calculate element info of a new frame.

Parameters:
frame An new frame for segmentation.
mask Segment mask from a prior segmentation step.
Returns:
1 if sequence is not long enough to start segmentation yet (smaller then wSize ), 0 otherwise
Gathers all needed element info and calculates the similarity matrix.

template<class IMG_ELM_TYPE = unsigned char, class MSK_ELM_TYPE = signed long>
double ncut::ElementProfile< IMG_ELM_TYPE, MSK_ELM_TYPE >::saturation unsigned int  elm  )  const [inline]
 

Get the mean saturation of an element.

Parameters:
elm The index of the element.
Returns:
The saturation of an element.

template<class IMG_ELM_TYPE = unsigned char, class MSK_ELM_TYPE = signed long>
unsigned int ncut::ElementProfile< IMG_ELM_TYPE, MSK_ELM_TYPE >::width  )  const [inline]
 

Get the width of the frames.

Returns:
The width of the frames.

template<class IMG_ELM_TYPE = unsigned char, class MSK_ELM_TYPE = signed long>
unsigned int ncut::ElementProfile< IMG_ELM_TYPE, MSK_ELM_TYPE >::wSize  )  const [inline]
 

Get the preset size of the frame window in frames.

Returns:
The preset size of the frame window in frames.


Member Data Documentation

template<class IMG_ELM_TYPE = unsigned char, class MSK_ELM_TYPE = signed long>
Sequence<IMG_ELM_TYPE> ncut::ElementProfile< IMG_ELM_TYPE, MSK_ELM_TYPE >::frameSeq_ [protected]
 

contains all frames in the current frame window

template<class IMG_ELM_TYPE = unsigned char, class MSK_ELM_TYPE = signed long>
unsigned int ncut::ElementProfile< IMG_ELM_TYPE, MSK_ELM_TYPE >::height_ [protected]
 

the height of each image in the sequence in pixels

template<class IMG_ELM_TYPE = unsigned char, class MSK_ELM_TYPE = signed long>
double* ncut::ElementProfile< IMG_ELM_TYPE, MSK_ELM_TYPE >::hue_ [protected]
 

the mean hue of each element

template<class IMG_ELM_TYPE = unsigned char, class MSK_ELM_TYPE = signed long>
double* ncut::ElementProfile< IMG_ELM_TYPE, MSK_ELM_TYPE >::hueVariation_ [protected]
 

the hue variation of each element

template<class IMG_ELM_TYPE = unsigned char, class MSK_ELM_TYPE = signed long>
double* ncut::ElementProfile< IMG_ELM_TYPE, MSK_ELM_TYPE >::hueVecX_ [protected]
 

the hue vector X component of each element

template<class IMG_ELM_TYPE = unsigned char, class MSK_ELM_TYPE = signed long>
double* ncut::ElementProfile< IMG_ELM_TYPE, MSK_ELM_TYPE >::hueVecY_ [protected]
 

the hue vector Y component of each element

template<class IMG_ELM_TYPE = unsigned char, class MSK_ELM_TYPE = signed long>
double** ncut::ElementProfile< IMG_ELM_TYPE, MSK_ELM_TYPE >::intensity_ [protected]
 

the mean intensity of each image channel

template<class IMG_ELM_TYPE = unsigned char, class MSK_ELM_TYPE = signed long>
double* ncut::ElementProfile< IMG_ELM_TYPE, MSK_ELM_TYPE >::lightness_ [protected]
 

the mean lightness of each element

template<class IMG_ELM_TYPE = unsigned char, class MSK_ELM_TYPE = signed long>
double* ncut::ElementProfile< IMG_ELM_TYPE, MSK_ELM_TYPE >::litVariation_ [protected]
 

the lightness variation of each element

template<class IMG_ELM_TYPE = unsigned char, class MSK_ELM_TYPE = signed long>
double* ncut::ElementProfile< IMG_ELM_TYPE, MSK_ELM_TYPE >::locationX_ [protected]
 

the center-of-gravity X coordinate

template<class IMG_ELM_TYPE = unsigned char, class MSK_ELM_TYPE = signed long>
double* ncut::ElementProfile< IMG_ELM_TYPE, MSK_ELM_TYPE >::locationY_ [protected]
 

the center-of-gravity Y coordinate

template<class IMG_ELM_TYPE = unsigned char, class MSK_ELM_TYPE = signed long>
double* ncut::ElementProfile< IMG_ELM_TYPE, MSK_ELM_TYPE >::locationZ_ [protected]
 

the center-of-gravity Z coordinate

template<class IMG_ELM_TYPE = unsigned char, class MSK_ELM_TYPE = signed long>
Sequence<MSK_ELM_TYPE> ncut::ElementProfile< IMG_ELM_TYPE, MSK_ELM_TYPE >::maskSeq_ [protected]
 

contains the segment masks of all frames in the current frame window

template<class IMG_ELM_TYPE = unsigned char, class MSK_ELM_TYPE = signed long>
std::vector<unsigned int> ncut::ElementProfile< IMG_ELM_TYPE, MSK_ELM_TYPE >::maxElmIdx_ [protected]
 

the highest used element index in each frame

template<class IMG_ELM_TYPE = unsigned char, class MSK_ELM_TYPE = signed long>
unsigned int ncut::ElementProfile< IMG_ELM_TYPE, MSK_ELM_TYPE >::nChl_ [protected]
 

the number of channels of each image in the sequence

template<class IMG_ELM_TYPE = unsigned char, class MSK_ELM_TYPE = signed long>
Matrix ncut::ElementProfile< IMG_ELM_TYPE, MSK_ELM_TYPE >::neighbors_ [protected]
 

stores the number of neighboring pixels of every element to every other element

template<class IMG_ELM_TYPE = unsigned char, class MSK_ELM_TYPE = signed long>
unsigned int ncut::ElementProfile< IMG_ELM_TYPE, MSK_ELM_TYPE >::nElm_ [protected]
 

the number of elements in the current frame window

template<class IMG_ELM_TYPE = unsigned char, class MSK_ELM_TYPE = signed long>
const double ncut::ElementProfile< IMG_ELM_TYPE, MSK_ELM_TYPE >::normFac
 

a constant factor to normalize a datatype of the image sequence to the interval [0,1]

template<class IMG_ELM_TYPE = unsigned char, class MSK_ELM_TYPE = signed long>
unsigned int* ncut::ElementProfile< IMG_ELM_TYPE, MSK_ELM_TYPE >::nPixels_ [protected]
 

the number of pixels in each element

template<class IMG_ELM_TYPE = unsigned char, class MSK_ELM_TYPE = signed long>
std::vector<std::vector<unsigned int> > ncut::ElementProfile< IMG_ELM_TYPE, MSK_ELM_TYPE >::pxls_ [protected]
 

a list of pixels in each element

template<class IMG_ELM_TYPE = unsigned char, class MSK_ELM_TYPE = signed long>
double* ncut::ElementProfile< IMG_ELM_TYPE, MSK_ELM_TYPE >::saturation_ [protected]
 

the mean saturation of each element

template<class IMG_ELM_TYPE = unsigned char, class MSK_ELM_TYPE = signed long>
double* ncut::ElementProfile< IMG_ELM_TYPE, MSK_ELM_TYPE >::satVariation_ [protected]
 

the saturation variation of each element

template<class IMG_ELM_TYPE = unsigned char, class MSK_ELM_TYPE = signed long>
unsigned int ncut::ElementProfile< IMG_ELM_TYPE, MSK_ELM_TYPE >::width_ [protected]
 

the width of each image in the sequence in pixels

template<class IMG_ELM_TYPE = unsigned char, class MSK_ELM_TYPE = signed long>
unsigned int ncut::ElementProfile< IMG_ELM_TYPE, MSK_ELM_TYPE >::wSize_ [protected]
 

the size of the frame window (in frames)


The documentation for this class was generated from the following file:
Generated on Thu Jun 22 14:47:21 2006 for ncut.kdevelop by  doxygen 1.4.6