dhog.c File Reference
Detailed Description
For internal use only.
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 VlDhogFilter * | vl_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 | ) |
For internal use only.
- Parameters:
-
f filter to delete.
Definition at line 270 of file dhog.c.
References VlDhogFilter_::bin_size, VlDhogFilter_::descr, VlDhogFilter_::height, VlDhogFilter_::hist, VlDhogFilter_::sampling_step, VlDhogFilter_::tmp, VlDhogFilter_::tmp2, vl_imconvcoltri_vf(), VL_PAD_BY_CONTINUITY, VL_TRANSPOSE, and VlDhogFilter_::width.
Referenced by vl_dhog_process().
VL_INLINE void _vl_dhog_with_gaussian_window | ( | VlDhogFilter * | f | ) |
For internal use only.
- Parameters:
-
f filter to delete.
Definition at line 215 of file dhog.c.
References _vl_dhog_new_kernel(), VlDhogFilter_::bin_size, VlDhogFilter_::descr, VlDhogFilter_::height, VlDhogFilter_::hist, VlDhogFilter_::sampling_step, VlDhogFilter_::tmp, VlDhogFilter_::tmp2, vl_free(), vl_imconvcol_vf(), VL_PAD_BY_CONTINUITY, VL_TRANSPOSE, and VlDhogFilter_::width.
Referenced by vl_dhog_process().
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 | |||
) |
- Parameters:
-
f DHOG filter. im image data. fast speed up computation by replacing a gaussian window with a flat one
Definition at line 335 of file dhog.c.
References _vl_dhog_with_flat_window(), _vl_dhog_with_gaussian_window(), VlDhogFilter_::bin_size, VlDhogFilter_::descr, VlDhogFilter_::height, VlDhogFilter_::hist, VlDhogFilter_::keys, VlDhogKeypoint_::norm, normalize_histogram(), VlDhogFilter_::sampling_step, vl_fast_atan2_f(), vl_fast_sqrt_f(), vl_floor_f(), vl_mod_2pi_f(), VL_PI, VlDhogFilter_::width, VlDhogKeypoint_::x, and VlDhogKeypoint_::y.