Quick shift (Quick shift image segmentation) More...
Go to the source code of this file.
Classes | |
struct | _VlQS |
quick shift results More... | |
Defines | |
#define | VL_QS_INF VL_INFINITY_D /* Change to _F for float math */ |
quick shift infinity constant | |
Typedefs | |
typedef double | vl_qs_type |
quick shift datatype | |
typedef struct _VlQS | VlQS |
quick shift results | |
Functions | |
Create and destroy | |
VL_EXPORT VlQS * | vl_quickshift_new (vl_qs_type const *im, int height, int width, int channels) |
Create a quick shift object. | |
VL_EXPORT void | vl_quickshift_delete (VlQS *q) |
Delete quick shift object. | |
Process data | |
VL_EXPORT void | vl_quickshift_process (VlQS *q) |
Create a quick shift objet. | |
Retrieve data and parameters | |
VL_INLINE vl_qs_type | vl_quickshift_get_max_dist (VlQS const *q) |
Get tau. | |
VL_INLINE vl_qs_type | vl_quickshift_get_kernel_size (VlQS const *q) |
Get sigma. | |
VL_INLINE vl_bool | vl_quickshift_get_medoid (VlQS const *q) |
Get medoid. | |
VL_INLINE int * | vl_quickshift_get_parents (VlQS const *q) |
Get parents. | |
VL_INLINE vl_qs_type * | vl_quickshift_get_dists (VlQS const *q) |
Get dists. | |
VL_INLINE vl_qs_type * | vl_quickshift_get_density (VlQS const *q) |
Get density. | |
Set parameters | |
VL_INLINE void | vl_quickshift_set_max_dist (VlQS *q, vl_qs_type tau) |
Set max distance. | |
VL_INLINE void | vl_quickshift_set_kernel_size (VlQS *q, vl_qs_type sigma) |
Set sigma. | |
VL_INLINE void | vl_quickshift_set_medoid (VlQS *q, vl_bool medoid) |
Set medoid. |
Quick shift (Quick shift image segmentation)
Definition in file quickshift.h.
#define VL_QS_INF VL_INFINITY_D /* Change to _F for float math */ |
quick shift infinity constant
Definition at line 25 of file quickshift.h.
typedef double vl_qs_type |
quick shift datatype
Definition at line 22 of file quickshift.h.
quick shift results
------------------------------------------------------------------ This implements quick shift mode seeking.
VL_EXPORT void vl_quickshift_delete | ( | VlQS * | q | ) |
Delete quick shift object.
-----------------------------------------------------------------
q | quick shift object. |
Definition at line 456 of file quickshift.c.
VL_INLINE vl_qs_type * vl_quickshift_get_density | ( | VlQS const * | q | ) |
Get density.
------------------------------------------------------------------
q | quick shift object. |
Definition at line 166 of file quickshift.h.
VL_INLINE vl_qs_type * vl_quickshift_get_dists | ( | VlQS const * | q | ) |
Get dists.
------------------------------------------------------------------
q | quick shift object. |
Definition at line 154 of file quickshift.h.
VL_INLINE vl_qs_type vl_quickshift_get_kernel_size | ( | VlQS const * | q | ) |
Get sigma.
------------------------------------------------------------------
q | quick shift object. |
Definition at line 114 of file quickshift.h.
VL_INLINE vl_qs_type vl_quickshift_get_max_dist | ( | VlQS const * | q | ) |
Get tau.
------------------------------------------------------------------
q | quick shift object. |
Definition at line 101 of file quickshift.h.
VL_INLINE vl_bool vl_quickshift_get_medoid | ( | VlQS const * | q | ) |
Get medoid.
------------------------------------------------------------------
q | quick Shift object. |
true
if medoid shift is used instead of quick shift. Definition at line 126 of file quickshift.h.
VL_INLINE int * vl_quickshift_get_parents | ( | VlQS const * | q | ) |
Get parents.
------------------------------------------------------------------
q | quick shift object. |
height
x width
matrix where each element contains the linear index of its parent node. The node is a root if its value is its own linear index. Definition at line 140 of file quickshift.h.
VL_EXPORT VlQS* vl_quickshift_new | ( | vl_qs_type const * | image, |
int | height, | ||
int | width, | ||
int | channels | ||
) |
Create a quick shift object.
-----------------------------------------------------------------
image | the image. |
height | the height (number of rows) of the image. |
width | the width (number of columns) of the image. |
channels | the number of channels of the image. |
The image
is an array of vl_qs_type values with three dimensions (respectively widht
, height
, and channels
). Typically, a color (e.g, RGB) image has three channels. The linear index of a pixel is computed with: channels
* width*
height
+ row
+ height
* col
.
Definition at line 231 of file quickshift.c.
VL_EXPORT void vl_quickshift_process | ( | VlQS * | q | ) |
Create a quick shift objet.
-----------------------------------------------------------------
q | quick shift object. |
Definition at line 258 of file quickshift.c.
VL_INLINE void vl_quickshift_set_kernel_size | ( | VlQS * | q, |
vl_qs_type | sigma | ||
) |
Set sigma.
------------------------------------------------------------------
q | quick shift object. |
sigma | standard deviation of the kernel used in the Parzen density estimate. |
Definition at line 179 of file quickshift.h.
VL_INLINE void vl_quickshift_set_max_dist | ( | VlQS * | q, |
vl_qs_type | tau | ||
) |
Set max distance.
------------------------------------------------------------------
q | quick shift object. |
tau | the maximum distance in the feature space between nodes in the quick shift tree. |
Definition at line 192 of file quickshift.h.
VL_INLINE void vl_quickshift_set_medoid | ( | VlQS * | q, |
vl_bool | medoid | ||
) |
Set medoid.
------------------------------------------------------------------
q | quick shift object. |
medoid | true to use kernelized medoid shift, false (default) uses quick shift. |
Definition at line 205 of file quickshift.h.