Save the document in real world as the file using webcam.
Project description
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:
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
- vyom_garg, "Python | Detect Polygons in an Image using OpenCV", GeeksforGeeks, 19. 10. 13., https://www.geeksforgeeks.org/python-detect-polygons-in-an-image-using-opencv/, 22. 12. 04.
- Daehee Yun, "Python OpenCV 강좌 : 제 21강 - 윤곽선 검출", Daehee YUN Tech Blog, 19. 02. 09., https://076923.github.io/posts/Python-opencv-21/, 22. 12. 04.
- KIDO, "Python Package 생성 및 배포하기", DEVOCEAN, 22. 01. 12., https://devocean.sk.com/blog/techBoardDetail.do?ID=163566, 22. 12. 13.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cam2file-0.0.1.tar.gz.
File metadata
- Download URL: cam2file-0.0.1.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b13d0bd932012f3003e3daff9a6fdc155b4304b7160ab2bc75ddd6b3ed2090e7
|
|
| MD5 |
6e7b521a11f51e1efc94f060c688cb3f
|
|
| BLAKE2b-256 |
ba044c8a3454b9599d7ccf8eb301d291c4c3a614678f1bb648888821b3a986c2
|
File details
Details for the file cam2file-0.0.1-py3-none-any.whl.
File metadata
- Download URL: cam2file-0.0.1-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
37c11d09e2ad4bff1d2f4cf4c749e1f860923b8496d4112ec55c8ef922bb9534
|
|
| MD5 |
0e3c2ce20c9223143c19c52c800bd782
|
|
| BLAKE2b-256 |
87ac3f0decd34736b4a86d2bc03705e1fe853092c745a9ed3dbdb2b6db69a17c
|