Commit 60219fcd authored by Julien Malik's avatar Julien Malik

COMP: ugly-fixing #418 once again

parent e7434b47
......@@ -388,10 +388,10 @@ private:
unsigned int m_ChangeSamplePointsMax;
/** Gaussian sigma for histogram smoothing */
static const double m_HistogramGaussianWeights[73];
std::vector<double> m_HistogramGaussianWeights;
/** Offsets vector, conveniance datas */
static const OffsetType m_Offsets[8];
OffsetType m_Offsets[8];
};
} // End namespace otb
#ifndef OTB_MANUAL_INSTANTIATION
......
......@@ -26,48 +26,6 @@
namespace otb
{
template <class TInputImage, class TOutputPointSet>
const double
ImageToSIFTKeyPointSetFilter<TInputImage, TOutputPointSet>
::m_HistogramGaussianWeights[73] =
{
2.3771112282795414e-07, 3.8860734758633732e-07, 6.2655544995978937e-07, 9.9631120821413786e-07,
1.5624909838697011e-06, 2.4167238265599128e-06, 3.6865788528530121e-06,
5.5463469229192623e-06, 8.2295774080263437e-06, 1.2043009749602365e-05, 1.738119136656513e-05,
2.4740646513897326e-05, 3.4731980398846277e-05, 4.808781565748272e-05,
6.5664032975164266e-05, 8.8431512984476723e-05, 0.00011745555408931643, 0.00015386047198026335,
0.00019877765486783745, 0.00025327659834301937, 0.00031828015928190065,
0.00039446735551235698, 0.00048216931692246382, 0.00058126620279441276, 0.00069109471776775144,
0.00081037694122312908, 0.00093718121775182789, 0.0010689246133776746,
0.0012024238404411182, 0.0013339976954896103, 0.0014596192424447215, 0.0015751106965100009, 0.0016763688464699555,
0.0017596045720966803, 0.0018215772013714365,
0.0018598035923515156, 0.0018727231637146351, 0.0018598035923515156, 0.0018215772013714365, 0.0017596045720966803,
0.0016763688464699555, 0.0015751106965100009,
0.0014596192424447215, 0.0013339976954896103, 0.0012024238404411182, 0.0010689246133776746,
0.00093718121775182789, 0.00081037694122312908, 0.00069109471776775144,
0.00058126620279441276, 0.00048216931692246382, 0.00039446735551235698, 0.00031828015928190065,
0.00025327659834301937, 0.00019877765486783745, 0.00015386047198026335,
0.00011745555408931643, 8.8431512984476723e-05, 6.5664032975164266e-05, 4.808781565748272e-05,
3.4731980398846277e-05, 2.4740646513897326e-05, 1.738119136656513e-05,
1.2043009749602365e-05, 8.2295774080263437e-06, 5.5463469229192623e-06, 3.6865788528530121e-06,
2.4167238265599128e-06, 1.5624909838697011e-06, 9.9631120821413786e-07,
6.2655544995978937e-07, 3.8860734758633732e-07, 2.3771112282795414e-07
};
template <class TInputImage, class TOutputPointSet>
const typename ImageToSIFTKeyPointSetFilter<TInputImage, TOutputPointSet>::OffsetType
ImageToSIFTKeyPointSetFilter<TInputImage, TOutputPointSet>::m_Offsets[8] =
{
{{-1, -1}}, //0
{{-1, 0}}, //1
{{-1, 1}}, //2
{{ 0, -1}}, //3
{{ 0, 1}}, //4
{{ 1, -1}}, //5
{{ 1, 0}}, //6
{{ 1, 1}}, //7
};
/**
* Constructor
*/
......@@ -97,6 +55,49 @@ ImageToSIFTKeyPointSetFilter<TInputImage, TOutputPointSet>
m_GradientMagnitudeThreshold = 0.2;
m_ExpandFilter = ExpandFilterType::New();
const float HistogramGaussianWeights[73] = {
2.3771112282795414e-07, 3.8860734758633732e-07, 6.2655544995978937e-07, 9.9631120821413786e-07,
1.5624909838697011e-06, 2.4167238265599128e-06, 3.6865788528530121e-06,
5.5463469229192623e-06, 8.2295774080263437e-06, 1.2043009749602365e-05, 1.738119136656513e-05,
2.4740646513897326e-05, 3.4731980398846277e-05, 4.808781565748272e-05,
6.5664032975164266e-05, 8.8431512984476723e-05, 0.00011745555408931643, 0.00015386047198026335,
0.00019877765486783745, 0.00025327659834301937, 0.00031828015928190065,
0.00039446735551235698, 0.00048216931692246382, 0.00058126620279441276, 0.00069109471776775144,
0.00081037694122312908, 0.00093718121775182789, 0.0010689246133776746,
0.0012024238404411182, 0.0013339976954896103, 0.0014596192424447215, 0.0015751106965100009, 0.0016763688464699555,
0.0017596045720966803, 0.0018215772013714365,
0.0018598035923515156, 0.0018727231637146351, 0.0018598035923515156, 0.0018215772013714365, 0.0017596045720966803,
0.0016763688464699555, 0.0015751106965100009,
0.0014596192424447215, 0.0013339976954896103, 0.0012024238404411182, 0.0010689246133776746,
0.00093718121775182789, 0.00081037694122312908, 0.00069109471776775144,
0.00058126620279441276, 0.00048216931692246382, 0.00039446735551235698, 0.00031828015928190065,
0.00025327659834301937, 0.00019877765486783745, 0.00015386047198026335,
0.00011745555408931643, 8.8431512984476723e-05, 6.5664032975164266e-05, 4.808781565748272e-05,
3.4731980398846277e-05, 2.4740646513897326e-05, 1.738119136656513e-05,
1.2043009749602365e-05, 8.2295774080263437e-06, 5.5463469229192623e-06, 3.6865788528530121e-06,
2.4167238265599128e-06, 1.5624909838697011e-06, 9.9631120821413786e-07,
6.2655544995978937e-07, 3.8860734758633732e-07, 2.3771112282795414e-07
};
std::copy(HistogramGaussianWeights, HistogramGaussianWeights+73, m_HistogramGaussianWeights.begin());
m_Offsets[0][0]=-1;
m_Offsets[0][1]=-1;
m_Offsets[1][0]=-1;
m_Offsets[1][1]= 0;
m_Offsets[2][0]=-1;
m_Offsets[2][1]= 1;
m_Offsets[3][0]= 0;
m_Offsets[3][1]=-1;
m_Offsets[4][0]= 0;
m_Offsets[4][1]= 1;
m_Offsets[5][0]= 1;
m_Offsets[5][1]=-1;
m_Offsets[6][0]= 1;
m_Offsets[6][1]= 0;
m_Offsets[7][0]= 1;
m_Offsets[7][1]= 1;
}
template <class TInputImage, class TOutputPointSet>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment