Qualeams / Android-Face-Recognition-with-Deep-Learning-Library

Face Recognition library for Android devices is an Android library (module) which includes several face recognition methods.
Apache License 2.0
371 stars 135 forks source link

error: (-13) The matrix is not continuous, thus its number of rows can not be changed in function #24

Open nishantsingh1814 opened 6 years ago

nishantsingh1814 commented 6 years ago

CvException [org.opencv.core.CvException: cv::Exception: /build/master_pack-android/opencv/modules/core/src/matrix.cpp:1047: error: (-13) The matrix is not continuous, thus its number of rows can not be changed in function cv::Mat cv::Mat::reshape(int, int) const ] at org.opencv.core.Mat.n_reshape(Native Method) at org.opencv.core.Mat.reshape(Mat.java:655) at ch.zhaw.facerecognitionlibrary.Recognition.Eigenfaces.addImage(Eigenfaces.java:178) at com.prakshep.attendanceprakshep.trainingActivityPackage.TrainingActivity$1.run(TrainingActivity.java:106) at java.lang.Thread.run(Thread.java:764)

how to resolve?

sunnykinger commented 6 years ago

I am getting same issue @nishantsingh1814 are you able to solve it?

dfomin commented 5 years ago

I found that the issue is in List<Mat> getProcessedImage method.

preProcessorRecognition = commandFactory.executeCommand(resources.getString(R.string.crop), preProcessorRecognition);

Cropping creates submat which is not continuous and has a different size. I removed this code because the images already cropped at the moment of this code.

tomsang commented 5 years ago

I seems that the project has been dormant because nobody responds to the question and the pull request.