each_channel decorator
Schönberger Johannes
hannesschoenberger at gmail.com
Tue Oct 16 16:54:23 EDT 2012
OK, so it is basically just a decorator which calls color.rgb2gray and passes the converted image to the function?
Johannes Schönberger
Am 16.10.2012 um 20:42 schrieb Stéfan van der Walt <stefan at sun.ac.za>:
> On Tue, Oct 16, 2012 at 7:13 AM, Schönberger Johannes
> <hannesschoenberger at gmail.com> wrote:
>> Sorry, but I do not understand what this decorator does. Could you provide a short example?
>
> @each_channel
> def some_gray_level_filter():
> return gray_image
>
> image = data.something()
> gray_image = color.rgb2gray(image)
>
> some_gray_level_filter(gray_image)
> some_gray_level_filter(image) <-- this works too
>
> --
>
>
More information about the scikit-image
mailing list