16 #include <opencv2/opencv.hpp>
32 template <
class T>
bool arma_cmp(
const T & a,
55 int cv_interpolate_flag=cv::INTER_LINEAR);
57 float angle(
const arma::fvec & a,
58 const arma::fvec & b);
76 arma::fvec & wavelengths);
79 const arma::fvec & in_waves,
80 const arma::fvec & in_waves_new);
void scale_cube(arma::fcube &in, int height, int width, int cv_interpolate_flag=cv::INTER_LINEAR)
scale_cube() resamples a cube spatially using OpenCV resize methods.
Definition: utility.cpp:226
void nan_to_zero(T &in)
nan_to_zero removes NaN values from a Armadillo data structure, replacing them with 0...
Definition: utility_imp.h:24
void zero_to_one(T &in)
zero_to_one replaces 0's in an Armadillo data structure with 1's.
Definition: utility_imp.h:41
arma::fmat resample_endmembers(const arma::fmat &in_endmembers, const arma::fvec &in_waves, const arma::fvec &in_waves_new)
resample_endmembers() is used to change the number of bands an endmember matrix has using NURBS...
Definition: utility.cpp:585
bool arma_cmp(const T &a, const T &b, const bool verbose, float eps)
arma_cmp compares two Armadillo objects for equality +- epsilon.
Definition: utility_imp.h:110
I.
Definition: scyllarus_types.h:114
void remove_bands(arma::fcube &in, arma::fvec &waves, arma::uvec remove)
remove_bands() removes image bands from the given image cube.
Definition: utility.cpp:184
void align_image_bands(arma::fcube &in, arma::fvec &coloff, arma::fvec &rowoff, int debug=0)
align_image_bands() aligns bands in an image according to the input row and column offsets...
Definition: utility.cpp:479
int arma_cmp_num(const T &a, const T &b, float eps)
void register_image_bands(const arma::fcube &in, arma::fvec &coloff, arma::fvec &rowoff, int debug=0)
register_image_bands() takes a image cube and attempts to automatically find the alignment of the ban...
Definition: utility.cpp:354
void sort_bands(arma::fcube &I, arma::fvec &wavelengths)
sort_bands() manipulates a Image cube and wavelengths vector.
Definition: utility.cpp:542
void image_gradient(const arma::fmat &in, arma::fmat &gx, arma::fmat &gy)
Calculates the gradients in the x and y directions for a given image.
Definition: utility.cpp:289
float angle(const arma::fvec &a, const arma::fvec &b)
angle returns the angle between two vectors in degrees.
Definition: utility.cpp:272
arma::fvec non_negative_least_squares_2(arma::fmat a, arma::fvec b)
non_negative_least_squares_2() gives a non negative solution for x to the problem of Ax = b...
Definition: utility.cpp:25
float arma_cmp_sig_figs(const T &a, const T &b, int num_sig_figs)
arma_cmp compares two Armadillo objects for equality. Instead of using a tolerance, test number of significant figures.
Definition: utility_imp.h:143
arma::fmat arma_slice_mean(const arma::fcube &in)
arma_slice_mean() takes an image cube and returns a mat which is the mean image of all the slices...
Definition: utility.cpp:329