C API

dsift.c File Reference


Detailed Description

For internal use only.

Author:
Andrea Vedaldi

Definition in file dsift.c.

#include "dsift.h"
#include "pgm.h"

Go to the source code of this file.


Functions

float * _vl_dsift_new_kernel (int binSize, int numBins, int binIndex)
 Initialize new convolution kernel.
VL_INLINE float _vl_dsift_normalize_histogram (float *begin, float *end)
 Normalize histogram.
void _vl_dsift_free_buffers (VlDsiftFilter *self)
 Free internal buffers.
void _vl_dsift_update_buffers (VlDsiftFilter *self)
void _vl_dsift_alloc_buffers (VlDsiftFilter *self)
 Allocate internal buffers.
VL_EXPORT VlDsiftFiltervl_dsift_new (int imWidth, int imHeight)
 Create a new DSIFT filter.
VL_EXPORT VlDsiftFiltervl_dsift_new_basic (int imWidth, int imHeight, int step, int binSize)
 Create a new DSIFT filter (basic interface).
VL_EXPORT void vl_dsift_delete (VlDsiftFilter *self)
 Delete DSIFT filter.
VL_INLINE void _vl_dsift_with_gaussian_window (VlDsiftFilter *self)
 Process with Gaussian window.
VL_INLINE void _vl_dsift_with_flat_window (VlDsiftFilter *self)
 Process with flat window.
void vl_dsift_process (VlDsiftFilter *self, float const *im)
 Compute keypoints and descriptors.

Function Documentation

void _vl_dsift_alloc_buffers ( VlDsiftFilter self  ) 

For internal use only.

Parameters:
self DSIFT filter.
The function (re)allocates the internal buffers in accordance with the current image and descriptor geometry.

Definition at line 358 of file dsift.c.

References _vl_dsift_free_buffers(), _vl_dsift_update_buffers(), vl_dsift_get_descriptor_size(), vl_dsift_get_keypoint_num(), and vl_malloc().

Referenced by vl_dsift_process().

void _vl_dsift_free_buffers ( VlDsiftFilter self  ) 

For internal use only.

Parameters:
self DSIFT filter.

Definition at line 303 of file dsift.c.

References vl_free().

Referenced by _vl_dsift_alloc_buffers(), and vl_dsift_delete().

float* _vl_dsift_new_kernel ( int  binSize,
int  numBins,
int  binIndex 
)

For internal use only.

Parameters:
binSize 
numBins 
binIndex negative to use flat window.
Returns:
a pointer to new filter.

Definition at line 247 of file dsift.c.

References vl_malloc().

Referenced by _vl_dsift_with_gaussian_window().

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

For internal use only.

Parameters:
begin 
end 

Definition at line 280 of file dsift.c.

References VL_EPSILON_F, and vl_fast_sqrt_f().

Referenced by vl_dsift_process().

void _vl_dsift_update_buffers ( VlDsiftFilter self  ) 

For internal use only.

Definition at line 329 of file dsift.c.

Referenced by _vl_dsift_alloc_buffers(), vl_dsift_new(), vl_dsift_set_bounds(), vl_dsift_set_geometry(), and vl_dsift_set_steps().

VL_INLINE void _vl_dsift_with_flat_window ( VlDsiftFilter self  ) 

For internal use only.

Parameters:
f filter to delete.

Definition at line 561 of file dsift.c.

References vl_dsift_get_descriptor_size(), vl_imconvcoltri_vf(), VL_PAD_BY_CONTINUITY, and VL_TRANSPOSE.

Referenced by vl_dsift_process().

VL_INLINE void _vl_dsift_with_gaussian_window ( VlDsiftFilter self  ) 

For internal use only.

Parameters:
self filter to delete.

Definition at line 488 of file dsift.c.

References _vl_dsift_new_kernel(), vl_dsift_get_descriptor_size(), vl_free(), vl_imconvcol_vf(), VL_PAD_BY_CONTINUITY, and VL_TRANSPOSE.

Referenced by vl_dsift_process().

VL_EXPORT void vl_dsift_delete ( VlDsiftFilter self  ) 

Parameters:
self filter to delete.

Definition at line 472 of file dsift.c.

References _vl_dsift_free_buffers(), and vl_free().

VL_EXPORT VlDsiftFilter* vl_dsift_new ( int  imWidth,
int  imHeight 
)

Parameters:
imWidth width of the image.
imHeight height of the image
Returns:
new filter.

Definition at line 400 of file dsift.c.

References _vl_dsift_update_buffers(), VL_FALSE, and vl_malloc().

Referenced by vl_dsift_new_basic().

VL_EXPORT VlDsiftFilter* vl_dsift_new_basic ( int  imWidth,
int  imHeight,
int  step,
int  binSize 
)

Parameters:
imWidth width of the image.
imHeight height of the image.
step sampling step.
binSize bin size.
The descriptor geometry matches the standard SIFT descriptor.

Returns:
new filter.

Definition at line 454 of file dsift.c.

References VlDsiftDescriptorGeometry_::binSizeX, VlDsiftDescriptorGeometry_::binSizeY, vl_dsift_get_geometry(), vl_dsift_new(), vl_dsift_set_geometry(), and vl_dsift_set_steps().