FileStorage 的用法

	//store 
	Mat dictionary;
	.......
	FileStorage fs("dictionary.yml", FileStorage::WRITE);
	fs << "vocabulary" << dictionary;
	fs.release();


  	//read
	Mat dictionary; 
	FileStorage fs("dictionary.yml", FileStorage::READ);
	fs["vocabulary"] >> dictionary;
	fs.release();	

你可能感兴趣的:(FileStorage)