Re: Pull request: fix tv denoise
I'd agree that `weight` is the more natural variable to change (that's
actually the parameter I was trying to change when I found this error). I've
added this change to a new branch and submitted this as a separate pull
request. Others should probably weigh in on the argument order, but both
options are available in the pull requests.
-Tony
On Thu, Jun 23, 2011 at 11:02 AM, Maël Primet
Hum.. then I guess we should rather change the other functions to im, weight, eps, no?
it makes more sense to be able to call denoise(image, weight) directly
On Thu, Jun 23, 2011 at 16:58, Tony Yu
wrote: On Thu, Jun 23, 2011 at 10:47 AM, Maël Primet
wrote: Why would you do that? People will usually change the weight, not eps, so it is more natural to set weight as the second argument?
The point of the patch isn't to set the order of arguments based on preference, but instead, based on consistency. The other functions (`tv_denoise` and `_tv_denoise_3d`) have `eps` followed by `weight`. Most importantly, the arguments passed to `_tv_denoise_2d` are in this order, so that setting the keyword arg `eps` in `tv_denoise` actually adjusts the `weight` argument of `_tv_denoise_2d` (and vice-versa). (See line 268 in https://github.com/stefanv/scikits.image/blob/master/scikits/image/filter/tv... )
-Tony
participants (1)
-
Tony Yu