OpenCV for Android (and the new Java API) has its own way to create ROI's.
All you have to do is to call the submat method of your Mat object. If I am not mistaken, calling submat does not create a copy of that image region, if you want a copy you can use copyTo on the submat for that purpose.
Mat roi = inputFrame.submat(rowStart, rowEnd, colStart, colEnd);
You can call submat in 3 different ways, check the links for more details:
- submat(int rowStart, int rowEnd, int colStart, int colEnd)
- submat(Range rowRange, Range colRange)
- submat(Rect roi)