subclass of UIView with ability of perspective correction
before:
after:
Easy to use.
- Import
KYPerspectiveCorrectionView.h
, layout just as a normal UIView. - Set the image you want to do perspective correction using instance method
setImage:
. - Tap and draw the control points to the vertexes of the rectangle.
- Use instance method
perspectiveCorrection
to get the result UIImage. - You can also enable the rectangle detection by setting the property
enableRectangleDetection
to YES.