Near-native speed
Rust/WASM handles the CPU-heavy edge detection; a fast bilinear inverse-map warp does perspective correction in under 10ms.
Professional-grade edge detection and perspective correction in the browser and Node.js, powered by Rust/WebAssembly. Under 100KB, ~10ms transforms.

npm install scanicpnpm add scanicyarn add scanicbun add scanicimport { scanDocument } from 'scanic'
// Detect the document and get a perspective-corrected crop
const result = await scanDocument(imageElement, { mode: 'extract' })
if (result.success) {
document.body.appendChild(result.output) // a <canvas> with the flattened page
}