Skip to main content

Module rectangles

Module rectangles 

Source
Available on crate feature rectangles only.
Expand description

Rectangle + document-segmentation detection.

VNDetectRectanglesRequest finds quadrilaterals (signs, photos, book pages); VNDetectDocumentSegmentationRequest finds full document boundaries — both return the same observation shape.

Structs§

RectangleObservation
A detected quadrilateral with axis-aligned bounding box plus individual corner points (in normalised image coordinates, bottom-left origin).
RectangleOptions
Optional tuning for detect_rectangles_in_path. Pass default() to use Apple’s defaults.

Functions§

detect_document_segmentation_in_path
Detect a full document’s boundary in the image at path. Returns at most one rectangle (the document outline).
detect_rectangles_in_path
Detect rectangles in the image at path.