您的位置:首页 > 运维架构

opencv图像处理之仿射变换

2016-11-29 11:04 316 查看
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输出图像与源图像大小和通道数一样的
M2×3 t转换矩阵
dsize输出图像的大小
flags插值的结合 (see cv::InterpolationFlags)
和可选的 WARP_INVERSE_MAP 代表M 是逆向的转换( dst→src ).
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.
borderValuevalue used in case of a constant border; by default, it is 0
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: