cvd_fast.cc

00001 /*
00002 
00003     This file is part of the FAST-ER machine learning system.
00004     Copyright (C) 2008  Edward Rosten and Los Alamos National Laboratory
00005 
00006     This program is free software; you can redistribute it and/or modify
00007     it under the terms of the GNU General Public License as published by
00008     the Free Software Foundation; either version 2 of the License, or
00009     (at your option) any later version.
00010 
00011     This program is distributed in the hope that it will be useful,
00012     but WITHOUT ANY WARRANTY; without even the implied warranty of
00013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014     GNU General Public License for more details.
00015 
00016     You should have received a copy of the GNU General Public License along
00017     with this program; if not, write to the Free Software Foundation, Inc.,
00018     51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
00019 */
00020 #include <cvd/image.h>
00021 #include <cvd/fast_corner.h>
00022 #include <cvd/nonmax_suppression.h>
00023 
00024 #include <vector>
00025 
00026 #include "cvd_fast.h"
00027 
00028 using namespace std;
00029 using namespace CVD;
00030 
00031 ////////////////////////////////////////////////////////////////////////////////
00032 //
00033 // FAST interface
00034 //
00035 
00036 
00037 void fast_9_old::operator()(const CVD::Image<CVD::byte>& i, std::vector<CVD::ImageRef>& c, unsigned int n) const 
00038 {
00039     vector<ImageRef> ct;
00040     vector<int> sc;
00041     fast_corner_detect_9(i, ct, static_cast<int>(n));
00042     fast_nonmax(i, ct, static_cast<int>(n), c);
00043 }
00044 
00045 void fast_9::operator()(const CVD::Image<CVD::byte>& i, std::vector<CVD::ImageRef>& c, unsigned int n) const 
00046 {
00047     fast_corner_detect_9_nonmax(i, c, static_cast<int>(n));
00048 }
00049 
00050 void fast_12::operator()(const CVD::Image<CVD::byte>& i, std::vector<CVD::ImageRef>& c, unsigned int n) const 
00051 {
00052     vector<ImageRef> cs;
00053     fast_corner_detect_12(i, cs, n);
00054     vector<int> sc;
00055     fast_corner_score_12(i, cs, n, sc);
00056     nonmax_suppression(cs, sc, c);
00057 }

Generated on Mon Mar 2 12:47:12 2009 for FAST-ER by  doxygen 1.5.3