Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You do not have to write your own conversion function as you can convert an image with the built-in cvtColor function.

So for converting an RGB image to grayscale you can call cvtColor(src, dst, CV_RGB2GRAY).