.size().width -> cols
This commit is contained in:
		| @@ -130,8 +130,8 @@ void Cloning::idst(const Mat& src, Mat& dest) | |||||||
|  |  | ||||||
| void Cloning::solve(const Mat &img, std::vector<float>& mod_diff, Mat &result) | void Cloning::solve(const Mat &img, std::vector<float>& mod_diff, Mat &result) | ||||||
| { | { | ||||||
|     const int w = img.size().width; |     const int w = img.cols; | ||||||
|     const int h = img.size().height; |     const int h = img.rows; | ||||||
|  |  | ||||||
|  |  | ||||||
|     Mat ModDiff(h-2, w-2, CV_32F, &mod_diff[0]); |     Mat ModDiff(h-2, w-2, CV_32F, &mod_diff[0]); | ||||||
| @@ -184,8 +184,8 @@ void Cloning::solve(const Mat &img, std::vector<float>& mod_diff, Mat &result) | |||||||
| void Cloning::poissonSolver(const Mat &img, Mat &laplacianX , Mat &laplacianY, Mat &result) | void Cloning::poissonSolver(const Mat &img, Mat &laplacianX , Mat &laplacianY, Mat &result) | ||||||
| { | { | ||||||
|  |  | ||||||
|     const int w = img.size().width; |     const int w = img.cols; | ||||||
|     const int h = img.size().height; |     const int h = img.rows; | ||||||
|  |  | ||||||
|     unsigned long int idx; |     unsigned long int idx; | ||||||
|  |  | ||||||
| @@ -244,12 +244,12 @@ void Cloning::initVariables(const Mat &destination, const Mat &binaryMask) | |||||||
|     binaryMaskFloatInverted = Mat(binaryMask.size(),CV_32FC1); |     binaryMaskFloatInverted = Mat(binaryMask.size(),CV_32FC1); | ||||||
|  |  | ||||||
|     //init of the filters used in the dst |     //init of the filters used in the dst | ||||||
|     const int w = destination.size().width; |     const int w = destination.cols; | ||||||
|     filter_X.resize(w - 2); |     filter_X.resize(w - 2); | ||||||
|     for(int i = 0 ; i < w-2 ; ++i) |     for(int i = 0 ; i < w-2 ; ++i) | ||||||
|         filter_X[i] = 2.0f * std::cos(CV_PI * (i + 1) / (w - 1)); |         filter_X[i] = 2.0f * std::cos(CV_PI * (i + 1) / (w - 1)); | ||||||
|  |  | ||||||
|     const int h  = destination.size().height; |     const int h  = destination.rows; | ||||||
|     filter_Y.resize(h - 2); |     filter_Y.resize(h - 2); | ||||||
|     for(int j = 0 ; j < h - 2 ; ++j) |     for(int j = 0 ; j < h - 2 ; ++j) | ||||||
|         filter_Y[j] = 2.0f * std::cos(CV_PI * (j + 1) / (h - 1)); |         filter_Y[j] = 2.0f * std::cos(CV_PI * (j + 1) / (h - 1)); | ||||||
| @@ -334,8 +334,8 @@ void Cloning::evaluate(const Mat &I, const Mat &wmask, const Mat &cloned) | |||||||
|  |  | ||||||
| void Cloning::normalClone(const Mat &destination, const Mat &patch, const Mat &binaryMask, Mat &cloned, int flag) | void Cloning::normalClone(const Mat &destination, const Mat &patch, const Mat &binaryMask, Mat &cloned, int flag) | ||||||
| { | { | ||||||
|     int w = destination.size().width; |     int w = destination.cols; | ||||||
|     int h = destination.size().height; |     int h = destination.rows; | ||||||
|     int channel = destination.channels(); |     int channel = destination.channels(); | ||||||
|  |  | ||||||
|     computeDerivatives(destination,patch,binaryMask); |     computeDerivatives(destination,patch,binaryMask); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Adrien BAK
					Adrien BAK