org.opencv.video.BackgroundSubtractor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of opencv Show documentation
Show all versions of opencv Show documentation
OpenCV packaged with native libraries and loader for multiple platforms.
// // This file is auto-generated. Please don't modify it! // package org.opencv.video; import org.opencv.core.Algorithm; import org.opencv.core.Mat; // C++: class BackgroundSubtractor /** *
* * @see org.opencv.video.BackgroundSubtractor : public Algorithm */ public class BackgroundSubtractor extends Algorithm { protected BackgroundSubtractor(long addr) { super(addr); } // // C++: void BackgroundSubtractor::operator ()(Mat image, Mat& fgmask, double learningRate = 0) // /** *Base class for background/foreground segmentation.
* *class BackgroundSubtractor : public Algorithm
* *// C++ code:
* * *public:
* *virtual ~BackgroundSubtractor();
* *virtual void operator()(InputArray image, OutputArray fgmask, double * learningRate=0);
* *virtual void getBackgroundImage(OutputArray backgroundImage) const;
* *};
* *The class is only used to define the common interface for the whole family of * background/foreground segmentation algorithms. *
Computes a foreground mask.
* * @param image Next video frame. * @param fgmask The output foreground mask as an 8-bit binary image. * @param learningRate a learningRate * * @see org.opencv.video.BackgroundSubtractor.operator() */ public void apply(Mat image, Mat fgmask, double learningRate) { apply_0(nativeObj, image.nativeObj, fgmask.nativeObj, learningRate); return; } /** *Computes a foreground mask.
* * @param image Next video frame. * @param fgmask The output foreground mask as an 8-bit binary image. * * @see org.opencv.video.BackgroundSubtractor.operator() */ public void apply(Mat image, Mat fgmask) { apply_1(nativeObj, image.nativeObj, fgmask.nativeObj); return; } @Override protected void finalize() throws Throwable { delete(nativeObj); } // C++: void BackgroundSubtractor::operator ()(Mat image, Mat& fgmask, double learningRate = 0) private static native void apply_0(long nativeObj, long image_nativeObj, long fgmask_nativeObj, double learningRate); private static native void apply_1(long nativeObj, long image_nativeObj, long fgmask_nativeObj); // native support for java finalize() private static native void delete(long nativeObj); }
© 2015 - 2025 Weber Informatics LLC | Privacy Policy