agast5_8.h
Go to the documentation of this file.
00001 //
00002 //    agast5 - AGAST, an adaptive and generic corner detector based on the
00003 //              accelerated segment test for a 8 pixel mask
00004 //
00005 //    Copyright (C) 2010  Elmar Mair
00006 //
00007 //    This program is free software: you can redistribute it and/or modify
00008 //    it under the terms of the GNU General Public License as published by
00009 //    the Free Software Foundation, either version 3 of the License, or
00010 //    (at your option) any later version.
00011 //
00012 //    This program is distributed in the hope that it will be useful,
00013 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015 //    GNU General Public License for more details.
00016 //
00017 //    You should have received a copy of the GNU General Public License
00018 //    along with this program.  If not, see <http://www.gnu.org/licenses/>.
00019 
00020 #ifndef AGAST5_8_H
00021 #define AGAST5_8_H
00022 
00023 #include <stdint.h>
00024 #include "AstDetector.h"
00025 
00026 struct CvPoint;
00027 
00028 namespace agast{
00029 
00030 class AgastDetector5_8 : public AstDetector
00031 {
00032         public:
00033                 AgastDetector5_8():AstDetector(){;}
00034                 AgastDetector5_8(int width, int height, int thr):AstDetector(width, height, thr){init_pattern();};
00035                 ~AgastDetector5_8(){}
00036                 void detect(const unsigned char* im,
00037                                 std::vector<CvPoint>& keypoints);
00038                 void nms(const unsigned char* im,
00039                                 const std::vector<CvPoint>& keypoints, std::vector<CvPoint>& keypoints_nms);
00040                 int get_borderWidth(){return borderWidth;}
00041                 int cornerScore(const unsigned char* p, bool ignorePattern=false);
00042 
00043         private:
00044                 static const int borderWidth=1;
00045                 int_fast16_t s_offset0;
00046                 int_fast16_t s_offset1;
00047                 int_fast16_t s_offset2;
00048                 int_fast16_t s_offset3;
00049                 int_fast16_t s_offset4;
00050                 int_fast16_t s_offset5;
00051                 int_fast16_t s_offset6;
00052                 int_fast16_t s_offset7;
00053 
00054                 void init_pattern()
00055                 {
00056                         s_offset0=(-1)+(0)*xsize;
00057                         s_offset1=(-1)+(-1)*xsize;
00058                         s_offset2=(0)+(-1)*xsize;
00059                         s_offset3=(1)+(-1)*xsize;
00060                         s_offset4=(1)+(0)*xsize;
00061                         s_offset5=(1)+(1)*xsize;
00062                         s_offset6=(0)+(1)*xsize;
00063                         s_offset7=(-1)+(1)*xsize;
00064                 }
00065 };
00066 
00067 }
00068 
00069 #endif /* AGAST5_8_H */


ptam
Author(s): Markus Achtelik , Stephan Weiss , Simon Lynen
autogenerated on Sun Oct 5 2014 23:52:33