Skip to content

prismocr/ocr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

c965cca · Dec 16, 2020
Nov 18, 2020
Dec 12, 2020
Dec 15, 2020
Dec 15, 2020
Dec 12, 2020
Dec 15, 2020
Dec 15, 2020
Sep 29, 2020
Dec 12, 2020
Oct 6, 2020
Dec 15, 2020
Oct 4, 2020
Oct 25, 2020
Nov 16, 2020
Dec 12, 2020
Dec 16, 2020

Repository files navigation


Prism

Prism

Prism is an efficient OCR written in C.

Convert scanned documents and images into editable text files.

GUI

Get started

Prerequisites

sudo apt update
sudo apt install make
sudo apt install libgtk-3-dev

Installation

  1. Clone the repository.
git clone git@github.com:prismocr/ocr.git
  1. Compile the project.
cd ocr
make

Usage

./build/release/ocr [options]

Possible options :

  • gui
  • ocr [network_path] [image_path]
  • sharpen [image_path]
  • blur [image_path]
  • rotate [image_path] [angle]
  • skew_detect [image_path]
  • auto_rotate [image_path]
  • edge_detect [image_path]
  • contrast [image_path] [delta]
  • invert [image_path]
  • network [xor/add]
  • segmentation [image_path]
  • network_load [network_path]

Development

Tests

You have to have Unity at the root of the repository:

git clone https://github.com/ThrowTheSwitch/Unity.git

And then:

make test

Auto-format before commit

Add the following code to .git/hooks/pre-commit (create the file if not already existing).

#!/bin/sh

STAGED_FILES=$(git diff --name-only --cached)
make format
git add ${STAGED_FILES}

And make it executable chmod +x .git/hooks/pre-commit

Valgrind script

To compile and run the project there is a script available at ./scripts/valgrind.sh

./scripts/valgrind.sh [target] [program arguments]

For example to run the xor demo in debug:

./scripts/valgrind.sh debug network xor

Authors

Flowtter
aureleoules
TrAyZeN
Obeeron

License

MIT