Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

my image loading / preprocessing code looks like this:

Mat load( string imgpath )
{
    cv::Mat gray = cv::imread(imgpath , 0);  // GRAYSCALE!!
    if ( gray.empty() ) 
        return Mat();

    Mat gr_eq;
    cv::equalizeHist( gray, gr_eq);  // maybe not strictly nessecary, but does wonders on the quality!

    return gr_eq.reshape(1,1);       // flatten it to one row
}

so, to sum things up (for both training and testing!) :

  1. it needs grayscale images, not rgb
  2. the fisher and eigen methods expect the image 'flattened', all in one col (or was it row?) the lbp one doesn't