1 | initial version |
Both solution work, thanks guys.
The first one (berak's) is more efficient without the conversions.
The second one (Guanta's) gets kudos for allowing the use of operator+ etc., looks better in code.
I also learned about OpenCV accumulator images meanwhile, worth a read for anyone interested.