Skip to content

ravichdev/php-image-match

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP Image Match

PHP Image match is php ported version of image-match

Based on the paper An image signature for any kind of image, Wong et al.

Quick start

  • git clone [email protected]:ravich11/php-image-match.git
  • cd php-image-match
  • composer install

Storing Image

<?php

require './vendor/autoload.php';

use Elasticsearch\ClientBuilder;
use ImageMatch\Database\ElasticSearchDatabase;

$builder = ClientBuilder::create();
// You have a elasticsearch instance with hostname `elasticsearch` and port 9000
$builder->setHosts(['elasticsearch']);
$client = $builder->build();

$signature_db = new ElasticSearchDatabase($client);
$response = $signature_db->addImage(PATH_TO_THE_IMAGE_FILE);

Searching Image

<?php

require './vendor/autoload.php';

use Elasticsearch\ClientBuilder;
use ImageMatch\Database\ElasticSearchDatabase;

$builder = ClientBuilder::create();
// You have a elasticsearch instance with hostname `elasticsearch` and port 9000
$builder->setHosts(['elasticsearch']);
$client = $builder->build();

$signature_db = new ElasticSearchDatabase($client);
$response = $signature_db->searchImage(PATH_TO_THE_IMAGE_FILE);

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages