Ask Your Question
0

Large resoution grabbing issue with OpenCV 2.4.2?

asked 2012-10-22 05:46:21 -0600

lucky gravatar image

I don't know whats wrong with OpenCV 2.4.2 with Visual Stuio 2010. I am trying to grab Camera frame that has 1280x1024 resolution. But OpenCV 2.4.2 always grab only 640x480 resolution. Why ? On the other hand, OpenCV 1.1pre working fine. What to do in this kind of issue ? I do not want 1.1pre, kindly give me the solution. Thanks.

These subrotinues I am using.

CvCapture* WebCAMinit = cvCaptureFromCAM(arg);
IplImage* imageRGB = cvQueryFrame(WebCAMinit);
edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
1

answered 2012-10-22 08:01:45 -0600

icedecker gravatar image

updated 2012-10-22 08:02:19 -0600

You need to define the width and height in capture properties of capture. I presume that you are using the C interface, right? If you don't want to use the C++ interface (the previous answer is for C++ way), take a look on the doc for C interface here.

Try with cvSetCaptureProperty(yourvideo,CV_CAP_PROP_FRAME_HEIGHT, 1024). Same thing for the width, using CV_CAP_PROP_FRAME_WIDTH.

edit flag offensive delete link more

Comments

you rockkkkkkkkk.. really you r awesome... it works now... thankssss.. alot.. ;)

lucky gravatar imagelucky ( 2012-10-22 08:41:19 -0600 )edit
1

answered 2012-10-22 06:24:53 -0600

victorocv3 gravatar image

Here you can find the reference for the VideoCapture class which will help you updating your code and also selecting capture properties:

http://docs.opencv.org/modules/highgui/doc/reading_and_writing_images_and_video.html#videocapture-set

edit flag offensive delete link more

Comments

Ita not working my friend... I have also tried sample program "starter_video.cpp", same result I got 640x480 pixels. But the same code with OpenCV 1.1 gives full 1280x1024 resolution. I think something wrong with built-in libs or dll files of OpenCV 2.4.2. Am I right ?

lucky gravatar imagelucky ( 2012-10-22 06:58:53 -0600 )edit

Question Tools

Stats

Asked: 2012-10-22 05:46:21 -0600

Seen: 933 times

Last updated: Oct 22 '12