Let's create a new folder for Lazy Eyes and, in this folder, create copies of or links to the ResizeUtils.py
and WxUtils.py
files from any of our previous Python projects such as the project The Living Headlights in Chapter 5, Equipping Your Car with a Rearview Camera and Hazard Detection. Alongside the copies or links, let's create a new file, LazyEyes.py
. Edit it and enter the following import statements:
import collections import numpy import cv2 import threading import timeit import wx import pyfftw.interfaces.cache from pyfftw.interfaces.scipy_fftpack import fft from pyfftw.interfaces.scipy_fftpack import ifft from scipy.fftpack import fftfreq import ResizeUtils import WxUtils
Besides the modules that we have used in previous projects, we are now using the standard library's collections
module for efficient collections and timeit
module for precise timing. Also for the first time, we are using signal processing functionality from PyFFTW and SciPy.
Like...