Ask Your Question

Revision history [back]

Hierarchy should be a Mat type and yes you can simply use something like this.

while(hierarchy.get(k, 2) != -1)
{
     (int)k = hierarchy.get(k, 2) // type casting to integer
     c++;
}