Ask Your Question

CharlesCV's profile - activity

2016-07-06 06:34:02 -0500 received badge  Famous Question (source)
2014-05-22 09:54:49 -0500 received badge  Notable Question (source)
2014-02-03 10:15:16 -0500 received badge  Teacher (source)
2013-11-09 12:59:43 -0500 received badge  Nice Question (source)
2013-10-29 06:25:27 -0500 received badge  Popular Question (source)
2013-09-05 04:08:28 -0500 received badge  Student (source)
2012-12-13 04:10:15 -0500 received badge  Self-Learner (source)
2012-11-28 15:41:01 -0500 answered a question VideoCapture parameters CV_CAP_PROP_FOURCC or CV_CAP_PROP_FPS, among others, not working

I have checked source files "cap_v4l.cpp" & "cap_libv4l.cpp".

Parameters CV_CAP_PROP_FOURCC and CV_CAP_PROP_FPS are not implemented. That's why they will never work under Linux.

No surprise, since it's libre software: sooner or later you'll have to pay for it somehow.

2012-11-19 13:12:38 -0500 asked a question VideoCapture parameters CV_CAP_PROP_FOURCC or CV_CAP_PROP_FPS, among others, not working

Hello:

I'm writing a code wich uses an USB webcam. Enviroment: Ubuntu 12.04 + OpenCV 2.4.2. All the development libraries are installed and updated (FFMPEG, V4L and so on).

Since CPU usage and bandwitdh are critical, I need to set some parameters, such as the frame size:

VideoCapture MyWebCamVariable;
MyWebCamVariable.open(0);
MyWebCamVariable.set(CV_CAP_PROP_FRAME_WIDTH, 320)
MyWebCamVariable.set(CV_CAP_PROP_FRAME_HEIGHT, 240)

Ok, everything works flawlessly, camera is shown properly. Troubles appear when dealing with parameters such as CV_CAP_PROP_FOURCC or CV_CAP_PROP_FPS (all of them are documented in the OpenCV reference manual).

For example:

char MyWebCamCodec;
MyWebCamCodec = MyWebCamVariable.get(CV_CAP_PROP_FOURCC);

gives the following message when executed:

HIGHGUI ERROR: V4L2: Unable to get property <unknown property string>(6) - Invalid Argument

Notice that I used get instruction, so no chances to mistake with a bad value. The rest of the code works well. Variable MyWebCamCodec is given an unrecognised character: �

In a Linux terminal I used v4l2-ctl --list-formats-ext and I checked that lots of capture modes (resolutions, FPS, YUV and MJPEG) are avaiable.

Regards

2012-11-19 12:18:49 -0500 received badge  Editor (source)
2012-11-19 12:15:32 -0500 answered a question Problem to compile OpenCV 2.4.3 with MinGW 4.4 for Windows XP

Hello

I had the same problem some weeks ago. I almost got mad. But fortunately I managed to solve it. It's a fault with your current MinGW setup. To solve this, you can either go directly to step 2 or, to ensure you'll success, rebuild OpenCV from the scratch:

  1. Uninstall your current deployment of OpenCV + MinGW + other stuff you have installed. Ensure that all the folders are cleaned.

  2. Install MingGW, but now ensure that you select Use pre-packaged repository catalogues when prompted with Repository catalogues on installer (look at the picture below).

  3. Rebuild OpenCV + other stuff you have selected.

image description.

Now you should be able to compile successfully. If you choose Download latest repository catalogues instead of Use pre-packaged repository catalogues you will get the same error again. I can't understand why this botched job, but fortunately it can be circumvented.