-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathREADME.txt
64 lines (44 loc) · 2.08 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
% Retinex PDE
# ABOUT
* Author : Nicolas Limare <[email protected]>
Jose-Luis Lisani <[email protected]>
* Copyright : (C) 2009-2011 IPOL Image Processing On Line http://www.ipol.im/
* License : GPL v3+, see GPLv3.txt
# OVERVIEW
This source code provides an implementation of the Retinex theory by a
Poisson equation, as described in IPOL
http://www.ipol.im/pub/algo/lmps_retinex_poisson_equation/.
This program reads a PNG image, computes its laplacian, performs a
DFT, then solves the Poisson equation in the Fourier space and
performs an inverse DFT.
The result is normalized to have the same mean and variance as the
input image and written as a PNG image.
# REQUIREMENTS
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. See http://www.libpng.org/pub/png/libpng.html
The fftw3 header and libraries are required on the system for
compilation and execution. See http://www.fftw.org/
# COMPILATION
Simply use the provided makefile, with the command `make`.
Alternatively, you can manually compile
cc -DNDEBUG io_png.c norm.c retinex_pde_lib.c retinex_pde.c \
-lpng -lfftw3f -o retinex_pde
Multi-threading is possible, with the FFTW_NTHREADS parameter:
cc -DNDEBUG io_png.c norm.c retinex_pde_lib.c retinex_pde.c \
-DFFTW_NTHREADS=4 -lpng -lfftw3f -lfftw3f_threads -o retinex_pde
Omit the -DNDEBUG option to get some debugging information when you
run the program.
# USAGE
This program takes 4 parameters: `retinex_pde T in.png rtnx.png`
* `T` : retinex threshold, in [0,1[
* `in.png` : input image
* `rtnx.png` : retinex output image
# ABOUT THIS FILE
Copyright 2009-2011 IPOL Image Processing On Line http://www.ipol.im/
Author: Nicolas Limare <[email protected]>
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.