定制 kwn/recognizeim 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

kwn/recognizeim

最新稳定版本:1.0.2

Composer 安装命令:

composer require kwn/recognizeim

包简介

Recognize.im PHP client. Allows image recognizing, includes REST and SOAP API

README 文档

README

Code Climate

Recognize.im provides API for Image Recognition. Before use you need to visit http://www.recognize.im/ and create an account. After sign in go to the user profile section and obtain: Your Client ID, Your API Key and Your CLAPI Key.

Installation

Add package to your composer.json

"kwn/recognizeim": "~1.0"

Run update command

php composer.phar update kwn/recognizeim

Done. Now you can use RecognizeIm classes.

Usage

use RecognizeIm\Client\RestApi;
use RecognizeIm\Client\SoapApi;
use RecognizeIm\Configuration;
use RecognizeIm\Model\Image;
use RecognizeIm\RecognizeImApi;

// [...]

// create a configuration object first
$configuration = new Configuration('CLIENT_ID', 'API_KEY', 'CLAPI_KEY');

// depending on your needs you can use soap or rest api 
$soapApi = new SoapApi($configuration);
$restApi = new RestApi($configuration, new ImageVerificator());

// or you can create an object that includes both apis (useful for dependency injection containers)
$recognizeim = new RecognizeImApi($soapApi, $restApi);

// now you can use soap api functions or rest api recognize method

// create an image and call recognize method 
$image = new Image('/home/kwn/Pictures/red.jpg');
$result = $recognizeim->getRestApiClient()->recognize($image, 'multi');

Authorization

You don't need to call method auth by yourself. Module object will authorize you when needed, you just need do provide valid credentials. You can get them from your account tab.

统计信息

  • 总下载量: 39
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-01-08