Skip to content

Ptyg/Document-detector

Repository files navigation


Document detector

A scanner, to find and crop documents from image

Code | Report Bug | Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Contributing
  5. License
  6. Contact

About The Project

How often do we need to scan documents: once a week, five times a month, ten times a year? All options have one common characteristic - we need a physical scanner. Moreover, if we have nothing at our place, it can takes a lot of time to find one, go to that place and probably have to pay someone to scan our document. So in order to prevent all this i created an app where we can scan our document and get "cropped" version of it, like we printed it on a paper. And all for free :)

(back to top)

Built With

  • C++
  • OpenCV
  • Qt
  • Cmake

(back to top)

Getting Started

Prerequisites

You need to have:

And next system envs:

  • [ not necessary ] VCPKG_ROOT - { path/to/vcpkg/dir/in/repo }
  • [ to run cmake commands ] PATH - { path/to/cmake/bin }
  • [ important ] PATH - { path/to/msvc/compiler }

Installation

  1. Create an empty directory wherever you want. It`s for repo cloning.

  2. Clone the repo.

    git clone https://github.com/Ptyg/Document-detector.git
  3. Open directory with cloned project in console.

    3.1 Type ...

    cmake --list-presets

    ... to see all available presets. It is gonna looks like ...

    "preset_name#1" - preset_display_name#1
    "preset_name#2" - preset_display_name#2
    "preset_name#3" - preset_display_name#3 
    ...

    3.2 Choose a preset and type ...

    cmake --preset preset_name#1 (or cmake --preset preset_name#2, etc)

    3.3 Wait until project generation is done. It will locate at ./out/build/{ preset_name }

(back to top)

Usage

  • After launch, you`ll see a window like this

main_window

  • Choose an image with you document

how_to_choose_file

  • And click on crop image button

result

Now you can save the result or try to 'crop' another image.

(back to top)

Contributing

If you have a suggestion that would make this better, please fork the repo and create a pull request.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b { branch_name })
  3. Commit your Changes (git commit -m 'Add an amazing feature')
  4. Push to the Branch (git push origin { branch_name })
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Gtyp - [email protected]

Project Link: https://github.com/Ptyg/Document-detector

(back to top)

Get more info

(back to top)

About

A "scanner" to help crop a document from image

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages