Boring changes - video.

pull/1281/head
Roman Donchenko 11 years ago
parent 93f757f8a2
commit 808e0cf10b
  1. 2
      modules/video/src/bgfg_gaussmix.cpp
  2. 2
      modules/video/src/bgfg_gaussmix2.cpp
  3. 2
      modules/video/src/bgfg_gmg.cpp
  4. 2
      modules/video/src/tvl1flow.cpp
  5. 2
      modules/video/test/test_backgroundsubtractor_gbh.cpp

@ -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);
}
}

@ -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);
}
}

@ -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);

@ -953,5 +953,5 @@ CV_INIT_ALGORITHM(OpticalFlowDual_TVL1, "DenseOpticalFlow.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();
Mat fgmask;
if (fgbg.empty())
if (!fgbg)
CV_Error(Error::StsError,"Failed to create Algorithm\n");
/**

Loading…
Cancel
Save