cv::flip

int main(int argc, char** argv) {


	cv::namedWindow("Example 2-3", cv::WINDOW_AUTOSIZE);

	cv::VideoCapture cap;

	cap.open(0);
	cout << "Opened file: " << argv[1] << endl;

	cv::Mat frame;

	for (;;) {

		cap >> frame;

		if (frame.empty()) break; // Ran out of film
		cv::Mat dsty,dstx,dstxy;
		cv::flip(frame, dsty,1);
		cv::flip(frame, dstx, 0);
		cv::flip(frame, dstxy, -1);
		cv::imshow("Example dsty", dsty);
		cv::imshow("Example dstx", dstx);
		cv::imshow("Example dstxy", dstxy);
		cv::imshow("Example 2-3", frame);

		if ((char)cv::waitKey(33) >= 0) break;



	}

	return 0;

}

  

posted @ 2022-09-25 20:55  leochan007  阅读(66)  评论(0编辑  收藏  举报