-
Notifications
You must be signed in to change notification settings - Fork 10
/
CalibCornerPatch.h
49 lines (38 loc) · 1001 Bytes
/
CalibCornerPatch.h
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
// -*- c++ -*-
// Copyright 2008 Isis Innovation Limited
#ifndef __CALIB_CORNER_PATCH_H
#define __CALIB_CORNER_PATCH_H
#include <TooN/TooN.h>
#include <cvd/image.h>
#include <cvd/byte.h>
namespace PTAMM {
using namespace TooN;
class CalibCornerPatch
{
public:
struct Params
{
Params();
Matrix<2> m2Warp();
Vector<2> v2Pos;
Vector<2> v2Angles;
double dMean;
double dGain;
};
CalibCornerPatch(int nSideSize = 8);
bool IterateOnImage(Params ¶ms, CVD::Image<CVD::byte> &im);
bool IterateOnImageWithDrawing(Params ¶ms, CVD::Image<CVD::byte> &im);
protected:
void MakeTemplateWithCurrentParams();
void FillTemplate(CVD::Image<float> &im, Params params);
double Iterate(CVD::Image<CVD::byte> &im);
Params mParams;
CVD::Image<float> mimTemplate;
CVD::Image<Vector<2> > mimGradients;
CVD::Image<Vector<2> > mimAngleJacs;
void MakeSharedTemplate();
static CVD::Image<float> mimSharedSourceTemplate;
double mdLastError;
};
}
#endif