PHPackages                             funnydevjsc/image-captcha-solver-laravel - 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. [Image &amp; Media](/categories/media)
4. /
5. funnydevjsc/image-captcha-solver-laravel

ActiveLibrary[Image &amp; Media](/categories/media)

funnydevjsc/image-captcha-solver-laravel
========================================

Laravel package for solving image captcha

1.0.1(1y ago)13308MITPHPPHP ^8.1

Since Feb 24Pushed 1y agoCompare

[ Source](https://github.com/funnydevjsc/image-captcha-solver-laravel)[ Packagist](https://packagist.org/packages/funnydevjsc/image-captcha-solver-laravel)[ Docs](https://github.com/funnydevjsc/image-captcha-solver-laravel)[ RSS](/packages/funnydevjsc-image-captcha-solver-laravel/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (4)Versions (3)Used By (0)

Image Captcha Solver Laravel
============================

[](#image-captcha-solver-laravel)

The free Laravel package to help you convert image captcha to text by OCR with Tesseract

Use Cases
---------

[](#use-cases)

- Solve image text captcha by OCR from images with Tesseract

Features
--------

[](#features)

- Easy and free to solve image text captcha with a simple line code

Know issues
-----------

[](#know-issues)

- Please consider your server's environment before using this package. It doesn't have to be a physical server or support GPUs but at least you have to have the ability to install applications and run commands.

Requirements
------------

[](#requirements)

- **PHP**: 8.1 or higher
- **Laravel** 9.0 or higher
- **Server** with permissions to install applications and execute commands (like APT or YUM/DNF)

Quick Start
-----------

[](#quick-start)

If you prefer to install this package into your own Laravel application, please follow the installation steps below

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

[](#installation)

#### Step 1. Install a Laravel project if you don't have one already

[](#step-1-install-a-laravel-project-if-you-dont-have-one-already)

#### Step 2. Install dependencies (If you use an operating system other than Ubuntu, please edit it accordingly):

[](#step-2-install-dependencies-if-you-use-an-operating-system-other-than-ubuntu-please-edit-it-accordingly)

```
apt install -y tesseract-ocr libtesseract-dev tesseract-ocr-all libmemcached-tools
```

#### Step 3. Require the current package using composer:

[](#step-3-require-the-current-package-using-composer)

```
composer require funnydevjsc/image-captcha-solver-laravel
```

Testing
-------

[](#testing)

```
use Imagick;
use FunnyDev\ImageCaptchaSolver\ImageCaptchaSolverSdk;

class TestCaptchaSolver
{
    /**
     * Handle the event.
     * @throws \Exception
     */
    public function handle(): void
    {
        $instance = new ImageCaptchaSolverSdk();
        $image = 'base64-image-captcha-content-here';

        /* Set image data and sanity to make it more clear */
        $instance->setImage(base64image: $image);
        $instance->sanityImage();

        /* Convert image to black and white, remove unnecessary pixels. Be careful when customizing the `fuzz` value to ensure that you don't lose the stroke of the necessary character. */
        $instance->changeColorImage(fuzz: 33.0);

        /* Resize the image to make it easier to recognize and remove pixels inserted into the characters that need to be recognized that were not completely processed in the previous step. */
        $instance->resizeImage(width: 165, height: 50, filter: Imagick::FILTER_LANCZOS, blur: 1, best_fit: false);

        /*
        *   Regarding how to train the recognition library, it can be simplified as follows instead of interfering with tesseract:
        *   1. You can run $instance->ocr(...args) with limit 0 to return all the results that this library finds.
        *   2. With the character length of the found results, depending on the frequency, we will separate the characters that need to be replaced and put them into the corresponding table. For example, if the captcha is ABCDEF but the recognition is ABCDDDF, we have the replacement phrase ['DDD' => 'DE'] to add to $instance->moreCharactersDictionary. Similarly with $instance->lessCharactersDictionary and $instance->equalCharactersDictionary.
        *   3. Replace $instance->moreCharactersDictionary = your dictionary array before executing $instance->ocr(...args) for the next time.
        */

        /* Returns a set of recorded results, where the `limit` value is the number of characters in the captcha to be recognized. */
        $results = $instance->ocr(limit: 6, language: 'eng', dictionary: 'QWERTYUIOPASDFGHJKLZXCVBNMqwertyuiopasdfghjklzxcvbnm123456789');
    }
}
```

Feedback
--------

[](#feedback)

Respect us in the [Laravel Việt Nam](https://www.facebook.com/groups/167363136987053)

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  or use the issue tracker.

Credits
-------

[](#credits)

- [Funny Dev., Jsc](https://github.com/funnydevjsc)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance45

Moderate activity, may be stable

Popularity17

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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.

###  Release Activity

Cadence

Every ~17 days

Total

2

Last Release

422d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ddb914505b68528e0f47a1a0c04b7e3bbe59d9849546c7d44654faf5294b0293?d=identicon)[funnydevjsc](/maintainers/funnydevjsc)

---

Top Contributors

[![fdteam-deanie](https://avatars.githubusercontent.com/u/146782529?v=4)](https://github.com/fdteam-deanie "fdteam-deanie (3 commits)")

---

Tags

laravelpackageimagecaptchasolver

### Embed Badge

![Health badge](/badges/funnydevjsc-image-captcha-solver-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/funnydevjsc-image-captcha-solver-laravel/health.svg)](https://phpackages.com/packages/funnydevjsc-image-captcha-solver-laravel)
```

PHPackages © 2026

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