dhog.c File Reference


Detailed Description

For internal use only.

Author:
Andrea Vedaldi

Definition in file dhog.c.

#include "dhog.h"
#include "pgm.h"
#include "mathop.h"
#include "imopv.h"
#include <math.h>
#include <string.h>

Go to the source code of this file.


Functions

VL_INLINE float normalize_histogram (float *begin, float *end)
 Normalize histogram.
VL_EXPORT VlDhogFiltervl_dhog_new (int width, int height, int sampling_step, int bin_size)
 Allocate and initialize a new DHOG filter.
VL_EXPORT void vl_dhog_delete (VlDhogFilter *f)
 Delete DHOG filter.
float * _vl_dhog_new_kernel (VlDhogFilter *f, int i)
 Initialize new convolution kernel.
VL_INLINE void _vl_dhog_with_gaussian_window (VlDhogFilter *f)
 Process with Gaussian window.
VL_INLINE void _vl_dhog_with_flat_window (VlDhogFilter *f)
 Process with flat window.
void vl_dhog_process (VlDhogFilter *f, float const *im, vl_bool fast)
 Compute Dense Feature Transform.

Function Documentation

float* _vl_dhog_new_kernel ( VlDhogFilter f,
int  i 
)

For internal use only.

Parameters:
f DHOG filter.
i bin index.
Returns:
Filter.

Definition at line 190 of file dhog.c.

References VlDhogFilter_::bin_size, and vl_malloc().

Referenced by _vl_dhog_with_gaussian_window().

VL_INLINE void _vl_dhog_with_flat_window ( VlDhogFilter f  ) 

VL_INLINE void _vl_dhog_with_gaussian_window ( VlDhogFilter f  ) 

VL_INLINE float normalize_histogram ( float *  begin,
float *  end 
)

For internal use only.

Parameters:
begin 
end 

Definition at line 107 of file dhog.c.

References VL_EPSILON_F, and vl_fast_sqrt_f().

Referenced by vl_dhog_process(), vl_sift_calc_keypoint_descriptor(), and vl_sift_calc_raw_descriptor().

VL_EXPORT void vl_dhog_delete ( VlDhogFilter f  ) 

Parameters:
f filter to delete.

Definition at line 166 of file dhog.c.

References VlDhogFilter_::descr, VlDhogFilter_::hist, VlDhogFilter_::keys, VlDhogFilter_::tmp, VlDhogFilter_::tmp2, and vl_free().

VL_EXPORT VlDhogFilter* vl_dhog_new ( int  width,
int  height,
int  sampling_step,
int  bin_size 
)

Parameters:
width 
height 
sampling_step step used to sample descriptors (must be 1 or a multiple of bin_size).
bin_size 
Returns:
new filter.

Definition at line 135 of file dhog.c.

References VlDhogFilter_::dheight, VlDhogFilter_::dwidth, VlDhogFilter_::height, VlDhogFilter_::hist, VlDhogFilter_::nkeys, vl_malloc(), and VlDhogFilter_::width.

void vl_dhog_process ( VlDhogFilter f,
float const *  im,
vl_bool  fast 
)