コード例 #1
0
        public double PointPointDistanceInWorld(Point pointA, Point pointB, bool display = true)
        {
            HTuple distance;

            HalconScripts.DistanceInWorld_PP(pointA.ImageY, pointA.ImageX, pointB.ImageY, pointB.ImageX, _mapToWorld, out distance);
            if (display)
            {
                PointPointDistanceGraphics.Add(new Line(pointA.ImageX, pointA.ImageY, pointB.ImageX, pointB.ImageY));
            }

            return(distance.D);
        }