I do not know well the algorithm that qhul implements, and it is lucky to
be more complicated than what is needed in this case since it seems to work
in higher dimensions than 2D. Nevertheless, I do not see any reason why the
points should be pathological:
here my modifications:
@@ -51,9 +51,15 @@ def convex_hull_image(image):
'scipy >= 0.9.')
# Find the convex hull
- chull = Delaunay(coords).convex_hull
- v = coords[np.unique(chull)]
+ #chull = Delaunay(coords).convex_hull
+ #v1 = coords[np.unique(chull)]
+ import vigra
+ #print v1
+ #print v2
As you can see I just exchanged the computation from scipy with that of
another library to which I personally had contributed implementing the
standard monotone chain convex hull algorithm.
Everything seems fine now.
Il giorno venerdì 24 agosto 2012 13:43:43 UTC+2, Stefan van der Walt ha
> Hi Luca
> > I confirm the bug to be really in qhull.
> > I substituted the computation of the convex hull in scipy (qhull) with
> > another library (vigranumpy) and thins fix the problem.
> Strange, do you know if the points are pathological for some reason?
> Perhaps we can pre-filter them to prevent any crashes. Where did you
> get these coordinates from?