我試圖從該站點上運行OpenCV的性別分類的例子, http://docs.opencv.org/modules/contrib/doc/facerec/tutorial/facerec_gender_classification.html 當我嘗試運行它給出了一個錯誤說法facerec_fisherfaces.cpp,爲什麼在預期的圖像大小時會出現opencv錯誤?
OpenCV Error: Unsupported format or combination of formats (In the Fisherfaces method all input samples (training images) must be of equal size! Expected 40000 pixels, but was 0 pixels.) in train, file /home/kavin/opencv/opencv-2.4.10/modules/contrib/src/facerec.cpp, line 564
terminate called after throwing an instance of 'cv::Exception'
what(): /home/kavin/opencv/opencv- 2.4.10/modules/contrib/src/facerec.cpp:564: error: (-210) In the Fisherfaces method all input samples (training images) must be of equal size! Expected 40000 pixels, but was 0 pixels. in function train
Aborted (core dumped)
下面是一個CSV文件條目我有使用冷杉此程序:
/home/kavin/Desktop/actors_cropped/female/an1_200_200.jpg;0
我有50個這樣的表項,在大小爲200 * 200的那些位置存在的圖像。我已經使用了與我發佈的教程鏈接相同的代碼facerec_fisherfaces.cpp。請幫忙。