Pull request: fix tv denoise

Tony Yu tsyu80 at gmail.com
Thu Jun 23 11:24:24 EDT 2011


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 <mael.primet at gmail.com> wrote:

> 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 <tsyu80 at gmail.com> wrote:
>
>>
>>
>> On Thu, Jun 23, 2011 at 10:47 AM, Maël Primet <mael.primet at gmail.com>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_denoise.py
>> )
>>
>> -Tony
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-image/attachments/20110623/1ea66c3e/attachment.html>


More information about the scikit-image mailing list