A foolproof guide to image manipulation in Python with OpenCV