0

I was online searching about Face recognition on Andoid and and found this project >>> https://github.com/Ajay191191/Opencv-Face-Recognition I have fixed lots of errors including configurations but stacked here. In the JNI part of the project in the jni_part.cpp class on line 131 and 132 Iam having an error.

        vector<Mat> images;//Vector of Mat image declared
            ...
        int im_width = images[0].cols;//line 131 and its trying to access column of images matrix
        int im_height = images[0].rows;//line 132 and trying to access rows of Mat images

And the error i am having is "Field 'Cols' couldnot be resolved" and "Field 'rows' could not be resolved".I think its trying to access the rows and columns of the Mat image 'images' which is a vector and i am not sure this is whether the right way to access the Mat of an Image file on Android. Can any one help by pointing to the right way on how to access the rows and columns of an image with Vector images declaration?

Sisay
  • 681
  • 7
  • 16
  • 31
  • That looks fine. It just trying to get number of cols and rows. Maybe there is something wrong with your build environment? – Bull Jun 09 '13 at 13:38
  • I dont know but i think i have configured my IDE according to the book(Very carefully and other sample codes works fine).What could possibly go wrong? P.S I am using Open cv on Android not on Desktop. – Sisay Jun 09 '13 at 13:40

1 Answers1

0

you can try this: create a new mat, assign image[0] to this new mat, get mat.cols().

vector<Mat> images;
........
Mat temp;
temp = images[0];
int im_width = temp.cols;