1

i tried to run the fisher algorithm provided by openCV community. http://docs.opencv.org/modules/contrib/doc/facerec/facerec_tutorial.html#tp91

But it produces the following error.

OpenCV Error: Image step is wrong (The matrix is not continuous, thus its number 
of rows can not be changed) in unknown function, file 
......\src\opencv\modules\core\src\matrix.cpp, line 802"

And found out that error is caused by,

          Ptr<FaceRecognizer> model = createFisherFaceRecognizer();
          model->train(images, labels);  //Error occurs when i cal this method

Images i am feeding are the same size. following links say it could be due to release libraries.

OpenCV 2.0 C++ API using imshow: returns unhandled exception and "bad-flag"

Getting OpenCV Error "Image step is wrong" in Fisherfaces.train() method

But i removed all the release libraries from the project and using the debug mode in visual studio 2010. I am using OpenCV 2.4.5

But i could not go pass the error.

please help.

Thank you.

Community
  • 1
  • 1
user2389323
  • 769
  • 2
  • 10
  • 22
  • are you using bmp files ? your images might be *padded* / non continuous somehow(you can't reshape padded images, that's what the error says), and the FisherFaceRecognizer does not like that. converting them to a different format (pgm) might help then. also check your csv file containing the image names there, any chance you've got some *non-image* in there ? ( e.g., the att database has a readme.txt ) – berak Oct 19 '13 at 17:28

0 Answers0