'**SUMMARY**
This function returns the gray value for a particular image pixel given a specific row and column.
.. Warning::
This function will always return pixels in RGB format even if the image is BGR format.
**PARAMETERS**
* *x* - Int the x pixel coordinate.
* *y* - Int the y pixel coordinate.
**RETURNS**
A gray value integer between 0 and 255.
**EXAMPLE**
>>> img = Image(logo)
>>> color = img.getGrayPixel(10,10)
.. Warning::
We suggest that this method be used sparingly. For repeated pixel access use python array notation. I.e. img[x][y].'

def getGrayPixel(self, x, y):

    retVal = None
    if ((x < 0) or (x >= self.width)):
        logger.warning('getGrayPixel:    X    value    is    not    valid.')
    elif ((y < 0) or (y >= self.height)):
        logger.warning('getGrayPixel:    Y    value    is    not    valid.')
    else:
        retVal = cv.Get2D(self._getGrayscaleBitmap(), y, x)
        retVal = retVal[0]
    return retVal
