MCPcopy Create free account
hub / github.com/creatale/node-dv / cvSave

Function cvSave

deps/opencv/modules/core/src/persistence.cpp:5042–5061  ·  view source on GitHub ↗

simple API for reading/writing data */

Source from the content-addressed store, hash-verified

5040
5041/* simple API for reading/writing data */
5042CV_IMPL void
5043cvSave( const char* filename, const void* struct_ptr,
5044 const char* _name, const char* comment, CvAttrList attributes )
5045{
5046 CvFileStorage* fs = 0;
5047
5048 if( !struct_ptr )
5049 CV_Error( CV_StsNullPtr, "NULL object pointer" );
5050
5051 fs = cvOpenFileStorage( filename, 0, CV_STORAGE_WRITE );
5052 if( !fs )
5053 CV_Error( CV_StsError, "Could not open the file storage. Check the path and permissions" );
5054
5055 cv::string name = _name ? cv::string(_name) : cv::FileStorage::getDefaultObjectName(filename);
5056
5057 if( comment )
5058 cvWriteComment( fs, comment, 0 );
5059 cvWrite( fs, name.c_str(), struct_ptr, attributes );
5060 cvReleaseFileStorage( &fs );
5061}
5062
5063CV_IMPL void*
5064cvLoad( const char* filename, CvMemStorage* memstorage,

Callers

nothing calls this directly

Calls 5

stringFunction · 0.85
cvWriteCommentFunction · 0.85
cvWriteFunction · 0.85
cvReleaseFileStorageFunction · 0.85
c_strMethod · 0.45

Tested by

no test coverage detected