private bool LoadTrainingData() { mydb = new DBConn(); imagelabel = mydb.getLabelNumList().ToArray(); imageStringlabel = mydb.getLabelList().ToArray(); trainingImages = mydb.getTrainedImageList(); Itrainingimage = trainingImages; if (mydb.getImageCount() > 0) { if (trainingImages.Length != 0) { f_recognize = new FisherFaceRecognizer(0, 123.0); f_recognize.Train(Itrainingimage, imagelabel); return(true); } else { return(false); } } else { return(false); } }
private bool LoadTrainingData() { mydb = new DBConn(); imagelabel = mydb.getLabelNumList().ToArray(); imageStringlabel = mydb.getLabelList().ToArray(); trainingImages = mydb.getTrainedImageList(); Itrainingimage = trainingImages; if (mydb.getImageCount() > 0) { if (trainingImages.Length != 0) { f_recognize = new FisherFaceRecognizer(0, 123.0); f_recognize.Train(Itrainingimage, imagelabel); return true; } else { return false; } } else { return false; } }