Archived

This topic is now archived and is closed to further replies.

VisualB4BigD

I have a web cam

Recommended Posts

In VB is there a control or a reference that will allow me to get real time images from my digital camera. There has to be. I sure hope this world isn''t one big joke, because I don''t get it.

Share this post


Link to post
Share on other sites
I dont know any VB, but what I most likely think you will have to do is to find a way to read from whatever port it is you connect your camera to on your computer, and figure out how to convert the data read into displayable pictures...

Share this post


Link to post
Share on other sites
Well there has to be a control already in place for this, right? Because the software that comes with my web cam can display the picture, and surely they would of made a control for it.

I sure hope this world isn''t one big joke, because I don''t get it.

Share this post


Link to post
Share on other sites
there may well be a control, but probably not from the company who made the software to view it because it probably doesn''t benefit them to make one. think about it, the viewer most probably consists of essentially that one control. why bother making a control out of it when the it is essentially the whole program. as for your actual question, i don''t really know but you might try planetsourcecode.com (it may be planet-source-code.com) or ask in the forums of vbexplorer.com. but why not just make it yourself? what good is knowing how to program if you aren''t going to apply that?

ewen

Share this post


Link to post
Share on other sites
there does not have to be a vb control for this. they most likly made their app using c/c++, mfc, and either direct access to the driver or more likly directshow. i am pretty sure there is an sdk sample on how to grab video form the camera using directshow. unfortunatly o dont know exactly what you are trying to do (ie just capture data or actually modify the data before it hits the screen). if its juts capturing data and displaying or compressing and saving to disk, you should be able to use vb. if you are trying to modify the video before it hits the screen, then you may need to look into using c++ for writing some of the code you will need to create the filter which will allow you to modify the output.

good luck

Share this post


Link to post
Share on other sites
im guessing that most webcams use bmp format, that you could use a winsock control to read the data into a buffer of some sort, then find a way to convert that buffer to an image and display it in a picture box

Share this post


Link to post
Share on other sites
Look at the website for the people who make your webcam, some of them have SDKs available for soing this. I''m pretty sure that they are availeble for the Logitech cameras.

Trying is the first step towards failure.

Share this post


Link to post
Share on other sites
Nope. Nope. Nope.

Win32 has controls for imaging devices, look for functions beginning with "cap" such as:

capDriverConnect()
capDriverDisconnect()
capPreview()

I know there is a way in VB to import C++ functions from libraries, and the functions you''ll want to use are located in
vfw32.lib, which is included in VC++.

I made a small program that displays video using Win32, if you need a hand with setting it up, you can email me at matrix_cubed@yahoo.com ... otherwise you can find the docs online in the MSDN library.

Good luck!



MatrixCubed
http://MatrixCubed.cjb.net






Share this post


Link to post
Share on other sites
i recall seeing a page where i guy wrote an app in VB
that used his webcam as a security device.
he set it up so it took temporary ''snapshots'' every 2 or 3
seconds, then compared the bits or whatever to see if
something had changed.. pretty simple, yet very nice
if i run across that link again i''ll post it in this
thread.

Share this post


Link to post
Share on other sites