[0d9e02]: src / hugin_cpfind / cpfind / PanoDetectorDefs.h Maximize Restore History

Download this file

PanoDetectorDefs.h    56 lines (40 with data), 1.6 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// -*- c-basic-offset: 4 ; tab-width: 4 -*-
/*
* Copyright (C) 2007-2008 Anael Orlinski
*
* This file is part of Panomatic.
*
* Panomatic is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* Panomatic is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Panomatic; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __detectpano_panodetectordefs_h
#define __detectpano_panodetectordefs_h
#include <vector>
#include <iostream>
#include <boost/shared_ptr.hpp>
#include <localfeatures/KeyPoint.h>
#include "KDTree.h"
#include "Utils.h"
// define KDTree element from a KeyPointPtr
// define a class to wrap an Ipoint and make it KDTree compliant.
class KDElemKeyPoint : public KDTreeSpace::KDTreeElemInterface<double>
{
public:
KDElemKeyPoint (lfeat::KeyPointPtr& iK, int iNumber) : _ivec(iK->_vec), _n(iNumber) {}
inline double& getVectorElem(int iPos) const { return _ivec[iPos];} // access to the vector elements.
double *_ivec;
size_t _n;
};
typedef std::vector<KDElemKeyPoint> KDElemKeyPointVect_t;
#endif // __detectpano_panodetectordefs_h