cloudmersive/cloudmersive_imagerecognition_api_client

3.0.1 2023-07-02 02:18 UTC

README

图像识别和处理API允许您使用机器学习来识别和处理图像,还可以执行有用的图像修改操作。

Cloudmersive 图像识别和计算机视觉API 提供高级计算机视觉和图像识别功能。

  • API版本:v1
  • 包版本:3.0.1

要求

PHP 5.5 及更高版本

安装与使用

Composer

要使用Composer安装绑定,请将以下内容添加到 composer.json

{
  "repositories": [
    {
      "type": "git",
      "url": "https://github.com/cloudmersive/cloudmersive_imagerecognition_api_client.git"
    }
  ],
  "require": {
    "cloudmersive/cloudmersive_imagerecognition_api_client": "*@dev"
  }
}

然后运行 composer install

手动安装

下载文件并包含 autoload.php

    require_once('/path/to/cloudmersive_imagerecognition_api_client/vendor/autoload.php');

测试

要运行单元测试

composer install
./vendor/bin/phpunit

入门指南

请按照 安装过程 进行,然后运行以下命令

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: Apikey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Apikey', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Apikey', 'Bearer');

$apiInstance = new Swagger\Client\Api\ArtisticApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$style = "style_example"; // string | The style of the painting to apply.  To start, try \"udnie\" a painting style.  Possible values are: \"udnie\", \"wave\", \"la_muse\", \"rain_princess\".
$image_file = "/path/to/file.txt"; // \SplFileObject | Image file to perform the operation on.  Common file formats such as PNG, JPEG are supported.

try {
    $result = $apiInstance->artisticPainting($style, $image_file);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ArtisticApi->artisticPainting: ', $e->getMessage(), PHP_EOL;
}

?>

API端点文档

所有URI均相对于 https://api.cloudmersive.com

模型文档

授权文档

Apikey

  • 类型: API密钥
  • API密钥参数名: Apikey
  • 位置: HTTP头

作者