map_y = np.append([], [ar[:, (0)] for ar in grid_z]).reshape(150, 150)
map_x_32 = map_x.astype('float32')
map_y_32 = map_y.astype('float32')
orig = cv2.imread('tmp.png')
warped = cv2.remap(orig, map_x_32, map_y_32, cv2.INTER_CUBIC)
cv2.imwrite('warped.png', warped)
Image transformation in OpenCV