PHPackages                             aanred/ssocr-for-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. aanred/ssocr-for-php

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

aanred/ssocr-for-php
====================

A wrapper to work with Seven Segment OCR for PHP.

125↓88.9%

Since Feb 21Compare

[ Source](https://github.com/aanred/ssocr-for-php)[ Packagist](https://packagist.org/packages/aanred/ssocr-for-php)[ RSS](/packages/aanred-ssocr-for-php/feed)WikiDiscussions Synced today

READMEChangelogDependenciesVersions (2)Used By (0)

Seven Segment OCR for PHP
=========================

[](#seven-segment-ocr-for-php)

A wrapper to work with Seven Segment OCR for PHP. This wrapper is adoption from the one built for Tesseract OCR [Tesseract OCR for PHP](https://github.com/thiagoalessio/tesseract-ocr-for-php).

Installation
------------

[](#installation)

You first need to make sure you have installed OCR library for seven segment number [SSOCR](https://github.com/auerswal/ssocr) by auerswal.

To use this library,

```
$ composer require aanred/ssocr-for-php

```

Quick Start and Examples
------------------------

[](#quick-start-and-examples)

Basic Usages,

```
$ssocr = new SSOCR('img.png');
echo $ssocr->run();
```

Examples,

Monochrome image ([004200\_mono.png](https://github.com/aanred/ssocr-for-php/blob/master/img/004200_mono.png))

[![Monochrome](https://github.com/aanred/ssocr-for-php/raw/master/img/004200_mono.png)](https://github.com/aanred/ssocr-for-php/blob/master/img/004200_mono.png)

```
$ssocr = new SSOCR('004200_mono.png');
echo $ssocr->run();
// Result
// 004200
```

Coloured image ([004200.png](https://github.com/aanred/ssocr-for-php/blob/master/img/004200.png))

[![Coloured](https://github.com/aanred/ssocr-for-php/raw/master/img/004200.png)](https://github.com/aanred/ssocr-for-php/blob/master/img/004200.png)

```
$ssocr = new SSOCR('004200.png');
// use iterative thresholding
$ssocr->iterativeThreshold();
// we need to crop the image so the tiny dot on the right bottom corner is not processed
$ssocr->crop(0, 0, 598, 172);
echo $ssocr->run();
// Result
// 004200
```

Manual threshold ([inside\_box.png](https://github.com/aanred/ssocr-for-php/blob/master/img/inside_box.png))

[![Threshold](https://github.com/aanred/ssocr-for-php/raw/master/img/inside_box.png)](https://github.com/aanred/ssocr-for-php/blob/master/img/inside_box.png)

```
$ssocr = new SSOCR('inside_box.png');
// use manual thresholding
$ssocr->threshold(20);
// we need to crop the image to take only the boxed numbers
$ssocr->crop(230, 195, 220, 60);
echo $ssocr->run();
// Result
// 086861
```

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/655201?v=4)[Aan Subhan](/maintainers/aanred)[@aanred](https://github.com/aanred)

### Embed Badge

![Health badge](/badges/aanred-ssocr-for-php/health.svg)

```
[![Health](https://phpackages.com/badges/aanred-ssocr-for-php/health.svg)](https://phpackages.com/packages/aanred-ssocr-for-php)
```

###  Alternatives

[thinkcmf/cmf-swoole

Swoole extend for ThinkCMF5.1

371.8k](/packages/thinkcmf-cmf-swoole)[beyondit/opencart-extension-installer

Custom Composer Installer for installing OpenCart Extensions

1020.5k6](/packages/beyondit-opencart-extension-installer)[romanzipp/laravel-dto

A strongly typed Data Transfer Object integration for Laravel

115.4k](/packages/romanzipp-laravel-dto)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
