Scyllarus: C++ Hyperspectral Processing Library
Hyperspectral Image Processing Pipeline
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
illuminant.h
Go to the documentation of this file.
1 /****************************************************************************************
2  * SCYLLARUS : C++ HYPERSPECTRAL PROCESSING LIBRARY
3  * illuminant.h - Hyperspectral Image illuminant recovery/estimation methods.
4  *
5  * This computer code is subject to copyright:
6  * (c) National ICT Australia Limited (NICTA) 2013-2014 All Rights Reserved.
7  *
8  * Jeremy Oorloff, National ICT Australia (NICTA)
9  *
10  ***************************************************************************************/
11 
12 #ifndef ILLUMINANT_H_
13 #define ILLUMINANT_H_
14 
15 #include <armadillo>
16 #include "filters.h"
17 #include "logger.h"
18 #include "utility.h"
19 #include "scyllarus_types.h"
20 
21 
22 namespace scyl
23 {
31  {
32  public:
34  patches(),
35  alpha(50),
36  patch_size(20),
37  filtered_already(false),
38  fast_50(true),
39  order(1),
40  debug(0)
41  {
42  }
44 
45  arma::umat patches;
46  float alpha;
47  int patch_size;
49  bool filtered_already;
51 
52  bool fast_50;
53  int order;
55  int debug;
56  };
57 
58  arma::umat select_smooth_patches(const arma::fcube & I,
59  arma::umat & patches,
60  arma::fmat & light_estimation_mask,
61  arma::fmat & contrast_mask,
62  arma::fmat & highlight_mask,
63  int patch_size=20,
64  int num_patches=50,
65  int debug=0);
66 
67  int patch_dichromatic_decompose(const arma::fcube & patch,
68  const arma::fmat & illuminant,
69  arma::fmat & g_out,
70  arma::fmat & k_out,
71  arma::fvec & s_out,
72  float & dichromatic_error,
73  float & smooth_error,
74  float alpha=50,
75  int debug=0);
76 
77  arma::fvec recover_global_illuminant(const arma::fcube & I,
80 
81  arma::fvec recover_illuminant_HRK(const arma::fcube & I,
82  arma::umat & patches,
83  float alpha,
84  int patch_size,
85  bool filtered_already=false,
86  bool fast_50=true,
87  int debug=0);
88 
89  arma::fvec recover_illuminant_FS(const arma::fcube & I,
90  arma::umat & patches,
91  int patch_size=20,
92  bool filtered_already=false,
93  int debug=0);
94 
95  arma::fvec recover_illuminant_GE(const arma::fcube & I,
96  int order=1,
97  int debug=0);
98 
99  arma::fvec recover_illuminant_GW(const arma::fcube & I,
100  int debug=0);
101 
102  arma::fvec recover_illuminant_SG(const arma::fcube & I,
103  int order=2,
104  int debug=0);
105 
106  arma::fvec recover_illuminant_WP(const arma::fcube & I,
107  int debug=0);
108 
109 }
110 
111 #endif /* ILLUMINANT_H_ */
int patch_size
Definition: illuminant.h:48
arma::fvec recover_illuminant_GW(const arma::fcube &I, int debug=0)
recover_illuminant_GW() takes an input image I and determines the illuminant.
Definition: illuminant.cpp:1244
arma::fvec recover_illuminant_HRK(const arma::fcube &I, arma::umat &patches, float alpha, int patch_size, bool filtered_already=false, bool fast_50=true, int debug=0)
recover_illuminant_HRK() takes an input image I and determines the illuminant.
Definition: illuminant.cpp:119
int debug
debug - Used for all
Definition: illuminant.h:55
arma::fvec recover_illuminant_WP(const arma::fcube &I, int debug=0)
recover_illuminant_WP() takes an input image I and determines the illuminant.
Definition: illuminant.cpp:1366
HRK - Use Huynh Robles-Kelly method for illuminant recovery.
Definition: scyllarus_types.h:63
I.
Definition: scyllarus_types.h:114
arma::umat patches
patches - Used for HRK
Definition: illuminant.h:43
ILLUMINANT_METHOD
Definition: scyllarus_types.h:62
arma::fvec recover_global_illuminant(const arma::fcube &I, scyl::ILLUMINANT_METHOD method=scyl::ILLUMINANT_HRK, scyl::illuminant_options op=scyl::illuminant_options())
recover_global_illuminant() takes an input image I and determines the illuminant. ...
Definition: illuminant.cpp:37
bool filtered_already
filtered_already - Used for HRK
Definition: illuminant.h:50
illuminant_options is used to give options for the Illuminant recovery option chosen.
Definition: illuminant.h:30
~illuminant_options()
Definition: illuminant.h:43
arma::fvec recover_illuminant_GE(const arma::fcube &I, int order=1, int debug=0)
recover_illuminant_GE() takes an input image I and determines the illuminant.
Definition: illuminant.cpp:1177
int patch_dichromatic_decompose(const arma::fcube &patch, const arma::fmat &illuminant, arma::fmat &g_out, arma::fmat &k_out, arma::fvec &s_out, float &dichromatic_error, float &smooth_error, float alpha=50, int debug=0)
patch_dichromatic_decompose() looks at a image patch and determines if the patch is suitable for use ...
Definition: illuminant.cpp:743
bool fast_50
Definition: illuminant.h:52
int order
order - Used for GE, SG
Definition: illuminant.h:54
illuminant_options()
Definition: illuminant.h:33
arma::fvec recover_illuminant_SG(const arma::fcube &I, int order=2, int debug=0)
recover_illuminant_SG() takes an input image I and determines the illuminant.
Definition: illuminant.cpp:1302
float alpha
Definition: illuminant.h:46
arma::umat select_smooth_patches(const arma::fcube &I, arma::umat &patches, arma::fmat &light_estimation_mask, arma::fmat &contrast_mask, arma::fmat &highlight_mask, int patch_size=20, int num_patches=50, int debug=0)
select_smooth_patches() returns a list of the first num_patches smooth patches it finds while inspect...
Definition: illuminant.cpp:534
arma::fvec recover_illuminant_FS(const arma::fcube &I, arma::umat &patches, int patch_size=20, bool filtered_already=false, int debug=0)
recover_illuminant_FS() takes an input image I and determines the illuminant.
Definition: illuminant.cpp:928