コード例 #1
0
        public void BuildTransferMatrix()
        {
            HTuple hv_machineY = new HTuple(), hv_machineX = new HTuple();
            HTuple hv_imageY = new HTuple(), hv_imageX = new HTuple();

            int count = Math.Min(ImgPoints.Length, MachinePoints.Length);

            if (count < 2)
            {
                return;
            }
            for (int i = 0; i < count; i++)
            {
                hv_machineX[i] = MachinePoints[i].X;
                hv_machineY[i] = MachinePoints[i].Y;

                hv_imageX[i] = ImgPoints[i].X;
                hv_imageY[i] = ImgPoints[i].Y;
            }

            try
            {
                Mat2D.VectorToSimilarity(hv_imageX, hv_imageY, hv_machineX, hv_machineY);
                var v = Scaling;
                IsBuiltted = true;
            }
            catch (Exception)
            {
                Mat2D      = new HHomMat2D();
                IsBuiltted = false;
            }
        }