1 | initial version |
The fourth parameter your are passing to wrapAffine is the size of destination image you are going to wrap, and you are passing it like Size(len, len)
where int len = std::max(src.cols, src.rows)
. So just change the wrapAffine call to
cv::warpAffine(src, dst, r, src.size());
Also see the answer here might be helpful.
2 | No.2 Revision |
The fourth parameter your are passing to wrapAffine is the size of destination image you are going to after wrap, and you are passing it like Size(len, len)
where
. So just change the wrapAffine call to int len = std::max(src.cols, src.rows)
cv::warpAffine(src, dst, r, src.size());
Also see the answer here might be helpful.