minor changes in opencv_stitching

This commit is contained in:
Alexey Spizhevoy 2011-05-27 04:44:32 +00:00
parent bfbc70436d
commit 8e3777676c

View File

@ -80,7 +80,6 @@ void Blender::feed(const Mat &img, const Mat &mask, Point tl)
{ {
CV_Assert(img.type() == CV_16SC3); CV_Assert(img.type() == CV_16SC3);
CV_Assert(mask.type() == CV_8U); CV_Assert(mask.type() == CV_8U);
int dx = tl.x - dst_roi_.x; int dx = tl.x - dst_roi_.x;
int dy = tl.y - dst_roi_.y; int dy = tl.y - dst_roi_.y;
@ -88,7 +87,6 @@ void Blender::feed(const Mat &img, const Mat &mask, Point tl)
{ {
const Point3_<short> *src_row = img.ptr<Point3_<short> >(y); const Point3_<short> *src_row = img.ptr<Point3_<short> >(y);
Point3_<short> *dst_row = dst_.ptr<Point3_<short> >(dy + y); Point3_<short> *dst_row = dst_.ptr<Point3_<short> >(dy + y);
const uchar *mask_row = mask.ptr<uchar>(y); const uchar *mask_row = mask.ptr<uchar>(y);
uchar *dst_mask_row = dst_mask_.ptr<uchar>(dy + y); uchar *dst_mask_row = dst_mask_.ptr<uchar>(dy + y);
@ -200,7 +198,7 @@ void MultiBandBlender::feed(const Mat &img, const Mat &mask, Point tl)
Point br_new(min(dst_roi_.br().x, tl.x + img.cols + gap), Point br_new(min(dst_roi_.br().x, tl.x + img.cols + gap),
min(dst_roi_.br().y, tl.y + img.rows + gap)); min(dst_roi_.br().y, tl.y + img.rows + gap));
// Ensure coordinates of top-left, bootom-right corners are divided by (1 << num_bands_). // Ensure coordinates of top-left, bottom-right corners are divided by (1 << num_bands_).
// After that scale between layers is exactly 2. // After that scale between layers is exactly 2.
// //
// We do it to avoid interpolation problems when keeping sub-images only. There is no such problem when // We do it to avoid interpolation problems when keeping sub-images only. There is no such problem when
@ -225,7 +223,6 @@ void MultiBandBlender::feed(const Mat &img, const Mat &mask, Point tl)
// Create the source image Laplacian pyramid // Create the source image Laplacian pyramid
vector<Mat> src_pyr_gauss(num_bands_ + 1); vector<Mat> src_pyr_gauss(num_bands_ + 1);
src_pyr_gauss[0] = img;
copyMakeBorder(img, src_pyr_gauss[0], top, bottom, left, right, copyMakeBorder(img, src_pyr_gauss[0], top, bottom, left, right,
BORDER_REFLECT); BORDER_REFLECT);
for (int i = 0; i < num_bands_; ++i) for (int i = 0; i < num_bands_; ++i)