I modified Run() function likethis,I want to get video from a camera
void Tracking::Run()
{
//ros::NodeHandle nodeHandler;
//ros::Subscriber sub = nodeHandler.subscribe("/camera/image_raw", 1, &Tracking::GrabImage, this);
/*
for (int i = 1; i <=2822; ++ i ) {
string r = "/home/lql/Datasets/seq1/";
ostringstream kk;
kk << i;
string k = kk.str();
while (k.length() < 6) k = "0" + k;
r = r + k + ".jpg";
cv::Mat img = cv::imread(r);
cout << i << endl;
GrabImage(img, i * 0.1);
}
*/
cv::VideoCapture capture(0);
while(capture.isOpened())
{
int i = 1;
cv::Mat frame;
capture>>frame;
GrabImage(frame, i * 0.1);
++i;
}
//ros::spin();
}
and then
cmake ..
make -j8
is OK,but when I run
./Project
have some trouble:
ORB-SLAM Copyright (C) 2014 Raul Mur-Artal
This program comes with ABSOLUTELY NO WARRANTY;
This is free software, and you are welcome to redistribute it
under certain conditions. See LICENSE.txt.
error
How to solve this problem?
I modified Run() function likethis,I want to get video from a camera
void Tracking::Run()
{
//ros::NodeHandle nodeHandler;
//ros::Subscriber sub = nodeHandler.subscribe("/camera/image_raw", 1, &Tracking::GrabImage, this);
/*
for (int i = 1; i <=2822; ++ i ) {
string r = "/home/lql/Datasets/seq1/";
ostringstream kk;
kk << i;
string k = kk.str();
while (k.length() < 6) k = "0" + k;
r = r + k + ".jpg";
cv::Mat img = cv::imread(r);
cout << i << endl;
GrabImage(img, i * 0.1);
}
*/
cv::VideoCapture capture(0);
while(capture.isOpened())
{
int i = 1;
cv::Mat frame;
capture>>frame;
GrabImage(frame, i * 0.1);
++i;
}
//ros::spin();
}
and then
cmake ..
make -j8
is OK,but when I run
./Project
have some trouble:
ORB-SLAM Copyright (C) 2014 Raul Mur-Artal
This program comes with ABSOLUTELY NO WARRANTY;
This is free software, and you are welcome to redistribute it
under certain conditions. See LICENSE.txt.
error
How to solve this problem?