PHPackages                             openwines/computer-vision-bundle - 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. [API Development](/categories/api)
4. /
5. openwines/computer-vision-bundle

ActiveSymfony-bundle[API Development](/categories/api)

openwines/computer-vision-bundle
================================

Provides a Microsoft Computer Vision API integration to your Symfony Project.

3231PHP

Since Feb 20Pushed 9y ago8 watchersCompare

[ Source](https://github.com/OpenWines/ComputerVisionBundle)[ Packagist](https://packagist.org/packages/openwines/computer-vision-bundle)[ RSS](/packages/openwines-computer-vision-bundle/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Microsoft Computer Vision API Bundle for Symfony
================================================

[](#microsoft-computer-vision-api-bundle-for-symfony)

[![a bottle of wine's label](src/OpenWines/ComputerVisionBundle/Resources/data/wines/20160827_163142.jpg)](src/OpenWines/ComputerVisionBundle/Resources/data/wines/20160827_163142.jpg)

> "o DEPUIS 1768 VIGNOBLES CHÉNEAU VITICULTEURS RÉCOLTANTS DE PÈRE EN FILS [www.vignoblescheneau.com](http://www.vignoblescheneau.com) MUSCADET SÈVRE ET MAINE APPELLATION D'ORIGINE PROTÉGÉE SUR LIE Château de la Cormerais est une ancienne seigneurie du Moyen-Age Situé sur la commune de Monnières, il est la propriété de la Famille Chéneau depuis 1856. Régulièrement récompensé, le Muscadet Sèvre et Maine Sur Lie Château de la Cormerais est une référence des Vignobles Chéneau implantés dans la région des Marches de Bretagne depuis d oil naitra une passion transmise de père en fils. EN BOUTEILLE AU CHÂTEAU ET FILS • BEAU-SOLEIL • 44330 MOUZILLON • BRETAGNE 3 557090 013504"

Service presentation
--------------------

[](#service-presentation)

With [Microsoft's Computer Vision API](https://www.microsoft.com/cognitive-services/en-us/computer-vision-api) users can analyze images to use optical character recognition to identify text found in images, directly from a Symfony project.

The cloud-based Computer Vision API provides developers with access to advanced algorithms for processing images and returning information. By uploading an image or specifying an image URL, Microsoft Computer Vision algorithms can analyze visual content in different ways based on inputs and user choices.

The OCR is available:

- as a service, available in your Symfony's dependency injection container
- as a command line tool, with arguments and options (see below)

Supported locales
-----------------

[](#supported-locales)

The 21 languages supported by OCR are Chinese Simplified, Chinese Traditional, Czech, Danish, Dutch, English, Finnish, French, German, Greek, Hungarian, Italian, Japanese, Korean, Norwegian, Polish, Portuguese, Russian, Spanish, Swedish, and Turkish.

Accuracy
--------

[](#accuracy)

The accuracy of text recognition depends on the quality of the image. An inaccurate reading may be caused by the following:

- Blurry images
- Handwritten or cursive text
- Artistic font styles
- Small text size
- Complex backgrounds, shadows or glare over text or perspective distortion
- Oversized or missing capital letters at the beginnings of words
- Subscript, superscript, or strikethrough text

Limitations
-----------

[](#limitations)

On photos where text is dominant, false positives may come from partially recognized words. On some photos, especially photos without any text, precision can vary a lot depending on the type of image.

- Small text size
- Complex backgrounds, shadows or glare over text or perspective distortion
- Oversized or missing capital letters at the beginnings of words
- Subscript, superscript, or strikethrough text

API Documentation
-----------------

[](#api-documentation)

- [Computer Vision API overview](https://www.microsoft.com/cognitive-services/en-us/computer-vision-api)
- [Computer Vision API documentation](https://westus.dev.cognitive.microsoft.com/docs/services/56f91f2d778daf23d8ec6739/operations/56f91f2e778daf14a499e1fc)

API usage conditions
--------------------

[](#api-usage-conditions)

- Free: up to 5000 calls per month
- Throttling: 10 transactions per second
- Charged: $1.50 per 1000 calls

No credit card required to get an API Token.

Installation
============

[](#installation)

Download the Bundle
-------------------

[](#download-the-bundle)

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:

```
$ composer require openwines/computer-vision-bundle "dev-master"
```

This command requires you to have Composer installed globally, as explained in the [installation chapter](https://getcomposer.org/doc/00-intro.md)of the Composer documentation.

Enable the Bundle
-----------------

[](#enable-the-bundle)

Then, enable the bundle by adding it to the list of registered bundles in the `app/AppKernel.php` file of your project:

```
