C API

quickshift.c File Reference


Detailed Description

For internal use only.

Author:
Brian Fulkerson

Andrea Vedaldi

Definition in file quickshift.c.

#include "quickshift.h"

Go to the source code of this file.


Functions

VL_INLINE vl_qs_type vl_quickshift_distance (vl_qs_type const *I, int N1, int N2, int K, int i1, int i2, int j1, int j2)
 Computes the accumulated channel L2 distance between i,j + the distance between i,j.
VL_INLINE vl_qs_type vl_quickshift_inner (vl_qs_type const *I, int N1, int N2, int K, int i1, int i2, int j1, int j2)
 Computes the accumulated channel inner product between i,j + the distance between i,j.
VL_EXPORT VlQSvl_quickshift_new (vl_qs_type const *image, int height, int width, int channels)
 Create a quick shift object.
VL_EXPORT void vl_quickshift_process (VlQS *q)
 Create a quick shift objet.
void vl_quickshift_delete (VlQS *q)
 Delete quick shift object.

Function Documentation

void vl_quickshift_delete ( VlQS q  ) 

Parameters:
q quick shift object.

Definition at line 449 of file quickshift.c.

References _VlQS::density, _VlQS::dists, _VlQS::parents, and vl_free().

VL_INLINE vl_qs_type vl_quickshift_distance ( vl_qs_type const *  I,
int  N1,
int  N2,
int  K,
int  i1,
int  i2,
int  j1,
int  j2 
)

For internal use only.

Parameters:
I input image buffer
N1 size of the first dimension of the image
N2 size of the second dimension of the image
K number of channels
i1 first dimension index of the first pixel to compare
i2 second dimension of the first pixel
j1 index of the second pixel to compare
j2 second dimension of the second pixel
Takes the L2 distance between the values in I at pixel i and j, accumulating along K channels and adding in the distance between i,j in the image.

Returns:
the distance as described above

Definition at line 151 of file quickshift.c.

Referenced by vl_quickshift_process().

VL_INLINE vl_qs_type vl_quickshift_inner ( vl_qs_type const *  I,
int  N1,
int  N2,
int  K,
int  i1,
int  i2,
int  j1,
int  j2 
)

For internal use only.

Parameters:
I input image buffer
N1 size of the first dimension of the image
N2 size of the second dimension of the image
K number of channels
i1 first dimension index of the first pixel to compare
i2 second dimension of the first pixel
j1 index of the second pixel to compare
j2 second dimension of the second pixel
Takes the channel-wise inner product between the values in I at pixel i and j, accumulating along K channels and adding in the inner product between i,j in the image.

Returns:
the inner product as described above

Definition at line 195 of file quickshift.c.

Referenced by vl_quickshift_process().

VL_EXPORT VlQS* vl_quickshift_new ( vl_qs_type const *  image,
int  height,
int  width,
int  channels 
)

Parameters:
image 
height 
width 
channels 
Returns:
New quick shift object.

Definition at line 223 of file quickshift.c.

References _VlQS::channels, _VlQS::density, _VlQS::dists, _VlQS::height, _VlQS::image, _VlQS::medoid, _VlQS::parents, _VlQS::sigma, _VlQS::tau, VL_FALSE, vl_malloc(), VL_MAX, and _VlQS::width.

VL_EXPORT void vl_quickshift_process ( VlQS q  )