def felzenszwalb(image, scale=1, sigma=0.8, min_size=20, multichannel=True):
 if ((not multichannel) and (image.ndim > 2)):
  raise ValueError('This algorithm works only on single or multi-channel 2d images. ')
 image = np.atleast_3d(image)
 return _felzenszwalb_cython(image, scale=scale, sigma=sigma, min_size=min_size)

def felzenszwalb ( image , scale = 1 , sigma = 0.8 , min_size = 20 , multichannel = True ) : if ( ( not multichannel ) and ( image . ndim > 2 ) ) : raise ValueError ( 'This algorithm works only on single or multi-channel 2d images. ' ) image = np . atleast_3d ( image ) return _felzenszwalb_cython ( image , scale = scale , sigma = sigma , min_size = min_size )
computes felsenszwalbs efficient graph based image segmentation .