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.

Loop Engineering: Orchestrating AI Agents with Practical Patterns and Tools

Loop Engineering: Orchestrating AI Agents with Practical Patterns and Tools

June 25, 2026

Loop Engineering is a GitHub repository offering practical patterns, starters, and CLI tools for building robust AI coding agent systems. It shifts the focus from individual prompt crafting to designing control systems that orchestrate agents over time. This project empowers developers to create autonomous, iterative AI workflows for various development tasks.

agentic-aiai-agentsloop-engineering
Pic Smaller: Intelligent Online Image Compression for Web and Mobile

Pic Smaller: Intelligent Online Image Compression for Web and Mobile

June 20, 2026

Pic Smaller is an intuitive and powerful online tool designed for intelligently compressing various image formats, including JPEG, PNG, WEBP, AVIF, SVG, and GIF. It offers a user-friendly experience with automatic compression and customizable output options, all while ensuring complete safety through purely local processing without server-side logic.

image-compressionjavascriptwebassembly
My Virtual World: A Self-Hosted 3D AI Virtual World for Agent Harnesses

My Virtual World: A Self-Hosted 3D AI Virtual World for Agent Harnesses

June 16, 2026

My Virtual World is an innovative self-hosted 3D AI virtual environment designed for agent harnesses such as OpenClaw and Hermes. It allows AI agents to live, work, move between buildings, and interact with objects in a persistent voxel-style world. This project offers a unique platform for developing and observing AI agent behaviors in a rich, customizable 3D setting.

ai-agentshermesopenclaw
Deliberation: Multi-Agent LLM Consensus for Code and Plan Review

Deliberation: Multi-Agent LLM Consensus for Code and Plan Review

June 15, 2026

Deliberation is an innovative GitHub repository that enables Claude Code to leverage multiple LLMs like GPT, Gemini, Grok, and 400+ OpenRouter models for expert second opinions and arbiter-mediated consensus. It provides specialized AI agents for tasks such as code review, security analysis, and architectural design, ensuring comprehensive and reliable feedback. This project helps developers get diverse perspectives and achieve higher quality in their work.

ai-agentsllmmulti-agent

Source repository

Open the original repository on GitHub.

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 ❤️