objects with their Delaunay graphs overlaid.

Franck Kalala <[email protected]>
Newsgroups gmane.comp.python.scientific.user
Message-ID <CAN+jCOp7v3UxJMM10Hnogxz_L8KEe632gs4YRuDTW22etDcztw@mail.gmail.com>
Hello All

I am not sure this a good place to ask this. I am just making a try.
I have and image and I would like to reproduced the Delaunay graphs
overlaid.
See the attached image for an idea.

I try the following code:

from matplotlib import pyplot as plt

from skimage.io import imread
from skimage.feature import corner_harris, corner_subpix, corner_peaks,
peak_local_max
from scipy.spatial import Delaunay
import matplotlib.pyplot as plt

image = imread("cup.png", as_grey='True')


#points = corner_peaks(corner_harris(image), min_distance=1)
points = peak_local_max(corner_harris(image), min_distance=2)
#coords_subpix = corner_subpix(image, coords, window_size=13)
tri = Delaunay(points)

#imgplot = plt.imshow(image,cmap='gray')
#plt.triplot(points[:,0], points[:,1], tri.simplices.copy())
#plt.plot(points[:,0], points[:,1], 'o')
#plt.show()
#print(image)

coords = peak_local_max(corner_harris(image), min_distance=2)
coords_subpix = corner_subpix(image, coords, window_size=13)

fig, ax = plt.subplots()
ax.imshow(image, interpolation='nearest', cmap=plt.cm.gray)
ax.plot(coords[:, 1], coords[:, 0], '.b', markersize=3)
#ax.plot(coords_subpix[:, 1], coords_subpix[:, 0], '+r', markersize=15)
#ax.axis((0, 350, 350, 0))
plt.show()


this code does not help. I attach also the cup image for a try.

best

franck

_______________________________________________
SciPy-User mailing list
[email protected]
https://mail.python.org/mailman/listinfo/scipy-user
objet_and_delaunay_graph_overlaid.png (image/png, 568.3 KB) - not displayed
cup.png (image/png, 20.6 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.