cvCreateCameraCapture fails to open camera (Bug #491)
Description
Running bumbleebee2 fireware camera on Windows XP SP3.
VideoCapture cap;
cap.open(0);
if(!cap.isOpened()) {
return -1;
}
In Revision 3354 the above works fine with my camera, since then it just isn't detected.
Related issues
duplicated by Bug #580: cannot get life feed from webcam under Windows | Cancelled |
Associated revisions
Merge pull request #491 from Daniil-Osokin:cvtRGB2YUV420p
History
Updated by Niall O'Hara over 14 years ago
the cmake flag, HAVE_VIDEOINPUT does not seem to be defined even when set?
Updated by Niall O'Hara over 14 years ago
- Status deleted (
Open)
Updated by Niall O'Hara over 14 years ago
if I ammend line 103-105 in \modules\highgui\src\precomp.hpp as follows
#if defined WIN32 || defined _WIN32
#define HAVE_VFW 1
#define HAVE_VIDEOINPUT 1
All works again as it should
Updated by Niall O'Hara over 14 years ago
Should also mention
using VS2008
Updated by Andrei Zaharescu over 14 years ago
I just looked at the opencv_highgui defines that got automatically generated in the project file, and HAVE_VIDEOINPUT is not one of them. Therefore, the problem is really in the cmake configure script for the highgui module.
I will try to figure out a fix and post it here.
Updated by Andrei Zaharescu over 14 years ago
It turns out the the proper fix is quite simple:
Modify trunk\opencv\modules\highgui\CMakeLists.txt and add the following lines:
if(WITH_VIDEOINPUT)
add_definitions(-DHAVE_VIDEOINPUT)
endif()
Somebody that can modify the svn tree should add this and close the bug.
Updated by anonymous - over 14 years ago
is this fix in the trunk yet?
Updated by Vadim Pisarevsky almost 14 years ago
looks like the problem has been fixed quite a while ago
- Status set to Done
- (deleted custom field) set to fixed
Updated by Andrey Kamaev over 12 years ago
- Category changed from highgui-images to highgui-camera