FileStorage and class

asked 2015-03-10 08:32:40 -0600

LBerger gravatar image

updated 2015-03-10 08:48:44 -0600

Hi,

I want to use FileStorage for my own data. I have modified this example http://docs.opencv.org/doc/tutorials/... (or samples/cpp/tutorial_code/core/file_input_output/file_input_output.cpp). At line 171 I have changed

class MyData

to

class MyData: public Mat

Now I have got this error message with VC2012 windows 7 opencv 3.0 (sorry it's in french)

\lib\opencv\modules\core\include\opencv2/core/persistence.hpp(772): error C2666: 'write' : les 3 surcharges ont des conversions similaires
2>          ..\starter_video.cpp(195): peut être 'void write(cv::FileStorage &,const std::string &,const MyData &)' [trouvé à l'aide d'une recherche dépendante d'un argument]
2>          D:\lib\opencv\modules\core\include\opencv2/core/persistence.hpp(394): ou       'void cv::write(cv::FileStorage &,const cv::String &,const std::vector<_Ty> &)'

I've got two questions. First have you got same error with another compiler? Thanks for yours help Second Is it possible to fix problem?

edit retag flag offensive close merge delete