gft_detector.cpp
Go to the documentation of this file.
00001 
00024 #include "ccny_rgbd/features/gft_detector.h"
00025 
00026 namespace ccny_rgbd {
00027 
00028 GftDetector::GftDetector():
00029   FeatureDetector()
00030 {
00031   gft_detector_.reset(
00032     new cv::GoodFeaturesToTrackDetector(n_features_, 0.01, min_distance_));
00033 }
00034 
00035 GftDetector::~GftDetector()
00036 {
00037 
00038 }
00039 
00040 void GftDetector::findFeatures(RGBDFrame& frame, const cv::Mat& input_img)
00041 {
00042   cv::Mat mask(frame.depth_img.size(), CV_8UC1);
00043   frame.depth_img.convertTo(mask, CV_8U);
00044 
00045   gft_detector_->detect(input_img, frame.keypoints, mask);
00046 }
00047 
00048 void GftDetector::setNFeatures(int n_features)
00049 {
00050   n_features_ = n_features;
00051     
00052   gft_detector_.reset(
00053     new cv::GoodFeaturesToTrackDetector(n_features_, 0.01, min_distance_));
00054 }
00055     
00056 void GftDetector::setMinDistance(double min_distance)
00057 {
00058   min_distance_ = min_distance;
00059     
00060   gft_detector_.reset(
00061     new cv::GoodFeaturesToTrackDetector(n_features_, 0.01, min_distance_));
00062 }
00063 
00064 } // namespace ccny_rgbd
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends


ccny_rgbd
Author(s): Ivan Dryanovski
autogenerated on Fri Apr 12 2013 20:38:48