Apply a Transform with perspective

Asked

Viewed 72 times

4

I would like to make the selection by perspective in a imageview.

Where I select the 4 corners of the image and cut, following this idea:

inserir a descrição da imagem aqui

I searched all day and found little thing, I found this link with the solution, only to Ios:

And I found something related to Opencv.

But none of them helped me, I would need something like this:

inserir a descrição da imagem aqui

Where I take the photo, I choose the 4 corners to cut in proportion and save the image.

Someone can give me a light?

  • 1

    Leonardo, I found this, using Opencv and automatic detection. Does it help or do you prefer to "crop even according to the points marked by the user"? http://stackoverflow.com/questions/32179805/rectangle-detection-using-opencv-in-android

  • Says Matthew, the ideal would be that the user could choose the 4 points, because he will take a photo of a race, and then select the points and leave only the proof in the image, without pieces of the table, for example.

  • 1

    Leonardo, then you will really have to implement some customized with Surfaceview/

  • Hey, Matthew, thanks for the tip, man! I was able to find this link and I was able to do the effect with the Opencv lib: https://github.com/jhansireddy/AndroidScannerDemo

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.