Problem with webcam image capture
-
Hello best programmers, I coded an application wich can display imagestream from a simple webcam. I found a good class (I guess) for capturing AVI from webcam to perform several functions etc... I found it here in Codeproject, some Russian dude encapsulated the functions of VFW class. Anyway, I tried to find a lot of useful information how to capture from webcam, but unfortunatly I found only descriptions of wich functions it has. And believe me there is a lot of functions, and a lot os useless functions for me. What I tried to do is making a simple dialogbox with a startbutton, when you click on start, the webcam is turned on and you'll see yourself on the dialogbox. I coded it as follows: void CCamSampDlg::OnStart() { CRect rect; // Here I try to display the imagestream WebCam.Create(WS_CHILD|WS_VISIBLE|WS_CLIPSIBLINGS,rect,this,TRUE); WebCam.ConnectWithDriver(-1); WebCam.SetPreviewRate(100); WebCam.StartPreview(TRUE); } It's actually very easy, but the PROBLEM is, when you click on start, the camera turns on (cause I see the activation LED blinking), but it shows nothing on the dialogbox. So I think there something missing in the part of Create-function. Can somebody please help me?? Thank you very very much!!! If my application works, I forget all my problems.
-
Hello best programmers, I coded an application wich can display imagestream from a simple webcam. I found a good class (I guess) for capturing AVI from webcam to perform several functions etc... I found it here in Codeproject, some Russian dude encapsulated the functions of VFW class. Anyway, I tried to find a lot of useful information how to capture from webcam, but unfortunatly I found only descriptions of wich functions it has. And believe me there is a lot of functions, and a lot os useless functions for me. What I tried to do is making a simple dialogbox with a startbutton, when you click on start, the webcam is turned on and you'll see yourself on the dialogbox. I coded it as follows: void CCamSampDlg::OnStart() { CRect rect; // Here I try to display the imagestream WebCam.Create(WS_CHILD|WS_VISIBLE|WS_CLIPSIBLINGS,rect,this,TRUE); WebCam.ConnectWithDriver(-1); WebCam.SetPreviewRate(100); WebCam.StartPreview(TRUE); } It's actually very easy, but the PROBLEM is, when you click on start, the camera turns on (cause I see the activation LED blinking), but it shows nothing on the dialogbox. So I think there something missing in the part of Create-function. Can somebody please help me?? Thank you very very much!!! If my application works, I forget all my problems.