Port dft.py sample from cv to cv2