Skip to content

JS app that takes photos and tries to find paper document outlines to extract a scan-like image.

License

Notifications You must be signed in to change notification settings

stefanw/photoscan.js

Repository files navigation

photoscanjs

JS library and Vue component to take a user provided picture, detect a document and transform that part of the picture to get a scan-like image of the document.

Demo

Warning: this uses opencv.js which is 11 MB of JavaScript and uses a lot of memory. This project was tested on some mobiles, but only works in memory-limited environment when the app's internal debug mode is turned off. This might severly limit your mobile use case. jsfeat could be an alternative, but seems to be missing some features that are needed and available in OpenCV like contour detection.

Build Setup

# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification
npm run build

Credits

Inspired by this article on pyimagesearch.com.

About

JS app that takes photos and tries to find paper document outlines to extract a scan-like image.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published