luispedro / mahotas

Computer Vision in Python
https://mahotas.rtfd.io
Other
839 stars 147 forks source link

Voronoi Problem #42

Closed kannitverstan closed 10 years ago

kannitverstan commented 10 years ago

If I put the following image into gvoronoi,(https://cloud.githubusercontent.com/assets/6875093/2861195/a477bbc8-d1da-11e3-88ac-aac940940a4c.png) I get the following result testvoronoi The input contains 6 objects, the output 5.

luispedro commented 10 years ago

Sorry, I am unable to reproduce. I get a very similar result but with 6 objects as the input. Your output seems to be different than mine and even have different values. Here's what I tried::

import mahotas as mh
im = mh.imread('./a477bbc8-d1da-11e3-88ac-aac940940a4c.png')
g = mh.segmentation.gvoronoi(im)

print set(g.ravel())
print set(im.ravel())

which prints out: {42, 85, 127, 170, 212, 255} {0, 42, 85, 127, 170, 212, 255}

The output image I see above seems unrelated:

g2 = mh.imread('./a7235f3a-d1da-11e3-9aec-16b99e5edf70.png')
print set(g2.ravel())

prints out

set([0, 102, 204, 51, 153, 255])

The pixel values do not match.

kannitverstan commented 10 years ago

Thanks for your rapid answer. I made lots of tests to chase the problem down. Unfortunately I can't reproduce the problem currently. So it will be best to ignore the problem for the moment and close the issue. If the problem persists, I can open a new issue about it, if you don't mind.

Sorry for bothering you without reason.

luispedro commented 10 years ago

Thanks for letting me know.