Oregami
Repositories/oxedyne/fe2o3

oxedyne/fe2o3/fe2o3_hash/test_images/README.txt

1.6 KiB, 1 run

created by r1870400018:17754, which is this file's identity for as long as the history lasts, whatever it is later renamed to

download · who wrote it · its history

1Perceptual hash test fixtures
2=============================
3
4Three synthetic 64 by 64 greyscale subjects, each with four variants produced by an external
5tool. The transforms are the oracle: a hash that did not survive a half-size reduction, a
6quality forty re-encode, a ten per cent brightening and a lossless to lossy conversion would be
7useless, and tests/phash.rs asserts that it does.
8
9The portable greymap is used because it is trivial to read, which keeps the decode outside the
10library under test, as the module's design requires.
11
12Regenerate with ImageMagick 7:
13
14 magick -size 64x64 -seed 42 plasma:fractal -colorspace Gray -depth 8 m_plasma.png
15 magick -size 64x64 gradient:white-black -colorspace Gray -rotate 30 \
16 -crop 64x64+0+0 +repage -depth 8 m_gradient.png
17 magick -size 64x64 xc:white -fill black \
18 -draw "circle 32,32 32,8" -draw "rectangle 4,4 20,20" \
19 -draw "polygon 40,50 60,60 44,62" -colorspace Gray -depth 8 m_shapes.png
20
21 for b in plasma gradient shapes; do
22 magick m_$b.png -depth 8 ${b}_orig.pgm
23 magick m_$b.png -resize 50% -depth 8 ${b}_half.pgm
24 magick m_$b.png -quality 40 v.jpg && magick v.jpg -depth 8 ${b}_q40.pgm
25 magick m_$b.png -modulate 110 -depth 8 ${b}_bright.pgm
26 magick m_$b.png -quality 85 v.jpg && magick v.jpg -depth 8 ${b}_png2jpg.pgm
27 done
28
29Measured over these fixtures: same-subject distances have a mean of 1.08 and a maximum of 5 for
30the difference hash, and a mean of 0.50 and a maximum of 4 for the cosine transform hash, while
31unrelated pairs have a minimum of 25 and 28 respectively.
32
33No photograph appears here.