snakes = morphology.skeletonize(img < 1)
corners = convolve2d(snakes, [[1, 1, 1], [1, 0, 1], [1, 1, 1]], mode='same'
    ) == 1
corners = corners & snakes
y, x = np.where(corners)
plt.imshow(img, cmap=plt.cm.gray, interpolation='nearest')
plt.scatter(x, y)
plt.axis('off')
plt.show()
Python image processing : Help needed for corner detection in preferably PIL or any relevant module