Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Facerecognition application using Linear Discriminant Analysis

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.

Facerecognition application using Linear Discriminant Analysis

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.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;
   }

Facerecognition application using Linear Discriminant Analysis

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;
   }

Facerecognition application using Linear Discriminant Analysis

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;
   }

Facerecognition application using Linear Discriminant Analysis

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;
   }