April 2020
Intermediate to advanced
438 pages
12h 2m
English
Follow these steps to implement the ECC algorithm using OpenCV-Python:
def get_gradient(im) : grad_x = cv2.Sobel(im,cv2.CV_32F,1,0,ksize=3) grad_y = cv2.Sobel(im,cv2.CV_32F,0,1,ksize=3) grad = cv2.addWeighted(np.absolute(grad_x), 0.5, \ np.absolute(grad_y), 0.5, 0) return grad
im_unaligned = cv2.imread("images/me_unaligned.jpg")height, width = im_unaligned.shape[:2]print(height, width)# 992 610channels = ['B', ...Read now
Unlock full access