I'm trying to run BackgroundSubtractorMOG on a video file, but the javadoc (Version 3.0.0) says that I need to provide a long as an argument, while the online documentation (Version 2.4.9) says that the constructor requires either no argument, or int,int,double. When I give it a long, I then get an error that the constructor is not visible. Looking into the BackgroundSubtractorMOG class, the constructor is protected, and I have no idea why. I've tried using it both static and non-static methods, but no luck. I have not been able to find a single example of someone successfully using BackgroundSubtractorMOG with java online. Any ideas or examples of how to invoke the constructor?
Asked
Active
Viewed 1,892 times
4
-
It seems they haven't created the Java interface yet. – dannyxyz22 Jun 25 '15 at 05:41
-
Actually, it has gone to the contrib branch. I don't know how to make it work so far. – dannyxyz22 Jun 25 '15 at 05:57
1 Answers
0
Seems like here opencv3.0 creating backgroundsubtractormog2 they solved it
you need to do it via Video.createBackgroundSubtractorMog2()

Community
- 1
- 1

Jacopo Ameli
- 1
- 1