code: function(type){
    var regExp = /CV_([0-9]+)([A-Z]+)([0-9]+)/;
    for(var k in cv.Constants) if(cv.Constants.hasOwnProperty(k) && k.match(regExp) && cv.Constants[k] === type){
      var bytes, channels, dataType;
      k.replace(regExp, function(all, b, l, c){
        bytes = b;
        channels = c;
        dataType = l[0]
      });
  
      return {
        bytes : parseInt(bytes),
        channels : !isNaN(parseInt(channels)) && parseInt(channels),
        dataType : dataType,
        label : k
      };
    }
  }
docs: we use the Opencv constants naming convention to extract the number of bytes (8, 16, 32, 64), and the number of channels from constants names