'**SUMMARY**
Find blobs  will look for continuous
light regions and return them as Blob features in a FeatureSet.  Parameters
specify the binarize filter threshold value, and minimum and maximum size for blobs.
If a threshold value is -1, it will use an adaptive threshold.  See binarize() for
more information about thresholding.  The threshblocksize and threshconstant
parameters are only used for adaptive threshold.
**PARAMETERS**
* *threshval* - the threshold as an integer or an (r,g,b) tuple , where pixels below (darker) than thresh are set to to max value,
and all values above this value are set to black. If this parameter is -1 we use Otsu\'s method.
* *minsize* - the minimum size of the blobs, in pixels, of the returned blobs. This helps to filter out noise.
* *maxsize* - the maximim size of the blobs, in pixels, of the returned blobs.
* *threshblocksize* - the size of the block used in the adaptive binarize operation. *TODO - make this match binarize*
* *appx_level* - The blob approximation level - an integer for the maximum distance between the true edge and the
approximation edge - lower numbers yield better approximation.
.. warning::
This parameter must be an odd number.
* *threshconstant* - The difference from the local mean to use for thresholding in Otsu\'s method. *TODO - make this match binarize*
**RETURNS**
Returns a featureset (basically a list) of :py:class:`blob` features. If no blobs are found this method returns None.
**EXAMPLE**
>>> img = Image("lenna")
>>> fs = img.findBlobs()
>>> if( fs is not None ):
>>>     fs.draw()
**NOTES**
.. Warning::
For blobs that live right on the edge of the image OpenCV reports the position and width
height as being one over for the true position. E.g. if a blob is at (0,0) OpenCV reports
its position as (1,1). Likewise the width and height for the other corners is reported as
being one less than the width and height. This is a known bug.
**SEE ALSO**
:py:meth:`threshold`
:py:meth:`binarize`
:py:meth:`invert`
:py:meth:`dilate`
:py:meth:`erode`
:py:meth:`findBlobsFromPalette`
:py:meth:`smartFindBlobs`'

def findBlobs(self, threshval=(-1), minsize=10, maxsize=0, threshblocksize=0, threshconstant=5, appx_level=3):

    if (maxsize == 0):
        maxsize = (self.width * self.height)
    blobmaker = BlobMaker()
    blobs = blobmaker.extractFromBinary(self.binarize(threshval, 255, threshblocksize, threshconstant).invert(), self, minsize=minsize, maxsize=maxsize, appx_level=appx_level)
    if (not len(blobs)):
        return None
    return FeatureSet(blobs).sortArea()
