Login   Register  
PHP Classes
elePHPant
Icontem

File: demo.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Ákos Nikházy  >  PHP Compare Images Similarity  >  demo.php  >  Download  
File: demo.php
Role: Sample output
Content type: text/plain
Description: demo
Class: PHP Compare Images Similarity
Compare two images to find if they are similar
Author: By
Last change:
Date: 10 months ago
Size: 547 bytes
 

Contents

Class file image Download
<?php
require 'image.compare.class.php';
 
/*
	these two images are almost the same so the hammered distance will be less than 10
	try it with images like this:
		1. the example images
		2. two complatly different image
		3. the same image (returned number should be 0)
		4. the same image but with different size, even different aspect ratio (returned number should be 0)
	you will see how the returned number will represent the similarity of the images.
*/ 
$class = new compareImages;
echo $class->compare('1.jpg','2.jpg');
  
?>