Пример #1
0
        }        //end of method

        /// <summary>
        /// Auxiliary method to recalculate the contour points of
        /// the rectangle by transforming the initial row and
        /// column coordinates (rowsInit, colsInit) by the updated
        /// homography hom2D
        /// </summary>
        private void updateHandlePos()
        {
            hom2D.HomMat2dIdentity();
            hom2D = hom2D.HomMat2dTranslate(midC, midR);
            hom2D = hom2D.HomMat2dRotateLocal(phi);
            tmp   = hom2D.HomMat2dScaleLocal(length1, length2);
            cols  = tmp.AffineTransPoint2d(colsInit, rowsInit, out rows);
        }
        /// <summary>
        /// 获取校正轴矩阵
        /// </summary>
        /// <returns></returns>
        public HHomMat2D getHomAxis()
        {
            HHomMat2D homA = new HHomMat2D();

            homA = homA.HomMat2dRotateLocal(PhiX);
            //homA = homA.HomMat2dSlantLocal(-PhiY, "y");
            return(homA);
        }
Пример #3
0
        /// <summary>
        ///更新操作点
        /// </summary>
        private void updateHandlePos()
        {
            _hom2D.HomMat2dIdentity();
            _hom2D  = _hom2D.HomMat2dTranslate(this._mid_col_x, this._mid_row_y);
            _hom2D  = _hom2D.HomMat2dRotateLocal(this._phi);
            _tmp    = _hom2D.HomMat2dScaleLocal(this._len1, this._len2);
            _cols_x = _tmp.AffineTransPoint2d(_colsInit_x, _rowsInit_y, out _rows_y);

            updateInterface();
        }
Пример #4
0
 /// <summary>
 /// Auxiliary method to recalculate the contour points of 
 /// the rectangle by transforming the initial row and 
 /// column coordinates (rowsInit, colsInit) by the updated
 /// homography hom2D
 /// </summary>
 private void updateHandlePos()
 {
     hom2D.HomMat2dIdentity();
     hom2D = hom2D.HomMat2dTranslate(midC, midR);
     hom2D = hom2D.HomMat2dRotateLocal(phi);
     tmp = hom2D.HomMat2dScaleLocal(length1, length2);
     cols = tmp.AffineTransPoint2d(colsInit, rowsInit, out rows);
 }