Ask Your Question
0

Close shadow detection on BackgroundSubtractorMOG2 in opencv.js [closed]

asked 2018-02-14 16:21:34 -0600

generator gravatar image

updated 2020-11-02 11:35:33 -0600

I want to close shadow detection on BackgroundSubtractorMOG2()(opencv.js ) I do some research on google and i find this C++ code:documentation

But I can't implement this code on my javascript code.basically following code doesn't work and get error

let fgbg = new cv.BackgroundSubtractorMOG2(500, 16, true,0);

BindingError: Tried to invoke ctor of BackgroundSubtractorMOG2 with invalid number of parameters (4) - expected (0,1,2,3) parameters instead
edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by generator
close date 2018-02-15 09:27:44.192183

1 answer

Sort by ยป oldest newest most voted
1

answered 2018-02-15 04:06:31 -0600

berak gravatar image

please have a look at the docs

there is no 4th argument, use it like:

let fgbg = new cv.BackgroundSubtractorMOG2(500, 16, true);
edit flag offensive delete link more

Comments

Thank you.How can i close shadow detection on BackgroundSubtractorMOG2()?

generator gravatar imagegenerator ( 2018-02-15 06:47:44 -0600 )edit

what do you mean with "close" ?

berak gravatar imageberak ( 2018-02-15 06:53:56 -0600 )edit

(Sorry for my bad english) I don't want to detect shadows.How can i (Open/Close) shadow detection?

generator gravatar imagegenerator ( 2018-02-15 07:14:58 -0600 )edit

it's the last argument, true == detect shadows, false == don't.

berak gravatar imageberak ( 2018-02-15 07:42:12 -0600 )edit
1

backgroundSubtractorMOG2 is a fashionable method

LBerger gravatar imageLBerger ( 2018-02-15 11:11:28 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2018-02-14 16:21:34 -0600

Seen: 452 times

Last updated: Feb 15 '18