4

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?

Mogsdad
  • 44,709
  • 21
  • 151
  • 275

1 Answers1

0

Seems like here opencv3.0 creating backgroundsubtractormog2 they solved it

you need to do it via Video.createBackgroundSubtractorMog2()

Community
  • 1
  • 1