Merge pull request #2409 from juanmanpr:master
This commit is contained in:
commit
5527f2872d
@ -45,7 +45,6 @@
|
|||||||
#include "math.h"
|
#include "math.h"
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
#include <iostream>
|
|
||||||
#include "contrast_preserve.hpp"
|
#include "contrast_preserve.hpp"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
@ -60,16 +59,7 @@ void cv::decolor(InputArray _src, OutputArray _dst, OutputArray _color_boost)
|
|||||||
_color_boost.create(I.size(), CV_8UC3);
|
_color_boost.create(I.size(), CV_8UC3);
|
||||||
Mat color_boost = _color_boost.getMat();
|
Mat color_boost = _color_boost.getMat();
|
||||||
|
|
||||||
if(!I.data )
|
CV_Assert(!I.empty() && (I.channels()==3));
|
||||||
{
|
|
||||||
cout << "Could not open or find the image" << endl ;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if(I.channels() !=3)
|
|
||||||
{
|
|
||||||
cout << "Input Color Image" << endl;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Parameter Setting
|
// Parameter Setting
|
||||||
int maxIter = 15;
|
int maxIter = 15;
|
||||||
|
@ -41,7 +41,6 @@
|
|||||||
|
|
||||||
#include "precomp.hpp"
|
#include "precomp.hpp"
|
||||||
#include "opencv2/photo.hpp"
|
#include "opencv2/photo.hpp"
|
||||||
#include <iostream>
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "seamless_cloning.hpp"
|
#include "seamless_cloning.hpp"
|
||||||
@ -93,11 +92,7 @@ void cv::seamlessClone(InputArray _src, InputArray _dst, InputArray _mask, Point
|
|||||||
int minyd = p.x - leny/2;
|
int minyd = p.x - leny/2;
|
||||||
int maxyd = p.x + leny/2;
|
int maxyd = p.x + leny/2;
|
||||||
|
|
||||||
if(minxd < 0 || minyd < 0 || maxxd > dest.size().height || maxyd > dest.size().width)
|
CV_Assert(minxd >= 0 && minyd >= 0 && maxxd <= dest.rows && maxyd <= dest.cols);
|
||||||
{
|
|
||||||
cout << "Index out of range" << endl;
|
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
Rect roi_d(minyd,minxd,leny,lenx);
|
Rect roi_d(minyd,minxd,leny,lenx);
|
||||||
Rect roi_s(miny,minx,leny,lenx);
|
Rect roi_s(miny,minx,leny,lenx);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user