Skip to content

Latest commit

 

History

History
17 lines (13 loc) · 671 Bytes

README.md

File metadata and controls

17 lines (13 loc) · 671 Bytes

perceptual-hash

A DCT-based perceptual hash in J.

See here for background.

Use

load 'phash.ijs'
phash (read_image 'demo-data/frog.jpeg')
0 0 1 1 0 1 0 1 0 1 1 1 1 1 1 1 1 1 0 0 1 0 1 0 1 1 0 0 0 0 1 0 1 0 0 0 0 1 1 1 0 1 1 0 1 1 0 0 0 0 0 1 1 1 0 1 0 0 1 0 1 0 0 0
phash (read_image 'demo-data/frog.png')
0 0 1 1 0 1 0 1 0 1 1 1 1 1 1 1 1 1 0 0 1 0 1 0 1 1 0 0 0 0 1 0 1 0 0 0 0 1 1 1 0 1 1 0 1 1 0 0 0 0 0 1 1 1 0 1 0 0 1 0 1 0 0 0
phash (read_image 'demo-data/cat.png')
0 0 1 1 0 0 0 0 1 1 1 1 1 0 0 0 0 0 1 1 1 0 0 1 1 0 0 1 0 0 0 0 1 1 1 1 1 0 0 1 0 0 1 1 1 1 0 0 1 1 0 1 1 0 0 0 0 1 1 1 1 0 0 1