CircularKeyPointDescriptor.h

Go to the documentation of this file.
00001 /*
00002 * Copyright (C) 2007-2009 Anael Orlinski & Pablo d'Angelo
00003 *
00004 * This file is part of Panomatic.
00005 *
00006 * Panomatic 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 * Panomatic 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
00017 * along with Panomatic; if not, write to the Free Software
00018 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019 */
00020 
00021 #ifndef __lfeat_circularkeypointdescriptor_h
00022 #define __lfeat_circularkeypointdescriptor_h
00023 
00024 #include "Image.h"
00025 #include "KeyPoint.h"
00026 #include "KeyPointDescriptor.h"
00027 
00028 namespace lfeat
00029 {
00030 
00031 struct SampleSpec
00032 {
00033     double x,y, size;
00034 };
00035 
00036 class LFIMPEX CircularKeyPointDescriptor : public KeyPointDescriptor
00037 {
00038 public:
00039     CircularKeyPointDescriptor(Image& iImage,
00040                                std::vector<int> rings = std::vector<int>(),
00041                                std::vector<double> ring_radius = std::vector<double>(),
00042                                std::vector<double> ring_gradient_width = std::vector<double>(),
00043                                int ori_bins=18, double ori_sample_scale=4, int ori_gridsize=11);
00044     ~CircularKeyPointDescriptor();
00045 
00046     void makeDescriptor(KeyPoint& ioKeyPoint) const;
00047     int getDescriptorLength() const
00048     {
00049         return _descrLen;
00050     };
00051     int assignOrientation(KeyPoint& ioKeyPoint, double angles[4]) const;
00052 
00053 protected:
00054     void createDescriptor(KeyPoint& ioKeyPoint) const;
00055 
00056 private:
00057     // orig image info
00058     Image&                      _image;
00059     int _vecLen;
00060     int _subRegions;
00061     int _descrLen;
00062     SampleSpec* _samples;
00063     const int _ori_nbins;
00064     const double _ori_sample_scale;
00065     const int _ori_gridsize;
00066     double* _ori_hist;
00067 };
00068 
00069 }
00070 
00071 #endif //__lfeat_keypointdescriptor_h

Generated on Wed Jul 16 01:25:39 2014 for Hugintrunk by  doxygen 1.3.9.1