cv::FileStorage unclear behaviour
Hi guys,
I use a C++ programm on my Raspberry Pi for OCR where I use cv::FileStorage to find classification files for kNN.
If i start the programm in the LXTerminal on the raspberry it searches for the classification files in the folder where the program is stored. If i start it from a remote machine using SSH it searches in the /home/pi folder, no matter where the programm is stored.
I am not too familar with Linux and don't really know if its a OpenCV problem or something else. Could you explain me why that happens and do you have any suggestions how to fix it? I want to store the classification files in the same folder as the program.
edit: Same happens with cv:imwrite.
it sounds a bit like your program is run in a different folder, depending on your login/user/shell
can you try to use an absolute path to your files, like
/some/folder/myknn.xml
?(i also do not think, that this is specific to opencv, more a common problem using relative pathes)
Going into the folder and then executing the program works. So i guess its right what u said.
Going into the folder first and then executing the program works. So i guess its right what u said.
can we close it, then ?