SLAMflex SE  0.1.0
SLAMflex provides detection and tracking of dominant planes for smartphone devices. This plane can then be used to show AR content relative to the plane orientation. The detection of plane is performed in the field of view of the smartphone camera. In subsequent frames it is tracked. The interface returns the plane position and orientation.
MiniPatch.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 // Copyright 2008 Isis Innovation Limited
3 //
4 // MiniPatch.h
5 //
6 // Declares MiniPatch class
7 //
8 // This is a simple pixel-patch class, used for tracking small patches
9 // it's used by the tracker for building the initial map
10 
11 #ifndef __MINI_PATCH_H
12 #define __MINI_PATCH_H
13 
14 #include "image.h"
15 #include "byte.h"
16 #include "utility.h"
17 #include "TooN.h"
18 using namespace TooN;
19 #include <vector>
20 #include "globals.h"
21 
22 struct MiniPatch
23 {
24  void SampleFromImage(CVD::ImageRef irPos, CVD::BasicImage<CVD::byte> &im); // Copy pixels out of source image
25  bool FindPatch(CVD::ImageRef &irPos, // Find patch in a new image
27  int nRange,
28  std::vector<CVD::ImageRef> &vCorners,
29  std::vector<int> *pvRowLUT = NULL);
30 
31  inline int SSDAtPoint(CVD::BasicImage<CVD::byte> &im, const CVD::ImageRef &ir); // Score function
32  static int mnHalfPatchSize; // How big is the patch?
33  static int mnRange; // How far to search?
34  static int mnMaxSSD; // Max SSD for matches?
35  CVD::Image<CVD::byte> mimOrigPatch; // Original pixels
36 };
37 
38 #endif
Everything lives inside this namespace.
Definition: allocator.hh:48
static int mnMaxSSD
Definition: MiniPatch.h:34
static int mnRange
Definition: MiniPatch.h:33
ImageRef ir(const TooN::Vector< 2 > &v)
static int mnHalfPatchSize
Definition: MiniPatch.h:32
CVD::Image< CVD::byte > mimOrigPatch
Definition: MiniPatch.h:35