thangman22/google-cloud-vision-php 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

thangman22/google-cloud-vision-php

最新稳定版本:1.02

Composer 安装命令:

composer require thangman22/google-cloud-vision-php

包简介

README 文档

README

Build Status

GoogleCloudVisionPHP

This project hosts the PHP library for the various RESTful based Google Cloud Vision API(s) [Read about Google Cloud Vision API] (https://cloud.google.com/vision/)

##Features

  • Support almost feature of Google Cloud Vision API (Version 1)
  • Auto encode images to based64

##how to get service key Google Cloud Vision API Document

##Requirements

  • PHP >= 5.4 with cURL extension

##Installation Add this to your composer.json

"require": {
        "thangman22/google-cloud-vision-php": "*"
    }

##Example

use GoogleCloudVisionPHP\GoogleCloudVision;

$gcv = new GoogleCloudVision();

// Follow instruction from Google Cloud Vision Document
$gcv->setKey("[Key from Google]");

$gcv->setImage("[File path]");

// 1 is Max result
$gcv->addFeature("LABEL_DETECTION", 1);

$gcv->addFeatureUnspecified(1);
$gcv->addFeatureFaceDetection(1);
$gcv->addFeatureLandmarkDetection(1);
$gcv->addFeatureLogoDetection(1);
$gcv->addFeatureLabelDetection(1);
$gcv->addFeatureOCR(1);
$gcv->addFeatureSafeSeachDetection(1);
$gcv->addFeatureImageProperty(1);

//Optinal
$gcv->setImageContext(array("languageHints"=>array("th")));

$response = $gcv->request();

统计信息

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

GitHub 信息

  • Stars: 24
  • Watchers: 4
  • Forks: 18
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2016-03-19