Merge pull request #888 from ankit-maverick/issue885

Fix Censure's mode='dob' for rectangular images
This commit is contained in:
Stefan van der Walt
2014-02-13 23:37:24 +02:00
3 changed files with 10 additions and 2 deletions
+1 -1
View File
@@ -37,7 +37,7 @@ def _filter_image(image, min_scale, max_scale, mode):
# make response[:, :, i] contiguous memory block
item_size = response.itemsize
response.strides = (item_size * response.shape[0], item_size,
response.strides = (item_size * response.shape[1], item_size,
item_size * response.shape[0] * response.shape[1])
integral_img = integral_image(image)
+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)))
+1 -1
View File
@@ -399,7 +399,7 @@ def regionprops(label_image, properties=None,
**major_axis_length** : float
The length of the major axis of the ellipse that has the same
normalized second central moments as the region.
**min_intensity** : float
**max_intensity** : float
Value with the greatest intensity in the region.
**mean_intensity** : float
Value with the mean intensity in the region.