def each_channel(image_filter, image, *args, **kwargs):
 c_new = [image_filter(c, *args, **kwargs) for c in image.T]
 return np.array(c_new).T

def each_channel ( image_filter , image , * args , ** kwargs ) : c_new = [ image_filter ( c , * args , ** kwargs ) for c in image . T ] return np . array ( c_new ) . T
return color image by applying image_filter on channels of image .