how can create and check csv file
Hello, Actually i am following face recognition tutorial for opencv 3.1.0 . Link is as below:
https://docs.opencv.org/3.1.0/da/d60/...
I have download the sample database file then copy all image into one folder then execute command "python /home/kishan/opencv-2.4.13.6/modules/contrib/doc/facerec/src/create_csv.py /home/kishan/FACE_SAMPLES/
", But i could not see any effect means i think .txt file has not generated.
So, how can i check that file is created or not?
Thanks and Regards, Kishan Patel.
it just prints to stdout. you need to pipe it into a txt file, like::
also:
no, you need a subfolder per person
Thanks for reply, I had do same thing but can not see any output.
Okay, I have made subfolder per person then re-execute command and got output as below: /home/kishan/FACE_SAMPLES/S15/subject15.happy;0 /home/kishan/FACE_SAMPLES/S15/subject15.sleepy;0 . . which i have save in one .txt file and execute command to run application as below: "./facerec_demo csv.txt" But i got error as below: Processing /home/kishan/FACE_SAMPLES/S13/subject13.leftlight /home/kishan/FACE_SAMPLES/S13/subject13.leftlight OpenCV Error: Image step is wrong (The matrix is not continuous, thus its number of rows can not be changed) in reshape, file /home/kishan/opencv-2.4.13.6/modules/core/src/matrix.cpp, line 812 terminate called after throwing an instance of 'cv::Exception'
what(): /home/kishan/opencv-2.4.13.6/modules/core/src/matrix.cpp:812: error: (-13) The matrix is not continuous, thus its number of rows can not be changed in function reshape
Aborted (core dumped)
Regards, Kishan Patel.
check, if your csv file has non-images (like thumbs.db, or readme, the like)
oh, and:
subject15.sleepy
-- sounds like thegif
files from yale db. opencv can't read gif's you have to convert those to png or jpg with an external tool.Okay, I will update after test. Regards, Kishan Patel.
I have changed file name. But still same issue occur.
Processing /home/kishan/FACE_SAMPLES/S13/subject13.happy.gif /home/kishan/FACE_SAMPLES/S13/subject13.happy.gif Processing /home/kishan/FACE_SAMPLES/S13/subject13.sleepy.gif /home/kishan/FACE_SAMPLES/S13/subject13.sleepy.gif OpenCV Error: Image step is wrong (The matrix is not continuous, thus its number of rows can not be changed) in reshape, file /home/kishan/opencv-2.4.13.6/modules/core/src/matrix.cpp, line 812 terminate called after throwing an instance of 'cv::Exception' what(): /home/kishan/opencv-2.4.13.6/modules/core/src/matrix.cpp:812: error: (-13) The matrix is not continuous, thus its number of rows can not be changed in function reshape
Aborted (core dumped)
it means, it could not read an image. again, you have to convert the imagesto png or such, as it cannot read gif files.
i have also tried to raname by .png , but still same issue occur. I have downloaded database of "Yale Facedatabase A".
Regards, Kishan Patel.
you don't get it.
don't rename files, but you have to convert them, using a 3rd party image editor, or some library like gd or imagemagic.