Skip to content

Commit

Permalink
2.6.3: correct UM model
Browse files Browse the repository at this point in the history
  • Loading branch information
zvezdochiot committed Feb 9, 2023
1 parent 1bdc573 commit d850c2e
Show file tree
Hide file tree
Showing 11 changed files with 1,036 additions and 46 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
JPEG Recompress
https://github.com/ImageProcessing-ElectronicPublications/jpeg-recompress

2.6.3 "um"

Research: correct UM model.
2023, zvezdochiot

2.6.2 "sharpenbad"

reimplementation SHARPENBAD:
Expand Down
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@ AR ?= ar
RM ?= rm
INSTALL = install

LIBOBJ = src/jmetrics.o

.PHONY: test clean install uninstall

all: $(PROGS)

$(LIBIMM): src/jmetrics.o
$(LIBIMM): $(LIBOBJ)
$(AR) crs $@ $^

$(PROGR): src/$(PROGR).c $(LIBIMM)
Expand All @@ -49,7 +51,7 @@ test: test/test.c $(LIBIMM)
./test/$@

clean:
$(RM) -rf $(PROGS) $(LIBIMM) test/test src/*.o
$(RM) -rf $(PROGS) $(LIBIMM) $(LIBOBJ) test/test

install: all
$(INSTALL) -d $(PREFIX)/bin
Expand Down
17 changes: 10 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Why are they different sizes? The default quality settings are set to average ou

#### Image Comparison Metrics

The following metrics are available when using `jpeg-recompress`. SSIM is the default.
The following metrics are available when using `jpeg-recompress`. SUM is the default.

Name | Option | Description
----------- | ------------- | -----------
Expand All @@ -69,7 +69,10 @@ SUMMARY | `-m sum` | `(ssim + vipf1 + smallfry + shbad + nhw) / 5` **DE

**Note**: The SmallFry algorithm may be [patented](http://www.jpegmini.com/main/technology) so use with caution.

"Universal Scale" of metrics (UM):
#### "Universal Scale" of metrics (UM):

![UM example](plot_um.svg)

```
0.0
... (DIRTY) ...
Expand All @@ -87,16 +90,16 @@ SUMMARY | `-m sum` | `(ssim + vipf1 + smallfry + shbad + nhw) / 5` **DE
```
Trends:
```
UM = 2.42 * sqrt(sqrt(1.0 / MPE)) - 1.38
UM = 0.25 * (sqrt(sqrt(255.0 / MPE)) - 1.0)
UM = 0.87 * sqrt(PNSR) - 4.70
UM = 1.02 * sqrt(sqrt(1.0 / MSEF)) - 1.49
UM = 0.5 * (sqrt(sqrt(1.0 / MSEF)) - 1.0)
UM = 1.0 * cor_sigma(cor_sigma(COR))
UM = 1.51 * cor_sigma(cor_sigma(cor_sigma(SSIM)))
UM = 1.59 * cor_sigma(cor_sigma(MS_SSIM))
UM = 1.06 * cor_sigma(cor_sigma(VIFP1))
UM = 0.0658 * SMALLFRY - 6.07
UM = 1.40 * cor_sigma(SHARPENBAD)
UM = 0.222 * sqrt(sqrt(1.0 / NHW))
UM = 3.0 * (SMALLFRY * 0.01 - 0.8)
UM = 1.0 * cor_sigma(sqrt(SHARPENBAD))
UM = 0.333 * (sqrt(sqrt(1.0 / NHW)) - 1.0)
cor_sigma(M) = 1.0 - sqrt(1.0 - M * M)
```
Expand Down
12 changes: 6 additions & 6 deletions man/man1/jpeg-compare.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH "jpeg-compare" 1 2.6.2 "08 Feb 2023" "User manual"
.TH "jpeg-compare" 1 2.6.3 "09 Feb 2023" "User manual"

.SH NAME
jpeg-compare
Expand Down Expand Up @@ -74,16 +74,16 @@ jpeg-compare --method ssim image1.jpg image2.jpg
.PP
Trends:

UM = 2.42 * sqrt(sqrt(1.0 / MPE)) - 1.38
UM = 0.25 * (sqrt(sqrt(255.0 / MPE)) - 1.0)
UM = 0.87 * sqrt(PNSR) - 4.70
UM = 1.02 * sqrt(sqrt(1.0 / MSEF)) - 1.49
UM = 0.5 * (sqrt(sqrt(1.0 / MSEF)) - 1.0)
UM = 1.0 * cor_sigma(cor_sigma(COR))
UM = 1.51 * cor_sigma(cor_sigma(cor_sigma(SSIM)))
UM = 1.59 * cor_sigma(cor_sigma(MS_SSIM))
UM = 1.06 * cor_sigma(cor_sigma(VIFP1))
UM = 0.0658 * SMALLFRY - 6.07
UM = 1.40 * cor_sigma(SHARPENBAD)
UM = 0.222 * sqrt(sqrt(1.0 / NHW))
UM = 3.0 * (SMALLFRY * 0.01 - 0.8)
UM = 1.0 * cor_sigma(sqrt(SHARPENBAD))
UM = 0.333 * (sqrt(sqrt(1.0 / NHW)) - 1.0)
cor_sigma(M) = 1.0 - sqrt(1.0 - M * M)

.SH COPYRIGHT
Expand Down
2 changes: 1 addition & 1 deletion man/man1/jpeg-hash.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH "jpeg-hash" 1 2.6.2 "08 Feb 2023" "User manual"
.TH "jpeg-hash" 1 2.6.3 "09 Feb 2023" "User manual"

.SH NAME
jpeg-hash
Expand Down
12 changes: 6 additions & 6 deletions man/man1/jpeg-recompress.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH "jpeg-recompress" 1 2.6.2 "08 Feb 2023" "User manual"
.TH "jpeg-recompress" 1 2.6.3 "09 Feb 2023" "User manual"

.SH NAME
jpeg-recompress
Expand Down Expand Up @@ -145,16 +145,16 @@ jpeg-recompress --quiet image.jpg compressed.jpg
.PP
Trends:

UM = 2.42 * sqrt(sqrt(1.0 / MPE)) - 1.38
UM = 0.25 * (sqrt(sqrt(255.0 / MPE)) - 1.0)
UM = 0.87 * sqrt(PNSR) - 4.70
UM = 1.02 * sqrt(sqrt(1.0 / MSEF)) - 1.49
UM = 0.5 * (sqrt(sqrt(1.0 / MSEF)) - 1.0)
UM = 1.0 * cor_sigma(cor_sigma(COR))
UM = 1.51 * cor_sigma(cor_sigma(cor_sigma(SSIM)))
UM = 1.59 * cor_sigma(cor_sigma(MS_SSIM))
UM = 1.06 * cor_sigma(cor_sigma(VIFP1))
UM = 0.0658 * SMALLFRY - 6.07
UM = 1.40 * cor_sigma(SHARPENBAD)
UM = 0.222 * sqrt(sqrt(1.0 / NHW))
UM = 3.0 * (SMALLFRY * 0.01 - 0.8)
UM = 1.0 * cor_sigma(sqrt(SHARPENBAD))
UM = 0.333 * (sqrt(sqrt(1.0 / NHW)) - 1.0)
cor_sigma(M) = 1.0 - sqrt(1.0 - M * M)

.SH COPYRIGHT
Expand Down
2 changes: 1 addition & 1 deletion man/man1/jpeg-zfpoint.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH "jpeg-zfpoint" 1 2.6.2 "08 Feb 2023" "User manual"
.TH "jpeg-zfpoint" 1 2.6.3 "09 Feb 2023" "User manual"

.SH NAME
jpeg-zfpoint
Expand Down
14 changes: 7 additions & 7 deletions man/man1/webp-compress.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH "webp-compress" 1 2.6.2 "08 Feb 2023" "User manual"
.TH "webp-compress" 1 2.6.3 "09 Feb 2023" "User manual"

.SH NAME
webp-compress
Expand Down Expand Up @@ -109,17 +109,17 @@ webp-compress --quiet image.jpg compressed.webp
.PP
Trends:

UM = 2.42 * sqrt(sqrt(1.0 / MPE)) - 1.38
UM = 0.25 * (sqrt(sqrt(255.0 / MPE)) - 1.0)
UM = 0.87 * sqrt(PNSR) - 4.70
UM = 1.02 * sqrt(sqrt(1.0 / MSEF)) - 1.49
UM = 0.5 * (sqrt(sqrt(1.0 / MSEF)) - 1.0)
UM = 1.0 * cor_sigma(cor_sigma(COR))
UM = 1.51 * cor_sigma(cor_sigma(cor_sigma(SSIM)))
UM = 1.59 * cor_sigma(cor_sigma(MS_SSIM))
UM = 1.06 * cor_sigma(cor_sigma(VIFP1))
UM = 0.0658 * SMALLFRY - 6.07
UM = 1.40 * cor_sigma(SHARPENBAD)
UM = 0.222 * sqrt(sqrt(1.0 / NHW))
cor_sigma(M) = 1.0 - sqrt(1.0 - M * M)
UM = 3.0 * (SMALLFRY * 0.01 - 0.8)
UM = 1.0 * cor_sigma(sqrt(SHARPENBAD))
UM = 0.333 * (sqrt(sqrt(1.0 / NHW)) - 1.0)
cor_sigma(M) = 1.0 - sqrt(1.0 - M * M)

.SH COPYRIGHT
JPEG-Archive is copyright © 2015 Daniel G. Taylor
Expand Down
Loading

0 comments on commit d850c2e

Please sign in to comment.