|
-
Feb 17th, 2007, 03:51 AM
#1
Thread Starter
WiggleWiggle
Webcam
Is there a way to have a web cam record in vb?
This is going to be hard for me to test, because i dont have a web cam.. so i am going to trust you code until i can test it
My usual boring signature: Something
-
Feb 17th, 2007, 03:58 AM
#2
Re: Webcam
You'll be having hard time i am telling you.
If you have a webcam installed with its software, there might have an OCX included with it. Like for instance in A4tech webcams, it has an OCX.
So just add it in components.
-
Feb 17th, 2007, 04:24 AM
#3
-
Feb 17th, 2007, 04:44 AM
#4
Re: Webcam
Accessing WebCam in Visual Basic 6
I don't have a webcam either. So I can't test the code.
-
Feb 17th, 2007, 11:14 AM
#5
Re: Webcam
It does work ... sort of. It puts the picture from the web cam into a picture box. It's good code to start with.
The most difficult part of developing a program is understanding the problem.
The second most difficult part is deciding how you're going to solve the problem.
Actually writing the program (translating your solution into some computer language) is the easiest part.
Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.
Please Help Us To Save Ana
-
Feb 17th, 2007, 09:40 PM
#6
Re: Webcam
There are some 'fake webcam' programs that install a 'virtual' webcam. Search for them. They may work.
-
Feb 17th, 2007, 11:48 PM
#7
Thread Starter
WiggleWiggle
Re: Webcam
 Originally Posted by iPrank
There are some 'fake webcam' programs that install a 'virtual' webcam. Search for them. They may work.
that makes no sense what so ever
My usual boring signature: Something
-
Feb 18th, 2007, 03:50 AM
#8
Re: Webcam
 Originally Posted by dclamp
 Originally Posted by iPrank
There are some 'fake webcam' programs that install a 'virtual' webcam. Search for them. They may work.
that makes no sense what so ever
He means programs that trick the computer into thinking a webcam is installed, so you can test your program without actually needing to connect one.
-
Feb 18th, 2007, 08:13 AM
#9
PowerPoster
Re: Webcam
check this out .. it does work ..
http://www.planet-source-code.com/vb...64535&lngWId=1
though it could use some cleaning up (not my code) ..
it should give you the basics .. i actually used the idea to create motion detection for an activeX i use for a CCTV DVR remote video app ..
in other words i didnt want to use the activeX's built in motion detection function as it kept crashing.
I then looked at this one which is better documented (slightly) ..
http://www.planet-source-code.com/vb...47404&lngWId=1
but the first one i linked (is in spanish) also has the record part ..
or at least save image
You need to use something to capture the video though, such as the VidCap, or the EZVIDC60.OCX from http://www.shrinkwrapvb.com. Optionally you can use whatever the Webcam manufacturer gives you .. most have some kind of ActiveX or even a way just to access the images.
Baically the picture box idea is this ..
Connect to the Webcam/DVR etc. . using their ActiveX .. if they dont have one, most have access to update the images, eg, such as Axis .. by using a web page .. so you could simply keep throwing that query at the URL to refresh the images, then put the images in the picture box ..
using an activeX ... etc .. slightly different, easier .. use the ActiveX controls built in SaveImage (may be called something different depending on the system, eg could be SnapShot) and set the image to a temp file (can be placed anywhere once you can access it again in the code). Simply in a loop you keep filling the picture box with that updated file. If the timer is at least 100mlls then it looks real time .. but this also depends on the speed of the captured video, remote connection, etc. Some will crash if you do it this fast though, such is the case of the DVR i work with, so I had to make it 500mlls which is slightly slower, but since i was only concerned with motion detection it was not an issue, i use the actual ActiveX to display the live video and just the picture box (hidden in my case) to check for motion and update a border on the main activeX video box.
I believe the code that Iprank linked to requires an existing Webcam window to already be open .. not sureas I have no local source ...
All that said, I dont have experience with webcams, more so with just Industrial products, and the remote video side.
Last edited by rory; Feb 18th, 2007 at 08:47 AM.
-
Feb 18th, 2007, 01:29 PM
#10
Thread Starter
WiggleWiggle
Re: Webcam
all the examples i downloaded and opened gave me errors for the ocx's. Maybe it is because i have vb5.0?
My usual boring signature: Something
-
Feb 18th, 2007, 01:44 PM
#11
PowerPoster
Re: Webcam
No, you first have to register the OCX ..
In the case of at least one of them, its that EZVid ActiveX Control and its included in a Drivers.zip file in the main zip.
or its located here ..
http://www.shrinkwrapvb.com/vbctrls.htm
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|