<div dir="ltr"><div><div>Thank you Thiago,<br><br></div>It is working but the triangulation goes out of the object for some points and is that I wanted to avoid compare the image I attached.<br><br></div>Best<br></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><div>-<br><span style="background-color:rgb(204,204,204)">Franck Kalala Mutombo, (PhD. Mathematics )</span></div><div>+243(04)844140 411 | +27(0)7646 91608<br></div><div>skype: franckm4<br><br></div><div></div>"<i><span lang="en">No one knows the future, however, but this does not prevent us to project</span></i><span lang="en"><i> in it and to act as if we control it</i>"<br></span></div><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On 14 March 2018 at 16:42, Thiago Franco Moraes <span dir="ltr"><<a href="mailto:tfmoraes@cti.gov.br" target="_blank">tfmoraes@cti.gov.br</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">You have to use plt.triplot. Also, you can use matplotlib.tri.Triangulation to triangulate using the delaunay. Something like this:<span class=""><br><br>from matplotlib import pyplot as plt<br><br>from <a href="http://skimage.io" target="_blank">skimage.io</a> import imread<br>from skimage.feature import corner_harris, corner_subpix, corner_peaks, peak_local_max<br></span>import matplotlib.tri as tri<span class=""><br>import matplotlib.pyplot as plt<br><br>image = imread("cup.png", as_grey='True')<br></span>points = peak_local_max(corner_harris(<wbr>image), min_distance=2)<br>triangles = tri.Triangulation(points[:,0], points[:,1])<span class=""><br>fig, ax = plt.subplots()<br>ax.imshow(image, interpolation='nearest', cmap=plt.cm.gray)<br></span>ax.triplot(triangles)<br>plt.show()<br><br><br><br></div><br><div class="gmail_quote"><div><div class="h5"><div dir="ltr">On Wed, Mar 14, 2018 at 1:24 PM Franck Kalala <<a href="mailto:franckkalala@googlemail.com" target="_blank">franckkalala@googlemail.com</a>> wrote:<br></div></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div><div><div><div><div><div>Hello All<br><br></div><div>I am not sure this a good place to ask this. I am just making a try.<br></div>I have and image and I would like to reproduced the Delaunay graphs overlaid.<br></div>See the attached image for an idea.<br><br></div>I try the following code:<br><br>from matplotlib import pyplot as plt<br><br>from <a href="http://skimage.io" target="_blank">skimage.io</a> import imread<br>from skimage.feature import corner_harris, corner_subpix, corner_peaks, peak_local_max<br>from scipy.spatial import Delaunay<br>import matplotlib.pyplot as plt<br><br>image = imread("cup.png", as_grey='True')<br><br><br>#points = corner_peaks(corner_harris(<wbr>image), min_distance=1)<br>points = peak_local_max(corner_harris(<wbr>image), min_distance=2)<br>#coords_subpix = corner_subpix(image, coords, window_size=13)<br>tri = Delaunay(points)<br><br>#imgplot = plt.imshow(image,cmap='gray')<br>#plt.triplot(points[:,0], points[:,1], tri.simplices.copy())<br>#plt.plot(points[:,0], points[:,1], 'o')<br>#plt.show()<br>#print(image)<br><br>coords = peak_local_max(corner_harris(<wbr>image), min_distance=2)<br>coords_subpix = corner_subpix(image, coords, window_size=13)<br><br>fig, ax = plt.subplots()<br>ax.imshow(image, interpolation='nearest', cmap=plt.cm.gray)<br>ax.plot(coords[:, 1], coords[:, 0], '.b', markersize=3)<br>#ax.plot(coords_subpix[:, 1], coords_subpix[:, 0], '+r', markersize=15)<br>#ax.axis((0, 350, 350, 0))<br>plt.show()<br><br><br></div>this code does not help. I attach also the cup image for a try.<br><br></div>best<br><br></div>franck<br></div></div></div>
______________________________<wbr>_________________<br>
SciPy-User mailing list<br>
<a href="mailto:SciPy-User@python.org" target="_blank">SciPy-User@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/scipy-user" rel="noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/listinfo/scipy-user</a><br>
</blockquote></div>
<br>______________________________<wbr>_________________<br>
SciPy-User mailing list<br>
<a href="mailto:SciPy-User@python.org">SciPy-User@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/scipy-user" rel="noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/listinfo/scipy-user</a><br>
<br></blockquote></div><br></div>