image-js
Version:
Image processing and manipulation in JavaScript
18 lines • 571 B
JavaScript
import { getContourMoore } from "./getContourMoore.js";
import { getContourPavlidis } from "./getContourPavlidis.js";
/**
* Finds external contour of the mask.
* @param mask - Mask to find contours from.
* @param options - GetExternalContourOptions.
* @returns Array of contour points.
*/
export function getExternalContour(mask, options = {}) {
const { allowCorners = false } = options;
if (allowCorners) {
return getContourPavlidis(mask);
}
else {
return getContourMoore(mask);
}
}
//# sourceMappingURL=getExternalContour.js.map