alessandrozamberletti / docdetect

Real-time detection of documents in images

Home Page:https://pypi.org/project/docdetect/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

docdetect

Build Status Build status codecov Maintainability PyPI version

sample_01 sample_02 sample_03

Simple real-time detection of documents in images using Canny Edge Detection, Hough Transform and Depth First Search.

Installation

To install, use pip or easy_install:

$ pip install --upgrade docdetect

or

$ easy_install --upgrade docdetect

Instructions

TBD

Examples

Process an image:

import docdetect

rects = docdetect.process(image)
image = docdetect.draw(rects, image)

Process a video:

import cv2
import docdetect

video = cv2.VideoCapture(video_path)
cv2.startWindowThread()
cv2.namedWindow('output')
while video.isOpened():
    ret, frame = video.read()
    if ret:
        rects = docdetect.process(frame)
        frame = docdetect.draw(rects, frame)
        cv2.imshow('output', frame)
        cv2.waitKey(1)
video.release()

Resources

About

Real-time detection of documents in images

https://pypi.org/project/docdetect/

License:MIT License


Languages

Language:Python 100.0%