Skip to content

Commit 0964841

Browse files
committed
0.2.5: smallfry
1 parent fc301ba commit 0964841

File tree

8 files changed

+570
-16
lines changed

8 files changed

+570
-16
lines changed

README.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,24 @@
33
This utility compares two graphics files based on metrics.
44

55
Includes metrics:
6+
67
- MSE / MAX^2, MAX = 255
78
- PSNR
8-
- NHW neatness
9-
- NHW convolutional
10-
- NHW relative
9+
- [SMALLFRY](https://github.com/dwbuiten/smallfry)
10+
- [SHARPENBAD](https://github.com/ImageProcessing-ElectronicPublications/libsmallfry)
11+
- [Correlation](https://github.com/ImageProcessing-ElectronicPublications/libsmallfry)
12+
- [NHW neatness](https://github.com/rcanut/NHW_Neatness_Metrics)
13+
- [NHW convolutional](https://github.com/rcanut/NHW_Neatness_Metrics/issues/1)
14+
- [NHW relative](https://github.com/rcanut/NHW_Neatness_Metrics/issues/1)
1115

1216
The value of MSE metrics is from 0.0 (minimum difference) to 1.0 (maximum difference).
1317

1418
The value of PSNR metrics is from 1.0 (maximum difference) to inf.
1519

20+
The value of SHARPENBAD metrics is from 1.0 (minimum difference) to -1.0 (maximum difference).
21+
22+
The value of Correlation metrics is from 1.0 (minimum difference) to 0.0 (maximum difference).
23+
1624
The value of NHW metrics is from 0.0 (minimum difference) to 1.0 (maximum difference) ([origin project code](https://github.com/rcanut/NHW_Neatness_Metrics/issues/1)).
1725

1826
## build
@@ -57,8 +65,9 @@ stbnhwmetrics ${IMAGE_ORIG_PATH} ${IMAGE_COMPARE_PATH} [metric.out.png]
5765
## structure
5866

5967
- `dependencies.c` - API [stb](https://github.com/nothings/stb.git)
60-
- `metricsnhw.h` - NHW metrics ([origin project code](https://github.com/rcanut/NHW_Neatness_Metrics/issues/1))
68+
- `metricsnhw.h` - [NHW metrics](https://github.com/rcanut/NHW_Neatness_Metrics/issues/1)
6169
- `metricspsnr.h` - metrics PSNR and MSE
70+
- `smallfry.h` - metrics [SMALLFRY, SHARPENBAD and Correlation](https://github.com/ImageProcessing-ElectronicPublications/libsmallfry)
6271
- `stb/` - [stb](https://github.com/nothings/stb.git)
6372
- `stbimmetrics.c` - CLI program.
6473
- `ycbcr.h` - YCbCr color space.
@@ -85,6 +94,9 @@ Save png: lena.quant444.psnr.png
8594

8695
* ![metric](https://raw.githubusercontent.com/ImageProcessing-ElectronicPublications/stb-image-metrics-demo/main/images/lena.quant444.mse.png) MSE: 0.013604
8796
* ![metric](https://raw.githubusercontent.com/ImageProcessing-ElectronicPublications/stb-image-metrics-demo/main/images/lena.quant444.psnr.png) PSNR: 18.663233
97+
* ![metric](https://raw.githubusercontent.com/ImageProcessing-ElectronicPublications/stb-image-metrics-demo/main/images/lena.quant444.smallfry.png) SMALLFRY: 83.753342
98+
* ![metric](https://raw.githubusercontent.com/ImageProcessing-ElectronicPublications/stb-image-metrics-demo/main/images/lena.quant444.shbad.png) SHARPENBAD: -0.213132
99+
* ![metric](https://raw.githubusercontent.com/ImageProcessing-ElectronicPublications/stb-image-metrics-demo/main/images/lena.quant444.cor.png) Corelation: 0.953666
88100
* ![metric](https://raw.githubusercontent.com/ImageProcessing-ElectronicPublications/stb-image-metrics-demo/main/images/lena.quant444.nhw-n.png) NHW-N: 0.072673
89101
* ![metric](https://raw.githubusercontent.com/ImageProcessing-ElectronicPublications/stb-image-metrics-demo/main/images/lena.quant444.nhw-c.png) NHW-C: 0.145290
90102
* ![metric](https://raw.githubusercontent.com/ImageProcessing-ElectronicPublications/stb-image-metrics-demo/main/images/lena.quant444.nhw-r.png) NHW-R: 0.116387

man/man1/stbimmetrics.1

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH "StbImMetrics" 1 0.2.4 "8 Jan 2023" "User Manual"
1+
.TH "StbImMetrics" 1 0.2.5 "8 Jan 2023" "User Manual"
22

33
.SH NAME
44
stbimmetrics
@@ -9,6 +9,9 @@ This utility compares two graphics files based on metrics.
99
Includes metrics:
1010
- MSE / MAX^2, MAX = 255
1111
- PSNR
12+
- SMALLFRY
13+
- SHARPENBAD
14+
- correlation
1215
- NHW neatness
1316
- NHW convolutional
1417
- NHW relative
@@ -17,6 +20,10 @@ The value of MSE metrics is from 0.0 (minimum difference) to 1.0 (maximum differ
1720

1821
The value of PSNR metrics is from 1.0 (maximum difference) to inf.
1922

23+
The value of SHARPENBAD metrics is from 1.0 (minimum difference) to -1.0 (maximum difference).
24+
25+
The value of Correlation metrics is from 1.0 (minimum difference) to 0.0 (maximum difference).
26+
2027
The value of NHW metrics is from 0.0 (minimum difference) to 1.0 (maximum difference).
2128

2229
.SH SYNOPSIS
@@ -26,11 +33,14 @@ stbimmetrics [options] ${IMAGE_ORIG_PATH} ${IMAGE_COMPARE_PATH} [metric.out.png]
2633
.TP
2734
-m STR
2835
metric (default psnr):
29-
mse - MSE / MAX^2, MAX = 255
30-
psnr - PSNR
31-
nhw-n - NHW neatness
32-
nhw-c - NHW convolutional
33-
nhw-r - NHW relative
36+
mse - MSE / MAX^2, MAX = 255
37+
psnr - PSNR
38+
smallfry - SMALLFRY
39+
shbad - SHARPENBAD
40+
cor - correlation
41+
nhw-n - NHW neatness
42+
nhw-c - NHW convolutional
43+
nhw-r - NHW relative
3444
.TP
3545
-q
3646
quiet mode

src/dependencies.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
#define YCBCR_IMPLEMENTATION
44
#define METRICS_NHW_IMPLEMENTATION
55
#define METRICS_PSNR_IMPLEMENTATION
6+
#define METRICS_SMALLFRY_IMPLEMENTATION
67
#include "stb/stb_image.h"
78
#include "stb/stb_image_write.h"
89
#include "ycbcr.h"
910
#include "metricspsnr.h"
1011
#include "metricsnhw.h"
12+
#include "smallfry.h"

src/metricsnhw.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
****************************************************************************
77
* Metrics NHW *
88
* file: metricsnhw.h *
9-
* version: 0.2.4 *
9+
* version: 0.2.5 *
1010
* *
1111
****************************************************************************
1212
***************************************************************************/
@@ -18,7 +18,7 @@
1818
#ifndef __METRICS_NHW__H
1919
#define __METRICS_NHW__H
2020

21-
#define METRICSNHW_VERSION "0.2.4"
21+
#define METRICSNHW_VERSION "0.2.5"
2222

2323
#ifdef METRICS_STATIC
2424
#define METRICSAPI static

src/metricspsnr.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
****************************************************************************
33
* Metrics PSNR *
44
* file: metricspsnr.h *
5-
* version: 0.2.4 *
5+
* version: 0.2.5 *
66
* *
77
****************************************************************************
88
***************************************************************************/
@@ -14,7 +14,7 @@
1414
#ifndef __METRICS_PSNR__H
1515
#define __METRICS_PSNR__H
1616

17-
#define METRICS_VERSION "0.2.4"
17+
#define METRICS_VERSION "0.2.5"
1818

1919
#ifdef METRICS_STATIC
2020
#define METRICSAPI static

0 commit comments

Comments
 (0)