Ask Your Question

Bismarky's profile - activity

2013-07-31 09:48:18 -0600 commented answer Problems with webcam in Windows 7, OpenCV 2.4.6

Thank you, SR. But that was not the problem. I have found the solution (or "one" solution).

I decided to take a look into the source code; more specifically, into: modules/highgui/src/cap_dshow.cpp

There is only one change in that file with respect to version 2.4.5. In function CvCaptureCAM_DShow::retrieveFrame, the old version 2.4.5 says in line 3198:

VI.getPixels( index, (uchar*)frame->imageData, false, true );
return frame;

In the new version 2.4.6 it is replaced by:

if (VI.getPixels( index, (uchar*)frame->imageData, false, true ))
    return frame;
else
    return NULL;

Probably there is some reason for that if-else. But the fact is that replacing that piece of code with the old version the camera works fine for me, and also all the samples

2013-07-31 09:45:03 -0600 received badge  Critic (source)
2013-07-30 14:36:40 -0600 answered a question WebCam won't open since 2.4.6

The Windows version of OpenCV 2.4.6 also has the same problem. Capture from webcam doesn't work.

2013-07-30 12:22:12 -0600 asked a question Problems with webcam in Windows 7, OpenCV 2.4.6

Hi,

I have used OpenCV for a long time, but now I have problems with the last version 2.4.6. Capture from the webcam is not working at all (neither in my own programs nor the C and C++ samples that come with OpenCV).

I am using Windows 7 and I usually work with the IDE QtCreator. I downloaded OpenCV 2.4.6 and the last version of QtCreator 2.7.2, that uses Qt 5.1.0 and MinGW 4.8. I have tried everything: using the precompiled mingw binaries and libs; compiling OpenCV in mingw with optimizations, without optimizations, with Qt, without Qt, with Debug configuration, with Release configuration, with SSE, without SSE... I have even tried downloading and compiling with Visual C++ 11, with optimizations, without optimization..., using the precompiled VC11 files and compiling the samples... I'm desperate!!! In all cases, I can compile OpenCV 2.4.6 correctly and also the samples, but when I execute the samples, all the programs that use the webcam doesn't work. There are also some problems with programs that use several highgui windows, because the windows doesn't refresh correctly.

The webcam is working correctly in previous versions of OpenCV (in DShow mode), and also in other applications not related to OpenCV.

I don't know what else I can try!!! Please, any indication or suggestion would be appreciated.

Best regards,
-------
Bismarky