Opencv图像处理之仿射变换

void cv::warpAffine ( InputArray  src,
    OutputArray  dst,
    InputArray  M,
    Size  dsize,
    int  flags = INTER_LINEAR,
    int  borderMode = BORDER_CONSTANT,
    const Scalar &  borderValue = Scalar() 
  )    

在图像上运用仿射变换

warpaffine功能运用指定的矩阵对源图像进行处理:

dst(x,y)=src(M11x+M12y+M13,M21x+M22y+M23)

when the flag WARP_INVERSE_MAP is set. Otherwise, the transformation is first inverted with cv::invertAffineTransform and then put in the formula above instead of M. The function cannot operate in-place.

Parameters
src 源图像
dst 输出图像与源图像大小和通道数一样的
M 2×3 t转换矩阵
dsize 输出图像的大小
flags 插值的结合 (see cv::InterpolationFlags) 和可选的 WARP_INVERSE_MAP 代表M 是逆向的转换( dstsrc ).
borderMode 像素外推方法 (see cv::BorderTypes); when borderMode=BORDER_TRANSPARENT, it means that the pixels in the destination image corresponding to the "outliers" in the source image are not modified by the function.
borderValue value used in case of a constant border; by default, it is 0

你可能感兴趣的:(计算机视觉与图像处理,计算机视觉和数字图像处理)