Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Mat srcImg = new Mat(@"C:\Users\src.jpg");
- OpenCvSharp.Point center = new OpenCvSharp.Point(srcImg.Width/2, srcImg.Height/2);
- double angle = 180.0;
- Mat affineMatrix = Cv2.GetRotationMatrix2D(center:center, angle:angle, scale:1.0);
- Mat dstImg = new Mat();
- Cv2.WarpAffine(src: srcImg, dst: dstImg, m: affineMatrix, dsize: dstImg.Size());
- Cv2.ImShow("srcImg", srcImg);
- Cv2.ImShow("dstImg", dstImg);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement