From 96057df75b73f2e5f2cb9c3410e4e138e5dbef4e Mon Sep 17 00:00:00 2001 From: Duy-Nguyen Ta Date: Thu, 21 Oct 2010 22:53:43 +0000 Subject: [PATCH] delete old files --- examples/vSLAMexample/FeatureDetector.cpp | 88 ----------------------- examples/vSLAMexample/FeatureDetector.h | 23 ------ 2 files changed, 111 deletions(-) delete mode 100644 examples/vSLAMexample/FeatureDetector.cpp delete mode 100644 examples/vSLAMexample/FeatureDetector.h diff --git a/examples/vSLAMexample/FeatureDetector.cpp b/examples/vSLAMexample/FeatureDetector.cpp deleted file mode 100644 index 9d93fbbb1..000000000 --- a/examples/vSLAMexample/FeatureDetector.cpp +++ /dev/null @@ -1,88 +0,0 @@ -#include "FeatureDetector.h" -#include "landmarkUtils.h" -#include -#include - -using namespace cv; -using namespace std; -using namespace gtsam; - -FeatureDetector::FeatureDetector(const char* colorDescFile) -{ - readLandMarkColors(colorDescFile, vColors_); -} - -int FeatureDetector::findColorId(const RGBColor& color) -{ - for (size_t i = 0; i FeatureDetector::detect(const cv::Mat& image) -{ - vFeatures_.clear(); - - RGBColor BLACK(0,0,0); - map numPixels; // - for (int y = 0; y(y,x) == BLACK) - continue; - - RGBColor color = image.at(y,x); - int t = color[2]; color[2] = color[0]; color[0] = t; - int colorId = findColorId(color); - - if (colorId == -1) - continue; - - map::iterator it = numPixels.find(colorId) ; - if (it == numPixels.end()) - { - numPixels[colorId] = 1; - vFeatures_.push_back(Feature2D(colorId, Point2(x,y))); - } - else - { - size_t k = 0; - for (; k& FeatureDetector::read(const char* filename) -{ - ifstream file(filename); - int numFeatures; - file >> numFeatures ; - - vFeatures_.clear(); - for (size_t i = 0; i < numFeatures; i++) - { - int id; double x, y; - file >> id >> x >> y; - vFeatures_.push_back(Feature2D(id, Point2(x, y))); - } - - file.close(); - return vFeatures_; -} diff --git a/examples/vSLAMexample/FeatureDetector.h b/examples/vSLAMexample/FeatureDetector.h deleted file mode 100644 index 59968ccd1..000000000 --- a/examples/vSLAMexample/FeatureDetector.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef FEATUREDETECTOR_H -#define FEATUREDETECTOR_H - -#include "Feature2D.h" -#include -#include "cv.h" -#include "landmarkUtils.h" - - -/** - * A simple Feature Detector to detect color-coded features in the image. - * A list of colors must be provided. Feature id is the id of its associated color. - */ -class FeatureDetector -{ -private: - std::vector vFeatures_; - -public: - std::vector& read(const char* filename); -}; - -#endif // FEATUREDETECTOR_H