gfacciol / bm3d

GNU General Public License v3.0
96 stars 24 forks source link

Precompute_BM function error? #10

Closed qjyun99 closed 5 years ago

qjyun99 commented 5 years ago

Dear
Is there any error in line 1375?
for (int di = - (int) nHW; di < 0; di++)

*// if (sum_table[-dj + nHW + (-di) Ns][k_r] < threshold) //should be

if (sum_table[-dj + nHW + (-di) Ns][k_r + di width + dj] < threshold)** table_distance.push_back(make_pair( sum_table[-dj + nHW + (-di) Ns][k_r + di width + dj] , k_r + di * width + dj));

tehret commented 5 years ago

Thanks for discovering this bug. We fixed it.