Ptr<gpu::DisparityBilateralFilter> cv::gpu::createDisparityBilateralFilter(int ndisp, int radius, int iters)
{
- return new DispBilateralFilterImpl(ndisp, radius, iters);
+ return makePtr<DispBilateralFilterImpl>(ndisp, radius, iters);
}
#endif /* !defined (HAVE_CUDA) */
Ptr<gpu::StereoBM> cv::gpu::createStereoBM(int numDisparities, int blockSize)
{
- return new StereoBMImpl(numDisparities, blockSize);
+ return makePtr<StereoBMImpl>(numDisparities, blockSize);
}
#endif /* !defined (HAVE_CUDA) */
Ptr<gpu::StereoBeliefPropagation> cv::gpu::createStereoBeliefPropagation(int ndisp, int iters, int levels, int msg_type)
{
- return new StereoBPImpl(ndisp, iters, levels, msg_type);
+ return makePtr<StereoBPImpl>(ndisp, iters, levels, msg_type);
}
void cv::gpu::StereoBeliefPropagation::estimateRecommendedParams(int width, int height, int& ndisp, int& iters, int& levels)
Ptr<gpu::StereoConstantSpaceBP> cv::gpu::createStereoConstantSpaceBP(int ndisp, int iters, int levels, int nr_plane, int msg_type)
{
- return new StereoCSBPImpl(ndisp, iters, levels, nr_plane, msg_type);
+ return makePtr<StereoCSBPImpl>(ndisp, iters, levels, nr_plane, msg_type);
}
void cv::gpu::StereoConstantSpaceBP::estimateRecommendedParams(int width, int height, int& ndisp, int& iters, int& levels, int& nr_plane)