jeremy-ellis-tech / Xamarin.Android.OpenCV

C# bindings for the OpenCV Android SDK
MIT License
92 stars 44 forks source link

Background Subtractor Classes Usage Unclear #23

Closed benhamilto closed 6 years ago

benhamilto commented 6 years ago

I've tried creating instances of BackgroundSubtractorMOG2 like you would in java e.g.

BackgroundSubtractorMOG2 bgsMog2 = new BackgroundSubtractorMOG2();

But the BackgroundSubtractorMOG2 class seems to only have one constructor and it is protected, so this is not allowed.

Can someone provide me with an idea of how to use it? Thanks.

benhamilto commented 6 years ago

Apparently in Java it is supposed to look like this: BackgroundSubtractorMOG2 mog2 = Video.createBackgroundSubtractorMOG2();.

Video does not have a method with that name in the binding, is this an issue with the binding?

benhamilto commented 6 years ago

Found the proper usage: BackgroundSubtractorMOG2 bsg = OpenCV.Video.Video.CreateBackgroundSubtractorMOG2()