'**SUMMARY**
Apply LUT allows you to apply a LUT (look up table) to the pixels in a image. Each LUT is just
an array where each index in the array points to its value in the result image. For example
rLUT[0]=255 would change all pixels where the red channel is zero to the value 255.
**PARAMETERS**
* *rLUT* - a tuple or np.array of size (256x1) with dtype=uint8.
* *gLUT* - a tuple or np.array of size (256x1) with dtype=uint8.
* *bLUT* - a tuple or np.array of size (256x1) with dtype=uint8.
.. warning::
The dtype is very important. Will throw the following error without it:
error: dst.size() == src.size() && dst.type() == CV_MAKETYPE(lut.depth(), src.channels())
**RETURNS**
The SimpleCV image remapped using the LUT.
**EXAMPLE**
This example saturates the red channel:
>>> rlut = np.ones((256,1),dtype=uint8)*255
>>> img=img.applyLUT(rLUT=rlut)
NOTE:
-==== BUG NOTE ====-
This method seems to error on the LUT map for some versions of OpenCV.
I am trying to figure out why. -KAS'

def applyLUT(self, rLUT=None, bLUT=None, gLUT=None):

    r = self.getEmpty(1)
    g = self.getEmpty(1)
    b = self.getEmpty(1)
    cv.Split(self.getBitmap(), b, g, r, None)
    if (rLUT is not None):
        cv.LUT(r, r, cv.fromarray(rLUT))
    if (gLUT is not None):
        cv.LUT(g, g, cv.fromarray(gLUT))
    if (bLUT is not None):
        cv.LUT(b, b, cv.fromarray(bLUT))
    temp = self.getEmpty()
    cv.Merge(b, g, r, None, temp)
    return Image(temp)
