forked from jonazpiazu/PTAM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SmallBlurryImage.h
46 lines (31 loc) · 921 Bytes
/
SmallBlurryImage.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
// -*- c++ -*-
// Copyright 2008 Isis Innovation Limited
//
// SmallBlurryImage - A small and blurry representation of an image.
// used by the relocaliser.
#ifndef __SMALLBLURRYIMAGE_H
#define __SMALLBLURRYIMAGE_H
#include <cvd/image.h>
#include <cvd/byte.h>
#include <TooN/se2.h>
#include <TooN/se3.h>
#include "KeyFrame.h"
#include "ATANCamera.h"
class SmallBlurryImage
{
public:
SmallBlurryImage();
SmallBlurryImage(KeyFrame &kf, double dBlur = 2.5);
void MakeFromKF(KeyFrame &kf, double dBlur = 2.5);
void MakeJacs();
double ZMSSD(SmallBlurryImage &other);
std::pair<SE2<>,double> IteratePosRelToTarget(SmallBlurryImage &other, int nIterations = 10);
static SE3<> SE3fromSE2(SE2<> se2, ATANCamera camera);
protected:
CVD::Image<CVD::byte> mimSmall;
CVD::Image<float> mimTemplate;
CVD::Image<Vector<2> > mimImageJacs;
bool mbMadeJacs;
static CVD::ImageRef mirSize;
};
#endif