Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Main Repositories
otb
Commits
2ea07dea
Commit
2ea07dea
authored
Jul 05, 2016
by
Julien Michel
Browse files
BUG: Fixing behaviour changes in vcl_pow starting ITK 4.10
parent
b3020c47
Changes
2
Hide whitespace changes
Inline
Side-by-side
Modules/Feature/Descriptors/include/otbFourierMellinDescriptorsImageFunction.txx
View file @
2ea07dea
...
...
@@ -112,12 +112,12 @@ FourierMellinDescriptorsImageFunction<TInputImage, TCoordRep>
for (unsigned int q= 0; q <= m_Qmax; q++)
{
ScalarComplexType power(double(p-2.0+m_Sigma)/2.0, -double(q)/2.0);
if
(x!=0 || y!=0) // vcl_pow limitation
s
{
coefs.at(p).at(q) += vcl_pow(xplusiy, -
p
) * vcl_pow(x2plusy2, power) * value;
}
}
if(x!=0 || y
!=0) // vcl_pow limitation
{
coefs.at(p).at(q) += vcl_pow(xplusiy, -
static_cast<double>(p)
) * vcl_pow(x2plusy2, power) * value;
}
}
}
}
...
...
Modules/Feature/Moments/include/otbComplexMomentsImageFunction.txx
View file @
2ea07dea
...
...
@@ -106,11 +106,23 @@ ComplexMomentsImageFunction<TInputImage, TCoordRep>
{
for (unsigned int q= 0; q <= m_Qmax; q++)
{
moments.at(p).at(q) += vcl_pow(xpy, p) * vcl_pow(xqy, q) * value;
ScalarComplexType pow1(1,0);
ScalarComplexType pow2(1,0);
if(p!=0 || x!=0 || y != 0)
{
pow1=vcl_pow(xpy,p);
}
if(q!=0 || x!=0 || y != 0)
{
pow2=vcl_pow(xqy,q);
}
moments.at(p).at(q) += pow1 * pow2 * value;
}
}
}
// Normalisation
for (int p = m_Pmax; p >= 0; p--)
{
...
...
Write
Preview
Supports
Markdown
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