Boring changes - video.

This commit is contained in:
Roman Donchenko 2013-08-13 17:57:49 +04:00
parent 93f757f8a2
commit 808e0cf10b
5 changed files with 5 additions and 5 deletions

View File

@ -464,7 +464,7 @@ void BackgroundSubtractorMOGImpl::apply(InputArray _image, OutputArray _fgmask,
Ptr<BackgroundSubtractorMOG> createBackgroundSubtractorMOG(int history, int nmixtures,
double backgroundRatio, double noiseSigma)
{
return new BackgroundSubtractorMOGImpl(history, nmixtures, backgroundRatio, noiseSigma);
return makePtr<BackgroundSubtractorMOGImpl>(history, nmixtures, backgroundRatio, noiseSigma);
}
}

View File

@ -769,7 +769,7 @@ void BackgroundSubtractorMOG2Impl::getBackgroundImage(OutputArray backgroundImag
Ptr<BackgroundSubtractorMOG2> createBackgroundSubtractorMOG2(int _history, double _varThreshold,
bool _bShadowDetection)
{
return new BackgroundSubtractorMOG2Impl(_history, (float)_varThreshold, _bShadowDetection);
return makePtr<BackgroundSubtractorMOG2Impl>(_history, (float)_varThreshold, _bShadowDetection);
}
}

View File

@ -485,7 +485,7 @@ void BackgroundSubtractorGMGImpl::release()
Ptr<BackgroundSubtractorGMG> createBackgroundSubtractorGMG(int initializationFrames, double decisionThreshold)
{
Ptr<BackgroundSubtractorGMG> bgfg = new BackgroundSubtractorGMGImpl;
Ptr<BackgroundSubtractorGMG> bgfg = makePtr<BackgroundSubtractorGMGImpl>();
bgfg->setNumFrames(initializationFrames);
bgfg->setDecisionThreshold(decisionThreshold);

View File

@ -953,5 +953,5 @@ CV_INIT_ALGORITHM(OpticalFlowDual_TVL1, "DenseOpticalFlow.DualTVL1",
Ptr<DenseOpticalFlow> cv::createOptFlow_DualTVL1()
{
return new OpticalFlowDual_TVL1;
return makePtr<OpticalFlowDual_TVL1>();
}

View File

@ -40,7 +40,7 @@ void CV_BackgroundSubtractorTest::run(int)
Ptr<BackgroundSubtractorGMG> fgbg = createBackgroundSubtractorGMG();
Mat fgmask;
if (fgbg.empty())
if (!fgbg)
CV_Error(Error::StsError,"Failed to create Algorithm\n");
/**