templateImage_ = OpenCvUtils.convertBufferedImage(templateImage_,BufferedImage.TYPE_INT_ARGB);
cameraImage_ = OpenCvUtils.convertBufferedImage(cameraImage_, BufferedImage.TYPE_INT_ARGB);
Mat templateImage = OpenCvUtils.toMat(templateImage_);
Mat cameraImage = OpenCvUtils.toMat(cameraImage_);
Mat roiImage = new Mat(cameraImage, new Rect(roiX, roiY, roiWidth, roiHeight));
// http://stackoverflow.com/questions/17001083/opencv-template-matching-example-in-android
Mat resultImage = new Mat(
roiImage.cols() - templateImage.cols() + 1,
roiImage.rows() - templateImage.rows() + 1,