FIX: move corner detection outside loop in test_num_peaks.

This commit is contained in:
Malcolm Reynolds
2013-03-18 15:23:35 +00:00
parent 0fde67bb56
commit 920e41398d
+2 -2
View File
@@ -105,11 +105,11 @@ def test_num_peaks():
peak_local_max returns exactly the right amount of peaks. Test
is run on Lena in order to produce a sufficient number of corners"""
lena = data.lena()
lena_corners = corner_harris(data.lena())
for i in xrange(20):
n = np.random.random_integers(20)
results = peak_local_max(corner_harris(lena), num_peaks=n)
results = peak_local_max(lena_corners, num_peaks=n)
assert (results.shape[0] == n)