I'm trying to display the center 1/3 of my phone's screen on real time, like this: https://i.stack.imgur.com/qDdAb.jpg
The idea is to limitate the user view to 1/3 of the screen, in the center (vertical).
I've trying to do the precessing in the onCameraFrame
method.
I tried to create a ROI like this:
roi = new Rect(0, height/3, width, height/3);
mRgbaCropped = mRgba.submat(roi);
return mRgbaCropped;
But all that I got is a black screen. Just to test I also tried to re-size the roi
to:
roi = new Rect(50, 50, 50, 50);
But no success. I'm not sure if what I'm doing is correct. What am i doing wrong?