Find contours example

This commit is contained in:
Emmanuelle Gouillart
2013-04-20 20:09:45 +02:00
parent 3f47aefa90
commit 8efaaee3c8
+11
View File
@@ -95,6 +95,17 @@ def find_contours(array, level,
Resolution 3D Surface Construction Algorithm. Computer Graphics
(SIGGRAPH 87 Proceedings) 21(4) July 1987, p. 163-170).
Examples
--------
>>> a = np.zeros((3, 3))
>>> a[0, 0] = 1
>>> a
array([[ 1., 0., 0.],
[ 0., 0., 0.],
[ 0., 0., 0.]])
>>> measure.find_contours(a, 0.5)
[array([[ 0. , 0.5],
[ 0.5, 0. ]])]
"""
array = np.asarray(array, dtype=np.double)
if array.ndim != 2: