Skip to main content

Module geometry

Module geometry 

Source

Functions§

approx_poly_dp
Approximate polygon — exact port of CV.approxPolyDP from js-aruco2. This version handles CLOSED contours correctly using the circular indexing approach from the JS implementation.
clockwise_corners
Ensure candidate corners are in clockwise order. Port of AR.Detector.prototype.clockwiseCorners from JS.
count_non_zero
Count non-zero pixels in a rectangular region of a grayscale image. Port of CV.countNonZero from JS.
get_extreme_corner
Select the corner of a polygon that is most “extreme” in the given directions. Port of ArUcoScanner.prototype._getExtreme from JS. mode_x: true for max, false for min mode_y: true for max, false for min
is_contour_convex
min_edge_length
not_too_near
Filter out candidates that are too close to each other. Port of AR.Detector.prototype.notTooNear from JS.
perimeter
polygon_area
refine_corner
Refine a corner position using image gradients (sub-pixel precision). Port of ArUcoScanner.prototype._refineCorner from original JS engine.