-
Notifications
You must be signed in to change notification settings - Fork 1
/
README.txt
129 lines (96 loc) · 3.91 KB
/
README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
━━━━━━━━
README
━━━━━━━━
Table of Contents
─────────────────
1 About
2 Overview
3 Requirement
4 Compilation
5 Usage
.. 5.1 Midway
..... 5.1.1 Description
..... 5.1.2 Usage examples
6 Reviewed files
1 About
═══════
Author : Thierry Guillemot <[email protected]> and
Julie Delon <[email protected]>
Copyright: (C) 2015 IPOL Image Processing On Line [http://www.ipol.im/]
Licence : GPL V3+
IPOL paper: [http://www.ipol.im/pub/pre/140/]
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved. This file is offered as-is,
without any warranty.
2 Overview
══════════
This source code provides an implementation of the "midway" image
equalization, as described in IPOL.
The 'bin/midway' program reads two PNG images, then apply contrast
changes to these images such that the output images have the same
distributions (this is done channel by channel). This common
distribution is built as the midway between the two original ones. If
H1 and H2 are the cumulative histograms of the input images (for the
considered channel), the midway histogram is defined as (0.5*(H1^{-1}
+ H2^{-1}))^{-1}. The contrast changes to be applied are thus
respectively x -> 0.5*(x + H2^{-1} o H1 (x)) for the first image and x
-> 0.5*(x + H1^{-1} o H2 (x)) for the second image. Both resulting
images are written as PNG images.
Only 8bit GRAY/RGB PNG images are handled.
3 Requirement
═════════════
The code is written in ANSI C, and should compile on any system with
an ANSI C compiler.
The libpng header and libraries are required on the system for
compilation and execution. On Linux, just use your package manager to
install it:
┌────
│ sudo apt-get install libpng
└────
For more information, see [http://www.libpng.org/pub/png/libpng.html]
4 Compilation
═════════════
Simply use the provided makefile, with the command 'make'. The
makefile will produce a program called : 'bin/midway'.
The 'midway' program is used to compute the midway equalization of two
images.
5 Usage
═══════
5.1 Midway
──────────
5.1.1 Description
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌
The 'bin/midway' program is used to apply the midway equalization over
two images. It takes 4 parameters with other optional:
┌────
│ bin/midway in1.png in2.png out1.png out2.png [options]
└────
in1.png : first input image.
in2.png : second input image.
out1.png: first output image.
out2.png: second output image.
Options :
-dithering sigma: apply a Gaussian noise of standard deviation sigma
before applying the midway equalization.
-verbose: activate the verbose mode
5.1.2 Usage examples
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌
If you want to compute the midway equalization between the files
'input/bat1.png' and 'input/bat2.png' without dithering and save the
resulting images into 'out1.png' and 'out2.png', you can use the
command:
┌────
│ bin/midway input/bat1.png input/bat2.png out1.png out2.png
└────
The command:
┌────
│ bin/midway input/bat1.png input/bat2.png out1.png out2.png -dithering 2
└────
will compute the midway equalization of the files 'input/bat1.png' and
'input/bat2.png' with a dithering of sigma=2 and save the resulting
images into 'out1.png' and 'out2.png'.
6 Bugs Report
═════════════
You can report any bug with the github interface :
[https://github.com/tguillemot/parigi]