public void CreateUpDownCameraCoor(double[] ux, double[] uy, double[] dx, double[] dy) { try { if (ux.Length != uy.Length || ux.Length != dx.Length || ux.Length != dy.Length || ux.Length == 0) { return; } HTuple Hom2D; HOperatorSet.VectorToHomMat2d(ux, uy, dx, dy, out Hom2D); m_Hom2Dutd = Hom2D.Clone(); HOperatorSet.VectorToHomMat2d(dx, dy, ux, uy, out Hom2D); m_Hom2Ddtu = Hom2D.Clone(); HTuple qx, qy; HTuple qx1, qy1; HOperatorSet.AffineTransPoint2d(m_Hom2Ddtu, dx[0], dy[0], out qx, out qy); HOperatorSet.AffineTransPoint2d(m_Hom2Dutd, qx, qy, out qx1, out qy1); } catch (Exception e) { String S = e.Message; } return; }
public void CreateDownRobotCoor(double[] dx, double[] dy, double[] rx, double[] ry) { if (rx.Length != ry.Length || dx.Length != dy.Length || rx.Length != dx.Length || rx.Length == 0) { return; } HTuple Hom2D; HTuple Hom2D1; HOperatorSet.VectorToHomMat2d(dx, dy, rx, ry, out Hom2D); m_Hom2Ddtr = Hom2D.Clone(); HOperatorSet.VectorToHomMat2d(rx, ry, dx, dy, out Hom2D1); m_Hom2Drtd = Hom2D1.Clone(); HTuple qx, qy; HTuple qx1, qy1; HOperatorSet.AffineTransPoint2d(m_Hom2Ddtr, dx[0], dy[0], out qx, out qy); HOperatorSet.AffineTransPoint2d(m_Hom2Drtd, qx, qy, out qx1, out qy1); return; }
public void CreateURCoor(double[] ux, double[] uy, double[] rx, double[] ry) { try { if (ux.Length != uy.Length || ux.Length != rx.Length || ux.Length != ry.Length || ux.Length == 0) { return; } HTuple Hom2D; HOperatorSet.VectorToHomMat2d(ux, uy, rx, ry, out Hom2D); m_Hom2Dutr = Hom2D.Clone(); HOperatorSet.VectorToHomMat2d(rx, ry, ux, uy, out Hom2D); m_Hom2Drtu = Hom2D.Clone(); HTuple qx, qy; HTuple qx1, qy1; HOperatorSet.AffineTransPoint2d(m_Hom2Dutr, ux[0], uy[0], out qx, out qy); HOperatorSet.AffineTransPoint2d(m_Hom2Drtu, qx, qy, out qx1, out qy1); } catch (Exception e) { String S = e.Message; } }