quickshift.c File Reference
Quick shift image segmentation - Definition. More...
#include "quickshift.h"#include "mathop.h"#include <string.h>#include <math.h>#include <stdio.h>Go to the source code of this file.
Functions | |
| 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_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. | |
| VlQS * | vl_quickshift_new (vl_qs_type const *image, int height, int width, int channels) |
| Create a quick shift object. | |
| void | vl_quickshift_process (VlQS *q) |
| Create a quick shift objet. | |
| void | vl_quickshift_delete (VlQS *q) |
| Delete quick shift object. | |
Detailed Description
For internal use only.
Definition in file quickshift.c.
Function Documentation
| void vl_quickshift_delete | ( | VlQS * | q | ) |
- Parameters:
-
q quick shift object.
Definition at line 448 of file quickshift.c.
References vl_free().
| 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 | |||
| ) | [inline] |
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_qs_type vl_quickshift_inner | ( | vl_qs_type const * | I, | |
| int | N1, | |||
| int | N2, | |||
| int | K, | |||
| int | i1, | |||
| int | i2, | |||
| int | j1, | |||
| int | j2 | |||
| ) | [inline] |
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().
| 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::height, _VlQS::image, vl_calloc(), VL_FALSE, vl_malloc(), VL_MAX, and _VlQS::width.
| void vl_quickshift_process | ( | VlQS * | q | ) |
- Parameters:
-
q quick shift object.
Definition at line 250 of file quickshift.c.
References _VlQS::channels, _VlQS::height, _VlQS::image, vl_calloc(), vl_free(), VL_MAX, VL_MIN, VL_QS_INF, vl_quickshift_distance(), vl_quickshift_inner(), and _VlQS::width.