Functions to compute quadratic distance functions. More...
Go to the source code of this file.
Functions | |
| void | vil_update_parabola_set (std::vector< double > &x, std::vector< double > &y, std::vector< double > &z, double a, double x0, double y0, double n) |
| Add parabola y=y0+(x-x0)^2 to lower envelope defined by (x,y,z). More... | |
| template<class srcT > | |
| void | vil_quad_envelope (const srcT *src, std::ptrdiff_t s_step, size_t n, std::vector< double > &x, std::vector< double > &y, std::vector< double > &z, double a) |
| Compute parabolas forming lower envelope from set over range [0,n). More... | |
| template<class destT > | |
| void | vil_sample_quad_envelope (const std::vector< double > &x, const std::vector< double > &y, const std::vector< double > &z, double a, destT *dest, std::ptrdiff_t d_step, size_t n) |
| Sample from lower envelope of a set of parabolas. More... | |
| template<class destT , class iT > | |
| void | vil_sample_quad_envelope_with_pos (const std::vector< double > &x, const std::vector< double > &y, const std::vector< double > &z, double a, destT *dest, std::ptrdiff_t d_step, size_t n, iT *pos, std::ptrdiff_t p_step) |
| Sample from lower envelope of a set of parabolas. More... | |
| template<class srcT , class destT > | |
| void | vil_quad_distance_function_1D (const srcT *src, std::ptrdiff_t s_step, size_t n, double a, destT *dest, std::ptrdiff_t d_step) |
| Compute quadratic distance function for a 1D function. More... | |
| template<class srcT , class destT , class posT > | |
| void | vil_quad_distance_function_1D (const srcT *src, std::ptrdiff_t s_step, unsigned int n, double a, destT *dest, std::ptrdiff_t d_step, posT *pos, std::ptrdiff_t p_step) |
| Compute quadratic distance function for a 1D function. More... | |
| template<class srcT , class destT > | |
| void | vil_quad_distance_function (const vil_image_view< srcT > &src, double ai, double aj, vil_image_view< destT > &dest) |
| Apply quadratic distance transform along each row of src. More... | |
| template<class srcT , class destT , class posT > | |
| void | vil_quad_distance_function (const vil_image_view< srcT > &src, double ai, double aj, vil_image_view< destT > &dest, vil_image_view< posT > &pos) |
| Apply quadratic distance transform along each row of src. More... | |
Functions to compute quadratic distance functions.
Definition in file vil_quad_distance_function.h.
|
inline |
Apply quadratic distance transform along each row of src.
Definition at line 162 of file vil_quad_distance_function.h.
|
inline |
Apply quadratic distance transform along each row of src.
(pos(x,y,0),pos(x,y,1)) gives the position (x+i,y+j) leading to minima
Definition at line 201 of file vil_quad_distance_function.h.
|
inline |
Compute quadratic distance function for a 1D function.
On exit dest(x) = min_i src(x+i)+a(i^2) Implementation of Felzenszwalb and Huttenlocher's algorithm, as described in "Distance Transforms of Sampled Functions".
dest(x) = dest[x*d_step], src(x)=src[x*s_step]
Definition at line 128 of file vil_quad_distance_function.h.
|
inline |
Compute quadratic distance function for a 1D function.
On exit dest(x) = min_i src(x+i)+a(i^2), pos(x) gives position (x+i) which leads to the minima Implementation of Felzenszwalb and Huttenlocher's algorithm, as described in "Distance Transforms of Sampled Functions".
dest(x) = dest[x*d_step], src(x)=src[x*s_step], pos(x)=pos[x*p_step]
Definition at line 146 of file vil_quad_distance_function.h.
|
inline |
Compute parabolas forming lower envelope from set over range [0,n).
Set of parabolas y=src[i*s_step]+a(x-i)^2 i=0..n-1 Select those defining lower envelope in range [0,n) On exit, selected parabolas are y' = y[i]+(x'-x[i])^2 Parabola i defines the envelope in the range (z[i],z[i+1]). Thus z.size()==x.size()+1
Definition at line 59 of file vil_quad_distance_function.h.
|
inline |
Sample from lower envelope of a set of parabolas.
Parabolas are y' = y[i]+a(x'-x[i])^2 Parabola i defines the envelope in the range (z[i],z[i+1]). Thus z.size()==x.size()+1
Definition at line 81 of file vil_quad_distance_function.h.
|
inline |
Sample from lower envelope of a set of parabolas.
Parabolas are y' = y[i]+a(x'-x[i])^2 Parabola i defines the envelope in the range (z[i],z[i+1]). Thus z.size()==x.size()+1
iT assumed to be an integer type (vxl_byte,short, int etc) On exit, pos[i*p_step] gives the x position of the parabola used to compute the envelope at position i.
Definition at line 104 of file vil_quad_distance_function.h.
|
inline |
Add parabola y=y0+(x-x0)^2 to lower envelope defined by (x,y,z).
Parabolas are y' = y[i]+a(x'-x[i])^2 Parabola i defines the envelope in the range (z[i],z[i+1]).
Definition at line 18 of file vil_quad_distance_function.h.
1.8.15