Navigate through hierarchy of contours found by FindContours method?
This must be simple for C++ developers using OpenCV directly. However what I'm using is Emgu (an OpenCV wrapper for .NET) and in the latest version we have the method CvInvoke.FindContours returning void, the output result is passed by parameter reference and is of type VectorOfVectorOfPoint . Here is a simple call: //outputResult is a VectorOfVectorOfPoint CvInvoke.FindContours(inputImage, outputResult, null, RetrType.Tree, ChainApproxMethod.ChainApproxSimple); For RetrType.List mode, we can just convert the result to some array of arrays and loop through all the contours easily. However here