Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
BIAS::ROI Class Reference

class for handling different region of interest (ROI) representations... More...

#include <Base/Image/ROI.hh>

+ Inheritance diagram for BIAS::ROI:
+ Collaboration diagram for BIAS::ROI:

Public Member Functions

void AddDebugLevel (const long int lv)
 
void AddDebugLevel (const std::string &name)
 
bool DebugLevelIsSet (const long int lv) const
 
bool DebugLevelIsSet (const std::string &name) const
 
void Erode (const ROI &src, const unsigned half_mask_size)
 
int GetDebugLevel () const
 
std::ostream & GetDebugStream () const
 
void GetDebugStream (std::ostream &os) const
 
long int Name2DebugLevel (const std::string &name) const
 looks up a debuglevel in the internal map, returns 0 if not found More...
 
long int NewDebugLevel (const std::string &name)
 creates a new debuglevel More...
 
void PrintDebugLevel (std::ostream &os=std::cout) const
 
void RemoveDebugLevel (const long int lv)
 
void RemoveDebugLevel (const std::string &name)
 
void SetDebugLevel (const long int lv)
 
void SetDebugLevel (const std::string &name)
 
void SetDebugStream (const std::ostream &os)
 
void ShowDebugLevel (std::ostream &os=std::cout) const
 prints all internally known debuglevels More...
 
construction and destruction
 ~ROI ()
 destructor More...
 
 ROI ()
 str. constructor More...
 
 ROI (const ROI &roi)
 calls operator= More...
 
void Release ()
 Deletes internal memory, sets mask and vector invalid. More...
 
void Resize (unsigned width, unsigned height)
 Resizes parent image. More...
 
void UnsetROI ()
 Delete region of interest. More...
 
ROIoperator= (const ROI &roi)
 assignment operator More...
 
void SetROIType (const enum ERoiType &type)
 alloc and free of internal memory More...
 
bool operator== (const ROI &roi) const
 comparison More...
 
bool operator!= (const ROI &roi) const
 
access function
int SetCorners (unsigned UpperLeftX, unsigned UpperLeftY, unsigned LowerRightX, unsigned LowerRightY)
 Sets a rectangular region of interest. More...
 
void GetCorners (unsigned &UpperLeftX, unsigned &UpperLeftY, unsigned &LowerRightX, unsigned &LowerRightY) const
 Return the region of interest, by saving the coordinates within the variables defined by the parameters. More...
 
void GetCorners (int &UpperLeftX, int &UpperLeftY, int &LowerRightX, int &LowerRightY) const
 Return the region of interest, by saving the coordinates within the variables defined by the parameters. More...
 
unsigned GetCornerUpperLeftX () const
 fetch individual ROI corner coordinate More...
 
unsigned GetCornerUpperLeftY () const
 fetch individual ROI corner coordinate More...
 
unsigned GetCornerLowerRightX () const
 fetch individual ROI corner coordinate More...
 
unsigned GetCornerLowerRightY () const
 fetch individual ROI corner coordinate More...
 
bool IsInROI (const double &x, const double &y) const
 ROI check if pixel position is inside the ROI. More...
 
bool IsInROI (const double &left, const double &top, const double &right, const double &bottom) const
 ROI check if rectangular window is inside the ROI. More...
 
int GetMaskImage (ImageBase &im) const
 returns an image of StorageType unsigned char, where every pixel not in the ROI is set to UCHAR_MAX and every other pixel to 0 More...
 
int SetMaskImage (const ImageBase &im)
 every pixel with value==0.0 is in the ROI, every pixel with value!=0.0 is not in the ROI More...
 
void SetMask (const unsigned &x, const unsigned &y, const bool val)
 Direct access to the mask data. More...
 
bool Mask (const unsigned &x, const unsigned &y) const
 Direct access to the mask data, const version. More...
 
void SetVector (std::vector< Position > &pos)
 Sets MaskValid_=false and VectorValid_=true. More...
 
std::vector< Position > * GetVector ()
 returns a pointer to the vector representation of the ROI More...
 
bool GetVector (std::vector< Position > &vec) const
 get a copy of mask vector. More...
 
unsigned GetWidth () const
 width capacity of roi (image width) More...
 
unsigned GetHeight () const
 height capacity of roi (image height) More...
 
bool GetRows (std::vector< unsigned > &start, std::vector< unsigned > &end) const
 Horizontal start and end position per image row, the length of the vectors always corresponds to the image height. More...
 
void SetRows (const std::vector< unsigned > &start, const std::vector< unsigned > &end)
 Horizontal start and end position per image row, the length of the vectors always corresponds to the image height. More...
 
interpolation
bool CheckBilinearInterpolation (const double x, const double y) const
 Check if subpixel position (x,y) in ROI is valid for bilinear interpolation (i.e. More...
 
bool CheckBicubicInterpolation (const double x, const double y) const
 Check if subpixel position (x,y) in ROI is valid for bicubic interpolation (i.e. More...
 
int GetBilinearInterpolationNeighbors (const double x, const double y, std::vector< int > &nx, std::vector< int > &ny) const
 Get valid neighbor pixels in ROI for bilinear interpolation at subpixel position (x,y). More...
 
checking
enum ERoiType GetROIType () const
 is the mask image valid? More...
 
bool MaskValid () const
 is the position vector valid? More...
 
bool VectorValid () const
 is the position vector valid? More...
 
bool SameSize (const ROI &roi) const
 Returns true if both ROIs have the same size. More...
 
conversion functions
int ConvertROIType (const enum ERoiType &type)
 Generic conversion function from current ROI representation to the given ROI representation. More...
 

Static Public Member Functions

static long int GetGlobalDebugLevel ()
 
static void SetGlobalDebugLevel (long int lev)
 

Protected Member Functions

long ConsumeNextFreeDebuglevel_ ()
 returns the next available debuglevel More...
 
internal conversion functions
int Corners2Mask_ ()
 Fills mask representation of ROI from corner representation. More...
 
int Corners2Vector_ ()
 Fills vector representation of ROI from corner representation. More...
 
int Corners2Rows_ ()
 Fills rows representation of ROI from corner representation. More...
 
int Mask2Corners_ ()
 Fills corner/bounding box representation of ROI from mask representation. More...
 
int Mask2Vector_ ()
 Fills vector representation of ROI from mask representation. More...
 
int Mask2Rows_ ()
 Fills rows representation of ROI from mask representation. More...
 
int Vector2Corners_ ()
 Fills corner/bounding box representation of ROI from vector representation. More...
 
int Vector2Mask_ ()
 Fills vector representation of ROI from mask representation. More...
 
int Vector2Rows_ ()
 Fills rows representation of ROI from vector representation. More...
 
int Rows2Corners_ ()
 Fills corner representation of ROI from rows representation. More...
 
int Rows2Mask_ ()
 Fills mask representation of ROI from rows representation. More...
 
int Rows2Vector_ ()
 Fills vector representation of ROI from rows representation. More...
 

Protected Attributes

long int _liDebugLevel
 
long int _liNextDebugLevel
 new concept, debuglevel are managed here in the debug class More...
 
std::map< std::string, long int > _String2Debuglevel
 
unsigned Height_
 
unsigned LowerRightX_
 
unsigned LowerRightY_
 
std::vector< bool > Mask_
 internal data for ROI of type ROI_Mask the mask data: Mask_[y*Width_+x] corresponds to pixel at (x,y) a bool vector is used, because the bool std::vector is internally stored as a bitfield More...
 
enum ERoiType RoiType_
 which method is used to store the ROI More...
 
std::vector< unsigned > RowEnd_
 
std::vector< unsigned > RowStart_
 internal data for ROI of type ROI_Rows the ROI is specified by a min and a max value for each row in the image More...
 
unsigned UpperLeftX_
 internal data for ROI of type ROI_Corners rectangular region of interest defined by upper left and lower right corners. More...
 
unsigned UpperLeftY_
 
std::vector< PositionVector_
 internal data for ROI of type ROI_Points Vector instance of ROI, always sorted from top left to bottom right More...
 
unsigned Width_
 maximum dimension of roi data More...
 

Static Protected Attributes

static std::ostream _zDebugStream
 
static long int GlobalDebugLevel = 0
 
static const int Version_ = ROI_VERSION_NUMBER
 version number of ROI class More...
 

io functions

int WriteBinary (std::ostream &os) const
 binary output to stream More...
 
int ReadBinary (std::istream &is)
 binary input from stream More...
 
BIASImageBase_EXPORT std::ostream & operator<< (std::ostream &os, const ROI &roi)
 human readable output operator for ROI, mainly for debugging More...
 

Detailed Description

class for handling different region of interest (ROI) representations...

The ROI class usually is member of an ImageBase and is stored together with the ImageBase. If an ImageBase is written to disk in the binary mip format, the ROI member is also automatically written in the same file.

Flags indication the validity of the single representations exist within the ROI class.

Right now, three different representations are possible:

The ROI class can later on be expanded in a way, that the vector does not only hold positions, but maybe somthing like more complex mask patches...

Todo:
TODO change ROI memebr in ImageBase to pointer to:
  • share a ROI between multiple images
Author
woelk 07/2005 redesign woelk 02/2008 (c) www.vision-n.de

Definition at line 118 of file ROI.hh.

Constructor & Destructor Documentation

ROI::~ROI ( )

destructor

Definition at line 117 of file ROI.cpp.

ROI::ROI ( )

str. constructor

Definition at line 122 of file ROI.cpp.

References BIAS::Debug::NewDebugLevel(), and UnsetROI().

ROI::ROI ( const ROI roi)

calls operator=

Definition at line 131 of file ROI.cpp.

References BIAS::Debug::NewDebugLevel(), and operator=().

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( const long int  lv)
inlineinherited
void BIAS::Debug::AddDebugLevel ( const std::string &  name)
inlineinherited

Definition at line 362 of file Debug.hh.

bool BIAS::ROI::CheckBicubicInterpolation ( const double  x,
const double  y 
) const
inline

Check if subpixel position (x,y) in ROI is valid for bicubic interpolation (i.e.

4x4 window centered at (x,y) is inside the ROI).

Author
esquivel

Definition at line 571 of file ROI.hh.

References IsInROI().

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetImageValue_().

bool BIAS::ROI::CheckBilinearInterpolation ( const double  x,
const double  y 
) const
inline

Check if subpixel position (x,y) in ROI is valid for bilinear interpolation (i.e.

has 4 neighbors inside the ROI).

Author
esquivel

Definition at line 565 of file ROI.hh.

References IsInROI().

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::GetImageValue_().

long BIAS::Debug::ConsumeNextFreeDebuglevel_ ( )
inlineprotectedinherited

returns the next available debuglevel

Author
woelk 09/2006

Definition at line 521 of file Debug.hh.

int ROI::ConvertROIType ( const enum ERoiType type)

Generic conversion function from current ROI representation to the given ROI representation.

Returns
Returns 0 if the conversion was successful, < 0 otherwise.
Author
esquivel 01/2010
Examples:
ExampleROI.cpp.

Definition at line 720 of file ROI.cpp.

References Corners2Mask_(), Corners2Rows_(), Corners2Vector_(), Mask2Corners_(), Mask2Rows_(), Mask2Vector_(), BIAS::ROI_Corners, BIAS::ROI_Mask, BIAS::ROI_Points, BIAS::ROI_Rows, RoiType_, Rows2Corners_(), Rows2Mask_(), Rows2Vector_(), Vector2Corners_(), Vector2Mask_(), and Vector2Rows_().

int ROI::Corners2Mask_ ( )
protected

Fills mask representation of ROI from corner representation.

Definition at line 780 of file ROI.cpp.

References BIAS::ROI_Corners, and RoiType_.

Referenced by ConvertROIType().

int ROI::Corners2Rows_ ( )
protected

Fills rows representation of ROI from corner representation.

Definition at line 794 of file ROI.cpp.

References BIAS::ROI_Corners, and RoiType_.

Referenced by ConvertROIType().

int ROI::Corners2Vector_ ( )
protected

Fills vector representation of ROI from corner representation.

Definition at line 787 of file ROI.cpp.

References BIAS::ROI_Corners, and RoiType_.

Referenced by ConvertROIType().

bool BIAS::Debug::DebugLevelIsSet ( const long int  lv) const
inlineinherited
bool BIAS::Debug::DebugLevelIsSet ( const std::string &  name) const
inlineinherited

Definition at line 350 of file Debug.hh.

void ROI::Erode ( const ROI src,
const unsigned  half_mask_size 
)
int BIAS::ROI::GetBilinearInterpolationNeighbors ( const double  x,
const double  y,
std::vector< int > &  nx,
std::vector< int > &  ny 
) const
inline

Get valid neighbor pixels in ROI for bilinear interpolation at subpixel position (x,y).

Returns
Returns number of valid neighbors found in ROI (0 to 4).
Author
esquivel

Definition at line 577 of file ROI.hh.

References IsInROI().

unsigned BIAS::ROI::GetCornerLowerRightX ( ) const
inline

fetch individual ROI corner coordinate

efficient inline access, used by BackwardMapping in most inner loop

Author
koeser 08/2007

Definition at line 201 of file ROI.hh.

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapTrilinearGreySimple_().

unsigned BIAS::ROI::GetCornerLowerRightY ( ) const
inline

fetch individual ROI corner coordinate

efficient inline access, used by BackwardMapping in most inner loop

Author
koeser 08/2007

Definition at line 207 of file ROI.hh.

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapTrilinearGreySimple_().

void BIAS::ROI::GetCorners ( unsigned &  UpperLeftX,
unsigned &  UpperLeftY,
unsigned &  LowerRightX,
unsigned &  LowerRightY 
) const
inline

Return the region of interest, by saving the coordinates within the variables defined by the parameters.

Parameters
[out]UpperLeftX,UpperLeftY,:first corner (x,y) of ROI (start), included in ROI
[out]LowerRightX,LowerRightY,:lower right corner (x,y) of ROI (end), NOT included in ROI
Author
woelk 07/2005

Definition at line 443 of file ROI.hh.

References LowerRightX_, LowerRightY_, UpperLeftX_, and UpperLeftY_.

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::_ExtractLocalMaxima(), BIAS::Rescale< InputStorageType, OutputStorageType >::_FillInterpolated(), BIAS::Rescale< InputStorageType, OutputStorageType >::_FillInterpolatedColor(), BIAS::Rescale< InputStorageType, OutputStorageType >::_FillInterpolatedGrey(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::_GradientProducts(), BIAS::MixtureOfGaussians< StorageType >::Apply(), BIAS::ImageConvert::ConvertST(), BIAS::ImageConvertThreaded::ConvertThreaded(), BIAS::FilterBase< InputStorageType, OutputStorageType >::CopyNonROIFromSource(), BIAS::ImageBase::Cut2ROI(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidInt_(), BIAS::Rescale< InputStorageType, OutputStorageType >::Downsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2Color(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4Grey(), BIAS::Median< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::Filter(), BIAS::Label::Filter(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3SameGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3ValidGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5ValidGreyFloat(), BIAS::GaussThreshold< InputStorageType, OutputStorageType >::Filter7x7GreyIgnoreBelowThreshold(), BIAS::GaussThreshold< InputStorageType, OutputStorageType >::Filter7x7GreyOnlyBelowThreshold(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2Grey(), BIAS::TriangleMesh::GenerateDenseMesh(), BIAS::ImageBase::GetCopyOfROI(), BIAS::ImageBase::GetCopyOfROI2(), BIAS::ImageBase::GetROICorners(), BIAS::ImageBase::GetROILowerRightX(), BIAS::ImageBase::GetROILowerRightY(), BIAS::ImageBase::GetROIUpperLeftX(), BIAS::ImageBase::GetROIUpperLeftY(), BIAS::TrackerBaseInterface< StorageType >::Init(), BIAS::Label::LabelInit_(), BIAS::ForwardMappingNearestNeighbour< InputStorageType, OutputStorageType >::Map(), BIAS::ImageConvertThreaded::MergeImage_(), BIAS::ImageCanvas::PaintRoiOnDc_(), BIAS::ImageBase::Paste2ROI(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::PolarTransform(), BIAS::Label::Process(), BIAS::FilterBase< InputStorageType, OutputStorageType >::SetNonROIToValue(), BIAS::ImageBase::SetOutsideROIZero(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::ShrinkROI_(), BIAS::HessianSimple< InputStorageType, OutputStorageType >::SimpleGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidFloat_(), BIAS::HessianSimple< InputStorageType, OutputStorageType >::SimpleGreyValidInt_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidInt_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreySameFloat_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidFloat_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidInt_(), BIAS::ImageConvertThreaded::SplitImage_(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::UpdatePyramidSize(), BIAS::Rescale< InputStorageType, OutputStorageType >::Upsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::UpsampleGrey(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLenL1(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLenL2(), and BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLenMax().

void BIAS::ROI::GetCorners ( int &  UpperLeftX,
int &  UpperLeftY,
int &  LowerRightX,
int &  LowerRightY 
) const
inline

Return the region of interest, by saving the coordinates within the variables defined by the parameters.

Parameters
[out]UpperLeftX,UpperLeftY,:first corner (x,y) of ROI (start), included in ROI
[out]LowerRightX,LowerRightY,:lower right corner (x,y) of ROI (end), NOT included in ROI
Author
woelk 07/2005

Definition at line 453 of file ROI.hh.

References LowerRightX_, LowerRightY_, UpperLeftX_, and UpperLeftY_.

unsigned BIAS::ROI::GetCornerUpperLeftX ( ) const
inline

fetch individual ROI corner coordinate

efficient inline access, used by BackwardMapping in most inner loop

Author
koeser 08/2007

Definition at line 189 of file ROI.hh.

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapTrilinearGreySimple_().

unsigned BIAS::ROI::GetCornerUpperLeftY ( ) const
inline

fetch individual ROI corner coordinate

efficient inline access, used by BackwardMapping in most inner loop

Author
koeser 08/2007

Definition at line 195 of file ROI.hh.

Referenced by BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapTrilinearGreySimple_().

int BIAS::Debug::GetDebugLevel ( ) const
inlineinherited
std::ostream& BIAS::Debug::GetDebugStream ( ) const
inlineinherited

Definition at line 405 of file Debug.hh.

void BIAS::Debug::GetDebugStream ( std::ostream &  os) const
inlineinherited

Definition at line 414 of file Debug.hh.

static long int BIAS::Debug::GetGlobalDebugLevel ( )
inlinestaticinherited

Definition at line 431 of file Debug.hh.

unsigned BIAS::ROI::GetHeight ( ) const
inline

height capacity of roi (image height)

Definition at line 254 of file ROI.hh.

Referenced by BIAS::CornerDetectorGradient< StorageType, CalculationType >::_ExtractLocalMaxima(), and Vector2Mask_().

int ROI::GetMaskImage ( ImageBase im) const
enum ERoiType BIAS::ROI::GetROIType ( ) const
inline
bool BIAS::ROI::GetRows ( std::vector< unsigned > &  start,
std::vector< unsigned > &  end 
) const
inline

Horizontal start and end position per image row, the length of the vectors always corresponds to the image height.

When no pixels in a certain row y are located inside the roi, both start[y] and end[y] are zero.

Definition at line 261 of file ROI.hh.

References BIAS::ROI_Rows.

Referenced by BIAS::ImageCanvas::PaintRoiOnDc_(), BIAS::PyramidImage< StorageType >::SetROI(), and BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::ShrinkROI_().

std::vector<Position>* BIAS::ROI::GetVector ( )
inline

returns a pointer to the vector representation of the ROI

Definition at line 242 of file ROI.hh.

References BIAS::ROI_Points.

Referenced by Vector2Mask_().

bool ROI::GetVector ( std::vector< Position > &  vec) const

get a copy of mask vector.

Returns true if vector is valid

Author
woelk 07/2005

Definition at line 471 of file ROI.cpp.

References BIAS::ROI_Points, RoiType_, and Vector_.

unsigned BIAS::ROI::GetWidth ( ) const
inline
bool BIAS::ROI::IsInROI ( const double &  x,
const double &  y 
) const
inline
bool BIAS::ROI::IsInROI ( const double &  left,
const double &  top,
const double &  right,
const double &  bottom 
) const
inline

ROI check if rectangular window is inside the ROI.

Attention
Tests if right bottom corner is also included in the ROI!

Definition at line 505 of file ROI.hh.

References Height_, LowerRightX_, LowerRightY_, Mask(), BIAS::ROI_Corners, BIAS::ROI_Mask, BIAS::ROI_Points, BIAS::ROI_Rows, RoiType_, RowEnd_, RowStart_, UpperLeftX_, UpperLeftY_, Vector_, and Width_.

bool ROI::Mask ( const unsigned &  x,
const unsigned &  y 
) const

Direct access to the mask data, const version.

Author
woelk 07/2005

Definition at line 488 of file ROI.cpp.

References Height_, Mask_, BIAS::ROI_Mask, RoiType_, and Width_.

Referenced by GetMaskImage(), IsInROI(), and Mask2Vector_().

int ROI::Mask2Corners_ ( )
protected

Fills corner/bounding box representation of ROI from mask representation.

Returns 0 if mask is valid.

Definition at line 801 of file ROI.cpp.

Referenced by ConvertROIType().

int ROI::Mask2Rows_ ( )
protected

Fills rows representation of ROI from mask representation.

Definition at line 828 of file ROI.cpp.

Referenced by ConvertROIType().

int ROI::Mask2Vector_ ( )
protected

Fills vector representation of ROI from mask representation.

Returns 0 if mask is valid. Sets VectorValid flag if maks is valid.

Author
woelk 07/2005

Definition at line 808 of file ROI.cpp.

References Height_, Mask(), BIAS::ROI_Mask, RoiType_, SetVector(), and Width_.

Referenced by ConvertROIType().

bool BIAS::ROI::MaskValid ( ) const
inline

is the position vector valid?

Examples:
ExampleBlobDetectorLevelSet.cpp.

Definition at line 307 of file ROI.hh.

References BIAS::ROI_Mask.

Referenced by BIAS::BlobDetectorLevelSet< StorageType >::Detect(), ReadBinary(), and BIAS::BlobDetectorLevelSet< StorageType >::Set().

long int BIAS::Debug::Name2DebugLevel ( const std::string &  name) const
inlineinherited

looks up a debuglevel in the internal map, returns 0 if not found

Author
woelk 09/2006

Definition at line 454 of file Debug.hh.

long int BIAS::Debug::NewDebugLevel ( const std::string &  name)
inlineinherited
bool BIAS::ROI::operator!= ( const ROI roi) const
inline

Definition at line 153 of file ROI.hh.

ROI & ROI::operator= ( const ROI roi)

assignment operator

Definition at line 155 of file ROI.cpp.

References Height_, LowerRightX_, LowerRightY_, Mask_, RoiType_, RowEnd_, RowStart_, UpperLeftX_, UpperLeftY_, Vector_, and Width_.

Referenced by ROI().

bool ROI::operator== ( const ROI roi) const
void BIAS::Debug::PrintDebugLevel ( std::ostream &  os = std::cout) const
inlineinherited

Definition at line 383 of file Debug.hh.

int ROI::ReadBinary ( std::istream &  is)
void ROI::Release ( )

Deletes internal memory, sets mask and vector invalid.

Author
woelk 07/2005

Definition at line 141 of file ROI.cpp.

References Height_, LowerRightX_, LowerRightY_, Mask_, BIAS::ROI_Corners, RoiType_, RowEnd_, RowStart_, UpperLeftX_, UpperLeftY_, Vector_, and Width_.

Referenced by BIAS::ImageBase::Release(), and Resize().

void BIAS::Debug::RemoveDebugLevel ( const long int  lv)
inlineinherited

Definition at line 369 of file Debug.hh.

void BIAS::Debug::RemoveDebugLevel ( const std::string &  name)
inlineinherited

Definition at line 376 of file Debug.hh.

void ROI::Resize ( unsigned  width,
unsigned  height 
)
int ROI::Rows2Corners_ ( )
protected

Fills corner representation of ROI from rows representation.

Definition at line 876 of file ROI.cpp.

References BIAS::ROI_Rows, and RoiType_.

Referenced by ConvertROIType().

int ROI::Rows2Mask_ ( )
protected

Fills mask representation of ROI from rows representation.

Definition at line 883 of file ROI.cpp.

References BIAS::ROI_Rows, and RoiType_.

Referenced by ConvertROIType().

int ROI::Rows2Vector_ ( )
protected

Fills vector representation of ROI from rows representation.

Definition at line 890 of file ROI.cpp.

References BIAS::ROI_Rows, and RoiType_.

Referenced by ConvertROIType().

bool ROI::SameSize ( const ROI roi) const

Returns true if both ROIs have the same size.

Only the rectangular ROI as defined by the corners is validated.

Author
woelk 07/2005

Definition at line 498 of file ROI.cpp.

References LowerRightX_, LowerRightY_, BIAS::ROI_Corners, RoiType_, UpperLeftX_, and UpperLeftY_.

int ROI::SetCorners ( unsigned  UpperLeftX,
unsigned  UpperLeftY,
unsigned  LowerRightX,
unsigned  LowerRightY 
)

Sets a rectangular region of interest.

Parameters
[in]UpperLeftX,UpperLeftY,:first corner (x,y) of ROI (start), included in ROI
[in]LowerRightX,LowerRightY,:lower right corner (x,y) of ROI (end), NOT included in ROI
Attention
LowerRightX and LowerRightY are not included in the ROI, this is correct per definition!
Author
woelk 07/2005

Definition at line 287 of file ROI.cpp.

References Height_, LowerRightX_, LowerRightY_, BIAS::ROI_Corners, SetROIType(), UpperLeftX_, UpperLeftY_, and Width_.

Referenced by BIAS::CornerDetectorFoerstner< StorageType, CalculationType >::_ComputeCornerness(), BIAS::LinearRegionDetector< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorKLT< StorageType, CalculationType >::_ComputeCornerness(), BIAS::CornerDetectorHarris< StorageType, CalculationType >::_ComputeCornerness(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor3x3(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor5x5(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensor7x7(), BIAS::StructureTensor< InputStorageType, OutputStorageType >::CalcStructureTensorValid(), BIAS::ImageConvert::ConvertST(), BIAS::ImageConvertThreaded::ConvertThreaded(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::DirectNeighborsGreyValidInt_(), BIAS::Rescale< InputStorageType, OutputStorageType >::Downsample(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy2Grey(), BIAS::Rescale< InputStorageType, OutputStorageType >::DownsampleBy4Grey(), BIAS::Erosion< InputStorageType, OutputStorageType >::Filter(), BIAS::Dilation< InputStorageType, OutputStorageType >::Filter(), BIAS::Median< InputStorageType, OutputStorageType >::Filter(), BIAS::GradientGaussAsymmetric< InputStorageType, OutputStorageType >::Filter(), BIAS::Label::Filter(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3SameGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter3x3ValidGreyFloat(), BIAS::Binomial< InputStorageType, OutputStorageType >::Filter5x5ValidGreyFloat(), BIAS::GaussThreshold< InputStorageType, OutputStorageType >::Filter7x7GreyIgnoreBelowThreshold(), BIAS::GaussThreshold< InputStorageType, OutputStorageType >::Filter7x7GreyOnlyBelowThreshold(), BIAS::Convolution< InputStorageType, OutputStorageType >::FilterFloat(), BIAS::Convolution< InputStorageType, OutputStorageType >::FilterInt(), BIAS::Mean< InputStorageType, OutputStorageType >::FilterMean2x2Grey(), BIAS::BackwardMapping< InputStorageType, OutputStorageType >::MapTri_(), BIAS::ImageConvertThreaded::MergeImage_(), BIAS::operator>>(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::PolarTransform(), BIAS::ImageBase::SetROICorners(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::ShrinkROI_(), BIAS::HessianSimple< InputStorageType, OutputStorageType >::SimpleGreyValidFloat_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidFloat_(), BIAS::HessianSimple< InputStorageType, OutputStorageType >::SimpleGreyValidInt_(), BIAS::GradientSimple< InputStorageType, OutputStorageType >::SimpleGreyValidInt_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreySameFloat_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidFloat_(), BIAS::GradientSobel3x3< InputStorageType, OutputStorageType >::Sobel3x3GreyValidInt_(), BIAS::VideoSource::SoftwareWhiteBalance(), BIAS::ImageConvertThreaded::SplitImage_(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLenL1(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLenL2(), BIAS::FilterNTo2N< InputStorageType, OutputStorageType >::VecLenMax(), and Vector2Corners_().

void BIAS::Debug::SetDebugLevel ( const long int  lv)
inlineinherited
void BIAS::Debug::SetDebugLevel ( const std::string &  name)
inlineinherited

Definition at line 325 of file Debug.hh.

void BIAS::Debug::SetDebugStream ( const std::ostream &  os)
inlineinherited

Definition at line 398 of file Debug.hh.

static void BIAS::Debug::SetGlobalDebugLevel ( long int  lev)
inlinestaticinherited

Definition at line 424 of file Debug.hh.

void ROI::SetMask ( const unsigned &  x,
const unsigned &  y,
const bool  val 
)

Direct access to the mask data.

Author
woelk 07/2005
Examples:
ExampleROI.cpp.

Definition at line 478 of file ROI.cpp.

References Height_, Mask_, BIAS::ROI_Mask, SetROIType(), and Width_.

Referenced by ReadBinary(), SetMaskImage(), and Vector2Mask_().

int ROI::SetMaskImage ( const ImageBase im)
void ROI::SetROIType ( const enum ERoiType type)

alloc and free of internal memory

Definition at line 238 of file ROI.cpp.

References Height_, Mask_, BIAS::ROI_Corners, BIAS::ROI_Mask, BIAS::ROI_Points, BIAS::ROI_Rows, RoiType_, RowEnd_, RowStart_, and Width_.

Referenced by ReadBinary(), SetCorners(), SetMask(), SetMaskImage(), SetRows(), SetVector(), and Vector2Mask_().

void ROI::SetRows ( const std::vector< unsigned > &  start,
const std::vector< unsigned > &  end 
)

Horizontal start and end position per image row, the length of the vectors always corresponds to the image height.

When no pixels in a certain row y are located inside the roi, both start[y] and end[y] are zero.

Definition at line 436 of file ROI.cpp.

References Height_, BIAS::ROI_Rows, RowEnd_, RowStart_, SetROIType(), and Width_.

void ROI::SetVector ( std::vector< Position > &  pos)

Sets MaskValid_=false and VectorValid_=true.

Copies pos -> Vector_. Sorts Vector_.

Author
woelk 07/2005
Examples:
ExampleROI.cpp.

Definition at line 463 of file ROI.cpp.

References BIAS::ROI_Points, SetROIType(), and Vector_.

Referenced by Mask2Vector_().

void BIAS::Debug::ShowDebugLevel ( std::ostream &  os = std::cout) const
inlineinherited

prints all internally known debuglevels

Author
woelk 09/2006

Definition at line 496 of file Debug.hh.

void ROI::UnsetROI ( )
int ROI::Vector2Corners_ ( )
protected

Fills corner/bounding box representation of ROI from vector representation.

Returns 0 if vector is valid.

Author
woelk 07/2005

Definition at line 835 of file ROI.cpp.

References BIAS::ROI_Points, RoiType_, SetCorners(), and Vector_.

Referenced by ConvertROIType().

int ROI::Vector2Mask_ ( )
protected

Fills vector representation of ROI from mask representation.

Returns 0 if vector is valid. Sets MaskValid flag if vector is valid.

Author
woelk 07/2005

Definition at line 846 of file ROI.cpp.

References GetHeight(), GetVector(), GetWidth(), Height_, BIAS::ROI_Mask, BIAS::ROI_Points, RoiType_, SetMask(), SetROIType(), and Width_.

Referenced by ConvertROIType().

int ROI::Vector2Rows_ ( )
protected

Fills rows representation of ROI from vector representation.

Definition at line 869 of file ROI.cpp.

Referenced by ConvertROIType().

bool BIAS::ROI::VectorValid ( ) const
inline

is the position vector valid?

Definition at line 311 of file ROI.hh.

References BIAS::ROI_Points.

Referenced by ReadBinary().

int ROI::WriteBinary ( std::ostream &  os) const

binary output to stream

Author
woelk 07/2005

Definition at line 507 of file ROI.cpp.

References Height_, LowerRightX_, LowerRightY_, Mask_, BIAS::ROI_Corners, BIAS::ROI_Mask, BIAS::ROI_Points, BIAS::ROI_Rows, RoiType_, RowEnd_, RowStart_, UpperLeftX_, UpperLeftY_, Vector_, Version_, and Width_.

Referenced by BIAS::operator<<().

Friends And Related Function Documentation

BIASImageBase_EXPORT std::ostream& operator<< ( std::ostream &  os,
const ROI roi 
)
friend

human readable output operator for ROI, mainly for debugging

Author
woelk 07/2005

Member Data Documentation

long int BIAS::Debug::_liDebugLevel
protectedinherited

Definition at line 510 of file Debug.hh.

Referenced by BIAS::Debug::operator=(), and BIAS::ImageBase::operator=().

long int BIAS::Debug::_liNextDebugLevel
protectedinherited

new concept, debuglevel are managed here in the debug class

Definition at line 516 of file Debug.hh.

Referenced by BIAS::Debug::operator=().

std::map<std::string, long int> BIAS::Debug::_String2Debuglevel
protectedinherited

Definition at line 517 of file Debug.hh.

Referenced by BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream
staticprotectedinherited

Definition at line 511 of file Debug.hh.

Referenced by BIAS::Debug::operator=().

long int BIAS::Debug::GlobalDebugLevel = 0
staticprotectedinherited

Definition at line 513 of file Debug.hh.

unsigned BIAS::ROI::Height_
protected
unsigned BIAS::ROI::LowerRightX_
protected
unsigned BIAS::ROI::LowerRightY_
protected
std::vector<bool> BIAS::ROI::Mask_
protected

internal data for ROI of type ROI_Mask the mask data: Mask_[y*Width_+x] corresponds to pixel at (x,y) a bool vector is used, because the bool std::vector is internally stored as a bitfield

Definition at line 369 of file ROI.hh.

Referenced by Mask(), operator=(), operator==(), Release(), SetMask(), SetROIType(), UnsetROI(), and WriteBinary().

enum ERoiType BIAS::ROI::RoiType_
protected
std::vector<unsigned> BIAS::ROI::RowEnd_
protected
std::vector<unsigned> BIAS::ROI::RowStart_
protected

internal data for ROI of type ROI_Rows the ROI is specified by a min and a max value for each row in the image

Definition at line 377 of file ROI.hh.

Referenced by Erode(), IsInROI(), BIAS::operator<<(), operator=(), operator==(), ReadBinary(), Release(), SetROIType(), SetRows(), UnsetROI(), and WriteBinary().

unsigned BIAS::ROI::UpperLeftX_
protected

internal data for ROI of type ROI_Corners rectangular region of interest defined by upper left and lower right corners.

The upperleft corner is part of the rectangle, while the lower is just outside

Definition at line 362 of file ROI.hh.

Referenced by Erode(), GetCorners(), IsInROI(), BIAS::operator<<(), operator=(), operator==(), ReadBinary(), Release(), SameSize(), SetCorners(), UnsetROI(), and WriteBinary().

unsigned BIAS::ROI::UpperLeftY_
protected
std::vector<Position> BIAS::ROI::Vector_
protected

internal data for ROI of type ROI_Points Vector instance of ROI, always sorted from top left to bottom right

Definition at line 373 of file ROI.hh.

Referenced by GetVector(), IsInROI(), BIAS::operator<<(), operator=(), operator==(), ReadBinary(), Release(), SetVector(), UnsetROI(), Vector2Corners_(), and WriteBinary().

const int ROI::Version_ = ROI_VERSION_NUMBER
staticprotected

version number of ROI class

Definition at line 380 of file ROI.hh.

Referenced by WriteBinary().

unsigned BIAS::ROI::Width_
protected

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