} //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 getHomImg() { HHomMat2D hom = new HHomMat2D(); //hom = hom.HomMat2dRotateLocal(PhiX); hom = hom.HomMat2dScaleLocal(ScaleX, ScaleY); //hom=hom.HomMat2dTranslate(Y * Math.Sin(PhiX), X * Math.Sin(PhiX));//有待验证 return(hom); }
/// <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(); }
/********************************************************************/ /* getter methods */ /********************************************************************/ /// <summary> /// Gets the model for the current image level /// </summary> public HXLD getModelContour() { if (PyramidROIs == null) { return(null); } homSc2D.HomMat2dIdentity(); homSc2D = homSc2D.HomMat2dScaleLocal(scaleW, scaleH); return(((PyramidROIs.SelectObj(currentImgLevel)). GenContourRegionXld("center")). AffineTransContourXld(homSc2D)); }
/// <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); }