Image Component Library (ICL)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Public Attributes
icl::markers::TwoLevelRegionStructure Struct Reference

Defines a common two level RegionStructure. More...

#include <TwoLevelRegionStructure.h>

Inheritance diagram for icl::markers::TwoLevelRegionStructure:
icl::markers::RegionStructure

List of all members.

Public Member Functions

 TwoLevelRegionStructure (const std::string &code) throw (utils::ICLException)
 contructor from given code (see libfidtrack code)
virtual bool match (const cv::ImageRegion &r) const
 match implementation
bool operator== (const TwoLevelRegionStructure &s) const
 comparison operator (compares the code-strings)

Public Attributes

icl8u color
 root region color
std::vector< int > children
 sub-regions subregion-counts
std::string code
 the original code (used for comparison)

Detailed Description

Defines a common two level RegionStructure.

The Two level region structure is defined by

  1. the color of the root region (level 0)
  2. the sub-region counts of all sub-regions (level 1)

e.g. The region structure

        ..........................  
        ..###############...####..  
        ..##...#####...##.........  
        ..##...#####...##...####..  
        ..##...#####...##.........  
        ..###############...####..  
        ..........................  
        

Has a root region with value '.' and sub-region counts (0,0,0,2)
The corresponding code is "b0122111"


Constructor & Destructor Documentation

contructor from given code (see libfidtrack code)

The given code is expected to be in the libfidtrack code style e.g. the code

          b01222212222122111
          

defines a black ('b') root region ('0') whose

  • first child region (first '1') has 4 children (first '2222')
  • 2nd child region (next '1') also has 4 children (next '2222')
  • 3rd child region (3rd '1') has two children (next '22')
  • 4th, 5th and 6th child-regions have no children (ending '111')

A white root region is defined by the prefix 'w0'; and the occurrence of the root region 0 is mandatory and therefore, it can be left out in the code.
3- or higher level codes (which contain higher digits than 2) are not supported an cause an exception in the parsing process. Internally, the children counts are sorted for easier comparison with an actual region structure whose root-region is passed to the virtual match method.


Member Function Documentation

virtual bool icl::markers::TwoLevelRegionStructure::match ( const cv::ImageRegion r) const [virtual]

match implementation

Implements icl::markers::RegionStructure.

bool icl::markers::TwoLevelRegionStructure::operator== ( const TwoLevelRegionStructure s) const [inline]

comparison operator (compares the code-strings)


Member Data Documentation

sub-regions subregion-counts

the original code (used for comparison)

root region color


The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines