I've removed the size variables for the main window, as showMaximized already sets those
Added them back, because if you want to run it at a smaller resolution, the app has no sensible default (at least on a desktop)
Changed the tracking from CHAIN_APPROX_NONE to CHAIN_APPROX_SIMPLE and changed the imports
Added rounding, which will hopefully prevent paws from accidentally getting marked as touching the edge