Maybe you should check your csv file,for example you can recreate a csv file; I get a error like this :what(): /home/pi/Resource/opencv-2.4.9/modules/core/src/matrix.cpp:802: error: (-13) The matrix is not continuous, thus its number of rows can not be changed in function reshape At the begining I thought my code has error,but after I recreate the csv file today the error has gone. I'm sorry my English is poor.It's my first time to reply ,I'm so excited .haha