Multi-matrix per-pixel mins and max c++

Folks, first post here. I am looking for the fastest way to find the per-pixel mins and maxes in a list of Mat objects. Ideally the result would be 2 matrices, one with mins at each pixel location, one with max.
I have tried the docs, but find doxygen generated “documentation” pretty much useless.
Thanks!
carl.

i don’t think, there’s a single-shot function for this. but we have max() and min(), so you could do something like:

vector<Mat> imgs;
Mat fin = imgs[0];
for (size_t i=1; i<imgs.size(); i++)
    cv::max(fin, imgs[i], fin);

Berak, thanks for your reply. Yes, I had done that, but was hoping that there was a more matlab-like version. Performance is an issue.
Thanks again!
carl.