Regarding frame-capturing using a web-camera

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Regarding frame-capturing using a web-camera


I use OpenCV to capture video frames for further process.The core code
is quite simple:

ShowCamVideo(HWND hwnd, int width, int height)
        int num = cvcamGetCamerasCount();
        if (num < 1) {
                return 0;
        cvcamSetProperty(0, CVCAM_PROP_ENABLE, CVCAMTRUE);
        cvcamSetProperty(0, CVCAM_PROP_RENDER, CVCAMTRUE);
        cvcamSetProperty(0, CVCAM_PROP_CALLBACK, callback);
        cvcamSetProperty(0, CVCAM_PROP_WINDOW, &hwnd); // link to a window to
render each video frame  
        cvcamSetProperty(0, CVCAM_RNDWIDTH, &width);
        cvcamSetProperty(0, CVCAM_RNDHEIGHT, &height);
        if( !cvcamInit() )
                return 0;
        return 1;

It works perfect during the development, but I do encounter the
problems during the release stage of the binary package (I have
included all related OpenCV dlls).

1.Some users (not all of them) reported they are required to register & OK, I just include these two filters.
2.After registering these two filters, the users can see the camera
input just for a few seconds, but then the video input is totally
freeze ...

I did some study and it might be caused by directshow. Should I ask
them to install directshow (obviously it is not a wise solution)? If
anyone can give me some clues to solve this problem more clever, it
would be great!

Thanks for your reading...