How can I print whether a cvMat is RGB, BGR or GRAY? The reason I need to do this is because I need to convert an image to GRAY and have been given errors such as this when trying CV_RGB2GRAY
OpenCV Error: Assertion failed (scn == 3 || scn == 4) in cvtColor