@classmethod
def trim(cls, im, vmin=None):
    """@return (yMin, yMax, xMin, xMax)"""
    if vmin is None:
        vmin = im.min()
    xs = im.max(0) > vmin
    ys = im.max(1) > vmin
    xMin = max(0, xs.argmax() - 5)
    yMin = max(0, ys.argmax() - 5)
    xMax = min(len(xs), len(xs) + 5 - xs[::-1].argmax())
    yMax = min(len(ys), len(ys) + 5 - ys[::-1].argmax())
    return yMin, yMax, xMin, xMax
