i want recognize faces using Emgu.CV library i selected the trained faces from the database and store them in image list as well as the labels
my problem is that when even i run the program it show me this error
An unhandled exception of type 'System.NullReferenceException' occurred in Emgu.CV.dll
Additional information: Object reference not set to an instance of an object.
please what is the cause of this problem and how can i solve if?
What I have tried:
i have tried this code
Dim trainingImages() As Image(Of Gray, Byte) = New Image(Of Gray, Byte)((5) - 1) {}
trainingImages(0) = New Image(Of Gray, Byte)(PictureBox1.Image)
Dim labels() As String = New String() {"Brad"}
Dim termCrit As New MCvTermCriteria(30, 0.001)
recognizer = New EigenObjectRecognizer(trainingImages.ToArray, labels.ToArray, 1000, termCrit)
Dim testImage As Image(Of Gray, Byte) = New Image(Of Gray, Byte)(imgFrame.Bitmap)
Dim label As String = recognizer.Recognize(testImage).Label
Console.Write(label)
i'll appreciate your response. thnx