jscanify: The Javascript Document Scanning Library
This repository profile is provided by osrepos.com, an open source repository discovery platform.

Summary
jscanify is a powerful Javascript library designed for document scanning, offering features such as paper detection, distortion correction, glare suppression, and multi-colored paper support. Built with `opencv.js`, it provides robust capabilities for web, NodeJS, and React environments, making it a versatile tool for various applications.
Repository Information
Topics
Click on any tag to explore related repositories
Use at your own risk
OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of code from these repositories is the user's own responsibility. Always review the repository, source code, dependencies, licenses, and security implications before running or installing anything. OSRepos is not responsible for issues, damages, or losses resulting from third-party repositories.
Introduction
jscanify is a robust Javascript library developed by puffinsoft, designed for efficient document scanning directly within web and Node.js environments. Leveraging the power of opencv.js, it provides advanced features for detecting, correcting, and extracting documents from images or live camera feeds. With 1649 stars and 74 forks on GitHub, it's a well-regarded tool in the developer community.
Key features include:
- Paper detection and highlighting
- Distortion correction for scanned documents
- New in v1.3.0+: Glare suppression
- New in v1.3.0+: Multi-colored paper support
Whether you're building a web application that needs to process user-uploaded documents or a backend service for image analysis, jscanify offers a comprehensive solution.
Installation
jscanify is easy to integrate into your project. You can install it via npm or include it directly via CDN.
npm:
npm i jscanify
Then, import it into your Javascript code:
import jscanify from 'jscanify'
CDN:
For browser-based applications, include the following script tags. Note that opencv.js should be loaded asynchronously.
<script src="https://docs.opencv.org/4.7.0/opencv.js" async></script>
<!-- warning: loading OpenCV can take some time. Load asynchronously -->
<script src="https://cdn.jsdelivr.net/gh/ColonelParrot/jscanify@master/src/jscanify.min.js"></script>
Note: jscanify on NodeJS has slight differences. Refer to the official documentation for specific instructions.
Examples
jscanify provides straightforward APIs for common document scanning tasks.
Highlight Paper in Image
This example demonstrates how to highlight detected paper within an existing image.
<img src="/path/to/your/image.png" id="image" />
const scanner = new jscanify();
image.onload = function () {
const highlightedCanvas = scanner.highlightPaper(image);
document.body.appendChild(highlightedCanvas);
};
Extract Paper
To extract the detected paper as a separate, corrected image:
const scanner = new jscanify();
const paperWidth = 500;
const paperHeight = 1000;
image.onload = function () {
const resultCanvas = scanner.extractPaper(image, paperWidth, paperHeight);
document.body.appendChild(resultCanvas);
};
Highlighting Paper in User Camera
jscanify can also process live video streams from a user's camera, continuously highlighting paper in real-time.
<video id="video"></video> <canvas id="canvas"></canvas>
<!-- original video -->
<canvas id="result"></canvas>
<!-- highlighted video -->
const scanner = new jscanify();
const canvasCtx = canvas.getContext("2d");
const resultCtx = result.getContext("2d");
navigator.mediaDevices.getUserMedia({ video: true }).then((stream) => {
video.srcObject = stream;
video.onloadedmetadata = () => {
video.play();
setInterval(() => {
canvasCtx.drawImage(video, 0, 0);
const resultCanvas = scanner.highlightPaper(canvas);
resultCtx.drawImage(resultCanvas, 0, 0);
}, 10);
};
});
You can also use the jscanify debugging tool to test and observe results on various images.
Why Use jscanify?
jscanify stands out as a powerful and flexible solution for document scanning in Javascript. Its key advantages include:
- Robust Detection: Reliably identifies and highlights paper in diverse conditions, even with multi-colored backgrounds.
- Advanced Correction: Automatically corrects distortion, providing clean and usable scanned outputs.
- Real-time Processing: Capable of processing live camera feeds for interactive scanning experiences.
- Cross-Platform Support: Works seamlessly across web browsers and Node.js environments.
- Active Development: Continuously improved with new features like glare suppression, ensuring cutting-edge performance.
It simplifies complex image processing tasks, allowing developers to integrate sophisticated document scanning functionalities with minimal effort.
Links
- GitHub Repository: puffinsoft/jscanify
- Official Documentation (Wiki): jscanify Wiki
- npm Package: jscanify on npm
- jsdelivr CDN: jscanify on jsdelivr
- jscanify Debugging Tool: Tester Page
Related repositories
Similar repositories that may be relevant next.

agent-skills: Production-Grade Engineering Skills for AI Coding Agents
August 14, 2026
agent-skills is a comprehensive GitHub repository offering production-grade engineering skills for AI coding agents. It provides structured workflows, quality gates, and best practices that senior engineers use to build reliable software. These skills help AI agents consistently follow robust development processes across all phases.
AsterMind-ELM: Modular Extreme Learning Machine for On-Device ML in JS/TS
July 21, 2026
AsterMind-ELM is a JavaScript/TypeScript library that modernizes Extreme Learning Machines (ELMs) for instant, on-device machine learning in web applications. It offers advanced features like Kernel ELMs, Online ELM, and DeepELM, enabling fast, private, and interpretable AI directly in the browser. This framework allows for building decentralized, self-training ML systems without relying on GPUs or servers.

clean-code-javascript: Applying Clean Code Principles to JavaScript Development
July 19, 2026
The clean-code-javascript repository by ryanmcdermott offers a comprehensive guide to applying Robert C. Martin's Clean Code principles specifically for JavaScript. It provides practical examples and explanations to help developers write more readable, reusable, and refactorable JavaScript code. This resource is invaluable for improving software quality and fostering better development practices.

async-javascript-cheatsheet: A Comprehensive Guide to Async/Await and Promises
July 17, 2026
The `async-javascript-cheatsheet` is a valuable resource offering a concise summary of promises and async/await concepts in JavaScript. This cheatsheet is derived from the 'Mastering Asynchronous JavaScript' course at Frontend Armory, providing a quick reference for developers. It's an excellent tool for anyone looking to quickly grasp or review asynchronous patterns.
Source repository
Open the original repository on GitHub.
19 counted GitHub visits