Commit b3682d98 authored by Davis King's avatar Davis King

Moved the /256 from the spatial filtering routine to it's proper place in the pyramid code.

parent b967f1f4
...@@ -459,10 +459,10 @@ namespace dlib ...@@ -459,10 +459,10 @@ namespace dlib
separable_3x3_filter_block_grayscale(block, original, rr, cc, 3, 10, 3); separable_3x3_filter_block_grayscale(block, original, rr, cc, 3, 10, 3);
// bi-linearly interpolate block // bi-linearly interpolate block
assign_pixel(down[r][c] , (block[0][0]*9 + block[1][0]*3 + block[0][1]*3 + block[1][1])/(16)); assign_pixel(down[r][c] , (block[0][0]*9 + block[1][0]*3 + block[0][1]*3 + block[1][1])/(16*256));
assign_pixel(down[r][c+1] , (block[0][2]*9 + block[1][2]*3 + block[0][1]*3 + block[1][1])/(16)); assign_pixel(down[r][c+1] , (block[0][2]*9 + block[1][2]*3 + block[0][1]*3 + block[1][1])/(16*256));
assign_pixel(down[r+1][c] , (block[2][0]*9 + block[1][0]*3 + block[2][1]*3 + block[1][1])/(16)); assign_pixel(down[r+1][c] , (block[2][0]*9 + block[1][0]*3 + block[2][1]*3 + block[1][1])/(16*256));
assign_pixel(down[r+1][c+1] , (block[2][2]*9 + block[1][2]*3 + block[2][1]*3 + block[1][1])/(16)); assign_pixel(down[r+1][c+1] , (block[2][2]*9 + block[1][2]*3 + block[2][1]*3 + block[1][1])/(16*256));
cc += size_in; cc += size_in;
} }
......
...@@ -147,7 +147,7 @@ namespace dlib ...@@ -147,7 +147,7 @@ namespace dlib
{ {
block[rr][cc] = (row_filt[rr][cc]*fe1 + block[rr][cc] = (row_filt[rr][cc]*fe1 +
row_filt[rr+1][cc]*fm + row_filt[rr+1][cc]*fm +
row_filt[rr+2][cc]*fe2)/256; row_filt[rr+2][cc]*fe2);
} }
} }
......
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