imwrite error
cv::imwrite("/home/jros/image.jpg",cv_ptr->image);
I want to save an image using imwrite but I get this error when I launch the node:
OpenCV Error: Unspecified error (could not find a writer for the specified extension) in imwrite_, file /home/guillaume/Developpement/libs/OpenCV-2.2.0/modules/highgui/src/loadsave.cpp, line 276
terminate called after throwing an instance of 'cv::Exception'
what(): /home/guillaume/Developpement/libs/OpenCV-2.2.0/modules/highgui/src/loadsave.cpp:276: error: (-2) could not find a writer for the specified extension in function imwrite_
Aborted (core dumped)
there is no error in compilation. It seems like an error in OpenCV version !?
It would be better if you ask this question in StackOverflow, as I see that you are using a standalone OpenCV version. And by the way try updating your OpenCV first and retry, because your version is REALLY old. You could also try the cvSaveImage (old C implementation of imwrite) , docs on this link http://docs.opencv.org/modules/highgui/doc/reading_and_writing_images_and_video.html#imwrite
Instead of StackOverflow it would be even better to ask your question in http://answers.opencv.org
cvSaveImage is in C but I'm using C++ so it's imwrite. ya as I said maybe it's an old opencv version