Scipy remote conversion algorithms

Since there are many different algorithms for distance conversions (see, for example, here ), it’s hard for me to understand how scipy distance_transform_edt and distance_transform_bf work. Are there any detailed descriptions for this?

+4
source share
1 answer

Following the source ...

distance_transform_edtends with code , starting with the following helpful comment:

/* Exact euclidean feature transform, as described in: C. R. Maurer,
   Jr., R. Qi, V. Raghavan, "A linear time algorithm for computing
   exact euclidean distance transforms of binary images in arbitrary
   dimensions. IEEE Trans." PAMI 25, 265-270, 2003. */

int NI_EuclideanFeatureTransform(PyArrayObject* input,
           PyArrayObject *sampling_arr,
           PyArrayObject* features)

And ends with a function that looks like brute force calculation. But here the algorithm is also well described in the main documentation and in other places that appear in the main search. distance_transform_bf

0

Source: https://habr.com/ru/post/1623456/


All Articles