null value in picturebox

Mar 4, 2012 at 1:23 AM
Edited Mar 5, 2012 at 10:37 AM

Hi Marcio.

I am trying to use the routine with a little bit change. I do not need that the control be visible and I take a picture every 10 seconds. Oddly sometimes I got a null image. Still oddly, in my desktop computer with an generic webcam I got no problem. When I installed  the software in my notebook, a Lenovo note, I got this problem.

Any idea?

thx in advance.

PS. Very nice blog.

Could be the slow frame rate of the notebook camera? because this happens with several libraries.

Coordinator
Mar 7, 2012 at 2:31 AM
Edited Mar 7, 2012 at 2:51 AM

Hi Deraldo, sorry my delay in response.

Are you using the component or the application?

I assume that you are using the component with your application, ok?

Try to set the webcam interval frame rate to something around 200 milliseconds or more, by fault the component uses 50 ms (try this out).

camOnWebComponent.IntervalFrameRate = 200;

To take pictures every 10 seconds you can use a timer component with the TakePicture method overload:

camOnWebComponent.TakePicture("F:\\" + Guid.NewGuid().ToString() + ".jpg");

Let me know if this helped you.

Regards!

Thanks for contacting me!

Márcio Pulcinelli.