private bool LoadTrainingData() { mydb = new DBConn(); allname = mydb.getLabelList(); trainingImages = mydb.getTrainedImageList(); int[] temp = Enumerable.Range(0, (allname.Count)).ToArray(); if (mydb.getImageCount() > 0) { if (trainingImages.Length != 0) { //set round and ... //termCrit = new MCvTermCriteria(mydb.getImageCount(), 0.001); //Eigen face recognizer recognizer = new FisherFaceRecognizer(0, 3200);//4000 recognizer.Train(trainingImages, temp); 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); } }
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(); allname = mydb.getLabelList(); trainingImages = mydb.getTrainedImageList(); int[] temp = Enumerable.Range(0,(allname.Count)).ToArray(); if (mydb.getImageCount() > 0) { if (trainingImages.Length != 0) { //set round and ... //termCrit = new MCvTermCriteria(mydb.getImageCount(), 0.001); //Eigen face recognizer recognizer = new FisherFaceRecognizer(0,3200);//4000 recognizer.Train(trainingImages, temp); return true; } else { return false; } } else { return false; } }