Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to create a Scalar with variable number of channels?

I want to create a Scalar which has a variable(integer) number of channels, hopefully all the channels being 0.

int channels = 2;
cv::Scalar(...); //Create Scalar with "channels" number of channels, all with the value of 0