For this task I used the opencv library (open source computer vision library). OpenCV is a huge open-source library for computer vision, machine learning, and image processing.
Steps: Rgb to grayscale, Use dilation, Blurring the image, Calculate the difference of two images, Use threshold