Hugintrunk
0.1
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
hugin_cpfind
localfeatures
RansacFiltering.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2007-2008 Anael Orlinski
3
*
4
* This file is part of Panomatic.
5
*
6
* Panomatic is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 2 of the License, or
9
* (at your option) any later version.
10
*
11
* Panomatic is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License
17
* along with Panomatic; if not, write to the Free Software
18
* <http://www.gnu.org/licenses/>.
19
*/
20
21
#ifndef __lfeat_ransacfiltering_h
22
#define __lfeat_ransacfiltering_h
23
24
#include <vector>
25
#include "
Homography.h
"
26
27
namespace
lfeat
28
{
29
30
class
LFIMPEX
Ransac
31
{
32
public
:
33
Ransac
() : _nIter(1000), _distanceThres(25) {};
34
35
void
filter(std::vector<PointMatchPtr>& ioMatches, std::vector<PointMatchPtr>& ioRemovedMatches);
36
inline
void
setIterations
(
int
iIters)
37
{
38
_nIter = iIters;
39
}
40
inline
void
setDistanceThreshold
(
int
iDT)
41
{
42
_distanceThres = iDT;
43
}
44
45
Homography
_bestModel
;
46
47
48
void
transform(
double
iX,
double
iY,
double
& oX,
double
& oY);
49
50
private
:
51
52
double
calcError(
Homography
* aH,
PointMatch
& aM);
53
54
int
_nIter
;
// number of iterations
55
int
_distanceThres
;
// error distance threshold in pixels
56
57
58
};
59
60
}
61
62
#endif
lfeat::Ransac::Ransac
Ransac()
Definition:
RansacFiltering.h:33
lfeat::Ransac::setDistanceThreshold
void setDistanceThreshold(int iDT)
Definition:
RansacFiltering.h:40
lfeat::Ransac::setIterations
void setIterations(int iIters)
Definition:
RansacFiltering.h:36
Homography.h
lfeat::Ransac::_bestModel
Homography _bestModel
Definition:
RansacFiltering.h:45
lfeat::Ransac::_nIter
int _nIter
Definition:
RansacFiltering.h:54
lfeat::Ransac
Definition:
RansacFiltering.h:30
lfeat::Homography
Definition:
Homography.h:32
lfeat::PointMatch
Definition:
PointMatch.h:32
lfeat::Ransac::_distanceThres
int _distanceThres
Definition:
RansacFiltering.h:55
LFIMPEX
#define LFIMPEX
Definition:
hugin_shared.h:41
Generated on Sun Nov 17 2024 01:25:53 for Hugintrunk by
1.8.5