MultiMarkerFiltered.h
Go to the documentation of this file.
00001 /*
00002  * This file is part of ALVAR, A Library for Virtual and Augmented Reality.
00003  *
00004  * Copyright 2007-2012 VTT Technical Research Centre of Finland
00005  *
00006  * Contact: VTT Augmented Reality Team <alvar.info@vtt.fi>
00007  *          <http://www.vtt.fi/multimedia/alvar.html>
00008  *
00009  * ALVAR is free software; you can redistribute it and/or modify it under the
00010  * terms of the GNU Lesser General Public License as published by the Free
00011  * Software Foundation; either version 2.1 of the License, or (at your option)
00012  * any later version.
00013  *
00014  * This library is distributed in the hope that it will be useful, but WITHOUT
00015  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00016  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
00017  * for more details.
00018  *
00019  * You should have received a copy of the GNU Lesser General Public License
00020  * along with ALVAR; if not, see
00021  * <http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html>.
00022  */
00023 
00024 #ifndef MULTIMARKERFILTERED_H
00025 #define MULTIMARKERFILTERED_H
00026 
00034 #include "MultiMarker.h"
00035 
00036 namespace alvar {
00037 
00045 class ALVAR_EXPORT MultiMarkerFiltered : public MultiMarker
00046 {
00047 protected:
00048         static const int filter_buffer_max=15;
00049         FilterMedian *pointcloud_filtered;
00050 
00051         double _Update(MarkerIterator &begin, MarkerIterator &end, 
00052                  Camera* cam, Pose& pose, IplImage* image);
00053 
00054 public:
00058         MultiMarkerFiltered(std::vector<int>& indices);
00059 
00061         ~MultiMarkerFiltered();
00062 
00068         void PointCloudAverage(int marker_id, double edge_length, Pose &pose);
00069 
00076         template <class M>
00077         double Update(const std::vector<M>* markers, Camera* cam, Pose& pose, IplImage* image = 0)
00078         {
00079                 if(markers->size() < 1) return false;
00080                 MarkerIteratorImpl<M> begin(markers->begin());
00081                 MarkerIteratorImpl<M> end(markers->end());
00082     return _Update(begin, end, 
00083                    cam, pose, image);
00084         }
00085 
00089         void MeasurementsReset() {
00090                 pointcloud_filtered->reset();
00091         }
00092 };
00093 
00094 } // namespace alvar
00095 
00096 #endif


ar_track_alvar
Author(s): Scott Niekum
autogenerated on Thu Jun 6 2019 21:12:54