PxCutout Class
@interface PxCutout : NSObject
A document (or other) region detected in a picture, described as an array of points linked in clockwise order.
Overview
A cutout currently holds four points (a quadrilateral); a future release may use more points to describe more complex regions. A cutout starts in the image’s native orientation, untransformed, and can be transformed for display and restored back to the native orientation.
Instance Properties
| Name | Summary |
|---|---|
| bounds | The cutout bounds after transformation is applied. |
| isDefined | Whether the cutout is a detected document. When false, detection found none and the cutout covers the entire image. |
| isValid | Whether the cutout is geometrically valid: points in the correct order and no self-intersection. Useful to flag an invalid user-edited cutout. |
| numPoints | The number of points in the rawPoints array. |
| rawPoints | The cutout points in their original, untransformed image space. |
| transformation | The transformation matrix applied to the cutout points. |
Instance Methods
| Name | Summary |
|---|---|
| applyTransform | Applies the current transformation to the points and resets it to identity. |
| copy | Returns a copy of this cutout. |
| expand | Expands the cutout to cover its entire origin image; isDefined becomes false. |
| getPoints: | Writes the transformed cutout points into the caller’s buffer. |
| reorder | Reorders the points to start from the top-left corner, going clockwise. |
| reset: | Resets the cutout to its initial state covering a region of the given size. |
| setPoints:: | Replaces the transformed cutout points. |
| transformToOrientation: | Transforms the cutout to the given orientation. |
Relationships
Inherits From
- NSObject