Boring changes - photo.
This commit is contained in:
parent
b12894d95a
commit
32205d3c5b
@ -718,7 +718,7 @@ icvNSInpaintFMM(const CvMat *f, CvMat *t, CvMat *out, int range, CvPriorityQueue
|
|||||||
}
|
}
|
||||||
|
|
||||||
namespace cv {
|
namespace cv {
|
||||||
template<> void cv::Ptr<IplConvKernel>::delete_obj()
|
template<> void cv::DefaultDeleter<IplConvKernel>::operator ()(IplConvKernel* obj) const
|
||||||
{
|
{
|
||||||
cvReleaseStructuringElement(&obj);
|
cvReleaseStructuringElement(&obj);
|
||||||
}
|
}
|
||||||
@ -759,11 +759,11 @@ cvInpaint( const CvArr* _input_img, const CvArr* _inpaint_mask, CvArr* _output_i
|
|||||||
ecols = input_img->cols + 2;
|
ecols = input_img->cols + 2;
|
||||||
erows = input_img->rows + 2;
|
erows = input_img->rows + 2;
|
||||||
|
|
||||||
f = cvCreateMat(erows, ecols, CV_8UC1);
|
f.reset(cvCreateMat(erows, ecols, CV_8UC1));
|
||||||
t = cvCreateMat(erows, ecols, CV_32FC1);
|
t.reset(cvCreateMat(erows, ecols, CV_32FC1));
|
||||||
band = cvCreateMat(erows, ecols, CV_8UC1);
|
band.reset(cvCreateMat(erows, ecols, CV_8UC1));
|
||||||
mask = cvCreateMat(erows, ecols, CV_8UC1);
|
mask.reset(cvCreateMat(erows, ecols, CV_8UC1));
|
||||||
el_cross = cvCreateStructuringElementEx(3,3,1,1,CV_SHAPE_CROSS,NULL);
|
el_cross.reset(cvCreateStructuringElementEx(3,3,1,1,CV_SHAPE_CROSS,NULL));
|
||||||
|
|
||||||
cvCopy( input_img, output_img );
|
cvCopy( input_img, output_img );
|
||||||
cvSet(mask,cvScalar(KNOWN,0,0,0));
|
cvSet(mask,cvScalar(KNOWN,0,0,0));
|
||||||
@ -772,7 +772,7 @@ cvInpaint( const CvArr* _input_img, const CvArr* _inpaint_mask, CvArr* _output_i
|
|||||||
cvSet(f,cvScalar(KNOWN,0,0,0));
|
cvSet(f,cvScalar(KNOWN,0,0,0));
|
||||||
cvSet(t,cvScalar(1.0e6f,0,0,0));
|
cvSet(t,cvScalar(1.0e6f,0,0,0));
|
||||||
cvDilate(mask,band,el_cross,1); // image with narrow band
|
cvDilate(mask,band,el_cross,1); // image with narrow band
|
||||||
Heap=new CvPriorityQueueFloat;
|
Heap=cv::makePtr<CvPriorityQueueFloat>();
|
||||||
if (!Heap->Init(band))
|
if (!Heap->Init(band))
|
||||||
return;
|
return;
|
||||||
cvSub(band,mask,band,NULL);
|
cvSub(band,mask,band,NULL);
|
||||||
@ -785,12 +785,12 @@ cvInpaint( const CvArr* _input_img, const CvArr* _inpaint_mask, CvArr* _output_i
|
|||||||
|
|
||||||
if( flags == cv::INPAINT_TELEA )
|
if( flags == cv::INPAINT_TELEA )
|
||||||
{
|
{
|
||||||
out = cvCreateMat(erows, ecols, CV_8UC1);
|
out.reset(cvCreateMat(erows, ecols, CV_8UC1));
|
||||||
el_range = cvCreateStructuringElementEx(2*range+1,2*range+1,
|
el_range.reset(cvCreateStructuringElementEx(2*range+1,2*range+1,
|
||||||
range,range,CV_SHAPE_RECT,NULL);
|
range,range,CV_SHAPE_RECT,NULL));
|
||||||
cvDilate(mask,out,el_range,1);
|
cvDilate(mask,out,el_range,1);
|
||||||
cvSub(out,mask,out,NULL);
|
cvSub(out,mask,out,NULL);
|
||||||
Out=new CvPriorityQueueFloat;
|
Out=cv::makePtr<CvPriorityQueueFloat>();
|
||||||
if (!Out->Init(out))
|
if (!Out->Init(out))
|
||||||
return;
|
return;
|
||||||
if (!Out->Add(band))
|
if (!Out->Add(band))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user