March 2020
Intermediate to advanced
366 pages
9h 8m
English
The FilterLayout GUI will be based on a generic, plain layout class called BaseLayout, which we will be able to use in subsequent chapters as well.
The BaseLayout class is designed as an abstract base class. You can think of this class as a blueprint or recipe that will apply to all the layouts that we are yet to design, that is, a skeleton class that will serve as the backbone for all of our future GUI code.
We start the file by importing the packages that we will use—the wxPython module, which we use to create the GUI; numpy, which we use to do matrix manipulations; and OpenCV (of course):
import numpy as npimport wximport cv2
The class is designed to be derived from the blueprint or skeleton, that is, the wx.Frame ...