'**SUMMARY**
Given an image, finds a chessboard within that image.  Returns the Chessboard featureset.
The Chessboard is typically used for calibration because of its evenly spaced corners.
The single parameter is the dimensions of the chessboard, typical one can be found in \SimpleCV ools\CalibGrid.png
**PARAMETERS**
* *dimensions* - A tuple of the size of the chessboard in width and height in grid objects.
* *subpixel* - Boolean if True use sub-pixel accuracy, otherwise use regular pixel accuracy.
**RETURNS**
A :py:class:`FeatureSet` of :py:class:`Chessboard` objects. If no chessboards are found None is returned.
**EXAMPLE**
>>> img = cam.getImage()
>>> cb = img.findChessboard()
>>> cb.draw()
**SEE ALSO**
:py:class:`FeatureSet`
:py:class:`Chessboard`'

def findChessboard(self, dimensions=(8, 5), subpixel=True):

    corners = cv.FindChessboardCorners(self._getEqualizedGrayscaleBitmap(), dimensions, (cv.CV_CALIB_CB_ADAPTIVE_THRESH + cv.CV_CALIB_CB_NORMALIZE_IMAGE))
    if (len(corners[1]) == (dimensions[0] * dimensions[1])):
        if subpixel:
            spCorners = cv.FindCornerSubPix(self.getGrayscaleMatrix(), corners[1], (11, 11), ((-1), (-1)), ((cv.CV_TERMCRIT_ITER | cv.CV_TERMCRIT_EPS), 10, 0.01))
        else:
            spCorners = corners[1]
        return FeatureSet([Chessboard(self, dimensions, spCorners)])
    else:
        return None
