title: Can I determine the number of channels in cv::Mat Opencv
body: <p>This maybe rudimentary, but is it possible to know how many channels a <code>cv::Mat</code> has? For eg, we load an RGB image, I know there are 3 channels. I do the following operations, just to get the laplacian of the image, which is straight from the Opencv Documentation.</p>
  
  <pre><code>int main(int argc, char **argv)
  {
       Mat src = imread(argv[1],1),src_gray,dst_gray,abs_dst_gray;
  
       cvtColor(src,src_gray,COLOR_BGR2GRAY);
       GaussianBlur( src, src, Size(3,3), 0, 0, BORDER_DEFAULT );
       Laplacian(src_gray,dst_gray,ddepth,kernel_size,scale,delta,BORDER_DEFAULT);
       convertScaleAbs(dst_gray,abs_dst_gray);
  }
  </code></pre>
  
  <p>After converting to Grayscale, we should have only one channel. But how can I determine the number of channels of <code>abs_dst_gray</code> in program? Is there any function to do this? Or is it possible through any other method, which should be written by the programmer? Please help me here.</p>
  
  <p>Thanks in advance.</p>