mirror of
https://github.com/wassname/scikit-image.git
synced 2026-08-03 13:11:25 +08:00
Addition of examples in the harris and peak local max function
This commit is contained in:
@@ -19,14 +19,11 @@ from skimage.feature import harris
|
||||
def plot_harris_points(image, filtered_coords):
|
||||
""" plots corners found in image"""
|
||||
|
||||
plt.plot()
|
||||
plt.imshow(image)
|
||||
plt.plot([p[1] for p in filtered_coords],
|
||||
[p[0] for p in filtered_coords],
|
||||
'b.')
|
||||
y, x = np.transpose(filtered_coords)
|
||||
plt.plot(x, y, 'b.')
|
||||
plt.axis('off')
|
||||
plt.show()
|
||||
|
||||
|
||||
# display results
|
||||
plt.figure(figsize=(9, 3))
|
||||
im_lena = img_as_float(data.lena())
|
||||
@@ -41,3 +38,5 @@ filtered_coords = harris(im_text, min_distance=4)
|
||||
|
||||
plt.axes([0.2, 0, 0.77, 1])
|
||||
plot_harris_points(im_text, filtered_coords)
|
||||
|
||||
plt.show()
|
||||
Reference in New Issue
Block a user