Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
otb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
273
Issues
273
List
Boards
Labels
Service Desk
Milestones
Merge Requests
8
Merge Requests
8
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Main Repositories
otb
Commits
e3d488e1
Commit
e3d488e1
authored
Feb 04, 2015
by
Christophe Palmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BUG: BCO interpolation, bad normalization. Coefs are normalized instead.
parent
19696ea1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
Code/BasicFilters/otbBCOInterpolateImageFunction.txx
Code/BasicFilters/otbBCOInterpolateImageFunction.txx
+9
-7
No files found.
Code/BasicFilters/otbBCOInterpolateImageFunction.txx
View file @
e3d488e1
...
...
@@ -87,6 +87,8 @@ BCOInterpolateImageFunctionBase<TInputImage, TCoordRep>
step = 4./static_cast<double>(2*radius);
position = - double(radius) * step;
double sum = 0.0;
for ( int i = -radius; i <= radius; ++i)
{
// Compute the BCO coefficients according to alpha.
...
...
@@ -109,9 +111,14 @@ BCOInterpolateImageFunctionBase<TInputImage, TCoordRep>
{
BCOCoef[m_Radius+i] = 0;
}
sum += BCOCoef[m_Radius+i];
position += step;
}
for ( unsigned int i = 0; i < winSize; ++i)
BCOCoef[i] = BCOCoef[i] / sum;
return BCOCoef;
}
...
...
@@ -179,10 +186,8 @@ BCOInterpolateImageFunction<TInputImage, TCoordRep>
value += lineRes[i+radius]*BCOCoefX[i+radius];
}
norma = (vcl_log(static_cast<double>(radius))/vcl_log(2.0));
norma = norma * norma;
return ( static_cast<OutputType>( value
/norma
) );
return ( static_cast<OutputType>( value ) );
}
template < typename TPixel, unsigned int VImageDimension, class TCoordRep >
...
...
@@ -278,12 +283,9 @@ BCOInterpolateImageFunction< otb::VectorImage<TPixel, VImageDimension> , TCoordR
}
}
norma = (vcl_log(static_cast<double>(radius))/vcl_log(2.0));
norma = norma * norma;
for( unsigned int k = 0; k<componentNumber; ++k)
{
output.SetElement(k, value.at(k)
/norma
);
output.SetElement(k, value.at(k));
}
return ( output );
...
...
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