GithubHelp home page GithubHelp logo

marcianobarros20 / 4d-plugin-phash Goto Github PK

View Code? Open in Web Editor NEW

This project forked from miyako/4d-plugin-phash

0.0 2.0 0.0 6.36 MB

4D implementation of the pHash The open source perceptual hash library.

C++ 93.59% Objective-C 0.98% C 5.41% HTML 0.02%

4d-plugin-phash's Introduction

4d-plugin-phash

This plugin is a 4D implementation of the [pHash] (http://www.phash.org/) open source perceptual hash library. It can compute and compare the perceptual hashes of PNG, BMP and JPEG files. You can use it, for example, to search similar images of different file types stored in your database.

Note: Audio and Video files are not supported.

Note: If you create the PNG on Mac OS, make sure the "simple file" option is NOT used. Otherwise the hash value will be zero.

Example

$fileA:=Get 4D folder(Current Resources folder)+"2004Cogs.jpg"
$fileB:=Get 4D folder(Current Resources folder)+"2004Cogs.bmp"
$fileC:=Get 4D folder(Current Resources folder)+"2004Cogs.png"

$statusA:=PH Compute DCT ($fileA;$hashA)//3726390674172847513
$statusB:=PH Compute DCT ($fileB;$hashB)//3726390674172847513
$statusC:=PH Compute DCT ($fileC;$hashC)//3726390674172847513

$fileD:=Get 4D folder(Current Resources folder)+"4D-main.jpg"
$statusD:=PH Compute DCT ($fileD;$hashD)//2732728107267830226
$fileE:=Get 4D folder(Current Resources folder)+"4D-main.png"
$statusE:=PH Compute DCT ($fileE;$hashE)//2732728107267830226

$distance1:=PH Compare DCT ($hashA;$hashB)//0
$distance2:=PH Compare DCT ($hashA;$hashD)//26

$sigma:=1
$gamma:=1
$N:=180

$pcc:=0//peak of cross correlation
$pcc1:=PH Compare RADISH ($fileA;$fileB;$sigma;$gamma;$N)//0.9999931960446829526
$pcc2:=PH Compare RADISH ($fileA;$fileC;$sigma;$gamma;$N)//0.9999931960446829526
$pcc3:=PH Compare RADISH ($fileB;$fileC;$sigma;$gamma;$N)//1

$alpha:=2
$lvl:=1

$hamming_distance:=0
$hamming_distance1:=PH Compare MH ($fileA;$fileB;$alpha;$lvl)//0.01215277777777777797
$hamming_distance2:=PH Compare MH ($fileA;$fileC;$alpha;$lvl)//0.01215277777777777797
$hamming_distance3:=PH Compare MH ($fileB;$fileC;$alpha;$lvl)//0

4d-plugin-phash's People

Contributors

miyako avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.