1 | initial version |
Mat mRgb = ...
List<Mat> lRgb = new ArrayList<Mat>(3);
Core.split(mRgb, lRgb);
Mat mR = lRgb.get(0);
Mat mG = lRgb.get(1);
Mat mB = lRgb.get(2);
Mat mSum = new Mat();
Mat mEmpty = new Mat();
Core.add(mR, mG, mSum, mEmpty, CvType.CV_16UC1);
Core.add(mSum, mB, mSum, mEmpty, CvType.CV_16UC1);
double maxSum = Core.norm(mSum, Core.NORM_INF);