Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

[e976b6]: src / hugin_base / algorithms / control_points / Descriptor.h Maximize Restore History

Download this file

Descriptor.h    66 lines (52 with data), 2.5 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
55
56
57
58
59
60
61
62
63
64
65
/***************************************************************************
* Copyright (C) 2007 by Zoran Mesec *
* zoran.mesec@gmail.com *
* *
* This program 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. *
* *
* This program 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 this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifndef DESCRIPTOR_H_INCLUDED
#define DESCRIPTOR_H_INCLUDED
#include <string>
#include "APImage.h"
#include "HessianDetector.h"
#define NR_ANGLE_BINS 8
#define DESCRIPTOR_SIZE 36
class Descriptor
{
public:
Descriptor(APImage* i, HessianDetector* hd);
double _gaussWeighting(int x, int y, double stdev);
void setPoints(vector<vector<int> >* pts);
//void orientate();
void createDescriptors();
vector<vector<double> >* getDescriptors();
bool printDescriptors(string name);
bool generateAutopanoXML(string name);
vector<vector<int> >* interestPoints;
private:
APImage* image;
HessianDetector* hd;
double _getMaxima(int x,int y);
double _euclidianDistance(int x1, int y1, int x2, int y2);
//double _initDescriptor(double* desciptor);
void _GaborResponse(int x,int y,double maxima,double* descriptor);
void _RegionResponse(int x,int y,double maxima,double* descriptor);
void _ShapeContext(int x,int y,double maxima,double* descriptor);
vector<vector<int> >* maximas;
vector<vector<double> > descriptors;
//int orientations[];
};
#endif // DESCRIPTOR_H_INCLUDED