mirror of
https://github.com/wassname/scikit-image.git
synced 2026-08-02 13:03:48 +08:00
Small fixes on the Harris corner detector - documentation, method renaming etc
This commit is contained in:
+10
-11
@@ -3,29 +3,28 @@
|
||||
Harris Corner detector
|
||||
===============================================================================
|
||||
|
||||
The Harris corner filter detects interest points using edge detection in many
|
||||
direction.
|
||||
The Harris corner filter detects interest points using edge detection in
|
||||
multiple direction.
|
||||
"""
|
||||
|
||||
from matplotlib import pyplot as plt
|
||||
from matplotlib import cm
|
||||
|
||||
from skimage import data
|
||||
from skimage.filter import harris_corner_detector
|
||||
from skimage import data, img_as_float
|
||||
from skimage.filter import harris
|
||||
|
||||
|
||||
def plot_harris_points(image, filtered_coords):
|
||||
""" plots corners found in image"""
|
||||
|
||||
plt.subplot(111)
|
||||
plt.imshow(image, cmap=cm.gray)
|
||||
plt.plot()
|
||||
plt.imshow(image)
|
||||
plt.plot([p[1] for p in filtered_coords],
|
||||
[p[0] for p in filtered_coords],
|
||||
'b.')
|
||||
[p[0] for p in filtered_coords],
|
||||
'b.')
|
||||
plt.axis('off')
|
||||
plt.show()
|
||||
|
||||
|
||||
im = data.lena().astype(float)
|
||||
filtered_coords = harris_corner_detector(im, 6)
|
||||
im = img_as_float(data.lena())
|
||||
filtered_coords = harris(im, 6)
|
||||
plot_harris_points(im, filtered_coords)
|
||||
|
||||
Reference in New Issue
Block a user