public double GetCellLengthWithEnclosingCircle(Point point) { var tempVectorOfVector = Contours.ConvertToVectorOfPoint(); foreach (var contour in tempVectorOfVector.ToArrayOfArray()) { var tempVector = new VectorOfPointF(contour); if (!(CvInvoke.PointPolygonTest(tempVector, point, true) >= 0)) { continue; } var tempCircle = CvInvoke.MinEnclosingCircle(contour); return(tempCircle.Radius * 2.0); } return(-1.0); }