Image Component Library (ICL)
|
Defines a common two level RegionStructure. More...
#include <TwoLevelRegionStructure.h>
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... | |
Defines a common two level RegionStructure.
The Two level region structure is defined by
e.g. The region structure
.......................... ..###############...####.. ..##...#####...##......... ..##...#####...##...####.. ..##...#####...##......... ..###############...####.. ..........................
Has a root region with value '.' and sub-region counts (0,0,0,2)
The corresponding code is "b0122111"
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
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.
|
virtual |
match implementation
Implements icl::markers::RegionStructure.
|
inline |
comparison operator (compares the code-strings)
std::vector<int> icl::markers::TwoLevelRegionStructure::children |
sub-regions subregion-counts
std::string icl::markers::TwoLevelRegionStructure::code |
the original code (used for comparison)
icl8u icl::markers::TwoLevelRegionStructure::color |
root region color