'**SUMMARY**
Apply a color correction curve in RGB space. This method can be used
to change values for each channel. The curves are :py:class:`ColorCurve` class objects.
**PARAMETERS**
* *rCurve* - the red ColorCurve object, or appropriately formatted list
* *gCurve* - the green ColorCurve object, or appropriately formatted list
* *bCurve* - the blue ColorCurve object, or appropriately formatted list
**RETURNS**
A SimpleCV Image
**EXAMPLE**
>>> img = Image("lenna")
>>> rc = ColorCurve([[0,0], [100, 120], [180, 230], [255, 255]])
>>> gc = ColorCurve([[0,0], [90, 120], [180, 230], [255, 255]])
>>> bc = ColorCurve([[0,0], [70, 110], [180, 230], [240, 255]])
>>> img2 = img.applyRGBCurve(rc,gc,bc)
**SEE ALSO**
:py:class:`ColorCurve`
:py:meth:`applyHLSCurve`'

def applyRGBCurve(self, rCurve, gCurve, bCurve):

    if isinstance(bCurve, list):
        bCurve = ColorCurve(bCurve)
    if isinstance(gCurve, list):
        gCurve = ColorCurve(gCurve)
    if isinstance(rCurve, list):
        rCurve = ColorCurve(rCurve)
    tempMat = np.array(self.getMatrix()).copy()
    tempMat[:, :, 0] = np.take(bCurve.mCurve, tempMat[:, :, 0])
    tempMat[:, :, 1] = np.take(gCurve.mCurve, tempMat[:, :, 1])
    tempMat[:, :, 2] = np.take(rCurve.mCurve, tempMat[:, :, 2])
    image = cv.CreateImageHeader((tempMat.shape[1], tempMat.shape[0]), cv.IPL_DEPTH_8U, 3)
    cv.SetData(image, tempMat.tostring(), ((tempMat.dtype.itemsize * 3) * tempMat.shape[1]))
    return Image(image, colorSpace=self._colorSpace)
