1 2 // 3 // This file is auto-generated. Please don't modify it! 4 // 5 package org.opencv.video; 6 7 import org.opencv.core.Algorithm; 8 import org.opencv.core.Mat; 9 10 // C++: class BackgroundSubtractor 11 //javadoc: BackgroundSubtractor 12 public class BackgroundSubtractor extends Algorithm { 13 14 protected BackgroundSubtractor(long addr) { super(addr); } 15 16 17 // 18 // C++: void getBackgroundImage(Mat& backgroundImage) 19 // 20 21 //javadoc: BackgroundSubtractor::getBackgroundImage(backgroundImage) 22 public void getBackgroundImage(Mat backgroundImage) 23 { 24 25 getBackgroundImage_0(nativeObj, backgroundImage.nativeObj); 26 27 return; 28 } 29 30 31 // 32 // C++: void apply(Mat image, Mat& fgmask, double learningRate = -1) 33 // 34 35 //javadoc: BackgroundSubtractor::apply(image, fgmask, learningRate) 36 public void apply(Mat image, Mat fgmask, double learningRate) 37 { 38 39 apply_0(nativeObj, image.nativeObj, fgmask.nativeObj, learningRate); 40 41 return; 42 } 43 44 //javadoc: BackgroundSubtractor::apply(image, fgmask) 45 public void apply(Mat image, Mat fgmask) 46 { 47 48 apply_1(nativeObj, image.nativeObj, fgmask.nativeObj); 49 50 return; 51 } 52 53 54 @Override 55 protected void finalize() throws Throwable { 56 delete(nativeObj); 57 } 58 59 60 61 // C++: void getBackgroundImage(Mat& backgroundImage) 62 private static native void getBackgroundImage_0(long nativeObj, long backgroundImage_nativeObj); 63 64 // C++: void apply(Mat image, Mat& fgmask, double learningRate = -1) 65 private static native void apply_0(long nativeObj, long image_nativeObj, long fgmask_nativeObj, double learningRate); 66 private static native void apply_1(long nativeObj, long image_nativeObj, long fgmask_nativeObj); 67 68 // native support for java finalize() 69 private static native void delete(long nativeObj); 70 71 } 72