{"id":18647516,"url":"https://github.com/jordikroon/php-google-vision-api","last_synced_at":"2025-05-07T16:09:50.504Z","repository":{"id":57001419,"uuid":"80249933","full_name":"jordikroon/Php-Google-Vision-Api","owner":"jordikroon","description":"Google Vision Api for PHP (https://cloud.google.com/vision/)","archived":false,"fork":false,"pushed_at":"2020-09-10T15:51:14.000Z","size":109,"stargazers_count":61,"open_issues_count":7,"forks_count":22,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-05-07T16:09:32.349Z","etag":null,"topics":["api-wrapper","google","google-cloud","google-cloud-platform","google-vision","image-recognition","ocr","php"],"latest_commit_sha":null,"homepage":"https://twitter.com/jordi_kr","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jordikroon.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-27T22:02:29.000Z","updated_at":"2024-04-10T07:02:39.000Z","dependencies_parsed_at":"2022-08-21T14:10:30.582Z","dependency_job_id":null,"html_url":"https://github.com/jordikroon/Php-Google-Vision-Api","commit_stats":null,"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jordikroon%2FPhp-Google-Vision-Api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jordikroon%2FPhp-Google-Vision-Api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jordikroon%2FPhp-Google-Vision-Api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jordikroon%2FPhp-Google-Vision-Api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jordikroon","download_url":"https://codeload.github.com/jordikroon/Php-Google-Vision-Api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252912996,"owners_count":21824066,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-wrapper","google","google-cloud","google-cloud-platform","google-vision","image-recognition","ocr","php"],"created_at":"2024-11-07T06:26:46.011Z","updated_at":"2025-05-07T16:09:50.477Z","avatar_url":"https://github.com/jordikroon.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Google Vision, PHP Client\n=========================\n\n[![Latest Stable Version](https://poser.pugx.org/jordikroon/google-vision/v/stable)](https://packagist.org/packages/jordikroon/google-vision)\n[![Build Status](https://travis-ci.org/jordikroon/Php-Google-Vision-Api.svg?branch=master)](https://travis-ci.org/jordikroon/Php-Google-Vision-Api)\n[![Dependency Status](https://www.versioneye.com/user/projects/588bdad0c64626002e5d6baf/badge.svg?style=flat-square)](https://www.versioneye.com/user/projects/588bdad0c64626002e5d6baf)\n[![License](https://poser.pugx.org/jordikroon/google-vision/license)](https://packagist.org/packages/jordikroon/google-vision)\n\n## Instalation\n\nThe easiest way to install Google Vision is through [Composer](http://getcomposer.org).\n\n```bash\ncomposer require jordikroon/google-vision\n```\n\nNext is to obtain an API key through the [Google Cloud Platform](https://cloud.google.com). To get one visit the link below.\nhttps://cloud.google.com/vision/docs/quickstart\n\nRequirements\n------------\n - [PHP \u003e= 5.6](http://php.net/releases/5_6_0.php)\n - [Curl extension](http://php.net/manual/en/curl.installation.php)\n\nBasic usage\n-----------\n\n```php\n$vision = new \\Vision\\Vision(\n    $apiKey, \n    [\n        // See a list of all features in the table below\n        // Feature, Limit\n        new \\Vision\\Feature(\\Vision\\Feature::FACE_DETECTION, 100),\n    ]\n);\n\n$imagePath = $_FILES['file']['tmp_name'];\n$response = $vision-\u003erequest(\n    // See a list of all image loaders in the table below\n    new \\Vision\\Request\\Image\\LocalImage($imagePath)\n);\n\n$faces = $response-\u003egetFaceAnnotations();\nforeach ($faces as $face) {\n    foreach ($face-\u003egetBoundingPoly()-\u003egetVertices() as $vertex) {\n        echo sprintf('Person at position X %f and Y %f', $vertex-\u003egetX(), $vertex-\u003egetY());\n    }\n}\n```\n\nAvailable features\n------------------\n\n| Name                                                                                | Constant                                  |\n| :-----------------------------------------------------------------------------------| :---------------------------------------- |\n| [LABEL_DETECTION](https://cloud.google.com/vision/docs/detecting-labels)            | \\Vision\\Feature::LABEL_DETECTION          |\n| [TEXT_DETECTION](https://cloud.google.com/vision/docs/detecting-text)               | \\Vision\\Feature::TEXT_DETECTION           |\n| [FACE_DETECTION](https://cloud.google.com/vision/docs/detecting-faces)              | \\Vision\\Feature::FACE_DETECTION           |\n| [LANDMARK_DETECTION](https://cloud.google.com/vision/docs/detecting-landmarks)      | \\Vision\\Feature::LANDMARK_DETECTION       |\n| [LOGO_DETECTION](https://cloud.google.com/vision/docs/detecting-logos)              | \\Vision\\Feature::LOGO_DETECTION           |\n| [SAFE_SEARCH_DETECTION](https://cloud.google.com/vision/docs/detecting-safe-search) | \\Vision\\Feature::SAFE_SEARCH_DETECTION    |\n| [IMAGE_PROPERTIES](https://cloud.google.com/vision/docs/detecting-properties)       | \\Vision\\Feature::IMAGE_PROPERTIES         |\n| [WEB_DETECTION](https://cloud.google.com/vision/docs/detecting-web)                 | \\Vision\\Feature::WEB_DETECTION            |\n| [CROP_HINTS](https://cloud.google.com/vision/docs/detecting-crop-hints)             | \\Vision\\Feature::CROP_HINTS               |\n| [DOCUMENT_TEXT_DETECTION](https://cloud.google.com/vision/docs/detecting-fulltext)  | \\Vision\\Feature::DOCUMENT_TEXT_DETECTION  |\n\nAvailable image loaders\n------------------\n\n| Image loader                                                                     | Description                                              |\n| :--------------------------------------------------------------------------------| :------------------------------------------------------- |\n| [\\Vision\\Request\\Image\\Base64Image](src/Request/Image/Base64Image.php)           | Loads Base64 encoded images                              |\n| [\\Vision\\Request\\Image\\BinaryImage](src/Request/Image/BinaryImage.php)           | Loads binary images (file_get_contents or fopen)         |\n| [\\Vision\\Request\\Image\\GoogleCloudImage](src/Request/Image/GoogleCloudImage.php) | Loads images from a Google Cloud bucket                  |\n| [\\Vision\\Request\\Image\\LocalImage](src/Request/Image/LocalImage.php)             | Loads a locally stored image                             |\n| [\\Vision\\Request\\Image\\RemoteImage](src/Request/Image/RemoteImage.php)           | Loads a remote (HTTP/HTTPS) image somewhere from the web |\n\nTo add a feature, add a `new \\Vision\\Feature` instance to features array used as second parameter. See [Basic Usage](#Basic-Usage) for a full example.\n```php\nnew \\Vision\\Feature($feature, $maxResults);\n```\n\nRun tests\n---------\n\n```bash\n$ composer install\n$ ./vendor/bin/phpunit \n```\n\nAuthors\n-------\nJordi Kroon | [Github](https://github.com/jordikroon) | [Twitter](https://twitter.com/jordi12100) | [jordikroon.nl](https://jordikroon.nl)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjordikroon%2Fphp-google-vision-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjordikroon%2Fphp-google-vision-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjordikroon%2Fphp-google-vision-api/lists"}