libelas
descriptor.h
Go to the documentation of this file.
1 /*
2 Copyright 2011. All rights reserved.
3 Institute of Measurement and Control Systems
4 Karlsruhe Institute of Technology, Germany
5 
6 This file is part of libelas.
7 Authors: Andreas Geiger
8 
9 libelas is free software; you can redistribute it and/or modify it under the
10 terms of the GNU General Public License as published by the Free Software
11 Foundation; either version 3 of the License, or any later version.
12 
13 libelas is distributed in the hope that it will be useful, but WITHOUT ANY
14 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
15 PARTICULAR PURPOSE. See the GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License along with
18 libelas; if not, write to the Free Software Foundation, Inc., 51 Franklin
19 Street, Fifth Floor, Boston, MA 02110-1301, USA
20 */
21 
22 // NOTE: This descripter is a sparse approximation to the 50-dimensional
23 // descriptor described in the paper. It produces similar results, but
24 // is faster to compute.
25 
26 #ifndef __DESCRIPTOR_H__
27 #define __DESCRIPTOR_H__
28 
29 #include <iostream>
30 #include <stdio.h>
31 #include <string.h>
32 #include <stdlib.h>
33 #include <math.h>
34 
35 // Define fixed-width datatypes for Visual Studio projects
36 #ifndef _MSC_VER
37  #include <stdint.h>
38 #else
39  typedef __int8 int8_t;
40  typedef __int16 int16_t;
41  typedef __int32 int32_t;
42  typedef __int64 int64_t;
43  typedef unsigned __int8 uint8_t;
44  typedef unsigned __int16 uint16_t;
45  typedef unsigned __int32 uint32_t;
46  typedef unsigned __int64 uint64_t;
47 #endif
48 
49 class Descriptor {
50 
51 public:
52 
53  // constructor creates filters
54  Descriptor(uint8_t* I,int32_t width,int32_t height,int32_t bpl,bool half_resolution);
55 
56  // deconstructor releases memory
57  ~Descriptor();
58 
59  // descriptors accessible from outside
60  uint8_t* I_desc;
61 
62 private:
63 
64  // build descriptor I_desc from I_du and I_dv
65  void createDescriptor(uint8_t* I_du,uint8_t* I_dv,int32_t width,int32_t height,int32_t bpl,bool half_resolution);
66 
67 };
68 
69 #endif
~Descriptor()
Definition: descriptor.cpp:38
Definition: descriptor.h:49
Descriptor(uint8_t *I, int32_t width, int32_t height, int32_t bpl, bool half_resolution)
Definition: descriptor.cpp:28
uint8_t * I_desc
Definition: descriptor.h:60