Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Discrepancy with output of nlmeans.py #1011
I am working on adaptive denoising patch for dipy, and I noticed an interesting catch in the current implementation of nlmeans.py. I have discussed this with @Garyfallidis
Ideally as per the equations (given below) the output should get more smooth on choosing the larger block/patch sizes (if we refer to this or [coupe2008]), but that is not the case. (in fact there is no blockwise approach of averaging in denspeed.pyx)
In fact for all cases where patch_size = block_size we get the same output!
I have been working to solve this bug and will make a PR soon with some changes in denspeed.pyx file. I would like to know your comments on the same.
Just to be clear: is the output identical in these two cases?
On Wed, Mar 23, 2016 at 11:20 AM, Riddhish Bhalodia <
One might reasonably expect that perhaps the "block size" means that the the central pixel of the patch would traverse a region equal to the block size, but that is not what the code actually does.
If you look at the function
I would recommended raising an error if the block radius is not strictly greater than the patch radius, otherwise, no denoising is actually being done.