All Projects → jansenfelipe → Omr

jansenfelipe / Omr

Optical Mark Recognition with PHP

Projects that are alternatives of or similar to Omr

Anonydog
On the internet, nobody knows you're a dog
Stars: ✭ 138 (+0%)
Mutual labels:  hacktoberfest
Packages
📦 Package configurations - The #1 free and open source CDN built to make life easier for developers.
Stars: ✭ 139 (+0.72%)
Mutual labels:  hacktoberfest
Chromebrew
Package manager for Chrome OS
Stars: ✭ 1,838 (+1231.88%)
Mutual labels:  hacktoberfest
Letsencrypt Zimbra
Files to automate the deploy of letsencrypt certificates to Zimbra
Stars: ✭ 138 (+0%)
Mutual labels:  hacktoberfest
Hiya Hiya Hiya
Whatsapp Clone base on Firebase Cloud Messaging
Stars: ✭ 139 (+0.72%)
Mutual labels:  hacktoberfest
Marketplace Partners
Image validation, automation, and other tools for DigitalOcean Marketplace partners and Custom Image users
Stars: ✭ 139 (+0.72%)
Mutual labels:  hacktoberfest
Rf24
OSI Layer 2 driver for nRF24L01 on Arduino & Raspberry Pi/Linux Devices
Stars: ✭ 1,813 (+1213.77%)
Mutual labels:  hacktoberfest
Ignition
A beautiful error page for Laravel apps
Stars: ✭ 1,885 (+1265.94%)
Mutual labels:  hacktoberfest
99 Ml Learning Projects
A list of 99 machine learning projects for anyone interested to learn from coding and building projects
Stars: ✭ 139 (+0.72%)
Mutual labels:  hacktoberfest
Descheduler
Descheduler for Kubernetes
Stars: ✭ 2,260 (+1537.68%)
Mutual labels:  hacktoberfest
Urlextract
URLExtract is python class for collecting (extracting) URLs from given text based on locating TLD.
Stars: ✭ 138 (+0%)
Mutual labels:  hacktoberfest
Haproxy
Development repository for the haproxy cookbook
Stars: ✭ 138 (+0%)
Mutual labels:  hacktoberfest
Hacktoberfest2018
A repository for HacktoberFest 2018.
Stars: ✭ 139 (+0.72%)
Mutual labels:  hacktoberfest
Odoo Brasil
Versão 14 - Odoo Brasil
Stars: ✭ 137 (-0.72%)
Mutual labels:  hacktoberfest
Jigsaw
Simple static sites with Laravel’s Blade.
Stars: ✭ 1,823 (+1221.01%)
Mutual labels:  hacktoberfest
Styleguide
The VTEX Design System and React component library.
Stars: ✭ 138 (+0%)
Mutual labels:  hacktoberfest
Morph
A webframework for Reason and OCaml
Stars: ✭ 139 (+0.72%)
Mutual labels:  hacktoberfest
Android Modular Architecture
📚 Sample Android Components Architecture on a modular word focused on the scalability, testability and maintainability written in Kotlin, following best practices using Jetpack.
Stars: ✭ 2,048 (+1384.06%)
Mutual labels:  hacktoberfest
Hledger
A reliable, user-friendly Plain Text Accounting tool with command line, terminal and web interfaces.
Stars: ✭ 1,887 (+1267.39%)
Mutual labels:  hacktoberfest
Tgmeetup
A collection set of technical groups' information (meetup).
Stars: ✭ 139 (+0.72%)
Mutual labels:  hacktoberfest

Optical Mark Recognition with PHP

Latest Stable Version Total Downloads Latest Unstable Version MIT license Build Status

This is an open source library written in PHP for recognition markings on questionnaires scans

See: https://en.wikipedia.org/wiki/Optical_mark_recognition

How to use

Add library:

$ composer require jansenfelipe/omr

Instantiate the Scanner class responsible for reading the image and enter its path

/*
 * Setup scanner
 */
$scanner = new ImagickScanner();
$scanner->setImagePath($imagePath);

You will need to scan a blank form and create the Target Mapping File to be able to use the library.

After creating the map.json file, enter its path:

/*
 * Setup map
 */
$map = MapJson::create($mapJsonPath);

Now you can scan and get the result

$result = $scanner->scan($map);

Scanners

This library currently has only one scanner class using Imagemagick 6. It has been tested using the following configurations:

  • PHP 7.3
  • imagemagick6
  • Extension imagick-3.4.4

See https://github.com/jansenfelipe/omr/blob/master/src/Scanners/ImagickScanner.php

Target Mapping File

It is a .json file that describes, in addition to the image information, the coordinates of the places (targets) that the script must do the pixel analysis. This file follows the following pattern:

{
    "width": 600,
    "height": 800,
    "targets": [
      {
        "x1": 50,
        "y1": 43,
        "x2": 65,
        "y2": 57,
        "id": "Foo",
        "type": "rectangle",
        "tolerance": 60
      }
    ] 
}

Example

In the example directory there is an image of a completed questionnaire response.png. There is also a map.json file that gives the coordinates of the image areas that will be analyzed the pixels.

To help with setting up the environment, there is a Dockerfile in the project based on the official PHP 7.3 image that adds composer, imagemagick and the imagick extension to PHP.

That way you can install the dependencies and run the command to process the image without headaches :)

  1. Clone this repo:
$ git clone https://github.com/jansenfelipe/omr.git
$ cd omr/
  1. Install dependencies:
$ docker-compose run php composer install
  1. Process example image:
$ docker-compose run php bin/omr scan example/response.png example/map.json

License

The MIT License (MIT)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].