'**SUMMARY**
morphologyClose applies a morphological close operation which is effectively
a dilation operation followed by a morphological erosion. This operation
helps to \'bring together\' or \'close\' binary regions which are close together.
* See: `Closing <http://en.wikipedia.org/wiki/Closing_(morphology)>`_
* See: `Morphology from OpenCV <http://opencv.willowgarage.com/documentation/cpp/image_filtering.html#cv-morphologyex>`_
* Example Use: Use when a part, which should be one blob is really two blobs.
* Example Code: ./examples/MorphologyExample.py
**RETURNS**
A SimpleCV image.
**EXAMPLE**
>>> img = Image("lenna")
>>> derp = img.binarize()
>>> derp.morphClose.show()
**SEE ALSO**
:py:meth:`erode`
:py:meth:`dilate`
:py:meth:`binarize`
:py:meth:`morphOpen`
:py:meth:`morphGradient`
:py:meth:`findBlobsFromMask`'

def morphClose(self):

    retVal = self.getEmpty()
    temp = self.getEmpty()
    kern = cv.CreateStructuringElementEx(3, 3, 1, 1, cv.CV_SHAPE_RECT)
    try:
        cv.MorphologyEx(self.getBitmap(), retVal, temp, kern, cv.MORPH_CLOSE, 1)
    except:
        cv.MorphologyEx(self.getBitmap(), retVal, temp, kern, cv.CV_MOP_CLOSE, 1)
    return Image(retVal, colorSpace=self._colorSpace)
