:: AForge.NET Framework :: Articles :: Forums ::

Problem with camera data capture

The forum is to discuss topics related to different areas of image processing and computer vision.

Problem with camera data capture

Postby snbc2017 » Sun Oct 01, 2017 8:19 pm

I have Winform with various objects on it (pictureBox, text boxes, labels...) and I have continuous drawing on my picture Box object.
I have added another picture Box object that accepts the image from web cam. And this is where my problem starts. It becomes white after 1-2 seconds. And what puzzles me is that same code for taking the video from web cam and putting it on picture Box works on another project (demo one) where I have only this picture Box on the form (in addition to combo box and button).

What might cause problem? Multithreading?

I'm kinda lost. Does anyone have an advice?

Posts: 11
Joined: Tue Sep 19, 2017 10:05 am

Re: Problem with camera data capture

Postby andrew.kirillov » Mon Oct 02, 2017 7:06 am

snbc2017 wrote:It becomes white after 1-2 seconds.

With red cross maybe? It means exception. The type of exception and message provided with it usually help in understanding the issue.

Try using AsyncVideoSource. Although being aimed for different purpose, it also helps debugging exceptions caused by users' code.
With best regards,

Interested in supporting AForge.NET Framework?
User avatar
Site Admin, AForge.NET Developer
Posts: 3453
Joined: Fri Jan 23, 2009 9:12 am
Location: UK

Return to Image Processing and Computer Vision