1 | initial version |
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.
2 | No.2 Revision |
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.
Note that reshape() does not reallocate or move elements, just inteprets their order in a different way, so it it very fast.