gfacciol / bm3d

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

about parameter tauMatch #1

Closed TZhaoPKU closed 7 years ago

TZhaoPKU commented 8 years ago

Hi, I'm little confused about the value of tauMatch (function bm3d_1st_step): const float tauMatch = (chnls == 1 ? 3.f : 1.f) * (sigma_table[0] < 35.0f ? 2500 : 5000) I'm just wondering why do we use tauMatch = 3\sigma when the input image has single channel? Thank you!

gfacciol commented 8 years ago

The comment of tauMatch says "threshold used to determine similarity between patches". It's the threshold on the mean squared distance below which two patches are declared similar. If the patches are identical the distance is all due to the image noise. Now, since a color patch has three times more pixels, the noise variance is expected to be 1/3 the one of a monochrome patch.