Skip to content
Snippets Groups Projects
Commit 43be77eb authored by Cyrille Valladeau's avatar Cyrille Valladeau
Browse files

ENH: add bin size control (already done in 1 of the case)

parent 7c9ed544
Branches
Tags
No related merge requests found
...@@ -201,6 +201,9 @@ HistogramOfOrientedGradientCovariantImageFunction<TInputImage, TOutputPrecision, ...@@ -201,6 +201,9 @@ HistogramOfOrientedGradientCovariantImageFunction<TInputImage, TOutputPrecision,
// lies in [-pi, pi] // lies in [-pi, pi]
unsigned int binIndex = vcl_floor((otb::CONST_PI + angle)/orientationBinWidth); unsigned int binIndex = vcl_floor((otb::CONST_PI + angle)/orientationBinWidth);
if(binIndex == m_NumberOfOrientationBins)
binIndex=m_NumberOfOrientationBins-1;
// Compute the angular position // Compute the angular position
double angularPosition = vcl_atan2((double)j, (double)i) - principalOrientation; double angularPosition = vcl_atan2((double)j, (double)i) - principalOrientation;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment