Click here to Skip to main content
15,911,707 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
hi when you click on botton Recognize it display a error as follows: An unhandled exception of type 'System.NullReferenceException' occurred in CameraCapture.exe Additional information: Object reference not set to an instance of an object

in part: name = recognizer.Recognize (ExtFaces [faceNo]) ToString ().; stringOutput [faceNo] = name;

here is the link the code part: C# - Emgu CV - Face Recognition code stops execution at EigenObjectRecognizer and exit without error

please help me thank you very much
Posted

1 solution

Do you know what the error message means ? It means that when you call recognizer.Recognize (ExtFaces [faceNo]), recognizer is null and so no method can be called on it. You should read up on how to use the debugger, and also in general on what this error means, how objects work, and what happens when an object is null, this is very basic programming stuff.

For now, make sure your object is not null, or insert a check to see if it is, and deal with it accordingly.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900