mirror of https://github.com/davisking/dlib.git
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.
This commit is contained in:
parent
5a0824c0f3
commit
2883650b0a
|
@ -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]);
|
||||
|
|
Loading…
Reference in New Issue