PHPackages                             morganolufsen/google-cloud-vision-php - 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. morganolufsen/google-cloud-vision-php

ActivePackage[API Development](/categories/api)

morganolufsen/google-cloud-vision-php
=====================================

A simple php library for the google cloud vision API

1.3.0(2y ago)013MITPHP

Since Feb 27Pushed 2y agoCompare

[ Source](https://github.com/MorganOlufsen/google-cloud-vision-php)[ Packagist](https://packagist.org/packages/morganolufsen/google-cloud-vision-php)[ RSS](/packages/morganolufsen-google-cloud-vision-php/feed)WikiDiscussions master Synced today

READMEChangelog (4)Dependencies (1)Versions (3)Used By (0)

google-cloud-vision-php
=======================

[](#google-cloud-vision-php)

Overview
========

[](#overview)

Performs Label detection, face detection, Logo detection, explicit content detection, landmark detection, optical character recogition and web detection on images. You can read more about Google cloud vision here

Getting Started
===============

[](#getting-started)

You will need a google account to use this API so if you do not already have an account with google, head over there and create one

Installation
------------

[](#installation)

```
composer require wapnen/google-cloud-vision-php
```

Enable the API
--------------

[](#enable-the-api)

To start using the google cloud vision api, follow the instructions here to enable the api for your google account

Authentication
--------------

[](#authentication)

You must set up an Api key to authenticate your requests. Follow the instructions here  to set up an API key for your project on google cloud platform console

Usage
=====

[](#usage)

```

```

Note : You can create as many as 16 Annotate image requests to be sent with the request object

The function `setImageUri();` takes a Google Cloud Storage image location, or publicly-accessible image URL. Alternatively you can use `setImage();` which takes a base64 encoded image string.

You can set as many features as are available to the annotateImageRequest by calling the `setFeature();` function on the annotateImageRequest which takes any of the following enum parameters ; TYPE\_UNSPECIFIED, FACE\_DETECTION, LANDMARK\_DETECTION, LOGO\_DETECTION, LABEL\_DETECTION, TEXT\_DETECTION, DOCUMENT\_TEXT\_DETECTION, SAFE\_SEARCH\_DETECTION, IMAGE\_PROPERTIES, CROP\_HINTS, WEB\_DETECTION.

Optionally, you can set the image context for each annotateImageRequest object like so

```
$annotateImageRequest1 = new AnnotateImageRequest()
$annotateImageRequest1->setImageContext();
$annotateImageRequest1->getImageContext()->setCropHintsParams([1.333]); //array
$annotateImageRequest1->getImageContext()->setWebDetectionParams(false);  //boolean
$annotateImageRequest1->getImageContext()->setLanguageHints([]); //array

```

Finally, the GoogleCloudVision request object takes an array of AnnotateImageRequest objects as the first parameter and the api key as the second parameter

### Response object

[](#response-object)

If successful, you will receive a json object response in the format below;

```
{
  "responses": [
    {
      object(AnnotateImageResponse)
    }
  ]
}

```

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 62.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

857d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/689832fda3eda47e193b0084363440959af18ab1bf5e983a61087f20cc674ce7?d=identicon)[MorganOlufsen](/maintainers/MorganOlufsen)

---

Top Contributors

[![wapnen](https://avatars.githubusercontent.com/u/18328614?v=4)](https://github.com/wapnen "wapnen (10 commits)")[![MorganOlufsen](https://avatars.githubusercontent.com/u/37509162?v=4)](https://github.com/MorganOlufsen "MorganOlufsen (6 commits)")

---

Tags

phpmachine learningComputer Visiongoogle cloud vision api

### Embed Badge

![Health badge](/badges/morganolufsen-google-cloud-vision-php/health.svg)

```
[![Health](https://phpackages.com/badges/morganolufsen-google-cloud-vision-php/health.svg)](https://phpackages.com/packages/morganolufsen-google-cloud-vision-php)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M47](/packages/tencentcloud-tencentcloud-sdk-php)[resend/resend-php

Resend PHP library.

617.2M43](/packages/resend-resend-php)[checkout/checkout-sdk-php

Checkout.com SDK for PHP

563.6M13](/packages/checkout-checkout-sdk-php)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

273.0k](/packages/eslazarev-wildberries-sdk)[files.com/files-php-sdk

Files.com PHP SDK

2481.1k](/packages/filescom-files-php-sdk)[aimeos/prisma

A powerful PHP package for integrating media related Large Language Models (LLMs) into your applications

1943.1k5](/packages/aimeos-prisma)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
