Closed mjhassan closed 7 years ago
Hi,
Seems that either img or Psi is corrupt at that point. Did you train the Eigenfaces algorithm first? You could check if the file /sdcard/Pictures/facerecognition/data/Eigenfaces/eigenfaces.xml contains the matrix Psi which should have 625 cols if you use N=25 (25x25=625).
Another problem could be with the img (which is the preprocessed image where you want to recognize someone). If the preprocessing fails at one point, the img will be null.
thanks for your reply. yes, I did train Eigenface algorithm first. I'll check the eigenfaces.xml file. How do I check if the preprocessing fails?
Try to debug before entering the subtract function. Then paste an image here of the variables Psi and img (or use Psi.dump() and img.dump() to log the whole Mat object)
Hi @mjhassan , any update?
Hi, There is a crash when I try to recognize face using
Eigenfaces
algorithm. The crash is inpublic String recognize(Mat img, String expectedLabel)
method; to be more specific at the following line:Here's error log:
Would you please help me to solve it? Thanks.