Ask Your Question

Revision history [back]

You can try like this :

 vector<Mat> x;
 split(x,src)
 vector<double> minChannel;
 vector<double> maxChannel;
 minChannel.resize(x.size());
 maxChannel.resize(x.size());
 for (int i=0i<x.size();i++)
      minMaxLoc(x[i],&minChannel[i],&maxChannel[i]);

resuts are in vectors minChannels and maxChannels

You can try like this :

 vector<Mat> x;
 split(x,src)
 vector<double> minChannel;
 vector<double> maxChannel;
 minChannel.resize(x.size());
 maxChannel.resize(x.size());
 for (int i=0i<x.size();i++)
i=0;i<x.size();i++)
      minMaxLoc(x[i],&minChannel[i],&maxChannel[i]);

resuts are in vectors minChannels and maxChannels

You can try like this :

 vector<Mat> x;
 split(x,src)
split(src,x)
 vector<double> minChannel;
 vector<double> maxChannel;
 minChannel.resize(x.size());
 maxChannel.resize(x.size());
 for (int i=0;i<x.size();i++)
      minMaxLoc(x[i],&minChannel[i],&maxChannel[i]);

resuts are in vectors minChannels and maxChannels