How to get the cropped frame (area of interest) on Android ?

  • Last Post 2 weeks ago
鄭宜崴 posted this 3 weeks ago

Your Android OCR sample code is so great,working perfectly!

I have tried to read and understood the source code of the sample,I want to know how can you crop the frame from SurfaceView.

But I can only understand the part of SurfaceViewWithOverlay,I learn how did you draw a Rect on the canvas,I have no idea how can you crop the Rect on per frame.

Could you help me,please?

Anna Fedyushkina posted this 2 weeks ago


As far as I understand you are studying our sample of Real-Time-Recognition and would like to know how the images are cropped by the Area of Interest; in which method it is performed.

As you can see in the startRecognition method of the sample, when the start method is called one of its parameters (the last one) is the areaOfInterest. So that is the start method that crops the image inside itself.

For more information please refer to our documentation: