69 pipeline(std::shared_ptr<scyl::input> input,
70 std::shared_ptr<scyl::output> output);
104 void save(std::string filename);
108 void crop(
int x0,
int y0,
int x1,
int y1,
bool reflectance=
false);
110 void remove_bands(arma::uvec
remove,
bool reflectance=
false);
120 void set_input(std::shared_ptr<scyl::input> in);
121 std::shared_ptr<scyl::input>
input();
123 void set_output(std::shared_ptr<scyl::output> in);
124 std::shared_ptr<scyl::output>
output();
130 void set_I(
const arma::fcube & in,
const arma::fvec &
wavelengths,
bool clean=
true);
131 arma::fcube
I()
const;
132 const arma::fcube *
I_ptr()
const;
140 void set_k(
const arma::fmat & in);
141 arma::fmat
k()
const;
143 void set_g(
const arma::fmat & in);
144 arma::fmat
g()
const;
149 void set_s(
const arma::fcube & in,
const arma::fvec & wavelengths,
bool clean=
true);
150 arma::fcube
s()
const;
151 const arma::fcube *
s_ptr()
const;
268 std::shared_ptr<scyl::output>
m_output;
arma::fvec m_analysis_values
Definition: pipeline.h:309
unsigned int m_width
Image width, get using width() (Cannot be set)
Definition: pipeline.h:315
void clear_results(bool reflectance=false)
clear_results() resets all the member variables associated with the results from the processing pipel...
Definition: pipeline.cpp:828
bool m_use_input
Flag for input (Used internally only)
Definition: pipeline.h:271
void set_nurbs_alpha(float in)
Sets nurbs_alpha (Alpha value used to determine convergence when removing knots)
Definition: pipeline.cpp:2365
void clean_input(bool reflectance=false)
clean_input takes the I and wavelengths from the current input and puts them into a 'clean' input...
Definition: pipeline.cpp:920
arma::fmat g() const
Gets g (Shading)
Definition: pipeline.cpp:1577
void clear_illuminant_results()
clear_illuminant_results() resets all the member variables associated with the results from the illum...
Definition: pipeline.cpp:861
material_options is used to give options for the material recovery option chosen. ...
Definition: material.h:30
int nurbs_iterations() const
Gets nurbs_iterations.
Definition: pipeline.cpp:2339
void set_spectral_library(const std::shared_ptr< scyl::spectral_library > in)
Sets the spectral_library object for the pipeline. Object is initialised before it is passed to this ...
Definition: pipeline.cpp:1368
int analysis_num() const
Gets analysis_num.
Definition: pipeline.cpp:2288
void align_bands()
align_bands() uses a FFT image registration routine to attempt to align the bands in the image I asso...
Definition: pipeline.cpp:1177
void set_material_element_abundance_indexes(const arma::ucube &in)
Sets material_element_abundance_indexes.
Definition: pipeline.cpp:1775
unsigned int m_height
Image height, get using height() (Cannot be set)
Definition: pipeline.h:314
void set_analysis_components(const arma::fcube &in)
Definition: pipeline.cpp:1908
float m_k_factor
K factor. Set using set_k_factor() and get using k_factor()
Definition: pipeline.h:285
FILTER_METHOD
Definition: scyllarus_types.h:102
void set_material_split_threshold(float in)
Sets material_split_threshold (Determines when a cluster is split in DA method.
Definition: pipeline.cpp:2225
void process_classification(scyl::CLASSIFICATION_METHOD method=scyl::CLASSIFICATION_SAM)
process_classification() performs classification of the pipeline object's reflectance cube with the s...
Definition: pipeline.cpp:642
float material_subsample() const
Definition: pipeline.cpp:2253
arma::fvec analysis_values() const
Definition: pipeline.cpp:1939
void set_nurbs_iterations(int in)
Sets nurbs_iterations (Max number of iterations to use when calculating NURBS)
Definition: pipeline.cpp:2331
float material_temperature_min() const
Gets material_temperature_min.
Definition: pipeline.cpp:2195
void process_recover_endmembers()
process_recover_endmembers() calls the function 'unmix_by_spectra' with the list of material elements...
Definition: pipeline.cpp:579
void set_input(std::shared_ptr< scyl::input > in)
Sets the input object for the pipeline. Object is initialised before it it passed to this function...
Definition: pipeline.cpp:1318
arma::fcube m_I
I. Set using set_I() and get using I()
Definition: pipeline.h:275
Output is a pure virtual base class from which output classes for the pipeline are derived...
Definition: output.h:32
scyl::illuminant_options m_illuminant_options
Definition: pipeline.h:325
CLASSIFICATION_METHOD
Definition: scyllarus_types.h:92
arma::umat patches() const
Gets illuminant_patches - array of patch locations and sizes (x, y, height, width)(n x 4) ...
Definition: pipeline.cpp:1718
void filter(scyl::FILTER_METHOD method=scyl::FILTER_WIENER, int size=5, bool reflectance=false)
filter() performs filtering on the image I associated with the Pipeline.
Definition: pipeline.cpp:1215
void set_analysis_values(const arma::fvec &in)
Definition: pipeline.cpp:1927
arma::fmat material_elements() const
Gets material_elements (Mat containing spectral signatures for each recovered material) ...
Definition: pipeline.cpp:1735
void set_illuminant_patch_size(int in)
Sets illuminant_patch_size, the size of the patches used when determining the image's illuminant...
Definition: pipeline.cpp:2068
arma::fmat k() const
Gets k (Specular)
Definition: pipeline.cpp:1546
void set_k_factor(const float &in)
Sets k_factor (Specular Factor)
Definition: pipeline.cpp:1593
void set_s(const arma::fcube &in, const arma::fvec &wavelengths, bool clean=true)
Sets s (reflectance)
Definition: pipeline.cpp:1629
arma::fvec wavelengths() const
Gets wavelengths (List describing the wavelength of each band in I)
Definition: pipeline.cpp:1515
arma::fcube m_analysis_components
Definition: pipeline.h:307
void remove_bands(arma::uvec remove, bool reflectance=false)
remove_bands will remove bands from the image associated with the pipeline in the given list (by inde...
Definition: pipeline.cpp:1052
void set_nurbs_save_as(bool in)
Sets nurbs_save_as (True if you want to use NURBS encoding when saving)
Definition: pipeline.cpp:2297
arma::umat endmember_abundance_indexes() const
Definition: pipeline.cpp:1856
arma::fmat m_g
g. Set using set_g() and get using g()
Definition: pipeline.h:283
void set_classification_indexes(const arma::ucube &in)
Definition: pipeline.cpp:1887
void process(bool clear=true)
process() runs the pipeline. At a minimum, an input image (I) or an input object must be set...
Definition: pipeline.cpp:300
bool m_use_output
Flag for output (Used internally only)
Definition: pipeline.h:273
arma::fcube m_classification_abundances
Definition: pipeline.h:303
int nurbs_knot_threshold() const
Gets nurbs_knot_threshold.
Definition: pipeline.cpp:2356
int nurbs_degree() const
Gets nurbs_degree.
Definition: pipeline.cpp:2322
MATERIAL_METHOD
Definition: scyllarus_types.h:82
arma::ucube classification_indexes() const
Definition: pipeline.cpp:1899
ILLUMINANT_METHOD
Definition: scyllarus_types.h:62
bool endmember_indexed() const
Gets endmember_indexed.
Definition: pipeline.cpp:1978
int m_nurbs_iterations
Definition: pipeline.h:358
arma::umat m_endmember_abundance_indexes
Material Element Abundance Indexes. (Index of material in material_elements for each above ratio) ...
Definition: pipeline.h:301
float material_temperature_max() const
Gets material_temperature_max.
Definition: pipeline.cpp:2178
void set_k(const arma::fmat &in)
Sets k (Specular)
Definition: pipeline.cpp:1531
DICHROMATIC_METHOD
Definition: scyllarus_types.h:74
arma::fmat m_endmember_abundances
Definition: pipeline.h:299
int debug_level() const
Gets debug_level.
Definition: pipeline.cpp:2042
void set_material_map(const arma::umat &in)
Sets material_map.
Definition: pipeline.cpp:1799
Pipeline is an object that holds configuration properties and data items, and facilitates the process...
Definition: pipeline.h:57
void crop(int x0, int y0, int x1, int y1, bool reflectance=false)
crop() will crop the image associated with the pipeline to the specified dimensions (spatially - for ...
Definition: pipeline.cpp:984
arma::fvec m_illuminant
Illuminant. Set using set_illuminant() and get using illuminant()
Definition: pipeline.h:277
void set_nurbs_degree(int in)
Sets nurbs_degree (Degree of the polynomial used to calculate NURBS)
Definition: pipeline.cpp:2314
illuminant_options is used to give options for the Illuminant recovery option chosen.
Definition: illuminant.h:30
arma::fvec illuminant() const
Gets illuminant, the recovered vector of the illuminant for the image cube I.
Definition: pipeline.cpp:1483
void set_abundance_num_materials(int in)
Sets abundance_num_materials (Number of materials to use per abundance when calculating abundances (S...
Definition: pipeline.cpp:2262
void set_material_cooling_rate(float in)
Sets material_cooling_rate (Rate of cooling for DA method, (t_max will be 'cooled' by this amount eac...
Definition: pipeline.cpp:2204
arma::fmat m_material_elements
Definition: pipeline.h:289
void set_material_method(scyl::MATERIAL_METHOD in)
Sets material_method (Method used for material recovery)
Definition: pipeline.cpp:2136
int m_analysis_num
Definition: pipeline.h:349
void set_dichromatic_gray_threshold(int in)
Sets dichromatic_gray_threshold, a threshold used in the dichromatic parameter recovery. (See recover_dichromatic_parameters() for more information)
Definition: pipeline.cpp:2119
float illuminant_recovery_alpha() const
Gets illuminant_recovery_alpha.
Definition: pipeline.cpp:2059
scyl::DICHROMATIC_METHOD dichromatic_method() const
Gets dichromatic_method.
Definition: pipeline.cpp:2021
bool is_filtered() const
Gets filtered.
Definition: pipeline.cpp:1987
float nurbs_alpha() const
Gets nurbs_alpha.
Definition: pipeline.cpp:2373
void set_illuminant_recovery_alpha(float in)
Sets illuminant_recovery_alpha, a threshold value used in illuminant recover. (See recover_global_ill...
Definition: pipeline.cpp:2051
void set_I(const arma::fcube &in, const arma::fvec &wavelengths, bool clean=true)
Sets I (Used in the case you don't want to use an input object, or you want to perform some other pro...
Definition: pipeline.cpp:1404
arma::fcube material_element_abundances() const
Gets material_element_abundances.
Definition: pipeline.cpp:1759
int m_nurbs_knot_threshold
Definition: pipeline.h:360
int dichromatic_neighbourhood_size() const
Gets dichromatic_neighbourhood_size.
Definition: pipeline.cpp:2110
void process_recover_dichromatic_parameters()
process_recover_dichromatic_parameters() calls the function 'recover_dichromatic_parameters'. At a minimum, an input image (I) and the illuminant must be set before calling this function.
Definition: pipeline.cpp:430
void set_endmember_abundances(const arma::fmat &in)
Definition: pipeline.cpp:1823
int dichromatic_gray_threshold() const
Gets dichromatic_gray_threshold.
Definition: pipeline.cpp:2127
arma::ucube m_material_element_abundance_indexes
Definition: pipeline.h:293
void set_material_element_abundances(const arma::fcube &in)
Sets material_element_abundances.
Definition: pipeline.cpp:1751
void set_dichromatic_neighbourhood_size(int in)
Sets dichromatic_neighbourhood_size, the kernel size used when decomposing the image. (See recover_dichromatic_parameters() for more information)
Definition: pipeline.cpp:2102
void set_g(const arma::fmat &in)
Sets g (Shading)
Definition: pipeline.cpp:1562
void set_classification_abundances(const arma::fcube &in)
Definition: pipeline.cpp:1866
float k_factor() const
Gets k_factor (Specular Factor)
Definition: pipeline.cpp:1601
bool m_nurbs_save_as
Definition: pipeline.h:354
scyl::MATERIAL_METHOD m_material_method
Definition: pipeline.h:340
void set_material_subsample(float in)
Sets material_subsample (Amount image is subsampled by when performing Material Recovery) ...
Definition: pipeline.cpp:2245
void process_recover_illuminant(bool clear=true)
process_recover_illuminant() calls the function 'recover_global_illuminant'. At a minimum...
Definition: pipeline.cpp:356
virtual ~pipeline()
Definition: pipeline.cpp:261
const arma::fcube * I_ptr() const
Gets I_ptr, a pointer to the image cube.
Definition: pipeline.cpp:1451
void set_patches(const arma::umat &in)
Sets illuminant_patches (n x 4 mat containing (x, y, h, w) for patches used in illuminant recovery) ...
Definition: pipeline.cpp:1710
const arma::fcube * s_ptr() const
Gets s_ptr, a pointer to the image cube.
Definition: pipeline.cpp:1696
arma::fcube s() const
Gets s (Reflectance)
Definition: pipeline.cpp:1681
void resize(int height, int width, bool reflectance=false)
resize() uses OpenCV to resize the image associated with the pipeline (spatially).
Definition: pipeline.cpp:1120
scyl::MATERIAL_METHOD material_method() const
Gets material_method.
Definition: pipeline.cpp:2144
void set_endmember_abundance_indexes(const arma::umat &in)
Definition: pipeline.cpp:1844
float material_split_threshold() const
Definition: pipeline.cpp:2233
arma::umat m_material_map
Definition: pipeline.h:295
std::shared_ptr< scyl::output > m_output
Definition: pipeline.h:269
arma::fcube I() const
Gets I, the image cube.
Definition: pipeline.cpp:1435
void clear_dichromatic_results()
clear_dichromatic_results() resets all the member variables associated with the results from the illu...
Definition: pipeline.cpp:880
int m_dichromatic_neighbourhood_size
Definition: pipeline.h:332
arma::fvec m_wavelengths
Definition: pipeline.h:279
arma::umat material_map() const
Gets material_map (Map image showing what materials have been identified at each pixel) ...
Definition: pipeline.cpp:1807
arma::fcube classification_abundances() const
Definition: pipeline.cpp:1878
void set_material_temperature_min(float in)
Sets material_temperature_min, the ending temperature for DA method. (See recover_materials() for mor...
Definition: pipeline.cpp:2187
scyl::material_options m_material_options
Definition: pipeline.h:342
bool nurbs_save_as() const
Gets nurbs_save_as.
Definition: pipeline.cpp:2305
arma::fcube m_s
s (Reflectance). Set using set_s() and get using s().
Definition: pipeline.h:287
bool illuminant_fast_50() const
Gets illuminant_fast_50.
Definition: pipeline.cpp:2093
int m_debug_level
Definition: pipeline.h:318
void set_debug_level(int in)
Sets debug_level (Amount of output printed to log)
Definition: pipeline.cpp:2030
void clear_material_results()
clear_material_results() resets all the member variables associated with the results from the illumin...
Definition: pipeline.cpp:900
int m_nurbs_degree
Definition: pipeline.h:356
void set_material_temperature_max(float in)
Sets material_temperature_max, the beginning temperature for DA method. (See recover_materials() for ...
Definition: pipeline.cpp:2170
int bands() const
Gets bands.
Definition: pipeline.cpp:1969
std::shared_ptr< scyl::input > input()
Gets input object.
Definition: pipeline.cpp:1341
std::shared_ptr< scyl::spectral_library > spectral_library()
Sets spectral_library.
Definition: pipeline.cpp:1376
void set_illuminant_method(scyl::ILLUMINANT_METHOD in)
Sets illuminant_method (Method used in Illuminant recovery)
Definition: pipeline.cpp:1996
SAM - Spectral Angle Mapping.
Definition: scyllarus_types.h:94
scyl::ILLUMINANT_METHOD m_illuminant_method
Definition: pipeline.h:323
unsigned int m_bands
Image bands, get using bands() (Cannot be set)
Definition: pipeline.h:316
arma::ucube m_classification_indexes
Definition: pipeline.h:305
scyl::DICHROMATIC_METHOD m_dichromatic_method
Definition: pipeline.h:330
void save(std::string filename)
save() saves a file according to the output object that is set for the pipeline.
Definition: pipeline.cpp:953
scyl::ILLUMINANT_METHOD illuminant_method() const
Gets illuminant_method.
Definition: pipeline.cpp:2004
void set_illuminant_fast_50(bool in)
Sets illuminant_fast_50, a flag to tell the Illuminant recovery method to use a faster version for im...
Definition: pipeline.cpp:2085
void set_material_elements(const arma::fmat &in)
Sets material_elements.
Definition: pipeline.cpp:1727
void set_wavelengths(const arma::fvec &in)
Sets wavelengths.
Definition: pipeline.cpp:1501
bool m_filtered
Specifies if the image has been filtered (false)
Definition: pipeline.h:367
int abundance_num_materials() const
Gets abundance_num_materials.
Definition: pipeline.cpp:2270
std::shared_ptr< scyl::spectral_library > m_spectral_library
Definition: pipeline.h:297
std::shared_ptr< scyl::input > m_input
Definition: pipeline.h:267
WIENER - Wiener filter (spatial)
Definition: scyllarus_types.h:105
int height() const
Gets height.
Definition: pipeline.cpp:1951
arma::fcube m_material_element_abundances
Definition: pipeline.h:291
int m_abundance_num_materials
Definition: pipeline.h:347
int material_max_clusters() const
Gets material_max_clusters.
Definition: pipeline.cpp:2161
arma::fmat endmember_abundances() const
Definition: pipeline.cpp:1835
std::shared_ptr< scyl::output > output()
Gets output object.
Definition: pipeline.cpp:1359
void set_analysis_num(int in)
Sets analysis_num (Number of analysis results to return (number of principal components)) ...
Definition: pipeline.cpp:2279
int illuminant_patch_size() const
Gets illuminant_patch_size.
Definition: pipeline.cpp:2076
int width() const
Gets width.
Definition: pipeline.cpp:1960
arma::fmat m_k
k. Set using set_k() and get using k()
Definition: pipeline.h:281
float m_nurbs_alpha
Definition: pipeline.h:362
arma::fcube analysis_components() const
Definition: pipeline.cpp:1918
void set_output(std::shared_ptr< scyl::output > in)
Sets the output object for the pipeline. Object is initialised before it it passed to this function...
Definition: pipeline.cpp:1350
int m_dichromatic_gray_threshold
Definition: pipeline.h:334
void set_material_max_clusters(int in)
Sets material_max_clusters, the maximum number of clusters found during material recovery. (See recover_materials() for more information)
Definition: pipeline.cpp:2153
void set_illuminant(const arma::fvec &in)
Sets illuminant.
Definition: pipeline.cpp:1469
void set_nurbs_knot_threshold(int in)
Sets nurbs_knot_threshold (Target number of knots when calculating NURBS)
Definition: pipeline.cpp:2348
void process_recover_materials()
process_recover_materials() calls the function 'recover_materials'. At a minimum, a reflectance cube ...
Definition: pipeline.cpp:508
float material_cooling_rate() const
Gets material_cooling_rate.
Definition: pipeline.cpp:2212
pipeline()
Definition: pipeline.cpp:20
void process_analysis(bool reflectance=true)
process_analysis() performs analysis of the pipeline object's reflectance cube (or image if the input...
Definition: pipeline.cpp:759
arma::ucube material_element_abundance_indexes() const
Gets material_element_abundance_indexes.
Definition: pipeline.cpp:1783
void set_dichromatic_method(scyl::DICHROMATIC_METHOD in)
Sets dichromatic_method (Method used in dichromatic parameter recovery)
Definition: pipeline.cpp:2013