1 | initial version |

there's a builtin sum function for that:

e.g. if you have a (bgr) image:

```
Mat img = imread("my.png");
Scalar s = sum(img);
//s[0] = sum of blue channel,
//s[1] = sum of green channel,
//s[2]... now guess what...
```

2 | No.2 Revision |

there's a builtin sum function for that:

e.g. if you have a (bgr) image:

```
Mat img = imread("my.png");
Scalar s = sum(img);
//s[0] = sum of blue channel,
//s[1] = sum of green channel,
```~~//s[2]... now guess what...
~~//s[2] = sum of red channel,

Copyright OpenCV foundation, 2012-2018. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.