 |
|
 |
thank you Dan
but i want to use your code whose article is "C# WebCam Service with FTP and Installer" to send image from webcam to my web site whitch i create it by asp.net
please advice me what can i do exactly to apply what i want to do .
please quickly reply to me
|
|
|
|
 |
|
 |
What license is this code released under?
|
|
|
|
 |
|
 |
This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.
|
|
|
|
 |
|
 |
Hi,
I need a little modification in the code. The functionality i am looking for are:
- To capture video(integrated laptop webcam) through time scheduling.
- Save the video on local Hard Drive.
Any idea on how to achieve this.
Thanks,
dzango
|
|
|
|
 |
|
 |
Around the 69 line of the Capture.cs
cam.Init();
Fails with some HRESULT stuff.
Seems the webCam stills stood powered ON, or busy-hoocked by another or the same Service itself.
This causes the prior errors reported by others, image=null;
Any code to reset-up things? i.e Make a "clean" capture on each cycle?
cam.CloseDevice(); ?¿?
cam.Init();
P.S : debug stuff.
The Debug.WriteLine( inside Capture.cs does not appear in WebCam.log
So I've tried, this lines in the config file, with no result.
I'm still can't view the debug output lines...
debug
listeners
add name="textListener" type="System.Diagnostics.TextWriterTraceListener,System"
initializeData="c:\Debug.log"
/add /listeners
/debug
This stuff
errr. sorry pals, cannot show correct XML stuff inside the code TAG
Thanks!
modified on Monday, March 31, 2008 10:47 AM
|
|
|
|
 |
|
 |
I am running this and it is working fine except everytime it goes to capture another image the memory increases in task manager. anyone find the leak?
|
|
|
|
 |
|
 |
I'm stumped. As described in several other messages, the webcam takes one image, then bombs out taking the second image. I'm running this on a Creative Live! Webcam.
I really don't even know where to begin. Did anyone resolve this? (And yes, I saw the alledged solution referring me to a "DsBugWO.cs" file. That didn't help)
|
|
|
|
 |
|
 |
I was using the FtpClient class in a windows service every hour, it would run once then failed after that. I was FTPing to filezilla server, It turned out to be the default responce message from filezilla that was breaking it.
Just incase anyone else is having the same problem.
Thanks,
Alan.
|
|
|
|
 |
|
 |
Hi,
I've opened and converted the project in VS 2005. Has anyone tested it in this. I am getting an error "Timeout waiting to get picture" even when I try using a Windows Application instead of service.
I've got a Logitech WebCam installed and works fine with MSN Messenger and Logitechs on software. Is there any special I need to try?
|
|
|
|
 |
|
 |
Just another little contribution if anyone stumbles upon this for a lightweight c# ftp component-
I had trouble when the socket raised an exception during file upload/download. The file handle was not being closed. Yes- there is a little more expense in throwing extra try/finallys in the upload and download methods but I think its well worth NOT having orphaned handles floating around with the O/S locking the file until windows cleans it up. So-
in the upload and download methods I've added a try/finally to ensure the file handles get closed and I also added another (nested) try/finally after the call to CreateSocket just to make sure I didnt have any orphaned socket handles either
Maybe this will help someone else!
Steve
|
|
|
|
 |
|
 |
wouldn't it be kelw to integrrate the Motion Dectection project with this project? Only put new pictures up when something has changed?
|
|
|
|
 |
|
 |
i have installed everything , and its working , only problem i got now is that it will only run once and to run it again i have to stop start the service
how do i solve this issue ?
best regards
|
|
|
|
 |
|
 |
Try doing some of the things that they posted in previous posts. Sometimes it is because your webcam is not released before it tries to take another picture. Someone posted a fix for that issue. Also, what does your error log say?
|
|
|
|
 |
|
 |
i still dont get it , maybe someone can tell me exacly what do i need to change
thanks in advance
|
|
|
|
 |
|
 |
I have not gone through the code but I think problem is you are releasing the cam like...Marshal.ReleaseComObject..do not use this if you want it to run second time ... just whatever is released , make it null and service will work again , only at final closing...use Marshal.ReleaseComObject.
|
|
|
|
 |
|
 |
Agree, damn this is close, and thanks to the author for a great code example!
I'm new to C#, so its taken me a bit to get to this stage.
I've found a couple of things to change, but the app still fails on the second attempt to save the
image.
WebCamService was also not keeping n number of old images. I think the following code needs to be
changed:
int deletes = files.Count - keepOldImageCount;
foreach ( FileInfo f in files.Values )
{
Debug.WriteLine( "Deleting " + f.Name);
f.Delete();
deletes--;
if ( deletes <= 0 ) break;
}
Should be:
int deletes = files.Count - keepOldImageCount;
foreach ( FileInfo f in files.Values )
{
if ( deletes <= 0 ) break;
Debug.WriteLine( "Deleting " + f.Name);
f.Delete();
deletes--;
}
That way, if there are less than KeepOldImageCount files, it won't try deleting any at all.
The real problem though is the line in capture.cs:
Image image = (Image)cam.image.Clone();
On the second capture, that line fails with:
Object reference not set to an instance of an object.
As per the other posts, I have tried:
1. Performing Cam.INit() only once per run.
2. Commenting out all Marshal.ReleaseComObject calls
(Just to see if the code is able to capture a second image
Neither of these has changed the end result, which regardless of which changes are made, the
program aborts at line 76 of capture.cs with the "Object reference not set..." error.
So if anyone has managed to get this to take more than one image, posting how you did that would
be great. With my limited knowledge of C#, I've done just about all I can to try make this work.
|
|
|
|
 |
|
 |
Trying to figure out how to set the resoultion of the picture it grabs.
Would setting these
cam.videoInfoHeader.BmiHeader.XPelsPerMeter = Horizontal Resolution Here
cam.videoInfoHeader.BmiHeader.YPelsPerMeter = Vertical Resolution Here
change the resolution of the image that it captures?
Also, where would i set these if it would work? In the CaptureImage method, OnCaptureDone method, GetImage method?
Thanks.
|
|
|
|
 |
|
 |
I am not able to run the application.I doesnot run.Also gives error messages that it cant write the image to the ouput directory.Can you please tell me in detail how to run the applicaton precisely.
conexus
|
|
|
|
 |
|
 |
I have used the WebBac Service code for a while. It works GREAT. However, I have been trying to change the frame size with no success.
cam anyone please help...
Thanks
Mnlux
|
|
|
|
 |
|
 |
I am also trying to change the FrameSize of the image that is produced to a higher resolution. It currently defaults to 128x92 for me. Is that the same resolution it does for everyone else?
Where do you think we set the resolution of the cam? The max resolution on my cam is like 346x288 or something like that and I would really like to take advantage of it.
|
|
|
|
 |
|
 |
Hi!
it's me again!
Can please anyone give me a code-snippet how to change the framesize in this source?
I think it has to be placed in the SetupGraph() Function.
But what? and where??
Please Help!
Many thanks in Advance!!!
Ciao
Clemens
|
|
|
|
 |
|
 |
Hi,
Im really interested in capturing frames from my webcam (for further processing). I referenced your dll and made a simple app that does
myPictureBox.Image = WebCamService.Capture.GetImage();
The picture comes out the right size but totally black. Any ideas what's causing this?
Thanks
felix
Felix
|
|
|
|
 |
|
 |
Your webcam has to adapt to the light after turning on. You can put a Thread.Sleep(1000) after the .Init() call.
|
|
|
|
 |
|
 |
<code>02.12.2005 16:02:29 System.NullReferenceException: Object reference not set to an instance of an object. at WebCamService.WebCamService.Run() in c:\documents and settings\a\desktop\webcamservice2\webcamservice\webcamservice.cs:line 129 </code> it's in WebCam.log file... It takes one photo and sends it to my ftp server everything is allright firstly but later every circle it gives that error and write it to file.. Sign it
|
|
|
|
 |
|
 |
The method cam.init() only use one time
cam.Init()
private void Init)
{
...
StartupVideo(dev.Mon)
{
....
SetupGraph()
{
.....
hr=capGraph.RenderStream(ref cat,ref med,....)
//hr<0 ->can't capture two times
}
}
}
}
HuuLongNguyen
|
|
|
|
 |