using GMT
I = gmtread(TESTSDIR * "assets/bone.png");
J = bwskell(I);
grdimage(I, figsize=6)
grdimage!(J, figsize=6, xshift=6, show=true)
Reduce all objects to lines in 2-D binary image.
Reduces all objects in the 2-D binary image I to 1-pixel wide curved lines, without changing the essential structure of the image. This process, called skeletonization, extracts the centerline while preserving the topology.
I::Union{GMTimage{<:UInt8, 2}, GMTimage{<:Bool, 2}}: Input image.type::Int=1: 1 To thin the foreground (normal situation), or 2 to thin the background.
maxiters::Int=0: Maximum number of iterations allowed. Use 0 to iterate untill completion.
conn::Int=4: 4 for 4-connectivity, 8 for 8-connectivity.
A new GMTimage of the same type as I with the skeleton.
Skeletonize a binary image.