Hugin trunk 0.1
Loading...
Searching...
No Matches
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
27namespace lfeat
28{
29
31{
32public:
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
46
47
48 void transform(double iX, double iY, double& oX, double& oY);
49
50private:
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
Homography _bestModel
void setDistanceThreshold(int iDT)
void setIterations(int iIters)
#define LFIMPEX
std::vector< deghosting::BImagePtr > threshold(const std::vector< deghosting::FImagePtr > &inputImages, const double threshold, const uint16_t flags)
Threshold function used for creating alpha masks for images.
Definition threshold.h:41