'Extract blobs using a color model
img        - The input image
colormodel - The color model to use.
minsize    - The minimum size of the returned features.
maxsize    - The maximum size of the returned features 0=uses the default value.
Parameters:
img - Image
colormodel - ColorModel object
minsize - Int
maxsize - Int'

def extractUsingModel(self, img, colormodel, minsize=10, maxsize=0):

    if (maxsize <= 0):
        maxsize = (img.width * img.height)
    gray = colormodel.threshold(img)
    blobs = self.extractFromBinary(gray, img, minArea=minsize, maxArea=maxsize)
    retVal = sorted(blobs, key=(lambda x: x.mArea), reverse=True)
    return FeatureSet(retVal)
