def edginess_sobel(image):
 edges = mh.sobel(image, just_filter=True)
 edges = edges.ravel()
 return np.sqrt(np.dot(edges, edges))

def edginess_sobel ( image ) : edges = mh . sobel ( image , just_filter = True ) edges = edges . ravel ( ) return np . sqrt ( np . dot ( edges , edges ) )
measure the "edginess" of an image image should be a 2d numpy array returns a floating point value which is higher the "edgier" the image is .