https://github.com/xelan/computer-vision-client
PHP Client for the Microsoft Computer Vision API
https://github.com/xelan/computer-vision-client
computer-vision hacktoberfest image-recognition php
Last synced: 4 months ago
JSON representation
PHP Client for the Microsoft Computer Vision API
- Host: GitHub
- URL: https://github.com/xelan/computer-vision-client
- Owner: xelan
- License: bsd-3-clause
- Created: 2017-05-20T10:33:23.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2018-02-07T08:11:32.000Z (over 8 years ago)
- Last Synced: 2025-12-14T08:35:57.254Z (7 months ago)
- Topics: computer-vision, hacktoberfest, image-recognition, php
- Language: PHP
- Homepage:
- Size: 10.7 KB
- Stars: 3
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
[](https://travis-ci.org/xelan/computer-vision-client) [](https://scrutinizer-ci.com/g/xelan/computer-vision-client/?branch=master) [](https://scrutinizer-ci.com/g/xelan/computer-vision-client/?branch=master)
# Computer Vision API Client
This library provides a simple client for Microsoft's [Computer Vision API](https://docs.microsoft.com/en-us/azure/cognitive-services/computer-vision/)
using the [Guzzle PHP HTTP client](http://guzzlephp.org/).
## Requirements
* PHP 5.5 or higher
* PHP CURL extension
## Installation (Composer)
This library is published as a [Composer package](https://packagist.org/packages/andaris/computer-vision-client), so Composer is the recommended way to install it.
Add `computer-vision-client` to your application's `composer.json` file:
```json
{
"require": {
"andaris/computer-vision-client": "0.1.0"
}
}
```
Navigate to your project root and run:
```
$ composer install
```
Make sure that the Composer autoloader is in your project's bootstrap.
## Usage
```php
use Andaris\ComputerVision\Client;
$imageData = file_get_contents('/path/to/image.jpg');
$client = new Client('14758f1afd44c09b7992073ccf00b43d'); // Insert your API key
$result = $client->analyze($imageData, [Client::FEATURE_CATEGORIES, Client::FEATURE_TAGS]);
```
## Testing
The PHPUnit test suite can be run via `vendor/bin/phpunit`.