Flipping Images

The cvFlip(, ) is used to flip image in OpenCV.

Example

#include<highgui.h>
int main(int argc, char *argv[]) 
{
IplImage* img = cvLoadImage("Desert1.jpg");
cvFlip(img, img);
// for saving flipped image
cvSaveImage("Image_flipped.jpg", img);
cvReleaseImage(&img);
cvReleaseImage(&img);
}