def _generate_segments(im_orig, scale, sigma, min_size):
<EOL>im_mask = skimage.segmentation.felzenszwalb(<EOL>skimage.util.img_as_float(im_orig), scale=scale, sigma=sigma,<EOL>min_size=min_size)<EOL>im_orig = numpy.append(<EOL>im_orig, numpy.zeros(im_orig.shape[:<NUM_LIT:2>])[:, :, numpy.newaxis], axis=<NUM_LIT:2>)<EOL>im_orig[:, :, <NUM_LIT:3>] = im_mask<EOL>return im_orig<EOL>
segment smallest regions by the algorithm of Felzenswalb and
Huttenlocher