Ask Your Question
-1

How to rotate captured video from camera

asked 2018-06-21 22:19:01 -0500

Derick gravatar image

I have OpenCV project using C language. I wish to rotate the captured video from camera, how I can do that? What is the rotate function in OpenCV? My code as below

static CvCapture * cap;

cap = cvCaptureFromCAM(cam_index);

Flip(cap, 0);

But it got error. How I can rotate my video? Please help

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2018-06-22 01:13:16 -0500

berak gravatar image

opencv's c-api is deprecated since 2010, and no more maintained. YOU MUST NOT USE IT.

you'll HAVE TO use c++ (cv::VideoCapture), and functions like cv::flip or cv::rotate

edit flag offensive delete link more

Comments

OMG. The problem now is I maintain somebody code wrote before and enhance it. Not enough time for me to re-write the whole project. Any similar project or code can share to me as reference? Tahnsk a lot

Derick gravatar imageDerick ( 2018-06-22 04:46:33 -0500 )edit

clearly, either abandon it and look for an alternative, or rewrite it from scratch.

Any similar project or code can share to me as reference ?

can you be a bit more specific about your requirements ?

also: https://docs.opencv.org/master/d9/df8...

berak gravatar imageberak ( 2018-06-22 05:00:47 -0500 )edit

I'm using a logitech web cam to do real time object detection in Ubuntu 16.04. I wish to rotate the output of the video on the screen.

Derick gravatar imageDerick ( 2018-06-24 02:50:18 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2018-06-21 22:19:01 -0500

Seen: 3,989 times

Last updated: Jun 22 '18