Hi, I'm new to this mailing list. skimage version 0.4.2 has morphology.skeletonize() that works almost as good as Matlab bwmorph('thin'). However the output seems transposed when I tested a Matlab's example image 'circles.png': http://www.mathworks.com/help/toolbox/images/ref/bwmorph.html Is this a bug? ######## import numpy as np from scipy import ndimage from scipy.io import loadmat from skimage.morphology import skeletonize import matplotlib.pyplot as plt # test image from Matlab bwmorph('skel') demo bw = loadmat('circles.mat')['BW'] sk = skeletonize(bw) plt.figure() plt.imshow(bw+sk.transpose(), cmap=plt.cm.gray, interpolation='nearest') plt.show() ######## Thanks, - TJ
Hi TJ On Mon, Dec 12, 2011 at 2:27 PM, karoyakani <tj.takei@gmail.com> wrote:
I'm new to this mailing list.
Welcome! We're glad to have you.
skimage version 0.4.2 has morphology.skeletonize() that works almost as good as Matlab bwmorph('thin').
We'd certainly love to remedy that...
However the output seems transposed when I tested a Matlab's example image 'circles.png': http://www.mathworks.com/help/toolbox/images/ref/bwmorph.html Is this a bug?
In order to reproduce this bug, I've put a repo online with your code: https://github.com/stefanv/skimage_circles Here is the output I get: http://mentat.za.net/refer/skeletonize_compare.png (Before running the experiment, run fetch_data to download the matlab test image; or just grab it by hand from their website. I don't know what the license is, so I didn't want to put it in the repo directly.) I am glad you showed me this example, because it also pointed out a problem with paletted image reading in PIL. I'm seriously considering just making matplotlib our default backend (except that they also have a PNG reading bug in older versions where images are flipped upside down!). Regards Stéfan
participants (2)
-
karoyakani -
Stéfan van der Walt