This code when executed via a terminal allows user to take a snapshot via OpenCV, convert it into grayscale and store it in a desired folder. This is useful for capturing images via a computer for machine learning datasets. After grayscaling histogram equalisation method can be used to get images in a unified lighting condition.