Boring changes - video.
This commit is contained in:
parent
93f757f8a2
commit
808e0cf10b
@ -464,7 +464,7 @@ void BackgroundSubtractorMOGImpl::apply(InputArray _image, OutputArray _fgmask,
|
|||||||
Ptr<BackgroundSubtractorMOG> createBackgroundSubtractorMOG(int history, int nmixtures,
|
Ptr<BackgroundSubtractorMOG> createBackgroundSubtractorMOG(int history, int nmixtures,
|
||||||
double backgroundRatio, double noiseSigma)
|
double backgroundRatio, double noiseSigma)
|
||||||
{
|
{
|
||||||
return new BackgroundSubtractorMOGImpl(history, nmixtures, backgroundRatio, noiseSigma);
|
return makePtr<BackgroundSubtractorMOGImpl>(history, nmixtures, backgroundRatio, noiseSigma);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -769,7 +769,7 @@ void BackgroundSubtractorMOG2Impl::getBackgroundImage(OutputArray backgroundImag
|
|||||||
Ptr<BackgroundSubtractorMOG2> createBackgroundSubtractorMOG2(int _history, double _varThreshold,
|
Ptr<BackgroundSubtractorMOG2> createBackgroundSubtractorMOG2(int _history, double _varThreshold,
|
||||||
bool _bShadowDetection)
|
bool _bShadowDetection)
|
||||||
{
|
{
|
||||||
return new BackgroundSubtractorMOG2Impl(_history, (float)_varThreshold, _bShadowDetection);
|
return makePtr<BackgroundSubtractorMOG2Impl>(_history, (float)_varThreshold, _bShadowDetection);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -485,7 +485,7 @@ void BackgroundSubtractorGMGImpl::release()
|
|||||||
|
|
||||||
Ptr<BackgroundSubtractorGMG> createBackgroundSubtractorGMG(int initializationFrames, double decisionThreshold)
|
Ptr<BackgroundSubtractorGMG> createBackgroundSubtractorGMG(int initializationFrames, double decisionThreshold)
|
||||||
{
|
{
|
||||||
Ptr<BackgroundSubtractorGMG> bgfg = new BackgroundSubtractorGMGImpl;
|
Ptr<BackgroundSubtractorGMG> bgfg = makePtr<BackgroundSubtractorGMGImpl>();
|
||||||
bgfg->setNumFrames(initializationFrames);
|
bgfg->setNumFrames(initializationFrames);
|
||||||
bgfg->setDecisionThreshold(decisionThreshold);
|
bgfg->setDecisionThreshold(decisionThreshold);
|
||||||
|
|
||||||
|
@ -953,5 +953,5 @@ CV_INIT_ALGORITHM(OpticalFlowDual_TVL1, "DenseOpticalFlow.DualTVL1",
|
|||||||
|
|
||||||
Ptr<DenseOpticalFlow> cv::createOptFlow_DualTVL1()
|
Ptr<DenseOpticalFlow> cv::createOptFlow_DualTVL1()
|
||||||
{
|
{
|
||||||
return new OpticalFlowDual_TVL1;
|
return makePtr<OpticalFlowDual_TVL1>();
|
||||||
}
|
}
|
||||||
|
@ -40,7 +40,7 @@ void CV_BackgroundSubtractorTest::run(int)
|
|||||||
Ptr<BackgroundSubtractorGMG> fgbg = createBackgroundSubtractorGMG();
|
Ptr<BackgroundSubtractorGMG> fgbg = createBackgroundSubtractorGMG();
|
||||||
Mat fgmask;
|
Mat fgmask;
|
||||||
|
|
||||||
if (fgbg.empty())
|
if (!fgbg)
|
||||||
CV_Error(Error::StsError,"Failed to create Algorithm\n");
|
CV_Error(Error::StsError,"Failed to create Algorithm\n");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user