Xmipp
v3.23.11-Nereus
|
Macros | |
#define | HAAR 2 |
#define | DAUB4 4 |
#define | DAUB12 12 |
#define | DAUB20 20 |
Wavelet transform | |
void | Bilib_DWT (const MultidimArray< double > &input, MultidimArray< double > &result, int iterations, int isign=1) |
void | set_DWT_type (int DWT_type) |
int | Get_Max_Scale (int size) |
template<typename T > | |
void | DWT (const MultidimArray< T > &v, MultidimArray< double > &result, int isign=1) |
void | IDWT (const MultidimArray< double > &v, MultidimArray< double > &result) |
Wavelet related functions | |
void | DWT_lowpass2D (const MultidimArray< double > &v, MultidimArray< double > &result) |
template<typename T > | |
void | SelectDWTBlock (int scale, const MultidimArray< T > &I, const std::string &quadrant, int &x1, int &x2) |
template<typename T > | |
void | SelectDWTBlock (int scale, const MultidimArray< T > &I, const std::string &quadrant, int &x1, int &x2, int &y1, int &y2) |
template<typename T > | |
void | SelectDWTBlock (int scale, const MultidimArray< T > &I, const std::string &quadrant, int &x1, int &x2, int &y1, int &y2, int &z1, int &z2) |
std::string | Quadrant2D (int q) |
std::string | Quadrant3D (int q) |
void | Get_Scale_Quadrant (int size_x, int x, int &scale, std::string &quadrant) |
void | Get_Scale_Quadrant (int size_x, int size_y, int x, int y, int &scale, std::string &quadrant) |
void | Get_Scale_Quadrant (int size_x, int size_y, int size_z, int x, int y, int z, int &scale, std::string &quadrant) |
#define | DWT_Imin(s, smax, l) |
#define | DWT_Imax(s, smax, l) |
Wavelet Denoising | |
void | clean_quadrant2D (MultidimArray< double > &I, int scale, const std::string &quadrant) |
void | clean_quadrant3D (MultidimArray< double > &I, int scale, const std::string &quadrant) |
void | soft_thresholding (MultidimArray< double > &I, double th) |
void | adaptive_soft_thresholding2D (MultidimArray< double > &I, int scale) |
void | DWT_keep_central_part (MultidimArray< double > &I, double R) |
Matrix1D< double > | bayesian_wiener_filtering2D (MultidimArray< double > &WI, int allowed_scale, double SNR0=0.1, double SNRF=0.2, bool white_noise=false, int tell=0, bool denoise=true) |
void | bayesian_wiener_filtering2D (MultidimArray< double > &WI, int allowed_scale, Matrix1D< double > &estimatedS) |
Matrix1D< double > | bayesian_wiener_filtering3D (MultidimArray< double > &WI, int allowed_scale, double SNR0=0.1, double SNRF=0.2, bool white_noise=false, int tell=0, bool denoise=true) |
void | bayesian_wiener_filtering3D (MultidimArray< double > &WI, int allowed_scale, Matrix1D< double > &estimatedS) |
void | phaseCongMono (MultidimArray< double > &I, MultidimArray< double > &PC, MultidimArray< double > &FT, MultidimArray< double > &Energy, MultidimArray< double > &lowPass, MultidimArray< double > &Radius, MultidimArray< std::complex< double > > &H, int nScale, double minWaveLength, double mult, double sigmaOnf) |
#define DWT_Imax | ( | s, | |
smax, | |||
l | |||
) |
#define DWT_Imin | ( | s, | |
smax, | |||
l | |||
) |
void adaptive_soft_thresholding2D | ( | MultidimArray< double > & | I, |
int | scale | ||
) |
Adaptive soft thresholding 2D.
Chang, Yu, Betterli. IEEE Int. Conf. Image Processing
Definition at line 384 of file wavelet.cpp.
Matrix1D< double > bayesian_wiener_filtering2D | ( | MultidimArray< double > & | WI, |
int | allowed_scale, | ||
double | SNR0 = 0.1 , |
||
double | SNRF = 0.2 , |
||
bool | white_noise = false , |
||
int | tell = 0 , |
||
bool | denoise = true |
||
) |
Bayesian, Wiener filtering.
Bijaoui, Signal Processing 2002, 82: 709-712. The Denoising procedure is applied up to the scale given. SNR0 is the smallest SNR and SNRF is the largest SNR.
This function returns the estimated coefficients for S and N at each scale. If denoise is set to false, then S and N coefficients are estimated but they are not applied to the image.
Definition at line 603 of file wavelet.cpp.
void bayesian_wiener_filtering2D | ( | MultidimArray< double > & | WI, |
int | allowed_scale, | ||
Matrix1D< double > & | estimatedS | ||
) |
Bayesian, Wiener filtering.
This is the function that really denoise.
Definition at line 704 of file wavelet.cpp.
Matrix1D< double > bayesian_wiener_filtering3D | ( | MultidimArray< double > & | WI, |
int | allowed_scale, | ||
double | SNR0 = 0.1 , |
||
double | SNRF = 0.2 , |
||
bool | white_noise = false , |
||
int | tell = 0 , |
||
bool | denoise = true |
||
) |
Bayesian, Wiener filtering.
Bijaoui, Signal Processing 2002, 82: 709-712. The denoising procedure is applied up to the scale given. SNR0 is the smallest SNR and SNRF is the largest SNR.
This function returns the estimated coefficients for S and N at each scale. If denoise is set to false, then S and N coefficients are estimated but they are not applied to the image.
Definition at line 726 of file wavelet.cpp.
void bayesian_wiener_filtering3D | ( | MultidimArray< double > & | WI, |
int | allowed_scale, | ||
Matrix1D< double > & | estimatedS | ||
) |
Bayesian, Wiener filtering.
This is the function that really denoise.
Definition at line 825 of file wavelet.cpp.
void Bilib_DWT | ( | const MultidimArray< double > & | input, |
MultidimArray< double > & | result, | ||
int | iterations, | ||
int | isign = 1 |
||
) |
B-spline Wavelet transform of a vector.
The B-spline wavelet transform of the input array is computed. The size of the array must be so as to allow the downsampling by 2 as many times as the number of iterations. For instance, if iterations is 1, then it must be a multiple of 2. If iterations is 2, then it must be a multiple of 4. If iterations if 3, then it must be a multiple of 8. And so on.
If the isign=-1 then the inverse wavelet transform is performed.
Definition at line 43 of file wavelet.cpp.
void clean_quadrant2D | ( | MultidimArray< double > & | I, |
int | scale, | ||
const std::string & | quadrant | ||
) |
Remove all information within a quadrant and scale.
Definition at line 288 of file wavelet.cpp.
void clean_quadrant3D | ( | MultidimArray< double > & | I, |
int | scale, | ||
const std::string & | quadrant | ||
) |
Remove all information within a quadrant and scale.
Definition at line 297 of file wavelet.cpp.
void DWT | ( | const MultidimArray< T > & | v, |
MultidimArray< double > & | result, | ||
int | isign = 1 |
||
) |
DWT of a MultidimArray
The output vector can be the same as the input one. Previously the type of DWT must be set with set_DWT_type. If isign=1 the direct DWT is performed, if isign=-1 the inverse DWT is done.
Definition at line 83 of file wavelet.h.
void DWT_keep_central_part | ( | MultidimArray< double > & | I, |
double | R | ||
) |
Keep central part 2D.
Keep those coefficients in a certain radius.
Definition at line 396 of file wavelet.cpp.
void DWT_lowpass2D | ( | const MultidimArray< double > & | v, |
MultidimArray< double > & | result | ||
) |
DWT Low pass versions.
This function returns the low pass versions at different scales. The low pass version of the image at scale s is stored in the 01 quadrant of that scale.
Definition at line 165 of file wavelet.cpp.
|
inline |
void Get_Scale_Quadrant | ( | int | size_x, |
int | x, | ||
int & | scale, | ||
std::string & | quadrant | ||
) |
Get scale and quadrant 1D.
Given a point and the maximum size of the image, this routine returns the scale and quadrant it belongs.
Definition at line 248 of file wavelet.cpp.
void Get_Scale_Quadrant | ( | int | size_x, |
int | size_y, | ||
int | x, | ||
int | y, | ||
int & | scale, | ||
std::string & | quadrant | ||
) |
Get scale and quadrant 2D.
Given a point and the maximum size of the image, this routine returns the scale and quadrant it belongs.
Definition at line 257 of file wavelet.cpp.
void Get_Scale_Quadrant | ( | int | size_x, |
int | size_y, | ||
int | size_z, | ||
int | x, | ||
int | y, | ||
int | z, | ||
int & | scale, | ||
std::string & | quadrant | ||
) |
Get scale and quadrant 3D.
Given a point and the maximum size of the image, this routine returns the scale and quadrant it belongs.
Definition at line 270 of file wavelet.cpp.
void IDWT | ( | const MultidimArray< double > & | v, |
MultidimArray< double > & | result | ||
) |
IDWT of a MultidimArray.
The output volume can be the same as the input one. Previously the type of DWT must be set with set_DWT_type.
Definition at line 159 of file wavelet.cpp.
void phaseCongMono | ( | MultidimArray< double > & | I, |
MultidimArray< double > & | PC, | ||
MultidimArray< double > & | FT, | ||
MultidimArray< double > & | Energy, | ||
MultidimArray< double > & | lowPass, | ||
MultidimArray< double > & | Radius, | ||
MultidimArray< std::complex< double > > & | H, | ||
int | nScale, | ||
double | minWaveLength, | ||
double | mult, | ||
double | sigmaOnf | ||
) |
Phase congruency filtering.
Phase congruency of an image using monogenic filters.
I - Image to be processed PC - Phase congruency indicating edge significance FT - Local weighted mean phase angle at every point in the image. A value of pi/2 corresponds to a bright line, 0 corresponds to a step and -pi/2 is a dark line. nscale 5 - Number of wavelet scales, try values 3-6 minWaveLength 3 - Wavelength of smallest scale filter. mult 2.1 - Scaling factor between successive filters. sigmaOnf 0.55 - Ratio of the standard deviation of the Gaussian describing the log Gabor filter's transfer function in the frequency domain to the filter center frequency.
References:
Peter Kovesi, "Image Features From Phase Congruency". Videre: A Journal of Computer Vision Research. MIT Press. Volume 1, Number 3, Summer 1999 http://mitpress.mit.edu/e-journals/Videre/001/v13.html
Michael Felsberg and Gerald Sommer, "A New Extension of Linear Signal Processing for Estimating Local Properties and Detecting Features". DAGM Symposium 2000, Kiel
Michael Felsberg and Gerald Sommer. "The Monogenic Signal" IEEE Transactions on Signal Processing, 49(12):3136-3144, December 2001
Peter Kovesi, "Phase Congruency Detects Corners and Edges". Proceedings DICTA 2003, Sydney Dec 10-12
Definition at line 850 of file wavelet.cpp.
std::string Quadrant2D | ( | int | q | ) |
Given a quadrant number it returns the string associated to it.
That is nothing more than its corresponding binary representation.
Definition at line 187 of file wavelet.cpp.
std::string Quadrant3D | ( | int | q | ) |
Given a quadrant number it returns the string associated to it.
That is nothing more than its corresponding binary representation.
Definition at line 208 of file wavelet.cpp.
void SelectDWTBlock | ( | int | scale, |
const MultidimArray< T > & | I, | ||
const std::string & | quadrant, | ||
int & | x1, | ||
int & | x2 | ||
) |
Select Block 1D.
Given the scale (s=0 is the finest) and the quadrant "0" (Lower frequencies) or "1"(Higher frequencies) this routine returns the indices that should be explored for this block (x1 and x2 should be included in the for).
Definition at line 134 of file wavelet.h.
void SelectDWTBlock | ( | int | scale, |
const MultidimArray< T > & | I, | ||
const std::string & | quadrant, | ||
int & | x1, | ||
int & | x2, | ||
int & | y1, | ||
int & | y2 | ||
) |
Select Block 2D.
Given the scale (s=0 is the finest) and the quadrant "xy"="00" (Upper left), "01" (Upper right), "10" (Lower left), "11" (Lower right). This routine returns the indices that should be explored for this block (the extremes should be included in the for).
Definition at line 153 of file wavelet.h.
void SelectDWTBlock | ( | int | scale, |
const MultidimArray< T > & | I, | ||
const std::string & | quadrant, | ||
int & | x1, | ||
int & | x2, | ||
int & | y1, | ||
int & | y2, | ||
int & | z1, | ||
int & | z2 | ||
) |
Select Block 3D.
Given the scale (s=0 is the finest) and the quadrant "xyz"="000", "001", "010", "011", "100", "101", "110", "111". This routine returns the indices that should be explored for this block (the extremes should be included in the for).
Definition at line 182 of file wavelet.h.
void set_DWT_type | ( | int | DWT_type | ) |
Set DWT type.
The DWT type should be set before starting making transforms. Valid types are: HAAR, DAUB4, DAUB12, DAUB20
Definition at line 154 of file wavelet.cpp.
void soft_thresholding | ( | MultidimArray< double > & | I, |
double | th | ||
) |
Soft thresholding .
Subtract a value from all coefficients, if the the value is greater than the absolute value of the coefficient, that coefficient is set to 0.
Definition at line 308 of file wavelet.cpp.