Add missing support for num_peaks parameter

This commit is contained in:
Johannes Schönberger
2012-10-10 13:06:21 +02:00
parent d9a7bac999
commit ede5df6c70
2 changed files with 20 additions and 1 deletions
@@ -101,5 +101,14 @@ def test_hough_peaks_angle():
assert len(tf.hough_peaks(hspace, angles, dists, min_angle=90)[0]) == 1
def test_hough_peaks_num():
img = np.zeros((100, 100), dtype=np.bool_)
img[:, 30] = True
img[:, 40] = True
hspace, angles, dists = tf.hough(img)
assert len(tf.hough_peaks(hspace, angles, dists, min_distance=0,
min_angle=0, num_peaks=1)[0]) == 1
if __name__ == "__main__":
run_module_suite()