jscanify: The Javascript Document Scanning Library

This repository profile is provided by osrepos.com, an open source repository discovery platform.

jscanify: The Javascript Document Scanning Library

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

Analyzed by OSRepos on October 12, 2025

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

Related repositories

Similar repositories that may be relevant next.

AgentsKit: The Complete JavaScript Toolkit for Building AI Agents

AgentsKit: The Complete JavaScript Toolkit for Building AI Agents

September 20, 2026

AgentsKit is a comprehensive JavaScript toolkit designed for building AI agents, offering a lightweight core and a modular ecosystem. It provides essential components like UIs, autonomous runtime, tools, memory, and RAG, enabling developers to create sophisticated agents from simple chat interfaces to complex autonomous systems. This framework aims to simplify agent development by offering composable parts and avoiding the need to glue multiple incompatible libraries together.

agent-frameworkai-agentstypescript
ECC: The Agent Harness Performance Optimization System for LLMs

ECC: The Agent Harness Performance Optimization System for LLMs

August 28, 2026

ECC is an advanced agent harness performance optimization system, providing a coordinated engineering system and toolbox for LLM development. It enables agents to plan, test, implement, review, and learn effectively, enhancing productivity and security for AI-driven coding workflows across platforms like Claude Code, Codex, and Cursor.

ai-agentsllmdeveloper-tools
agent-skills: Production-Grade Engineering Skills for AI Coding Agents

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.

agent-skillsai-agentsdevelopment
AsterMind-ELM: Modular Extreme Learning Machine for On-Device ML in JS/TS

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.

artificial-intelligencemachine-learningextreme-learning-machine

Source repository

Open the original repository on GitHub.

31 counted GitHub visits

View on GitHub
OS
OSRepos

Analysis and discovery of open source repositories. Find interesting projects and follow their updates.

Monitor your website with YourWebsiteScore

OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of third-party repository code is at your own risk. Always review source code, dependencies, licenses, and security implications before running anything.

© 2025 OSRepos. Built with Nuxt 3 and lots of ❤️