Image Shadow Removal Using OpenCV and Python
fgbg = cv2.createBackgroundSubtractorMOG2(128,cv2.THRESH_BINARY,1)
masked_image = fgbg.apply(image)


in masked_image shadow will be grey color(pixel value= 127)
just replace 127 to 0, to convert grey pixel to black.

masked_image[masked_image==127]=0