Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version
bg.setBool("detectShadows", true);

It should be better. Also have a look here https://www.behance.net/gallery/BGS-Library/3943089

bg.setBool("detectShadows", true);

It should be better. Also have a look here https://www.behance.net/gallery/BGS-Library/3943089

bg.setBool("detectShadows", true);

It should be better.

Also have a look here https://www.behance.net/gallery/BGS-Library/3943089

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