Pure python motion detection and high quality video recording for the Raspberry Pi Camera Module