import { Corners, Point, Rect } from '../types'; import { VisitedPoints } from '../utils/VisitedPoints'; export declare type Edge = Int32Array; export interface Shape { bounds: Rect; edges: { top: Edge; right: Edge; bottom: Edge; left: Edge; }; } /** * Finds a shape in a binarized image by looking for adjacent pixels of a * specific color starting at a given point. */ export declare function findShape(imageData: ImageData, startingPoint: Point, visitedPoints?: VisitedPoints, { color }?: { color?: number | undefined; }): Shape; export interface ParseRectangleResult { isRectangle: boolean; angles: [number, number, number, number]; } /** * Determines whether the given corners make for a roughly rectangular shape. * The amount of allowed error can be controlled. * * @param corners the corners to check * @param param1.allowedErrorAngle the angle in radians to allow in error */ export declare function parseRectangle(corners: Corners, { allowedErrorAngle }?: { allowedErrorAngle?: number | undefined; }): ParseRectangleResult;