Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

What's the best way to create a 3-channel grayscale from BGR?

Hi,

I'm trying to implement a generic algorithm that works with images in fourier space. Grayscale images are normally mxn while bgr/rgb are mxnx3 for each of the color channels. I've tried calling cvtColor in python with dstCn=3, but this still produces a mxn matrix. Is there an opencv/pythonic way to create an mxnx3 grayscale matrix from bgr format?

Thanks