Public Member Functions | Protected Attributes
Mask Class Reference

#include <Mask.h>

List of all members.

Public Member Functions

bool empty () const
void getPointsOutsideMask (const std::vector< cv::KeyPoint > &keys, std::vector< unsigned int > &i_out) const
 Mask (const char *filename)
 Mask (const cv::Mat &mask)
void maskKeyPoints (std::vector< cv::KeyPoint > &keys)
void reset ()
void shrink (int margin)
bool test (int x, int y) const
virtual ~Mask ()

Protected Attributes

cv::Mat m_current_mask
 Working mask.
cv::Mat m_original_mask
 Original mask.

Detailed Description

Definition at line 40 of file Mask.h.


Constructor & Destructor Documentation

Mask::Mask ( const char *  filename)

Creates the mask by loading a mask file

Parameters:
filenamefilename of mask file

Definition at line 39 of file Mask.cpp.

Mask::Mask ( const cv::Mat &  mask)

Creates the mask by loading a mask image

Parameters:
mask

Definition at line 47 of file Mask.cpp.

Mask::~Mask ( ) [virtual]

Definition at line 55 of file Mask.cpp.


Member Function Documentation

bool Mask::empty ( void  ) const [inline]

Says whether there is some mask

Returns:
true iff there is no mask

Definition at line 114 of file Mask.h.

void Mask::getPointsOutsideMask ( const std::vector< cv::KeyPoint > &  keys,
std::vector< unsigned int > &  i_out 
) const

Returns the indices of the given keys that are not inside the mask

Parameters:
keys
i_outindices of keys not inside the mask

Definition at line 109 of file Mask.cpp.

void Mask::maskKeyPoints ( std::vector< cv::KeyPoint > &  keys)

Removes from keys those keypoints which are not inside the mask

Parameters:
keys
Note:
this function may change the order of the keypoints

Definition at line 81 of file Mask.cpp.

void Mask::reset ( )

Resets the mask to its original state

Definition at line 74 of file Mask.cpp.

void Mask::shrink ( int  margin)

Makes the current mask smaller by deleting those pixels whose distance to the edge is smaller than margin

Parameters:
margin

Definition at line 61 of file Mask.cpp.

bool Mask::test ( int  x,
int  y 
) const [inline]

Returns true if the pixel given is inside the mask, false otherwise, or if the pixel is not in the image

Definition at line 95 of file Mask.h.


Member Data Documentation

cv::Mat Mask::m_current_mask [protected]

Working mask.

Definition at line 108 of file Mask.h.

cv::Mat Mask::m_original_mask [protected]

Original mask.

Definition at line 105 of file Mask.h.


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


re_vision
Author(s): Dorian Galvez-Lopez
autogenerated on Sun Jan 5 2014 11:34:12