1 | initial version |
bg.setBool("detectShadows", true);
It should be better. Also have a look here https://www.behance.net/gallery/BGS-Library/3943089
2 | No.2 Revision |
bg.setBool("detectShadows", true);
It should be better. Also have a look here https://www.behance.net/gallery/BGS-Library/3943089
3 | No.3 Revision |
bg.setBool("detectShadows", true);
It should be better.
Also have a look here https://www.behance.net/gallery/BGS-Library/39430894 | No.4 Revision |
bg.setBool("detectShadows", true);
It should be better. Watch what happens to the fore image now.
Then, before erosion insert this:
cv::threshold(fore,fore,254,255,0);
It will remove shadows from further processing and hopefully get you what you want.
Also have a look here https://www.behance.net/gallery/BGS-Library/3943089