My decision:
cv::Mat FlipLR(const cv::Mat& inImg) { //create flipped image from Left to right cv::Mat outImg(inImg.size(), inImg.type()); cv::Mat_<double> FlipMatrix(2, 3); FlipMatrix << -1, 0, inImg.cols - 1, 0, 1, 0; cv::warpAffine( inImg, outImg, FlipMatrix, outImg.size(), cv::INTER_NEAREST ); return outImg; }
Is there a more efficient way to do this?
c ++ opencv matlab
Yonatan simson
source share