orca-robotics


INTRODUCTION
Overview
Download and Install
Documentation

REPOSITORY
Interfaces
Drivers
Libraries
Utilities
Software Map

DEVELOPER
Dashboard

PEOPLE
Contributors
Users

SourceForge.net Logo
Project
Download
Mailing lists

 

         

foregroundextractor.h

00001 /*
00002  * Orca-Robotics Project: Components for robotics 
00003  *               http://orca-robotics.sf.net/
00004  * Copyright (c) 2004-2008 Alex Brooks
00005  *
00006  * This copy of Orca is licensed to you under the terms described in
00007  * the LICENSE file included in this distribution.
00008  *
00009  */
00010 #ifndef HYDROLFEXTRACT_FOREGROUND_EXTRACTOR_H
00011 #define HYDROLFEXTRACT_FOREGROUND_EXTRACTOR_H
00012 
00013 #include <vector>
00014 #include <hydrofeatureobs/features.h>
00015 #include <hydrolaserfeatureextract/scanutil.h>
00016 #include <hydrolaserfeatureextract/polefinder.h>
00017 
00018 namespace hydrolfextract {
00019 
00020 class ForegroundExtractor
00021 {
00022 
00023 public: 
00024 
00025     struct Config {
00026         Config( const ScannerConfig &scannerCfg )
00027             : scannerConfig(scannerCfg),
00028               minForegroundWidth(0.1),
00029               maxForegroundWidth(0.5),
00030               minForegroundBackgroundSeparation(1.0)
00031             {}
00032 
00033         ScannerConfig scannerConfig;
00034         double minForegroundWidth;
00035         double maxForegroundWidth;
00036         double minForegroundBackgroundSeparation;
00037 
00038         bool isSane() const;
00039     };
00040 
00041     ForegroundExtractor( const Config &config )
00042         : config_(config)
00043         { assert( config.isSane() ); }
00044 
00045     std::vector<Pole> extractForegroundPoints( const std::vector<float> &ranges, bool debug=false ) const;
00046 
00047     const Config &config() const { return config_; }
00048     
00049 private: 
00050 
00051     mutable std::vector<Pole> possiblePoles_;
00052 
00053     Config config_;
00054 };
00055 
00056 class ForegroundFeatureExtractor
00057 {
00058 
00059 public: 
00060 
00061     ForegroundFeatureExtractor( const ForegroundExtractor::Config &config,
00062                                 double rangeSd,
00063                                 double bearingSd,
00064                                 double pFalsePositive,
00065                                 double pTruePositive )
00066         : config_(config),
00067           rangeSd_(rangeSd),
00068           bearingSd_(bearingSd),
00069           pFalsePositive_(pFalsePositive),
00070           pTruePositive_(pTruePositive)
00071         {}
00072 
00073     std::vector<hydrofeatureobs::PointFeatureObs*> extractFeatures( const std::vector<float> &ranges,
00074                                                                     const std::vector<Pole>  &fgPoints ) const;
00075 
00076 private: 
00077 
00078 
00079     ForegroundExtractor::Config config_;
00080 
00081     double rangeSd_;
00082     double bearingSd_;
00083     double pFalsePositive_;
00084     double pTruePositive_;
00085 };
00086 
00087 } // namespace
00088 
00089 #endif
 

Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)


Generated for Orca Robotics by  doxygen 1.4.5