i already have my histogram, now i want tosave the histogram data and call it back to do comparison. But when I try to show the image of "histogram1" and "histogram2" it gives unhandled exception error. here's my code // save file Mat result1 Mat result2 cv::FileStorage fs("results_file.yml", cv::FileStorage::WRITE); fs << "result1" << result1 ; fs << "result2" << result2 ; fs.release();
// load file cv::FileStorage fs("results_file.yml", cv::FileStorage::READ); Mat histogram1 ; Mat histogram2 ; fs["result1"] >> histogram1 ; fs["result2"] >> histogram2 ; fs.release(); imshow("histogram1",histogram1); imshow("histogram2",histogram2);