puffinsoft

jscanify: Detect and Straighten Paper in Images

jscanify is a JavaScript document-scanning library for detecting paper in images and correcting perspective. It uses OpenCV.js and supports browser and Node.js workflows, including live camera input.

View on GitHub Compare
Stars
1.8k
Forks
81
Stars, last 30 days
+13

Our take

Health score

21/100

How it is scored
Activity
28
Community
15
Issues
21
Pull requests
20

+13 stars in the last 30 days

  • Fewer contributors than 82% of the projects we track

Project history

Daily GitHub snapshots since Oct 7, 2026. History covers stars and forks; health signals are not tracked historically.

Selected snapshot

Stars

1,792

Forks

81

Change since Nov 17, 2026: 0 stars·0 forks

Overview

jscanify helps web and Node.js developers turn images of paper documents into highlighted or perspective-corrected scans. It uses OpenCV.js to detect paper boundaries, making it useful when an application needs basic document capture without building image-processing logic from scratch.

It is a fit for client-side scanning workflows where users photograph or show a document to a camera. Detection quality depends on the image and scene, so it is not a substitute for a dedicated OCR or document-management system.

Key Features

  • Detect and highlight paper boundaries in images.
  • Extract paper regions with perspective correction.
  • Process images in browser-based applications.
  • Support Node.js use, with setup differences from browser use.
  • Work with live camera input through browser media APIs.
  • Suppress glare and support multi-colored paper, according to the project README.
  • Provide a debugging tool for inspecting highlighting and extraction results.

Use Cases

  • Frontend developers can add document capture to a web form where users submit photos of paper documents.
  • Teams building browser-based scanning apps can correct perspective before saving or exporting a captured page.
  • Developers can highlight detected paper in a live camera preview to guide users during document capture.
  • Node.js developers can incorporate paper detection and extraction into server-side image workflows, following the project's Node.js-specific setup guidance.

Getting Started

Install from npm:

npm i jscanify

See the README and wiki documentation for usage details, including OpenCV.js setup and Node.js differences.

Considerations

  • OpenCV.js must be loaded for browser use, and the README notes that loading it can take time.
  • The project recommends a flat surface and solid background for optimal paper detection.
  • The README advises waiting until the browser window has loaded before using jscanify, so OpenCV is available.
  • Node.js setup differs from browser usage and requires consulting the project documentation.
  • The library focuses on paper detection and extraction. OCR and PDF export are not described as built-in features.

Found this useful?

Share it with someone who would like jscanify.