Merge pull request #3 from focs/patch-1

Update frame.cpp
This commit is contained in:
Christian Forster
2014-05-15 18:40:16 +02:00
+1 -1
View File
@@ -48,7 +48,7 @@ void Frame::initFrame(const cv::Mat& img)
{ {
// check image // check image
if(img.empty() || img.type() != CV_8UC1 || img.cols != cam_->width() || img.rows != cam_->height()) if(img.empty() || img.type() != CV_8UC1 || img.cols != cam_->width() || img.rows != cam_->height())
throw std::runtime_error("Frame: provided image has not the same size as the camera model"); throw std::runtime_error("Frame: provided image has not the same size as the camera model or image is not grayscale");
// Set keypoints to NULL // Set keypoints to NULL
std::for_each(key_pts_.begin(), key_pts_.end(), [&](Feature* ftr){ ftr=NULL; }); std::for_each(key_pts_.begin(), key_pts_.end(), [&](Feature* ftr){ ftr=NULL; });