Flipping an image to get mirror effect
c++, image-processing, opencv
Solution
cv::Mat src=imload("bla.png");
cv::Mat dst; // dst must be a different Mat
cv::flip(src, dst, 1); // because you can't flip in-place (leads to segfault)
Problem
I am working on a video processing project which needs some flipping of frame. I tried using cvFlip but doesnt seem to flip along y axis (x axis working...) and results in segmentation fault. Is there any other option?? ``` cv::Mat dst=src; //src= source image from cam cv::flip(dst, dst, 1); //segmentation fault shown imshow("flipped",dst); ```