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

webcam question

$
0
0
Hello, I bought a new web cam and I made this little program that takes one frame and saves it to a file passed to the parameter. I have only one problem, the camera is 8 MP but the picture I take is of low resolution: 640x480 How do I tell it to use a higher resolution? Thank you My code #include "opencv2/opencv.hpp" using namespace cv; int main(int argc, char** argv) { VideoCapture cap; if(!cap.open(0)) { return 0; }else { Mat frame; cap >> frame; if( frame.empty() ) { }else { imwrite( argv[1], frame ); } } return 0; }

Viewing all articles
Browse latest Browse all 41027

Trending Articles



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