For Background Subtraction, the value nShadowDetection can't be set (Bug #3623)
Description
When you have an instance of the MOG2 background subtractor
cv::BackgroundSubtractorMOG2 mybacksub;
you can set all values, except
mybacksub.set("nShadowDetection", 120);
where an error occurs.
I think the error is likely to be in "bgfg_gaussmix2.cpp", line 782
Associated revisions
Merge pull request #3623 from Trundle:fix_android_link
History
Updated by Ben Jones almost 11 years ago
you can set all values, except
mybacksub.set("nShadowDetection", 120);
this means that all other parameters can be set (e.g. "fTau"). Setting "nShadowDetection" crashed for all values (not just 120).
Updated by Sergei Nosov almost 11 years ago
Hi!
Thx for reporting! Could you, please, consider submitting a pull request to our repo on GitHub (https://github.com/Itseez/opencv) with a proposed fix?
- Status changed from New to Open
Updated by Sergei Nosov almost 11 years ago
- Category set to imgproc, video
Updated by Artur Wieczorek almost 11 years ago
Though BackgroundSubtractorMOG2 (and BackgroundSubtractorMOG) inherits from Algorithm class but interface to set/get parameters is not currently implemented.
In the pull request https://github.com/Itseez/opencv/pull/2681 there is submitted a patch implementing missing interface.
- % Done changed from 0 to 100
Updated by Andrew Senin almost 11 years ago
- Pull request set to https://github.com/Itseez/opencv/pull/2681
Updated by Vladislav Vinogradov almost 11 years ago
In 3.0 old get/set API with string parameter are replaced with separate get/set function for each parameter:
// old bg->set("nShadowDetection", 0); int n = bgs->getInt("nShadowDetection"); // new bg->setShadowValue(0); int n = bg->getShadowValue();
The old approach was declared obsolete. In 2.4 old API is used and it works.
I am cancelling the issue, please reopen if you disagree.
- Status changed from Open to Cancelled
- Affected version changed from 2.4.8 (latest release) to branch 'master' (3.0-dev)