Skip to main content

cam2file

Save the document in real world as the file using webcam.

Installation

% python -m pip install cam2file

Usage

  • Import package
import cam2file as c2f
  • Capture paper
from cam2file import handle_image

path = './result.png'
handle_image(path) # Image will be saved on the path
  • Get the paper frame in the code
from cam2file import capturePaper
import cv2

res = capturePaper() # Return frame of paper image
cv2.imshow('Result', res)
cv2.waitKey()
cv2.destroyAllWindows()

When you call capturePaper(), The webcam will be activated as below:

exampleimg

If the paper is detected, Yellow border indicates it. Press a then it will be captured. The result is transformed as A4 size, so it can be distorted if you capture paper which size is not A4.

capturePaper('x')
capturePaper(ok_key='x') # same as above

If you want to change the confirm key, pass a character as an argument ok_key.

References

Release files for cam2file 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cam2file 0.0.1
File Size Uploaded
cam2file-0.0.1.tar.gz 3.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cam2file 0.0.1
File Interpreter ABI Platform
cam2file-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 7.7 kB

Release files / cam2file-0.0.1.tar.gz

Download URL cam2file-0.0.1.tar.gz
Size 3.5 kB
Tags Source
SHA-256 checksum
How to use checksums
b13d0bd932012f3003e3daff9a6fdc155b4304b7160ab2bc75ddd6b3ed2090e7
BLAKE2b-256 checksum
How to use checksums
ba044c8a3454b9599d7ccf8eb301d291c4c3a614678f1bb648888821b3a986c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.7.4

Release files / cam2file-0.0.1-py3-none-any.whl

Download URL cam2file-0.0.1-py3-none-any.whl
Size 4.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
37c11d09e2ad4bff1d2f4cf4c749e1f860923b8496d4112ec55c8ef922bb9534
BLAKE2b-256 checksum
How to use checksums
87ac3f0decd34736b4a86d2bc03705e1fe853092c745a9ed3dbdb2b6db69a17c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.7.4

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page