All Projects → jordikroon → Php-Google-Vision-Api

jordikroon / Php-Google-Vision-Api

Licence: MIT license
Google Vision Api for PHP (https://cloud.google.com/vision/)

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to Php-Google-Vision-Api

Attention Ocr
A Tensorflow model for text recognition (CNN + seq2seq with visual attention) available as a Python package and compatible with Google Cloud ML Engine.
Stars: ✭ 844 (+1283.61%)
Mutual labels:  ocr, google-cloud, image-recognition
Ocr
The Best Image OCR SDK For BAT
Stars: ✭ 173 (+183.61%)
Mutual labels:  ocr, image-recognition
Dmsmsgrcg
A photo OCR project aims to output DMS messages contained in sign structure images.
Stars: ✭ 18 (-70.49%)
Mutual labels:  ocr, image-recognition
deploy-appengine
A GitHub Action that deploys source code to Google App Engine.
Stars: ✭ 184 (+201.64%)
Mutual labels:  google-cloud, google-cloud-platform
ocr
Simple app to extract text from pictures using Tesseract
Stars: ✭ 98 (+60.66%)
Mutual labels:  ocr, image-recognition
smart-docs-parser
An OCR based document parser to extract information from identity document images
Stars: ✭ 14 (-77.05%)
Mutual labels:  ocr, google-vision
spannerz
Google Cloud Spanner Query Planner Visualizer
Stars: ✭ 60 (-1.64%)
Mutual labels:  google-cloud, google-cloud-platform
Google Cloud Cpp
C++ Client Libraries for Google Cloud Services
Stars: ✭ 233 (+281.97%)
Mutual labels:  google-cloud, google-cloud-platform
gcpsamples
Simple "Hello world" samples for accessing Google Cloud APIs in (node,dotnet,java,golang,python)
Stars: ✭ 100 (+63.93%)
Mutual labels:  google-cloud, google-cloud-platform
awesome-bigquery-views
Useful SQL queries for Blockchain ETL datasets in BigQuery.
Stars: ✭ 325 (+432.79%)
Mutual labels:  google-cloud, google-cloud-platform
deploy-cloudrun
This action deploys your container image to Cloud Run.
Stars: ✭ 238 (+290.16%)
Mutual labels:  google-cloud, google-cloud-platform
lookup
🔍 Pure Go implementation of fast image search and simple OCR, focused on reading info from screenshots
Stars: ✭ 35 (-42.62%)
Mutual labels:  ocr, image-recognition
ImageToText
OCR with Google's AI technology (Cloud Vision API)
Stars: ✭ 30 (-50.82%)
Mutual labels:  ocr, google-cloud
Flysystem Google Cloud Storage
Flysystem Adapter for Google Cloud Storage
Stars: ✭ 237 (+288.52%)
Mutual labels:  google-cloud, google-cloud-platform
K8s-Cluster-Provisioner-GCP-Terrafrom
This repo will seamlessly setup self managed Kubernetes cluster in GCP using Terraform and Kubespray.
Stars: ✭ 17 (-72.13%)
Mutual labels:  google-cloud, google-cloud-platform
auth
A GitHub Action for authenticating to Google Cloud.
Stars: ✭ 567 (+829.51%)
Mutual labels:  google-cloud, google-cloud-platform
Gcping
Like gcping.com but a command line tool
Stars: ✭ 153 (+150.82%)
Mutual labels:  google-cloud, google-cloud-platform
Googlecloudarchitectprofessional
Resources to prepare for Google Certified Cloud Architect Professional Exam - 2017
Stars: ✭ 177 (+190.16%)
Mutual labels:  google-cloud, google-cloud-platform
augle
Auth + Google = Augle
Stars: ✭ 22 (-63.93%)
Mutual labels:  google-cloud, google-cloud-platform
spanner-bench
Google Cloud Spanner Query Planner Benchmarking
Stars: ✭ 24 (-60.66%)
Mutual labels:  google-cloud, google-cloud-platform

Google Vision, PHP Client

Latest Stable Version Build Status Dependency Status License

Instalation

The easiest way to install Google Vision is through Composer.

composer require jordikroon/google-vision

Next is to obtain an API key through the Google Cloud Platform. To get one visit the link below. https://cloud.google.com/vision/docs/quickstart

Requirements

Basic usage

$vision = new \Vision\Vision(
    $apiKey, 
    [
        // See a list of all features in the table below
        // Feature, Limit
        new \Vision\Feature(\Vision\Feature::FACE_DETECTION, 100),
    ]
);

$imagePath = $_FILES['file']['tmp_name'];
$response = $vision->request(
    // See a list of all image loaders in the table below
    new \Vision\Request\Image\LocalImage($imagePath)
);

$faces = $response->getFaceAnnotations();
foreach ($faces as $face) {
    foreach ($face->getBoundingPoly()->getVertices() as $vertex) {
        echo sprintf('Person at position X %f and Y %f', $vertex->getX(), $vertex->getY());
    }
}

Available features

Name Constant
LABEL_DETECTION \Vision\Feature::LABEL_DETECTION        
TEXT_DETECTION \Vision\Feature::TEXT_DETECTION
FACE_DETECTION \Vision\Feature::FACE_DETECTION
LANDMARK_DETECTION \Vision\Feature::LANDMARK_DETECTION
LOGO_DETECTION \Vision\Feature::LOGO_DETECTION
SAFE_SEARCH_DETECTION \Vision\Feature::SAFE_SEARCH_DETECTION
IMAGE_PROPERTIES \Vision\Feature::IMAGE_PROPERTIES
WEB_DETECTION \Vision\Feature::WEB_DETECTION
CROP_HINTS \Vision\Feature::CROP_HINTS
DOCUMENT_TEXT_DETECTION \Vision\Feature::DOCUMENT_TEXT_DETECTION

Available image loaders

Image loader Description
\Vision\Request\Image\Base64Image Loads Base64 encoded images        
\Vision\Request\Image\BinaryImage Loads binary images (file_get_contents or fopen)
\Vision\Request\Image\GoogleCloudImage Loads images from a Google Cloud bucket
\Vision\Request\Image\LocalImage Loads a locally stored image
\Vision\Request\Image\RemoteImage Loads a remote (HTTP/HTTPS) image somewhere from the web

To add a feature, add a new \Vision\Feature instance to features array used as second parameter. See Basic Usage for a full example.

new \Vision\Feature($feature, $maxResults);

Run tests

$ composer install
$ ./vendor/bin/phpunit 

Authors

Jordi Kroon | Github | Twitter | jordikroon.nl

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].