0
我正在開發一個帶有emguCV的C#應用程序,我是emguCV的新手。我在互聯網上看過這個例子。如何使用EigenObjectRecognizer訓練圖像
Image<Gray, Byte>[] trainingImages = new Image<Gray,Byte>[5];
trainingImages[0] = new Image<Gray, byte>("brad.jpg");
trainingImages[1] = new Image<Gray, byte>("david.jpg");
trainingImages[2] = new Image<Gray, byte>("foof.jpg");
trainingImages[3] = new Image<Gray, byte>("irfan.jpg");
trainingImages[4] = new Image<Gray, byte>("joel.jpg");
String[] labels = new String[] { "Brad", "David", "Foof", "Irfan" , "Joel"}
MCvTermCriteria termCrit = new MCvTermCriteria(16, 0.001);
EigenObjectRecognizer recognizer = new EigenObjectRecognizer(
trainingImages,
labels,
5000,
ref termCrit);
Image<Gray,Byte> testImage = new Image<Gray,Byte>("brad_test.jpg");
String label = recognizer.Recognize(testImage);
Console.Write(label);
我需要知道的是如何訓練所有圖像?
http://stackoverflow.com/questions/2837523/using-eigenobjectrecognizer – 2013-10-01 13:29:58