You can reshape() it to a 3 cols* (initial_rows*initial_cols) rows, then use cv::reduce() by summing up the cols, then reshape it back to initial_rows-by-initial_cols. You won't need the split.
You can reshape() it to a 3 cols* (initial_rows*initial_cols) rows, then use cv::reduce() by summing up the cols, then reshape it back to initial_rows-by-initial_cols. You won't need the split.