First time here? Check out the FAQ!
answered 2016-08-11 22:41:21 -0600
Hierarchy should be a Mat type and yes you can simply use something like this.
Mat
while(hierarchy.get(k, 2) != -1) { (int)k = hierarchy.get(k, 2) // type casting to integer c++; }