Adding test to check Censure works on any 2D shape

This commit is contained in:
Ankit Agrawal
2014-02-12 20:53:22 +05:30
parent 292f9dce9b
commit d8589f00e1
+8
View File
@@ -7,6 +7,14 @@ from skimage.feature import CENSURE
img = moon()
def test_censure_on_rectangular_images():
"""Censure feature detector should work on 2D image of any shape."""
rect_image = np.random.random((300, 200))
square_image = np.random.random((200, 200))
CENSURE().detect((square_image))
CENSURE().detect((rect_image))
def test_keypoints_censure_color_image_unsupported_error():
"""Censure keypoints can be extracted from gray-scale images only."""
assert_raises(ValueError, CENSURE().detect, np.zeros((20, 20, 3)))