Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

convertTo() does not change the channel count, only the depth (e.g. 8U -> 32F)

instead use:

cvtColor(src,dst,COLOR_BGR2BGRA);

to go from 3 to 4 channels.