CIRectangleFeature
Information about a rectangular region detected in a still or video image.
Declaration
class CIRectangleFeatureOverview
A detected rectangle feature is not necessarily rectangular in the plane of the image; rather, the feature identifies a shape that may be rectangular in space (for example a book on a desk) but which appears as a four-sided polygon in the image. The properties of a CIRectangleFeature object identify its four corners in image coordinates.
You can use rectangle feature detection together with the CIPerspectiveCorrection filter to transform the feature to a normal orientation.
To detect rectangles in an image or video, choose CIDetectorTypeRectangle when initializing a CIDetector object, and use the CIDetectorAspectRatio and CIDetectorFocalLength options to specify the approximate shape of rectangular features to search for. The detector returns at most one rectangle feature, the most prominent found in the image.