Go to the documentation of this file.00001
00024 #include "ccny_rgbd/features/star_detector.h"
00025
00026 namespace ccny_rgbd {
00027
00028 StarDetector::StarDetector(): FeatureDetector()
00029 {
00030 star_detector_.reset(
00031 new cv::StarFeatureDetector(16, threshold_, 10, 8, min_distance_));
00032 }
00033
00034 StarDetector::~StarDetector()
00035 {
00036
00037 }
00038
00039 void StarDetector::findFeatures(RGBDFrame& frame, const cv::Mat& input_img)
00040 {
00041 boost::mutex::scoped_lock(mutex_);
00042
00043 cv::Mat mask(frame.depth_img.size(), CV_8UC1);
00044 frame.depth_img.convertTo(mask, CV_8U);
00045
00046 star_detector_->detect(input_img, frame.keypoints, mask);
00047 }
00048
00049 void StarDetector::setMinDistance(double min_distance)
00050 {
00051 min_distance_ = min_distance;
00052
00053 star_detector_.reset(
00054 new cv::StarFeatureDetector(16, threshold_, 10, 8, min_distance_));
00055 }
00056
00057 void StarDetector::setThreshold(double threshold)
00058 {
00059 threshold_ = threshold;
00060
00061 star_detector_.reset(
00062 new cv::StarFeatureDetector(16, threshold_, 10, 8, min_distance_));
00063 }
00064
00065 }