Development of face recognition using opencv [closed]
Hiii...I am new to C++ and opencv .Actually i am in my btech final year project in which am working on facerecognition application using LDA algorithm.I dont have knowledge regarding the subject . At present am to trying to write the code in which a CSV file is uploaded ,calculate the mean of the file and extract the features using LDA and compare the training image with test image.But the main problem is am unable to understand the concept.Someone help me to write the application code, it will be a great help for me. This is the code which am trying now...
#include "opencv2/core/core.hpp"
#include "opencv2/highgui.hpp"
#include "opencv2/face.hpp"
#include "opencv2/imgproc.hpp"
#include <iostream>
#include <fstream>
#include <sstream>
using namespace std;
using namespace cv;
using namespace cv::face;
int main(int argc, const char *argv[])
{
string line;
ifstream myfile("1_seq40.csv");
vector< vector<Mat> >images;
while(getline(myfile,line))
{
vector<int>labels;
stringstream stream(line);
string classlabel;
while(getline(stream,classlabel,','))
{
labels.push_back(atoi(classlabel.c_str()));
}
images.push_back(labels);
}
Mat vect = Mat::zeros((int)images.size(), (int)images[0].size(),CV_8UC1);
for(int rows = 0; rows<(int)images.size(); rows++)
{
for(int cols = 0; cols<(int)images.size();cols++)
{
vector<uchar>(rows,cols) = images[rows][cols];
}
}
return 0;
}
is there any chance, you can re-negotiate that project ?
if both the theory is over your head, and your coding skills are non-existing, you can only fail.
(e.g. if it's about face-recognition, using opencv's pretrained dnn with a live webcam would work much better, and would be easier to implement)
I dont have any other option regarding the project ....can you help me how to implement the code by pca and lda...