To be able to extract the actual "paper of interest" from an image, we need to perform a perspective transform. I think there is two possible ways of doing this: using the Android native Matrix class or using OpenCV for Android. Here are a few hints on both of these.
Matrix class
The Matrix class has a method called "setPolyToPoly", which is most likely the thing we need: Matrix.setPolyToPoly
To apply this Matrix to an ImageView should work something like this:
I don't know about anti aliasing in this kind of setup and I don't know how to automatically find the corners of the page. However, I'm sure these things can be handled.
OpenCV
OpenCV is a great library for image manipulation and can be used in Android: Android - OpenCV
In OpenCV, the thing we look for is the "getPerspectiveTransform". Here's a Tutorial on that.
I guess the preferred option is to go with the Android native stuff, as OpenCV might add a lot of overhead to the project.
To be able to extract the actual "paper of interest" from an image, we need to perform a perspective transform. I think there is two possible ways of doing this: using the Android native Matrix class or using OpenCV for Android. Here are a few hints on both of these.
Matrix class The Matrix class has a method called "setPolyToPoly", which is most likely the thing we need: Matrix.setPolyToPoly To apply this Matrix to an ImageView should work something like this:
I don't know about anti aliasing in this kind of setup and I don't know how to automatically find the corners of the page. However, I'm sure these things can be handled.
OpenCV OpenCV is a great library for image manipulation and can be used in Android: Android - OpenCV In OpenCV, the thing we look for is the "getPerspectiveTransform". Here's a Tutorial on that.
I guess the preferred option is to go with the Android native stuff, as OpenCV might add a lot of overhead to the project.