Removed non-ASCII characters from code files, closes #3445

This commit is contained in:
Morgan Hardwood 2016-10-03 22:05:02 +02:00
parent 35b9fa2e9d
commit 6d85d35039
11 changed files with 65 additions and 48 deletions

View File

@ -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:
<EFBFBD> It's free.
<EFBFBD> You may not incorporate this code as part of proprietary or commercial software, but via freeware you may use its output for profit.
<EFBFBD> You may modify and redistribute, but keep this big comment block intact and not for profit in any way unless I give specific permission.
<EFBFBD> If you're unsure about anything else, treat as public domain.
<EFBFBD> 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!
*/

View File

@ -1,7 +1,7 @@
/*
* This file is part of RawTherapee.
*
* Copyright © 2010 Emil Martinec <ejmartin@uchicago.edu>
* Copyright (C) 2010 Emil Martinec <ejmartin@uchicago.edu>
*
* RawTherapee is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,7 +1,7 @@
/*
* This file is part of RawTherapee.
*
* Copyright (c) 2016 Flössie <floessie.mail@gmail.com>
* Copyright (C) 2016 Floessie <floessie.mail@gmail.com>
*
* RawTherapee is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1457,7 +1457,7 @@ Quality X: unknown, ie we knowing to little about the camera properties to know
"ranges": { "black": 15, "white": 4050 } // 15 is BL offset. Dcraw/RT read the base offset from exif and calculates total BL = BLbase+BLoffset
},
{ // Quality Β,
{ // Quality B,
"make_model": [ "Panasonic DMC-FZ300", "Panasonic DMC-FZ330" ],
"dcraw_matrix": [ 8378,-2798,-769,-3068,11410,1877,-538,1792,4623 ], // DNG-V9.1.1
"ranges": { "black": 15, "white": 4050 } // 15 is BL offset. Dcraw/RT read the base offset from exif and calculates total BL = BLbase+BLoffset

View File

@ -34,7 +34,7 @@ namespace rtengine
extern const Settings* settings;
static const double cie_colour_match_jd[97][3] = {//350nm to 830nm 5 nm J.Desmis observer 2<>
static const double cie_colour_match_jd[97][3] = {//350nm to 830nm 5 nm J.Desmis 2 degree Standard Observer.
{0.0000000, 0.000000, 0.000000}, {0.0000000, 0.000000, 0.000000}, {0.0001299, 0.0003917, 0.0006061},
{0.0002321, 0.000006965, 0.001086}, {0.0004149, 0.00001239, 0.001946}, {0.0007416, 0.00002202, 0.003846},
{0.001368, 0.000039, 0.006450001}, {0.002236, 0.000064, 0.01054999}, {0.004243, 0.000120, 0.02005001},
@ -295,7 +295,7 @@ const double ColorTemp::Solux4100_spect[97] = {
62.40, 61.373, 59.75, 58.1810, 56.25, 54.395, 51.90, 49.496, 47.05, 44.620
};
//spectral data for Solux lamp : near Daylight (for example "mus<EFBFBD>e d'Orsay..") - 4700K
//spectral data for Solux lamp : near Daylight (for example "Musee d'Orsay") - 4700K
const double ColorTemp::Solux4700_spect[97] = {
0.4590, 0.83, 1.2011, 1.53, 1.8647, 2.15, 2.5338, 3.06, 3.5809, 3.99, 4.4137, 4.82, 5.2228, 5.63, 6.0387, 6.53, 6.9944, 7.55, 8.0266, 8.475, 8.9276, 8.90, 9.7840, 10.20, 10.6390, 11.00, 11.3600, 11.75, 12.1340, 12.36, 12.5880, 12.74, 12.8790,
13.07, 13.2560, 13.38, 13.5220, 13.41, 13.3070, 13.35, 13.3990, 13.37, 13.3420, 13.39, 13.4220, 13.65, 13.2710, 13.25, 13.2330, 13.12, 13.0110, 12.93, 12.8470, 12.805, 12.7630, 12.66, 12.5760, 12.563, 12.5490,
@ -1797,7 +1797,7 @@ The next 3 methods are inspired from:
this values are often called xBar yBar zBar and are characteristics of a color / illuminant
values cie_colour_match[][3] = Observer 2<EFBFBD> x2, y2, z2
values cie_colour_match[][3] = Observer 2 degree Standard Observer x2, y2, z2
E.g. for 380nm: x2=0.001368 y2=0.000039 z2=0.006451 round in J.Walker to 0.0014 0.0000 0.0065 above
I have increase precision used by J.Walker and pass to 350nm to 830nm
*/
@ -1855,7 +1855,7 @@ void ColorTemp::spectrum_to_xyz_preset(const double* spec_intens, double &x, dou
this values are often called xBar yBar zBar and are characteristics of a color / illuminant
values cie_colour_match[][3] = Observer 2<EFBFBD> x2, y2, z2
values cie_colour_match[][3] = 2 degree Standard Observer x2, y2, z2
E.g. for 380nm: x2=0.001368 y2=0.000039 z2=0.006451 round in J.Walker to 0.0014 0.0000 0.0065 above
I have increased the precision used by J.Walker and pass from 350nm to 830nm
*/

View File

@ -14,7 +14,7 @@
* You should have received a copy of the GNU General Public License
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
*
* © 2010 Emil Martinec <ejmartin@uchicago.edu>
* (C) 2010 Emil Martinec <ejmartin@uchicago.edu>
*
*/

View File

@ -14,7 +14,7 @@
* You should have received a copy of the GNU General Public License
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
*
* © 2010 Emil Martinec <ejmartin@uchicago.edu>
* (C) 2010 Emil Martinec <ejmartin@uchicago.edu>
*
*/

View File

@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
*
* These median implementations from Flössie and Ingo Weyrich are inspired by this work:
* These median implementations from Floessie and Ingo Weyrich are inspired by this work:
*
* http://ndevilla.free.fr/median/median.pdf
* http://pages.ripco.net/~jgamble/nw.html

View File

@ -71,7 +71,7 @@ public:
int nrwavlevel;
bool daubech;
bool ciebadpixgauss;
int CRI_color; // N<EFBFBD> for display Lab value ; 0 disabled
int CRI_color; // Number for display Lab value; 0 = disabled
int denoiselabgamma; // 0=gamma 26 11 1=gamma 40 5 2 =gamma 55 10
// double colortoningab; //
// double decaction;

View File

@ -14,7 +14,7 @@
* You should have received a copy of the GNU General Public License
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
*
* © 2010 Emil Martinec <ejmartin@uchicago.edu>
* (C) 2010 Emil Martinec <ejmartin@uchicago.edu>
*/
#include "dirpyrequalizer.h"

View File

@ -14,7 +14,7 @@
* You should have received a copy of the GNU General Public License
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
*
* © 2010 Emil Martinec <ejmartin@uchicago.edu>
* (C) 2010 Emil Martinec <ejmartin@uchicago.edu>
*/
#ifndef DIRPYREQUALIZER_H_INCLUDED