Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Main Repositories
otb
Commits
8491aaad
Commit
8491aaad
authored
Jul 19, 2011
by
Emmanuel Christophe
Browse files
ENH: add more explanation for the comparaison and remove unused and untested method
parent
a6895c9a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Code/MultiScale/otbWaveletOperatorBase.h
View file @
8491aaad
...
...
@@ -157,18 +157,6 @@ protected:
*/
void
RevertFilter
(
CoefficientVector
&
coeff
);
/**
* Performs the definition of high pass filter in an orthogonal framework
* It follows conjugate quadrature filter (CQF) of the chapter 5 of
* "Ten Lecture on Wavelets", of Ingrid Daubechies,
* Society for Industrial and Applied Mathematics, 1992.
*
* It defines filter coefficients as \f$ G(z) = - z H(-z^{-1}) \f$.
* According to Daubechies'notation, it concerns the synthesis (Inverse)
* part of the filter banc.
*/
void
GenerateForwardHighPassFilterFromLowPassFilter
(
CoefficientVector
&
coeff
);
/**
* Performs the definition of high pass filter in an orthogonal framework
* It follows conjugate quadrature filter (CQF) of the chapter 5 of
...
...
Code/MultiScale/otbWaveletOperatorBase.txx
View file @
8491aaad
...
...
@@ -89,37 +89,6 @@ WaveletOperatorBase<TMotherWaveletOperator, TPixel, VDimension, TAllocator>
coeff = newCoeff;
}
template <Wavelet::Wavelet TMotherWaveletOperator,
class TPixel, unsigned int VDimension, class TAllocator>
void
WaveletOperatorBase<TMotherWaveletOperator, TPixel, VDimension, TAllocator>
::GenerateForwardHighPassFilterFromLowPassFilter(CoefficientVector& coeff)
{
const unsigned int length = coeff.size();
//const unsigned int medianPosition = length / 2;
CoefficientVector highPassCoeff(length + 2);
highPassCoeff[0] = 0.;
highPassCoeff[1] = 0.;
double sign = -1; //(medianPosition&1)==1 ? -1. : 1.;
for (unsigned int i = 0; i < length; i++)
{
highPassCoeff[i + 2] = sign * coeff[length - 1 - i];
sign *= -1.;
}
//highPassCoeff[length] = 0.;
//highPassCoeff[length+1] = 0.;
coeff = highPassCoeff;
while (coeff[0] == coeff[coeff.size() - 1])
{
ReduceFilterLength(coeff);
}
}
template <Wavelet::Wavelet TMotherWaveletOperator,
class TPixel, unsigned int VDimension, class TAllocator>
void
...
...
@@ -141,6 +110,8 @@ WaveletOperatorBase<TMotherWaveletOperator, TPixel, VDimension, TAllocator>
coeff = highPassCoeff;
// Note that the 0.0 value is obtained by affectation and not by
// computation. It is fine to do an == comparison
while ((coeff[0] == coeff[coeff.size() - 1]) && (coeff[0] == 0.0))
{
ReduceFilterLength(coeff);
...
...
@@ -168,6 +139,8 @@ WaveletOperatorBase<TMotherWaveletOperator, TPixel, VDimension, TAllocator>
coeff = highPassCoeff;
// Note that the 0.0 value is obtained by affectation and not by
// computation. It is fine to do an == comparison
while ((coeff[0] == coeff[coeff.size() - 1]) && (coeff[0] == 0.0))
{
assert(coeff.size() > 1);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment