Loop problem in capturing image using webcam - RealWorld forums

Log-in or register.

Loop problem in capturing image using webcam

labby
on January 6th 2007

Hi,

I've application to capture video of image and grab the still image. It runs well until I put loop to regrab the still images many times automatically. It gives one exception error:
NullReferenceException was unhandled  ”Object reference not set to an instance of an object".
I found that, this error come out because of calling file from outside of the main code of the programming.
These are the code that calling file from the outside of the main body of code programming.

//// apply filter subtract===>>>> call file from out bin folder  <<<<=====
System.Drawing.Bitmap subtract = filter1.Apply(image2);

// =====>>> call file ScanFirstStage <<<========
//// create filter for extraction
string scanning = "";
////apply filter for extraction
ClassFirstStage.ScanFirstStage filter3 = new ClassFirstStage.ScanFirstStage(binary, out scanning);
objectCount1.Text = scanning;

// ========>>> call file Scan2ndStage <<<=========
// create filter for extraction
string scanning2 = "";

//apply filter for extraction
Class2ndStage.Scan2ndStage filter7 = new Class2ndStage.Scan2ndStage(horImage, out scanning2);
objectCount2.Text = scanning2;

I’m using C# express edition. Could anybody help me please..

Page views: 9448       Posts: 1      
Vista & Win 7 icons
I wish there were...
Select background