Image Component Library (ICL)
Public Member Functions | Public Attributes | List of all members
icl::markers::TwoLevelRegionStructure Struct Reference

Defines a common two level RegionStructure. More...

#include <TwoLevelRegionStructure.h>

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

Public Member Functions

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

Public Attributes

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

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

◆ TwoLevelRegionStructure()

icl::markers::TwoLevelRegionStructure::TwoLevelRegionStructure ( const std::string &  code)

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

◆ match()

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

match implementation

Implements icl::markers::RegionStructure.

◆ operator==()

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

comparison operator (compares the code-strings)

Member Data Documentation

◆ children

std::vector<int> icl::markers::TwoLevelRegionStructure::children

sub-regions subregion-counts

◆ code

std::string icl::markers::TwoLevelRegionStructure::code

the original code (used for comparison)

◆ color

icl8u icl::markers::TwoLevelRegionStructure::color

root region color


The documentation for this struct was generated from the following file: