When I run this code the next error comes out:
include <stdlib.h>
include <stdio.h>
include "matio.h"
include "opencv2/core/core.hpp"
include "opencv2/features2d/features2d.hpp"
include "opencv2/highgui/highgui.hpp"
include "opencv2/nonfree/features2d.hpp"
include "opencv2/nonfree/nonfree.hpp"
include <opencv2/ml/ml.hpp>
include
include "/home/rahim/Desktop/cvmatio-master/include/MatlabIO.hpp"
include "/home/rahim/Desktop/cvmatio-master/include/MatlabIOContainer.hpp"
using namespace std;
char * filename = new char[100];
using namespace cv;
using namespace std;
int
main(int argc,char **argv)
{
// load the MATLAB MAT file
MatlabIO matio;
//bool ok = matio.open("/home/rahim/workspace/svm/bin_train_y.mat", "r");
bool ok = matio.open("/home/rahim/Desktop/cvmatio-master/test.mat", "r");
if (!ok) return -1;
// read all of the variables in the file
std::vector<MatlabIOContainer> variables;
variables = matio.read();
matio.close();
// load the matrix by name in OpenCV style
cv::Mat basis = matio.find<cv::Mat>(variables, "B");
//cout << basis;
}
include <stdlib.h>
include <stdio.h>
include "matio.h"
include "opencv2/core/core.hpp"
include "opencv2/features2d/features2d.hpp"
include "opencv2/highgui/highgui.hpp"
include "opencv2/nonfree/features2d.hpp"
include "opencv2/nonfree/nonfree.hpp"
include <opencv2/ml/ml.hpp>
include
include "/home/rahim/Desktop/cvmatio-master/include/MatlabIO.hpp"
include "/home/rahim/Desktop/cvmatio-master/include/MatlabIOContainer.hpp"
using namespace std;
char * filename = new char[100];
using namespace cv;
using namespace std;
int
main(int argc,char **argv)
{
// load the MATLAB MAT file
MatlabIO matio;
//bool ok = matio.open("/home/rahim/workspace/svm/bin_train_y.mat", "r");
bool ok = matio.open("/home/rahim/Desktop/cvmatio-master/test.mat", "r");
if (!ok) return -1;
// read all of the variables in the file
std::vector<MatlabIOContainer> variables;
variables = matio.read();
matio.close();
// load the matrix by name in OpenCV style
cv::Mat basis = matio.find<cv::Mat>(variables, "B");
//cout << basis;
}
include <stdlib.h>
include <stdio.h>
include "matio.h"
include "opencv2/core/core.hpp"
include "opencv2/features2d/features2d.hpp"
include "opencv2/highgui/highgui.hpp"
include "opencv2/nonfree/features2d.hpp"
include "opencv2/nonfree/nonfree.hpp"
include <opencv2/ml/ml.hpp>
include
include "/home/rahim/Desktop/cvmatio-master/include/MatlabIO.hpp"
include "/home/rahim/Desktop/cvmatio-master/include/MatlabIOContainer.hpp"
using namespace std;
char * filename = new char[100];
using namespace cv;
using namespace std;
int
main(int argc,char **argv)
{
// load the MATLAB MAT file
MatlabIO matio;
//bool ok = matio.open("/home/rahim/workspace/svm/bin_train_y.mat", "r");
bool ok = matio.open("/home/rahim/Desktop/cvmatio-master/test.mat", "r");
if (!ok) return -1;
// read all of the variables in the file
std::vector<MatlabIOContainer> variables;
variables = matio.read();
matio.close();
// load the matrix by name in OpenCV style
cv::Mat basis = matio.find<cv::Mat>(variables, "B");
//cout << basis;
}
error: terminate called after throwing an instance of 'std::exception*'