Skip to content

Point (0,0) appears falsely in pixel coordinates when using skeleton_to_csgraph #93

@theo258

Description

@theo258

When we take a look at the attached image, we can observe that in the upper left corner no line/branch is present. Nevertheless with the following code the coordinates list contains the point (0,0) within the pixel coordinates, which for my understanding shouldn't be. I also think that such a behavior is not documented in the docs, although there it says that pixel_coordinates is an array of shape (Nnz + 1, skel.ndim). Is this +1 mentioned there the point (0,0)?

import numpy as np
import matplotlib.pyplot as plt
from skimage import io
from skan import skeleton_to_csgraph

sk = io.imread('https://user-images.githubusercontent.com/60721219/90833952-67b11e00-e349-11ea-9e4b-c2ea9ae8c426.png').astype(bool)

plt.figure()
plt.imshow(sk)

graph, pixel_coordinates, degree_image = skeleton_to_csgraph(sk)

test_sk

I'm using version Skan version: 0.8 installed from conda.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions