Example #1
0
        public static PointF[] GetImagePointsF(Float3 rawPosition)
        {
            PointF[] imgPts = new PointF[4];
            float radiusPx = rawPosition.Z;

            imgPts[0] = new PointF(rawPosition.X - radiusPx, rawPosition.Y - radiusPx);
            imgPts[1] = new PointF(rawPosition.X + radiusPx, rawPosition.Y - radiusPx);
            imgPts[2] = new PointF(rawPosition.X + radiusPx, rawPosition.Y + radiusPx);
            imgPts[3] = new PointF(rawPosition.X - radiusPx, rawPosition.Y + radiusPx);

            return imgPts;
        }
Example #2
0
        public static MCvPoint2D64f[] GetImagePoints(Float3 rawPosition)
        {
            MCvPoint2D64f[] imgPts = new MCvPoint2D64f[4];

            float radiusPx = rawPosition.Z;

            imgPts[0] = new MCvPoint2D64f(rawPosition.X - radiusPx, rawPosition.Y - radiusPx);
            imgPts[1] = new MCvPoint2D64f(rawPosition.X + radiusPx, rawPosition.Y - radiusPx);
            imgPts[2] = new MCvPoint2D64f(rawPosition.X + radiusPx, rawPosition.Y + radiusPx);
            imgPts[3] = new MCvPoint2D64f(rawPosition.X - radiusPx, rawPosition.Y + radiusPx);

            return imgPts;
        }