sobel -> Sobel

This commit is contained in:
Alexander Mordvintsev 2011-07-11 09:46:36 +00:00
parent 0217ae3a70
commit c053532be1

View File

@ -21,9 +21,9 @@ def coherence_filter(img, sigma = 11, str_sigma = 11, blend = 0.5, iter_n = 4):
eigen = eigen.reshape(h, w, 3, 2) # [[e1, e2], v1, v2] eigen = eigen.reshape(h, w, 3, 2) # [[e1, e2], v1, v2]
x, y = eigen[:,:,1,0], eigen[:,:,1,1] x, y = eigen[:,:,1,0], eigen[:,:,1,1]
gxx = cv2.sobel(gray, cv2.CV_32F, 2, 0, ksize=sigma) gxx = cv2.Sobel(gray, cv2.CV_32F, 2, 0, ksize=sigma)
gxy = cv2.sobel(gray, cv2.CV_32F, 1, 1, ksize=sigma) gxy = cv2.Sobel(gray, cv2.CV_32F, 1, 1, ksize=sigma)
gyy = cv2.sobel(gray, cv2.CV_32F, 0, 2, ksize=sigma) gyy = cv2.Sobel(gray, cv2.CV_32F, 0, 2, ksize=sigma)
gvv = x*x*gxx + 2*x*y*gxy + y*y*gyy gvv = x*x*gxx + 2*x*y*gxy + y*y*gyy
m = gvv < 0 m = gvv < 0