1

I have 4 points on an image (not perfectly a rectangle, just a 4 point polygon). For example:

enter image description here

I want to extract the image bounded by the 4 points, resulting image: enter image description here

Using Quartz, I can only specify a rectangle to do this. However, i might not have a perfect rectangle all the time, so what's the best way to do this? Thanks

4

1 回答 1

1

What about to use OpenGL "Render to texture" technique? Use those 4 points as input texture coordinates and render straight rectangle to the output texture.

于 2012-09-23T21:48:13.887 回答