Quantcast
Channel: OpenCV Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 41027

Numpy Arrays

$
0
0
I am using python bindings to convert a project ,initially made in C++ , in python. The following is the snapshot of some part of the code : cv::Mat debugImage; CvCapture* capture; cv::Mat frame; capture = cvCaptureFromCAM( -1 ); if( capture ) { while( true ) { frame = cvQueryFrame( capture ); // mirror it cv::flip(frame, frame, 1); frame.copyTo(debugImage); } } Here frame is defined as matrix which is then copied to the debugImage matrix inside the loop. But if I use numpy arrays declaration for frame and debugimage and then copy it using the copyto method of numpy, it throws error. Please help me to covert this code into python.

Viewing all articles
Browse latest Browse all 41027

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>