(-13) Matrix error in Eigenfaces model (Face Recognizer)

asked 2014-10-01 09:30:10 -0600

repopelino gravatar image

updated 2014-10-01 09:40:37 -0600

Hi guys, I've been experiencing this error on Eigenfaces.cpp:

OpenCV Error: Image step is wrong (The matrix is not continuous, thus its number of rows can not be changed) in reshape, file terminate called after trowing an instance of 'cv::Exception'
what (): /home/pi/opencv-2.4.8/modules/core/src/matrix.cpp: 802: error: (-13) The matrix is not continuous, thus its number of rows can not be changed in function reshape

I downloaded a pack of 400 faces, but I don't know what this error is about. It is about the faces, the filters or algorythm problem?

It is called on the 'reshape' method

  // perform the PCA
PCA pca(data, Mat(), CV_PCA_DATA_AS_ROW, _num_components);
 // copy the PCA results
_mean = pca.mean.reshape(1,1); // store the mean vector

Edit: I'm using OpenCv 2.4.8

edit retag flag offensive close merge delete

Comments

that is a bit weird. are you really sure that this is the correct reshape() call (there are 6 in facerec.cpp) ? not when processing the images ?

berak gravatar imageberak ( 2014-10-01 10:18:28 -0600 )edit