Removed non-ASCII characters from code files, closes #3445
This commit is contained in:
@@ -1,47 +1,64 @@
|
||||
#pragma once
|
||||
/*
|
||||
The EdgePreservingDecomposition files contain standard C++ (standard except the first line) code for creating and, to a
|
||||
limited extent (create your own uses!), messing with multi scale edge preserving decompositions of a 32 bit single channel
|
||||
image. As a byproduct it contains a lot of linear algebra which can be useful for optimization problems that
|
||||
you want to solve in rectangles on rectangular grids.
|
||||
The EdgePreservingDecomposition files contain standard C++ (standard except the
|
||||
first line) code for creating and, to a limited extent (create your own uses!),
|
||||
messing with multi scale edge preserving decompositions of a 32 bit single
|
||||
channel image. As a byproduct it contains a lot of linear algebra which can be
|
||||
useful for optimization problems that you want to solve in rectangles on
|
||||
rectangular grids.
|
||||
|
||||
Anyway. Basically, this is an implementation of what's presented in the following papers:
|
||||
Edge-Preserving Decompositions for Multi-Scale Tone and Detail Manipulation
|
||||
An Iterative Solution Method for Linear Systems of Which the Coefficient Matrix is a Symetric M-Matrix
|
||||
Color correction for tone mapping
|
||||
Wikipedia, the free encyclopedia
|
||||
Anyway. Basically, this is an implementation of what's presented in the
|
||||
following papers:
|
||||
- Edge-Preserving Decompositions for Multi-Scale Tone and Detail Manipulation
|
||||
- An Iterative Solution Method for Linear Systems of Which the Coefficient
|
||||
Matrix is a Symetric M-Matrix
|
||||
- Color correction for tone mapping
|
||||
- Wikipedia, the free encyclopedia
|
||||
|
||||
First one is most of what matters, next two are details, last everything else. I did a few things differently, especially:
|
||||
Reformulated the minimization with finite elements instead of finite differences. This results in better conditioning,
|
||||
slightly better accuracy (less artifacts), the possibility of a better picked edge stopping function, but more memory consumption.
|
||||
|
||||
A single rotationally invariant edge stopping function is used instead of two non-invariant ones.
|
||||
|
||||
Incomplete Cholseky factorization instead of Szeliski's LAHBF. Slower, but not subject to any patents.
|
||||
|
||||
For tone mapping, original images are decomposed instead of their logarithms, and just one decomposition is made;
|
||||
I find that this way works plenty good (theirs isn't better or worse... just different) and is simpler.
|
||||
First one is most of what matters, next two are details, last everything else.
|
||||
I did a few things differently, especially:
|
||||
- Reformulated the minimization with finite elements instead of finite
|
||||
differences. This results in better conditioning, slightly better accuracy
|
||||
(less artifacts), the possibility of a better picked edge stopping function,
|
||||
but more memory consumption.
|
||||
- A single rotationally invariant edge stopping function is used instead of two
|
||||
non-invariant ones.
|
||||
- Incomplete Cholseky factorization instead of Szeliski's LAHBF. Slower, but
|
||||
not subject to any patents.
|
||||
- For tone mapping, original images are decomposed instead of their logarithms,
|
||||
and just one decomposition is made;
|
||||
- I find that this way works plenty good (theirs isn't better or worse... just
|
||||
different) and is simpler.
|
||||
|
||||
Written by ben_pcc in Portland, Oregon, USA. Some history:
|
||||
Late April 2010, I develop interest in this stuff because photos of my ceramics lack local contrast.
|
||||
Mid 2010, it works but is too slow to be useful.
|
||||
Fall 2010, various unsuccessful attempts at speeding up are tried.
|
||||
Early December 2010, I get off the path of least resistance and write a matrix storage class with incomplete Cholesky decomposition.
|
||||
31 December 2010, the FEM reformulation works very well.
|
||||
1 January 2011, I'm cleaning up this file and readying it for initial release.
|
||||
12 - 14 November 2011, further cleanup, improvements, bug fixes, integration into Raw Therapee.
|
||||
- Late April 2010, I develop interest in this stuff because photos of my
|
||||
ceramics lack local contrast.
|
||||
- Mid 2010, it works but is too slow to be useful.
|
||||
- Fall 2010, various unsuccessful attempts at speeding up are tried.
|
||||
- Early December 2010, I get off the path of least resistance and write a
|
||||
matrix storage class with incomplete Cholesky decomposition.
|
||||
- 31 December 2010, the FEM reformulation works very well.
|
||||
- 1 January 2011, I'm cleaning up this file and readying it for initial release.
|
||||
- 12 - 14 November 2011, further cleanup, improvements, bug fixes, integration
|
||||
into Raw Therapee.
|
||||
|
||||
It's likely that I'll take apart and rerelease contents of this file (in the distant future) as most of it isn't edge preserving decomposition
|
||||
and rather supporting material. SparseConjugateGradient alone is a workhorse I and a few others have been exploiting for a few years.
|
||||
It's likely that I'll take apart and rerelease contents of this file (in the
|
||||
distant future) as most of it isn't edge preserving decomposition and rather
|
||||
supporting material. SparseConjugateGradient alone is a workhorse I and a few
|
||||
others have been exploiting for a few years.
|
||||
|
||||
EdgePreservingDecomposition.h and EdgePreservingDecomposition.cpp are released under the following licence:
|
||||
<20> It's free.
|
||||
<20> You may not incorporate this code as part of proprietary or commercial software, but via freeware you may use its output for profit.
|
||||
<20> You may modify and redistribute, but keep this big comment block intact and not for profit in any way unless I give specific permission.
|
||||
<20> If you're unsure about anything else, treat as public domain.
|
||||
<20> Don't be a dick.
|
||||
EdgePreservingDecomposition.h and EdgePreservingDecomposition.cpp are released
|
||||
under the following licence:
|
||||
- It's free.
|
||||
- You may not incorporate this code as part of proprietary or commercial
|
||||
software, but via freeware you may use its output for profit.
|
||||
- You may modify and redistribute, but keep this big comment block intact and
|
||||
not for profit in any way unless I give specific permission.
|
||||
- If you're unsure about anything else, treat as public domain.
|
||||
- Don't be a dick.
|
||||
|
||||
My email address is my screen name followed by @yahoo.com. I'm also known as ben_s or nonbasketless. Enjoy!
|
||||
My email address is my screen name followed by @yahoo.com. I'm also known as
|
||||
ben_s or nonbasketless. Enjoy!
|
||||
*/
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user