def sobel(image, mask=None):
 assert_nD(image, 2)
 out = np.sqrt(((sobel_h(image, mask) ** 2) + (sobel_v(image, mask) ** 2)))
 out /= np.sqrt(2)
 return out

def sobel ( image , mask = None ) : assert_nD ( image , 2 ) out = np . sqrt ( ( ( sobel_h ( image , mask ) ** 2 ) + ( sobel_v ( image , mask ) ** 2 ) ) ) out /= np . sqrt ( 2 ) return out
find the edge magnitude using the sobel transform .