/// <summary> /// Compute the shape distance between two shapes defined by its contours. /// </summary> /// <param name="contour1">Contour defining first shape</param> /// <param name="contour2">Contour defining second shape</param> /// <returns>The shape distance between two shapes defined by its contours.</returns> public float ComputeDistance(Point[] contour1, Point[] contour2) { using (Emgu.CV.Util.VectorOfPoint c1 = new Util.VectorOfPoint(contour1)) using (Emgu.CV.Util.VectorOfPoint c2 = new Util.VectorOfPoint(contour2)) { return(ComputeDistance(c1, c2)); } }
/// <summary> /// Compute the shape distance between two shapes defined by its contours. /// </summary> /// <param name="contour1">Contour defining first shape</param> /// <param name="contour2">Contour defining second shape</param> /// <returns>The shape distance between two shapes defined by its contours.</returns> public float ComputeDistance(Point[] contour1, Point[] contour2) { using (Emgu.CV.Util.VectorOfPoint c1 = new Util.VectorOfPoint(contour1)) using (Emgu.CV.Util.VectorOfPoint c2 = new Util.VectorOfPoint(contour2)) { return(ShapeInvoke.cvShapeDistanceExtractorComputeDistance(_ptr, c1, c2)); } }
/// <summary> /// Compute the shape distance between two shapes defined by its contours. /// </summary> /// <param name="contour1">Contour defining first shape</param> /// <param name="contour2">Contour defining second shape</param> /// <returns>The shape distance between two shapes defined by its contours.</returns> public float ComputeDistance(Point[] contour1, Point[] contour2) { using (Emgu.CV.Util.VectorOfPoint c1 = new Util.VectorOfPoint(contour1)) using (Emgu.CV.Util.VectorOfPoint c2 = new Util.VectorOfPoint(contour2)) { return ShapeInvoke.cvShapeDistanceExtractorComputeDistance(_ptr, c1, c2); } }
/// <summary> /// Compute the shape distance between two shapes defined by its contours. /// </summary> /// <param name="contour1">Contour defining first shape</param> /// <param name="contour2">Contour defining second shape</param> /// <returns>The shape distance between two shapes defined by its contours.</returns> public float ComputeDistance(Point[] contour1, Point[] contour2) { using (Emgu.CV.Util.VectorOfPoint c1 = new Util.VectorOfPoint(contour1)) using (Emgu.CV.Util.VectorOfPoint c2 = new Util.VectorOfPoint(contour2)) { return ComputeDistance(c1, c2); } }