Click to See Complete Forum and Search --> : WinAPI and webcams and C++
Mike Houghton
February 25th, 2003, 10:40 AM
Well, here I am right back at the beginning of my problem again. I find that I already have the SDK in my Builder 5 Pro edition. In it I find all the info about WinAPI. I still have not found anything that will let me use a still image from my USB webcam on a C++ form. Any pointers (direct or indexed) in the right direction will be rewarded with beer, if I ever catch up with the ptr.
I thank you.
Paul McKenzie
February 25th, 2003, 01:00 PM
Are you trying to capture the image? If you are, is the WebCam TWAIN compliant? If it is, you need to capture the image using the TWAIN driver that comes with the WebCam.
I can help further if this is what you are looking to do.
Regards,
Paul McKenzie
Mike Houghton
February 26th, 2003, 02:49 AM
Thanks for that pointer, I will have to try and find out although Logitech do not talk to their suckers, sorry their customers. Yes, that is what I ned to do; I need an image from the webcam on a c++ form, so that I can generate a 3D image from it.
Paul McKenzie
February 27th, 2003, 11:52 AM
If it is TWAIN compliant, when you take the picture, the picture data will come back to you as a Device Independent Bitmap (there are other formats, but the default is DIB). From there it's up to you to handle the image data as you see fit.
The first part, taking the picture using their TWAIN driver, is not that easy to do. That is the part that I can help you with.
Regards,
Paul McKenzie
Mike Houghton
February 28th, 2003, 03:23 AM
Well Paul, you're getting to the nub of the problem. Currently I have a QuickCam express USB thingy - but I can get any camera req. I have found dozens of apps that do one thing or another with a webcam. I'll try to explain what I need;
Imagine I have a C++ app, or form with say an image window or tool. I want to get still images or frames, from my webcam, into that object so that I can manipluate the data. That's it. Why, why am I finding this impossible ?
Paul McKenzie
February 28th, 2003, 02:48 PM
OK. To take the picture (assuming it's TWAIN compliant) there are two choices. One is to download the TWAIN toolkit from www.twain.org, or you could get a library that implements what you see in the Toolkit.
Let me warn you that the Toolkit is 500 pages of good, but hard to implement, and ambiguous information. If you don't want to go through trying to understand all of that, you can log into my company's website and download a library that will hopefully work in getting a picture from your web-cam. However, (as I stated in my previous message), once the picture is taken, the handling of the returned image data is up to you -- this includes displaying it in the formview.
I will send you private e-mail on obtaining the library (there are free, but limited versions, and a full-featured commercial version).
Regards,
Paul McKenzie
Mike Houghton
March 3rd, 2003, 03:13 AM
It seems I have missed the whole point! What I really need to do is use the WinAPI to access video, like (I understand) Video For windows. I have no need to go 'down' to USB etc. Spent weekend trying to find a book about this, but no joy. So the new question is, how does one hook up with the video stream api stuff ? I have (for example) WebCam200 prog which happily pops up a window with my webcam image, so thats more or less what I need. I do have the source code but it doesn't compile on my machine. Anyway, thats where I need to go. So new Q is How ?
ltachna
March 3rd, 2003, 10:37 AM
Originally posted by Paul McKenzie
www.twain.org,
should be www.twain.org
Paul McKenzie
March 3rd, 2003, 11:54 AM
Originally posted by Mike Houghton
It seems I have missed the whole point! What I really need to do is use the WinAPI to access video, like (I understand) Video For windows. I have no need to go 'down' to USB etc. Spent weekend trying to find a book about this, but no joy. So the new question is, how does one hook up with the video stream api stuff ? I have (for example) WebCam200 prog which happily pops up a window with my webcam image, so thats more or less what I need. I do have the source code but it doesn't compile on my machine. Anyway, thats where I need to go. So new Q is How ? Maybe you should investigate why the source code doesn't compile on your machine.
What errors are you getting?
Regards,
Paul McKenzie
Mike Houghton
March 4th, 2003, 03:54 AM
SORTED! FIXED! CRACKED AND DONE! Why (oh why) do I have to make my life so difficult ? All I needed to do wasto use Video for Windows. I have. It works. Thanks for all replies.
Caprice
March 5th, 2003, 02:32 AM
capCreateCaptureWindow
capDriverConnect
and so on.
I'm not sure, I think you're asking about this API.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.