Implementation of bit-exact resize. Internal calls to linear resize updated to use bit-exact version. (#9468)

This commit is contained in:
Vitaly Tuzov
2017-12-13 15:00:38 +03:00
committed by Vadim Pisarevsky
parent 84ee4d701a
commit 51cb56ef2c
57 changed files with 1300 additions and 112 deletions
+4 -4
View File
@@ -465,7 +465,7 @@ int main(int argc, char* argv[])
work_scale = min(1.0, sqrt(work_megapix * 1e6 / full_img.size().area()));
is_work_scale_set = true;
}
resize(full_img, img, Size(), work_scale, work_scale);
resize(full_img, img, Size(), work_scale, work_scale, INTER_LINEAR_EXACT);
}
if (!is_seam_scale_set)
{
@@ -478,7 +478,7 @@ int main(int argc, char* argv[])
features[i].img_idx = i;
LOGLN("Features in image #" << i+1 << ": " << features[i].keypoints.size());
resize(full_img, img, Size(), seam_scale, seam_scale);
resize(full_img, img, Size(), seam_scale, seam_scale, INTER_LINEAR_EXACT);
images[i] = img.clone();
}
@@ -805,7 +805,7 @@ int main(int argc, char* argv[])
}
}
if (abs(compose_scale - 1) > 1e-1)
resize(full_img, img, Size(), compose_scale, compose_scale);
resize(full_img, img, Size(), compose_scale, compose_scale, INTER_LINEAR_EXACT);
else
img = full_img;
full_img.release();
@@ -831,7 +831,7 @@ int main(int argc, char* argv[])
mask.release();
dilate(masks_warped[img_idx], dilated_mask, Mat());
resize(dilated_mask, seam_mask, mask_warped.size());
resize(dilated_mask, seam_mask, mask_warped.size(), 0, 0, INTER_LINEAR_EXACT);
mask_warped = seam_mask & mask_warped;
if (!blender && !timelapse)