No problem @Tony. Sorry, but I do not understand what this decorator does. Could you provide a short example? Johannes Schönberger Am 16.10.2012 um 05:30 schrieb Tony Yu <tsyu80@gmail.com>:
After my failed @grayscale decorator suggestion (sorry again Johannes for all the unnecessary work this caused you), I was thinking it might be nice to add an @each_channel decorator. The basic idea is that the decorator would check if the input image is RGB, and applies the grayscale function to each channel of an RGB image.
Cheers, -Tony
--
On Tue, Oct 16, 2012 at 7:13 AM, Schönberger Johannes <hannesschoenberger@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
participants (2)
-
Schönberger Johannes
-
Stéfan van der Walt