You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For the rag_mean_color function, I had to modify the function to adapt it to raster data, that can have more than three bands.
I thought with a bit of control flow it would be possible to extend the function to any number of channels.
for n in graph:
#graph.nodes[n].update({'labels': [n],
# 'pixel count': 0,
# 'total color': np.array([0, 0, 0],
# dtype=np.double)})
# modification to adapt to multi_label data
graph.nodes[n].update({'labels': [n],
'pixel count': 0,
'total color': np.zeros(image.shape[-1],
dtype=np.double)})
PS: this is my first issue
The text was updated successfully, but these errors were encountered:
Thank you @kimzed for your interest. This in fact could be a good addition, I also see that rag_mean_color assumes that the channel axis is the last channel. We introduced the channel_axis argument to handle any channel axis position, so it can also be a good update to the function API.
BTW, I will convert this issue to a Discussion as we try to only report bugs in our Issues. We can continue this discussion there ;)
For the rag_mean_color function, I had to modify the function to adapt it to raster data, that can have more than three bands.
I thought with a bit of control flow it would be possible to extend the function to any number of channels.
PS: this is my first issue
The text was updated successfully, but these errors were encountered: