'**SUMMARY**
This method returns the colors in the palette of the image. A palette is the
set of the most common colors in an image. This method is helpful for segmentation.
**PARAMETERS**
* *bins* - an integer number of bins into which to divide the colors in the image.
* *hue*  - if hue is true we do only cluster on the image hue values.
* *centroids* - A list of tuples that are the initial k-means estimates. This is handy if you want consisten results from the palettize.
**RETURNS**
A numpy array of the BGR color tuples.
**EXAMPLE**
>>> p = img.getPalette(bins=42)
>>> print p[2]
**NOTES**
The hue calculations should be siginificantly faster than the generic RGB calculation as
it works in a one dimensional space. Sometimes the underlying scipy method freaks out
about k-means initialization with the following warning:
.. Warning::
One of the clusters is empty. Re-run kmean with a different initialization.
This shouldn\'t be a real problem.
**SEE ALSO**
:py:meth:`rePalette`
:py:meth:`drawPaletteColors`
:py:meth:`palettize`
:py:meth:`getPalette`
:py:meth:`binarizeFromPalette`
:py:meth:`findBlobsFromPalette`'

def getPalette(self, bins=10, hue=False, centroids=None):

    self._generatePalette(bins, hue, centroids)
    return self._mPalette
