Skip to content

Commit 9bc2e72

Browse files
committed
2.5.9: added VIFP1 metric
1 parent 55e7b16 commit 9bc2e72

File tree

12 files changed

+115
-62
lines changed

12 files changed

+115
-62
lines changed

CHANGELOG

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
JPEG Recompress
22
https://github.com/ImageProcessing-ElectronicPublications/jpeg-recompress
33

4+
2.5.9 "vifp1"
5+
6+
Added VIFP 1 layer metric.
7+
48
2.5.8 "neat"
59

610
Neat adds up all values.

README.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ MPE | `-m mpe` | Mean pixel error (as used by [imgmin](https://gith
5656
PSNR | `-m psnr` | [Peak signal-to-noise ratio](https://en.wikipedia.org/wiki/Peak_signal-to-noise_ratio)
5757
SSIM | `-m ssim` | [Structural similarity](http://en.wikipedia.org/wiki/Structural_similarity)
5858
MS-SSIM* | `-m ms-ssim` | Multi-scale structural similarity (slow!) ([2008 paper](http://foulard.ece.cornell.edu/publications/dmr_hvei2008_paper.pdf))
59+
VIFP1 | `-m vifp1` | [The visual information fidelity (VIF)](http://live.ece.utexas.edu/publications.php) 1 layer.
5960
SmallFry | `-m smallfry` | Linear-weighted BBCQ-like ([original project](https://github.com/dwbuiten/smallfry), [2011 BBCQ paper](http://spie.org/Publications/Proceedings/Paper/10.1117/12.872231) -> [LibSmallFry](https://github.com/ImageProcessing-ElectronicPublications/libsmallfry))
6061
SharpenBad | `-m shbad` | Sharpen discrepancies ([LibSmallFry](https://github.com/ImageProcessing-ElectronicPublications/libsmallfry))
6162
Correlation | `-m cor` | [Correlation](https://en.wikipedia.org/wiki/Correlation)
@@ -72,14 +73,15 @@ SUMMARY | `-m sum` | `(ssim + smallfry + shbad + nhw) / 4` **DEFAULT**
7273
```
7374
Trends:
7475
```
75-
UM = 2.79 * sqrt(sqrt(1.0 / MPE)) - 1.54
76-
UM = 0.95 * sqrt(PNSR) - 4.97
77-
UM = 1.95 * cor_sigma(cor_sigma(cor_sigma(SSIM))) - 0.20
78-
UM = 1.50 * cor_sigma(cor_sigma(MS_SSIM)) + 0.06
79-
UM = 0.0643 * SMALLFRY - 5.86
80-
UM = 1.11 * SHARPENBAD - 0.06
81-
UM = 2.86 * cor_sigma(cor_sigma(COR)) - 1.38
82-
UM = 0.37 * sqrt(sqrt(1.0 / NHW)) - 0.39
76+
UM = 2.99 * sqrt(sqrt(1.0 / MPE)) - 1.70
77+
UM = 1.00 * sqrt(PNSR) - 5.32
78+
UM = 2.07 * cor_sigma(cor_sigma(cor_sigma(SSIM))) - 0.26
79+
UM = 1.59 * cor_sigma(cor_sigma(MS_SSIM)) + 0.01
80+
UM = 3.69 * cor_sigma(VIFP1) - 2.74
81+
UM = 0.0684 * SMALLFRY - 6.29
82+
UM = 1.17 * SHARPENBAD - 0.12
83+
UM = 3.03 * cor_sigma(cor_sigma(COR)) - 1.52
84+
UM = 0.40 * sqrt(sqrt(1.0 / NHW)) - 0.48
8385
8486
cor_sigma(M) = 1.0 - sqrt(1.0 - M * M)
8587
```

man/man1/jpeg-compare.1

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
1-
.TH "jpeg-compare" 2.5.8 "13 Jan 2023" "User manual"
1+
.TH "jpeg-compare" 2.5.9 "15 Jan 2023" "User manual"
2+
23
.SH NAME
34
jpeg-compare
5+
46
.SH DESCRIPTION
57
Compare two JPEG photos to judge how similar they are.
68
The fast comparison method returns an integer from 0 to 99, where 0 is identical.
79
PSNR, SSIM, and MS-SSIM return floats but require images to be the same dimensions.
10+
811
.SH SYNOPSIS
912
jpeg-compare [options] image1.jpg image2.jpg
13+
1014
.SH OPTIONS
1115
.TP
1216
\fB\-h\fR, \fB\-\-help\fR
1317
output program help
1418
.TP
1519
\fB\-m\fR, \fB\-\-method\fR [arg]
16-
set comparison method to one of 'fast', 'mpe', 'psnr', 'ssim', 'ms-ssim', 'smallfry', 'shbad', `cor`, 'nhw', 'ssimfry', 'ssimshb', 'sum' [fast]
20+
set comparison method to one of 'fast', 'mpe', 'psnr', 'ssim', 'ms-ssim', 'vifp1', 'smallfry', 'shbad', 'cor', 'nhw', 'ssimfry', 'ssimshb', 'sum' [fast]
1721
.TP
1822
\fB\-n\fR, \fB\-\-norm\fR
1923
UM scale metric
@@ -35,6 +39,7 @@ output program version
3539
.TP
3640
\fB\-\-short\fR
3741
do not prefix output with the name of the used method
42+
3843
.SH EXAMPLES
3944
Do a fast compare of two images:
4045
.PP
@@ -50,6 +55,7 @@ Calculate SSIM:
5055
.PP
5156
.I
5257
jpeg-compare --method ssim image1.jpg image2.jpg
58+
5359
.SH NOTES
5460
"Universal Scale" of metrics (UM):
5561
0.0
@@ -68,21 +74,23 @@ jpeg-compare --method ssim image1.jpg image2.jpg
6874
.PP
6975
Trends:
7076

71-
UM = 2.79 * sqrt(sqrt(1.0 / MPE)) - 1.54
72-
UM = 0.95 * sqrt(PNSR) - 4.97
73-
UM = 1.95 * cor_sigma(cor_sigma(cor_sigma(SSIM))) - 0.20
74-
UM = 1.50 * cor_sigma(cor_sigma(MS_SSIM)) + 0.06
75-
UM = 0.0643 * SMALLFRY - 5.86
76-
UM = 1.11 * SHARPENBAD - 0.06
77-
UM = 2.86 * cor_sigma(cor_sigma(COR)) - 1.38
78-
UM = 0.37 * sqrt(sqrt(1.0 / NHW)) - 0.39
77+
UM = 2.99 * sqrt(sqrt(1.0 / MPE)) - 1.70
78+
UM = 1.00 * sqrt(PNSR) - 5.32
79+
UM = 2.07 * cor_sigma(cor_sigma(cor_sigma(SSIM))) - 0.26
80+
UM = 1.59 * cor_sigma(cor_sigma(MS_SSIM)) + 0.01
81+
UM = 3.69 * cor_sigma(VIFP1) - 2.74
82+
UM = 0.0684 * SMALLFRY - 6.29
83+
UM = 1.17 * SHARPENBAD - 0.12
84+
UM = 3.03 * cor_sigma(cor_sigma(COR)) - 1.52
85+
UM = 0.40 * sqrt(sqrt(1.0 / NHW)) - 0.48
7986
cor_sigma(M) = 1.0 - sqrt(1.0 - M * M)
8087

8188
.SH COPYRIGHT
8289
JPEG-Archive is copyright © 2015 Daniel G. Taylor
8390
Image Quality Assessment (IQA) is copyright 2011, Tom Distler (http://tdistler.com)
8491
SmallFry is copyright 2014, Derek Buitenhuis (https://github.com/dwbuiten)
8592
All rights reserved.
93+
8694
.SH "SEE ALSO"
8795
jpeg-hash,
8896
jpeg-recompress,

man/man1/jpeg-hash.1

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1-
.TH "jpeg-hash" 2.5.5 "14 Dec 2022" "User manual"
1+
.TH "jpeg-hash" 2.5.9 "15 Jan 2023" "User manual"
2+
23
.SH NAME
34
jpeg-hash
5+
46
.SH DESCRIPTION
57
Create a hash of an image that can be used to compare it to other images quickly.
8+
69
.SH SYNOPSIS
710
jpeg-hash [options] image.jpg
11+
812
.SH OPTIONS
913
.TP
1014
\fB\-h\fR, \fB\-\-help\fR
@@ -15,6 +19,7 @@ set fast comparison image hash size
1519
.TP
1620
\fB\-V\fR, \fB\-\-version\fR
1721
output program version
22+
1823
.SH EXAMPLES
1924
.I
2025
jpeg-hash image.jpg
@@ -23,6 +28,7 @@ jpeg-hash image.jpg
2328
Image Quality Assessment (IQA) is copyright 2011, Tom Distler (http://tdistler.com)
2429
SmallFry is copyright 2014, Derek Buitenhuis (https://github.com/dwbuiten)
2530
All rights reserved.
31+
2632
.SH "SEE ALSO"
2733
jpeg-compare,
2834
jpeg-recompress,

man/man1/jpeg-recompress.1

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
1-
.TH "jpeg-recompress" 2.5.8 "13 Jan 2023" "User manual"
1+
.TH "jpeg-recompress" 2.5.9 "15 Jan 2023" "User manual"
2+
23
.SH NAME
34
jpeg-recompress
5+
46
.SH DESCRIPTION
57
Compress JPEGs by re-encoding to the smallest JPEG quality while keeping perceived
68
visual quality the same and by making sure huffman tables are optimized.
79
This is a lossy operation, but the images are visually identical and it usually
810
saves 30-70% of the size for JPEGs coming from a digital camera, particularly DSLRs.
911
By default all EXIF/IPTC/XMP and color profile metadata is copied over,
1012
but this can be disabled to save more space if desired.
13+
1114
.SH SYNOPSIS
1215
jpeg-recompress [options] image.jpg compressed.jpg
16+
1317
.SH OPTIONS
1418
.TP
1519
\fB\-a\fR, \fB\-\-accurate\fR
@@ -31,7 +35,7 @@ output program help
3135
set the number of runs to attempt [6]
3236
.TP
3337
\fB\-m\fR, \fB\-\-method\fR [arg]
34-
set comparison method to one of 'mpe', 'psnr', 'ssim', 'ms-ssim', 'smallfry', 'shbad', `cor`, 'nhw', 'ssimfry', 'ssimshb', 'sum' [sum]
38+
set comparison method to one of 'mpe', 'psnr', 'ssim', 'ms-ssim', 'vifp1', 'smallfry', 'shbad', 'cor', 'nhw', 'ssimfry', 'ssimshb', 'sum' [sum]
3539
.TP
3640
\fB\-n\fR, \fB\-\-min\fR [arg]
3741
minimum JPEG quality [40]
@@ -71,6 +75,7 @@ output program version
7175
.TP
7276
\fB\-Y\fR, \fB\-\-ycbcr\fR [arg]
7377
YCbCr jpeg colorspace: 0 - source, >0 - YCrCb, <0 - RGB
78+
7479
.SH EXAMPLES
7580
Default settings:
7681
.PP
@@ -121,6 +126,7 @@ Disable all output except for errors:
121126
.PP
122127
.I
123128
jpeg-recompress --quiet image.jpg compressed.jpg
129+
124130
.SH NOTES
125131
"Universal Scale" of metrics (UM):
126132
0.0
@@ -139,21 +145,23 @@ jpeg-recompress --quiet image.jpg compressed.jpg
139145
.PP
140146
Trends:
141147

142-
UM = 2.79 * sqrt(sqrt(1.0 / MPE)) - 1.54
143-
UM = 0.95 * sqrt(PNSR) - 4.97
144-
UM = 1.95 * cor_sigma(cor_sigma(cor_sigma(SSIM))) - 0.20
145-
UM = 1.50 * cor_sigma(cor_sigma(MS_SSIM)) + 0.06
146-
UM = 0.0643 * SMALLFRY - 5.86
147-
UM = 1.11 * SHARPENBAD - 0.06
148-
UM = 2.86 * cor_sigma(cor_sigma(COR)) - 1.38
149-
UM = 0.37 * sqrt(sqrt(1.0 / NHW)) - 0.39
148+
UM = 2.99 * sqrt(sqrt(1.0 / MPE)) - 1.70
149+
UM = 1.00 * sqrt(PNSR) - 5.32
150+
UM = 2.07 * cor_sigma(cor_sigma(cor_sigma(SSIM))) - 0.26
151+
UM = 1.59 * cor_sigma(cor_sigma(MS_SSIM)) + 0.01
152+
UM = 3.69 * cor_sigma(VIFP1) - 2.74
153+
UM = 0.0684 * SMALLFRY - 6.29
154+
UM = 1.17 * SHARPENBAD - 0.12
155+
UM = 3.03 * cor_sigma(cor_sigma(COR)) - 1.52
156+
UM = 0.40 * sqrt(sqrt(1.0 / NHW)) - 0.48
150157
cor_sigma(M) = 1.0 - sqrt(1.0 - M * M)
151158

152159
.SH COPYRIGHT
153160
JPEG-Archive is copyright © 2015 Daniel G. Taylor
154161
Image Quality Assessment (IQA) is copyright 2011, Tom Distler (http://tdistler.com)
155162
SmallFry is copyright 2014, Derek Buitenhuis (https://github.com/dwbuiten)
156163
All rights reserved.
164+
157165
.SH "SEE ALSO"
158166
jpeg-compare,
159167
jpeg-hash,

man/man1/jpeg-zfpoint.1

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
1-
.TH "jpeg-zfpoint" 2.5.5 "14 Dec 2022" "User manual"
1+
.TH "jpeg-zfpoint" 2.5.9 "15 Jan 2023" "User manual"
2+
23
.SH NAME
34
jpeg-zfpoint
5+
46
.SH DESCRIPTION
57
Find ZF point of compress JPEGs by re-encoding to the smallest JPEG quality
68
while keeping perceived visual quality the same and by making sure huffman tables are optimized.
79
This is a lossy operation, but the images are visually identical and it usually
810
saves 30-70% of the size for JPEGs coming from a digital camera, particularly DSLRs.
911
By default all EXIF/IPTC/XMP and color profile metadata is copied over,
1012
but this can be disabled to save more space if desired.
13+
1114
.SH SYNOPSIS
1215
jpeg-zfpoint [options] image.jpg zfpoint.jpg
16+
1317
.SH OPTIONS
1418
.TP
1519
\fB\-a\fR, \fB\-\-accurate\fR
@@ -67,11 +71,13 @@ Default settings:
6771
.PP
6872
.I
6973
jpeg-zfpoint image.jpg zfpoint.jpg
74+
7075
.SH COPYRIGHT
7176
JPEG-Archive is copyright © 2015 Daniel G. Taylor
7277
Image Quality Assessment (IQA) is copyright 2011, Tom Distler (http://tdistler.com)
7378
SmallFry is copyright 2014, Derek Buitenhuis (https://github.com/dwbuiten)
7479
All rights reserved.
80+
7581
.SH "SEE ALSO"
7682
jpeg-compare,
7783
jpeg-hash,

man/man1/webp-compress.1

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH "webp-compress" 2.5.8 "13 Jan 2023" "User manual"
1+
.TH "webp-compress" 2.5.9 "15 Jan 2023" "User manual"
22

33
.SH NAME
44
webp-compress
@@ -12,6 +12,7 @@ All EXIF/IPTC/XMP and color profile metadata are not preserved!
1212

1313
.SH SYNOPSIS
1414
webp-compress [options] image.[jpg|ppm] compressed.webp
15+
1516
.SH OPTIONS
1617
.TP
1718
\fB\-c\fR, \fB\-\-no-copy\fR
@@ -30,7 +31,7 @@ output program help
3031
set the number of runs to attempt [8]
3132
.TP
3233
\fB\-m\fR, \fB\-\-method\fR [arg]
33-
set comparison method to one of 'mpe', 'psnr', 'ssim', 'ms-ssim', 'smallfry', 'shbad', `cor, 'nhw', 'ssimfry', 'ssimshb', 'sum' [sum]
34+
set comparison method to one of 'mpe', 'psnr', 'ssim', 'ms-ssim', 'vifp1', 'smallfry', 'shbad', 'cor', 'nhw', 'ssimfry', 'ssimshb', 'sum' [sum]
3435
.TP
3536
\fB\-n\fR, \fB\-\-min\fR [arg]
3637
minimum quality [1]
@@ -89,6 +90,7 @@ Disable all output except for errors:
8990
.PP
9091
.I
9192
webp-compress --quiet image.jpg compressed.webp
93+
9294
.SH NOTES
9395
"Universal Scale" of metrics (UM):
9496
0.0
@@ -107,14 +109,15 @@ webp-compress --quiet image.jpg compressed.webp
107109
.PP
108110
Trends:
109111

110-
UM = 2.79 * sqrt(sqrt(1.0 / MPE)) - 1.54
111-
UM = 0.95 * sqrt(PNSR) - 4.97
112-
UM = 1.95 * cor_sigma(cor_sigma(cor_sigma(SSIM))) - 0.20
113-
UM = 1.50 * cor_sigma(cor_sigma(MS_SSIM)) + 0.06
114-
UM = 0.0643 * SMALLFRY - 5.86
115-
UM = 1.11 * SHARPENBAD - 0.06
116-
UM = 2.86 * cor_sigma(cor_sigma(COR)) - 1.38
117-
UM = 0.37 * sqrt(sqrt(1.0 / NHW)) - 0.39
112+
UM = 2.99 * sqrt(sqrt(1.0 / MPE)) - 1.70
113+
UM = 1.00 * sqrt(PNSR) - 5.32
114+
UM = 2.07 * cor_sigma(cor_sigma(cor_sigma(SSIM))) - 0.26
115+
UM = 1.59 * cor_sigma(cor_sigma(MS_SSIM)) + 0.01
116+
UM = 3.69 * cor_sigma(VIFP1) - 2.74
117+
UM = 0.0684 * SMALLFRY - 6.29
118+
UM = 1.17 * SHARPENBAD - 0.12
119+
UM = 3.03 * cor_sigma(cor_sigma(COR)) - 1.52
120+
UM = 0.40 * sqrt(sqrt(1.0 / NHW)) - 0.48
118121
cor_sigma(M) = 1.0 - sqrt(1.0 - M * M)
119122

120123
.SH COPYRIGHT

0 commit comments

Comments
 (0)