Commit 2883650b authored by Davis King's avatar Davis King

Made resize_image() and functions that use it like the pyramid objects produce

better results when run on float and double images.  There was needless
rounding to integers happening in the bilinear interpolation.  Now if you work
with a float image the entire process will run without integer rounding.
parent 5a0824c0
......@@ -828,8 +828,8 @@ namespace dlib
simd4f bl(in_img[bottom][fleft[0]], in_img[bottom][fleft[1]], in_img[bottom][fleft[2]], in_img[bottom][fleft[3]]);
simd4f br(in_img[bottom][fright[0]], in_img[bottom][fright[1]], in_img[bottom][fright[2]], in_img[bottom][fright[3]]);
simd4i out = simd4i(tlf*tl + trf*tr + blf*bl + brf*br);
int32 fout[4];
simd4f out = simd4f(tlf*tl + trf*tr + blf*bl + brf*br);
float fout[4];
out.store(fout);
out_img[r][c] = static_cast<T>(fout[0]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment