00001
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044 #ifndef ASRL_GPU_SURF_OCTAVE_HPP
00045 #define ASRL_GPU_SURF_OCTAVE_HPP
00046
00047 #include "CudaSynchronizedMemory.hpp"
00048 #include "gpu_globals.h"
00049
00050 namespace asrl {
00051
00059 class GpuSurfOctave {
00060 public:
00064 GpuSurfOctave();
00065
00081 GpuSurfOctave(int img_width, int img_height, float l1, float l2, float l3, float l4, float edge_scale, float base_scale, int octave, int baseStep, int nIntervals);
00082
00086 void init(int img_width, int img_height, float l1, float l2, float l3, float l4, float edge_scale, float base_scale, int octave, int baseStep, int nIntervals);
00087
00091 operator SurfOctaveParameters();
00092
00096 float mask_width() {return m_mask_width;}
00097
00101 float mask_height(){return m_mask_height;}
00102
00106 bool valid(){ return m_valid;}
00107
00111 int border(){ return m_border;}
00112
00116 int height(){ return m_height;}
00117
00121 int width(){ return m_width;}
00122
00126 int intervals(){ return m_intervals;}
00127
00131 int step() { return m_step; }
00132
00136 const float * scales(){ return m_scales; }
00137
00141 int stride() {
00142
00143 int n32s = width() / 32;
00144 int n32s_remainder = width() % 32;
00145 if(n32s_remainder != 0)
00146 n32s++;
00147 return n32s * 32;
00148 }
00149
00150 private:
00152 float m_mask_width;
00154 float m_mask_height;
00156 float m_l1;
00158 float m_l2;
00160 float m_l3;
00162 float m_l4;
00164 float m_edge_scale;
00166 bool m_valid;
00168 int m_border;
00170 int m_width;
00172 int m_height;
00174 int m_intervals;
00176 int m_step;
00178
00180 float m_scales[ASRL_SURF_MAX_INTERVALS];
00181 };
00182
00183 }
00184
00185 #endif // ASRL_SURF_OCTAVE_HPP