# ORB Extractor: Number of features per image ORBextractor.nFeatures:1000
# ORB Extractor: Scale factor between levels in the scale pyramid ORBextractor.scaleFactor:1.2
# ORB Extractor: Number of levels in the scale pyramid ORBextractor.nLevels:8
# ORB Extractor: Fast threshold # Image is divided in a grid. At each cell FAST are extracted imposing a minimum response. # Firstly we impose iniThFAST. If no corners are detected we impose a lower value minThFAST # You can lower these values if your images have low contrast ORBextractor.iniThFAST:20 ORBextractor.minThFAST:7
// 获取视频图像 cv::VideoCapture cap(videoFile); // change to 1 if you want to use USB camera.
// 记录系统时间 auto start = chrono::system_clock::now();
while (1) { cv::Mat frame; cap >> frame; // 读取相机数据 if ( frame.data == nullptr ) break;
// rescale because image is too large cv::Mat frame_resized; cv::resize(frame, frame_resized, cv::Size(640,480));
auto now = chrono::system_clock::now(); auto timestamp = chrono::duration_cast<chrono::milliseconds>(now - start); SLAM.TrackMonocular(frame_resized, double(timestamp.count())/1000.0); cv::waitKey(30); }