mirror of
https://github.com/opencv/opencv.git
synced 2025-01-18 06:03:15 +08:00
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 {
|
||||
template<> void cv::Ptr<IplConvKernel>::delete_obj()
|
||||
template<> void cv::DefaultDeleter<IplConvKernel>::operator ()(IplConvKernel* obj) const
|
||||
{
|
||||
cvReleaseStructuringElement(&obj);
|
||||
}
|
||||
@ -759,11 +759,11 @@ cvInpaint( const CvArr* _input_img, const CvArr* _inpaint_mask, CvArr* _output_i
|
||||
ecols = input_img->cols + 2;
|
||||
erows = input_img->rows + 2;
|
||||
|
||||
f = cvCreateMat(erows, ecols, CV_8UC1);
|
||||
t = cvCreateMat(erows, ecols, CV_32FC1);
|
||||
band = cvCreateMat(erows, ecols, CV_8UC1);
|
||||
mask = cvCreateMat(erows, ecols, CV_8UC1);
|
||||
el_cross = cvCreateStructuringElementEx(3,3,1,1,CV_SHAPE_CROSS,NULL);
|
||||
f.reset(cvCreateMat(erows, ecols, CV_8UC1));
|
||||
t.reset(cvCreateMat(erows, ecols, CV_32FC1));
|
||||
band.reset(cvCreateMat(erows, ecols, CV_8UC1));
|
||||
mask.reset(cvCreateMat(erows, ecols, CV_8UC1));
|
||||
el_cross.reset(cvCreateStructuringElementEx(3,3,1,1,CV_SHAPE_CROSS,NULL));
|
||||
|
||||
cvCopy( input_img, output_img );
|
||||
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(t,cvScalar(1.0e6f,0,0,0));
|
||||
cvDilate(mask,band,el_cross,1); // image with narrow band
|
||||
Heap=new CvPriorityQueueFloat;
|
||||
Heap=cv::makePtr<CvPriorityQueueFloat>();
|
||||
if (!Heap->Init(band))
|
||||
return;
|
||||
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 )
|
||||
{
|
||||
out = cvCreateMat(erows, ecols, CV_8UC1);
|
||||
el_range = cvCreateStructuringElementEx(2*range+1,2*range+1,
|
||||
range,range,CV_SHAPE_RECT,NULL);
|
||||
out.reset(cvCreateMat(erows, ecols, CV_8UC1));
|
||||
el_range.reset(cvCreateStructuringElementEx(2*range+1,2*range+1,
|
||||
range,range,CV_SHAPE_RECT,NULL));
|
||||
cvDilate(mask,out,el_range,1);
|
||||
cvSub(out,mask,out,NULL);
|
||||
Out=new CvPriorityQueueFloat;
|
||||
Out=cv::makePtr<CvPriorityQueueFloat>();
|
||||
if (!Out->Init(out))
|
||||
return;
|
||||
if (!Out->Add(band))
|
||||
|
Loading…
Reference in New Issue
Block a user