bundles / skimage latest / skimage / morphology / _skeletonize_various_cy / _skeletonize_loop
cython_function_or_method
skimage.morphology._skeletonize_various_cy:_skeletonize_loop
Signature
def _skeletonize_loop ( result , i , j , order , table ) Summary
Inner loop of skeletonize function
Parameters
result: ndarray of uint8On input, the image to be skeletonized, on output the skeletonized image.
i, j: ndarraysThe coordinates of each foreground pixel in the image
order: ndarrayThe index of each pixel, in the order of processing (order[0] is the first pixel to process, etc.)
table: ndarrayThe 512-element lookup table of values after transformation (whether to keep or not each configuration in a binary 3x3 array)
Notes
The loop determines whether each pixel in the image can be removed without changing the Euler number of the image. The pixels are ordered by increasing distance from the background which means a point nearer to the quench-line of the brushfire will be evaluated later than a point closer to the edge.
Note that the neighborhood of a pixel may evolve before the loop arrives at this pixel. This is why it is possible to compute the skeleton in only one pass, thanks to an adapted ordering of the pixels.
Aliases
-
skimage.morphology._skeletonize._skeletonize_loop