org.opencv.video.BackgroundSubtractorMOG2 Java Examples

The following examples show how to use org.opencv.video.BackgroundSubtractorMOG2. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: BackgroundSubtractionOp.java    From StormCV with Apache License 2.0 5 votes vote down vote up
/**
 * prepareOpenCVOp
 */
@Override
protected void prepareOpenCVOp(Map arg0, TopologyContext arg1)
		throws Exception 
{
	this.fgMaskMOG  = new Mat();
	this.fgMaskMOG2 = new Mat();
	this.pMOG       = new BackgroundSubtractorMOG();
	this.pMOG2      = new BackgroundSubtractorMOG2();
}
 
Example #2
Source File: BackgroundSubtractor.java    From go-bees with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Get the instance of BackgroundSubtractorMOG2 with the desired configuration.
 *
 * @param history         the number of frames to consider in the background model.
 * @param shadowThreshold the threshold to consider a pixel as shadow or not.
 * @return instance of BackgroundSubtractorMOG2.
 */
private BackgroundSubtractorMOG2 getMogInstance(int history, double shadowThreshold) {
    BackgroundSubtractorMOG2 instance =
            Video.createBackgroundSubtractorMOG2(history, VAR_THRESHOLD, DETECT_SHADOWS);
    instance.setBackgroundRatio(BACKGROUND_RATIO);
    instance.setVarInit(VAR_INIT);
    instance.setShadowThreshold(shadowThreshold);
    return instance;
}
 
Example #3
Source File: Video.java    From LicensePlateDiscern with MIT License 3 votes vote down vote up
public static BackgroundSubtractorMOG2 createBackgroundSubtractorMOG2()
{
    
    BackgroundSubtractorMOG2 retVal = BackgroundSubtractorMOG2.__fromPtr__(createBackgroundSubtractorMOG2_3());
    
    return retVal;
}
 
Example #4
Source File: Video.java    From OpenCvFaceDetect with Apache License 2.0 3 votes vote down vote up
public static BackgroundSubtractorMOG2 createBackgroundSubtractorMOG2()
{
    
    BackgroundSubtractorMOG2 retVal = BackgroundSubtractorMOG2.__fromPtr__(createBackgroundSubtractorMOG2_3());
    
    return retVal;
}
 
Example #5
Source File: Video.java    From OpenCvFaceDetect with Apache License 2.0 3 votes vote down vote up
public static BackgroundSubtractorMOG2 createBackgroundSubtractorMOG2(int history)
{
    
    BackgroundSubtractorMOG2 retVal = BackgroundSubtractorMOG2.__fromPtr__(createBackgroundSubtractorMOG2_2(history));
    
    return retVal;
}
 
Example #6
Source File: Video.java    From OpenCvFaceDetect with Apache License 2.0 3 votes vote down vote up
public static BackgroundSubtractorMOG2 createBackgroundSubtractorMOG2(int history, double varThreshold)
{
    
    BackgroundSubtractorMOG2 retVal = BackgroundSubtractorMOG2.__fromPtr__(createBackgroundSubtractorMOG2_1(history, varThreshold));
    
    return retVal;
}
 
Example #7
Source File: Video.java    From OpenCvFaceDetect with Apache License 2.0 3 votes vote down vote up
public static BackgroundSubtractorMOG2 createBackgroundSubtractorMOG2(int history, double varThreshold, boolean detectShadows)
{
    
    BackgroundSubtractorMOG2 retVal = BackgroundSubtractorMOG2.__fromPtr__(createBackgroundSubtractorMOG2_0(history, varThreshold, detectShadows));
    
    return retVal;
}
 
Example #8
Source File: Video.java    From pasm-yolov3-Android with GNU General Public License v3.0 3 votes vote down vote up
public static BackgroundSubtractorMOG2 createBackgroundSubtractorMOG2()
{
    
    BackgroundSubtractorMOG2 retVal = BackgroundSubtractorMOG2.__fromPtr__(createBackgroundSubtractorMOG2_3());
    
    return retVal;
}
 
Example #9
Source File: Video.java    From pasm-yolov3-Android with GNU General Public License v3.0 3 votes vote down vote up
public static BackgroundSubtractorMOG2 createBackgroundSubtractorMOG2(int history)
{
    
    BackgroundSubtractorMOG2 retVal = BackgroundSubtractorMOG2.__fromPtr__(createBackgroundSubtractorMOG2_2(history));
    
    return retVal;
}
 
Example #10
Source File: Video.java    From pasm-yolov3-Android with GNU General Public License v3.0 3 votes vote down vote up
public static BackgroundSubtractorMOG2 createBackgroundSubtractorMOG2(int history, double varThreshold)
{
    
    BackgroundSubtractorMOG2 retVal = BackgroundSubtractorMOG2.__fromPtr__(createBackgroundSubtractorMOG2_1(history, varThreshold));
    
    return retVal;
}
 
Example #11
Source File: Video.java    From pasm-yolov3-Android with GNU General Public License v3.0 3 votes vote down vote up
public static BackgroundSubtractorMOG2 createBackgroundSubtractorMOG2(int history, double varThreshold, boolean detectShadows)
{
    
    BackgroundSubtractorMOG2 retVal = BackgroundSubtractorMOG2.__fromPtr__(createBackgroundSubtractorMOG2_0(history, varThreshold, detectShadows));
    
    return retVal;
}
 
Example #12
Source File: Video.java    From VIA-AI with MIT License 3 votes vote down vote up
public static BackgroundSubtractorMOG2 createBackgroundSubtractorMOG2(int history, double varThreshold, boolean detectShadows)
{
    
    BackgroundSubtractorMOG2 retVal = BackgroundSubtractorMOG2.__fromPtr__(createBackgroundSubtractorMOG2_0(history, varThreshold, detectShadows));
    
    return retVal;
}
 
Example #13
Source File: Video.java    From LicensePlateDiscern with MIT License 3 votes vote down vote up
public static BackgroundSubtractorMOG2 createBackgroundSubtractorMOG2(int history)
{
    
    BackgroundSubtractorMOG2 retVal = BackgroundSubtractorMOG2.__fromPtr__(createBackgroundSubtractorMOG2_2(history));
    
    return retVal;
}
 
Example #14
Source File: Video.java    From LicensePlateDiscern with MIT License 3 votes vote down vote up
public static BackgroundSubtractorMOG2 createBackgroundSubtractorMOG2(int history, double varThreshold)
{
    
    BackgroundSubtractorMOG2 retVal = BackgroundSubtractorMOG2.__fromPtr__(createBackgroundSubtractorMOG2_1(history, varThreshold));
    
    return retVal;
}
 
Example #15
Source File: Video.java    From LicensePlateDiscern with MIT License 3 votes vote down vote up
public static BackgroundSubtractorMOG2 createBackgroundSubtractorMOG2(int history, double varThreshold, boolean detectShadows)
{
    
    BackgroundSubtractorMOG2 retVal = BackgroundSubtractorMOG2.__fromPtr__(createBackgroundSubtractorMOG2_0(history, varThreshold, detectShadows));
    
    return retVal;
}
 
Example #16
Source File: Video.java    From LPR with Apache License 2.0 3 votes vote down vote up
public static BackgroundSubtractorMOG2 createBackgroundSubtractorMOG2()
{
    
    BackgroundSubtractorMOG2 retVal = BackgroundSubtractorMOG2.__fromPtr__(createBackgroundSubtractorMOG2_3());
    
    return retVal;
}
 
Example #17
Source File: Video.java    From LPR with Apache License 2.0 3 votes vote down vote up
public static BackgroundSubtractorMOG2 createBackgroundSubtractorMOG2(int history)
{
    
    BackgroundSubtractorMOG2 retVal = BackgroundSubtractorMOG2.__fromPtr__(createBackgroundSubtractorMOG2_2(history));
    
    return retVal;
}
 
Example #18
Source File: Video.java    From LPR with Apache License 2.0 3 votes vote down vote up
public static BackgroundSubtractorMOG2 createBackgroundSubtractorMOG2(int history, double varThreshold)
{
    
    BackgroundSubtractorMOG2 retVal = BackgroundSubtractorMOG2.__fromPtr__(createBackgroundSubtractorMOG2_1(history, varThreshold));
    
    return retVal;
}
 
Example #19
Source File: Video.java    From LPR with Apache License 2.0 3 votes vote down vote up
public static BackgroundSubtractorMOG2 createBackgroundSubtractorMOG2(int history, double varThreshold, boolean detectShadows)
{
    
    BackgroundSubtractorMOG2 retVal = BackgroundSubtractorMOG2.__fromPtr__(createBackgroundSubtractorMOG2_0(history, varThreshold, detectShadows));
    
    return retVal;
}
 
Example #20
Source File: Video.java    From VIA-AI with MIT License 3 votes vote down vote up
public static BackgroundSubtractorMOG2 createBackgroundSubtractorMOG2()
{
    
    BackgroundSubtractorMOG2 retVal = BackgroundSubtractorMOG2.__fromPtr__(createBackgroundSubtractorMOG2_3());
    
    return retVal;
}
 
Example #21
Source File: Video.java    From VIA-AI with MIT License 3 votes vote down vote up
public static BackgroundSubtractorMOG2 createBackgroundSubtractorMOG2(int history)
{
    
    BackgroundSubtractorMOG2 retVal = BackgroundSubtractorMOG2.__fromPtr__(createBackgroundSubtractorMOG2_2(history));
    
    return retVal;
}
 
Example #22
Source File: Video.java    From VIA-AI with MIT License 3 votes vote down vote up
public static BackgroundSubtractorMOG2 createBackgroundSubtractorMOG2(int history, double varThreshold)
{
    
    BackgroundSubtractorMOG2 retVal = BackgroundSubtractorMOG2.__fromPtr__(createBackgroundSubtractorMOG2_1(history, varThreshold));
    
    return retVal;
}