Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
otb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
David Youssefi
otb
Commits
fe8ecb5d
Commit
fe8ecb5d
authored
15 years ago
by
Guillaume Borrut
Browse files
Options
Downloads
Patches
Plain Diff
ENH: the radar functors are grouped in otbRadarFunctors.h
parent
ef234e2e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Code/Radiometry/otbRadarFunctors.h
+94
-6
94 additions, 6 deletions
Code/Radiometry/otbRadarFunctors.h
Code/Radiometry/otbTerraSarCalibrationImageFilter.h
+0
-85
0 additions, 85 deletions
Code/Radiometry/otbTerraSarCalibrationImageFilter.h
with
94 additions
and
91 deletions
Code/Radiometry/otbRadarFunctors.h
+
94
−
6
View file @
fe8ecb5d
...
...
@@ -24,7 +24,6 @@
#include
"itkUnaryFunctorImageFilter.h"
#include
"otbTerraSarCalibrationImageFilter.h"
#include
"itkMetaDataDictionary.h"
#include
"otbMath.h"
...
...
@@ -49,6 +48,10 @@ public:
};
virtual
~
TerraSarRadarBrightnessImageFunctor
()
{};
typedef
std
::
vector
<
double
>
DoubleVectorType
;
typedef
std
::
vector
<
DoubleVectorType
>
DoubleVectorVectorType
;
typedef
itk
::
Size
<
2
>
SizeType
;
/** Accessors */
void
SetCalFactor
(
double
val
)
{
m_CalFactor
=
val
;
};
double
GetCalFactor
()
{
return
m_CalFactor
;
};
...
...
@@ -84,7 +87,7 @@ public:
TerraSarRadarBrightnessComplexImageFunctor
()
{};
virtual
~
TerraSarRadarBrightnessComplexImageFunctor
()
{};
typedef
TerraSarRadarBrightnessImageFunctor
<
TInput
,
TOutput
>
FunctorType
;
typedef
TerraSarRadarBrightnessImageFunctor
<
TInput
,
TOutput
>
BetaNaught
FunctorType
;
/** Accessors */
void
SetCalFactor
(
double
val
)
{
m_BetaNaughtFunctor
->
SetCalFactor
(
val
);
};
...
...
@@ -109,7 +112,92 @@ public:
private
:
/** Calibration Factor */
FunctorType
m_BetaNaughtFunctor
;
BetaNaughtFunctorType
m_BetaNaughtFunctor
;
};
/**
* \class TerraSarCalibrationImageFunctor
* \brief Compute the surface reflectance pixel from a TOA reflectance.
*
* \ingroup Functor
* \ingroup Radiometry
*/
template
<
class
TInputIt
,
class
TOutput
>
class
TerraSarCalibrationImageFunctor
{
public:
TerraSarCalibrationImageFunctor
();
virtual
~
TerraSarCalibrationImageFunctor
()
{};
typedef
std
::
vector
<
double
>
DoubleVectorType
;
typedef
std
::
vector
<
DoubleVectorType
>
DoubleVectorVectorType
;
typedef
std
::
vector
<
long
int
>
LIntVectorType
;
typedef
itk
::
Size
<
2
>
SizeType
;
typedef
typename
TInputIt
::
PixelType
InputPixelType
;
typedef
TerraSarRadarBrightnessImageFunctor
<
InputPixelType
,
TOutput
>
BrightnessFunctorType
;
/** Accessors */
void
SetCalFactor
(
double
val
)
{
m_CalFactor
=
val
;
m_RadarBrightness
.
SetCalFactor
(
val
);
};
double
GetCalFactor
()
const
{
return
m_CalFactor
;
};
void
SetNoiseRangeValidityMin
(
double
val
)
{
m_NoiseRangeValidityMin
=
val
;
};
double
GetNoiseRangeValidityMin
()
const
{
return
m_NoiseRangeValidityMin
;
};
void
SetNoiseRangeValidityMax
(
double
val
)
{
m_NoiseRangeValidityMax
=
val
;
};
double
GetNoiseRangeValidityMax
()
const
{
return
m_NoiseRangeValidityMax
;
};
void
SetNoiseRangeValidityRef
(
double
val
)
{
m_NoiseRangeValidityRef
=
val
;
};
double
GetNoiseRangeValidityRef
()
const
{
return
m_NoiseRangeValidityRef
;
};
void
SetLocalIncidentAngle
(
double
val
)
{
m_LocalIncidentAngle
=
val
;
m_SinLocalIncidentAngle
=
vcl_sin
(
m_LocalIncidentAngle
*
CONST_PI_180
);
};
double
GetLocalIncidentAngle
()
const
{
return
m_LocalIncidentAngle
;
};
double
GetSinLocalIncidentAngle
()
const
{
return
m_SinLocalIncidentAngle
;
};
void
SetNoisePolynomialCoefficientsList
(
DoubleVectorVectorType
vect
)
{
m_NoisePolynomialCoefficientsList
=
vect
;
};
DoubleVectorVectorType
GetNoisePolynomialCoefficientsList
()
const
{
return
m_NoisePolynomialCoefficientsList
;
};
void
SetImageSize
(
SizeType
size
)
{
m_ImageSize
=
size
;
};
SizeType
GetImageSize
()
const
{
return
m_ImageSize
;
};
void
SetUseFastCalibrationMethod
(
bool
b
)
{
m_UseFastCalibrationMethod
=
b
;
};
bool
GetUseFastCalibrationMethod
()
const
{
return
m_UseFastCalibrationMethod
;
};
void
SetTimeUTC
(
LIntVectorType
vect
)
{
m_TimeUTC
=
vect
;
};
LIntVectorType
GetTimeUTC
()
const
{
return
m_TimeUTC
;
};
void
SetPRF
(
double
val
)
{
m_PRF
=
val
;
m_InvPRF
=
1.
/
m_PRF
;
};
double
GetPRF
()
const
{
return
m_PRF
;
};
double
GetInvPRF
()
const
{
return
m_InvPRF
;
};
double
ComputeCurrentNoise
(
unsigned
int
colId
);
DoubleVectorType
ComputeCurrentCoeffs
(
unsigned
int
lineId
);
inline
TOutput
operator
()
(
const
TInputIt
&
inIt
);
private
:
/** Calibration Factor */
double
m_CalFactor
;
/** Noise minimal range validity */
double
m_NoiseRangeValidityMin
;
/** Noise maxinimal range validity */
double
m_NoiseRangeValidityMax
;
/** Noise reference range */
double
m_NoiseRangeValidityRef
;
/** Sensor local incident angle in degree */
double
m_LocalIncidentAngle
;
/** sin of the LocalIncidentAngle */
double
m_SinLocalIncidentAngle
;
/** Vector of vector that contain noise polinomial coefficient */
DoubleVectorVectorType
m_NoisePolynomialCoefficientsList
;
/** Image Size */
SizeType
m_ImageSize
;
/** Fast Calibration Method. If set to trus, will consider only the first noise coefficient else,
* will use all of them and applied it according to its acquisition UTC time and the coordinates
* of the pixel in the image. */
bool
m_UseFastCalibrationMethod
;
/** TimeUTC for each noise coefficient acquisition (in second). */
LIntVectorType
m_TimeUTC
;
/** Pulse Repetition Frequency */
double
m_PRF
;
/** Inverse Pulse Repetition Frequency */
double
m_InvPRF
;
/** Radar Brightness functor */
BrightnessFunctorType
m_RadarBrightness
;
};
...
...
@@ -127,10 +215,10 @@ public:
TerraSarCalibrationComplexImageFunctor
()
{};
virtual
~
TerraSarCalibrationComplexImageFunctor
()
{};
typedef
TerraSarCalibrationImageFunctor
<
TInput
,
TOutput
>
FunctorType
;
typedef
std
::
vector
<
double
>
DoubleVectorType
;
typedef
std
::
vector
<
DoubleVectorType
>
DoubleVectorVectorType
;
typedef
itk
::
Size
<
2
>
SizeType
;
typedef
TerraSarCalibrationImageFunctor
<
TInput
,
TOutput
>
SigmaNaughtFunctorType
;
/** Accessors */
void
SetCalFactor
(
double
val
)
{
m_SigmaNaughtFunctor
.
SetCalFactor
(
val
);
};
...
...
@@ -167,10 +255,10 @@ public:
private
:
/** Calibration Factor */
FunctorType
m_SigmaNaughtFunctor
;
SigmaNaught
FunctorType
m_SigmaNaughtFunctor
;
};
}
}
// end namespace functor
}
// end namespace otb
...
...
This diff is collapsed.
Click to expand it.
Code/Radiometry/otbTerraSarCalibrationImageFilter.h
+
0
−
85
View file @
fe8ecb5d
...
...
@@ -31,92 +31,7 @@
namespace
otb
{
namespace
Functor
{
/**
* \class TerraSarCalibrationImageFunctor
* \brief Compute the surface reflectance pixel from a TOA reflectance.
*
* \ingroup Functor
* \ingroup Radiometry
*/
template
<
class
TInputIt
,
class
TOutput
>
class
TerraSarCalibrationImageFunctor
<
TInputIt
,
TOutput
>
{
public:
TerraSarCalibrationImageFunctor
();
virtual
~
TerraSarCalibrationImageFunctor
()
{};
typedef
std
::
vector
<
double
>
DoubleVectorType
;
typedef
std
::
vector
<
DoubleVectorType
>
DoubleVectorVectorType
;
typedef
std
::
vector
<
long
int
>
LIntVectorType
;
typedef
itk
::
Size
<
2
>
SizeType
;
typedef
typename
TInputIt
::
PixelType
InputPixelType
;
typedef
TerraSarRadarBrightnessImageFunctor
<
InputPixelType
,
TOutput
>
BrightnessFunctorType
;
/** Accessors */
void
SetCalFactor
(
double
val
)
{
m_CalFactor
=
val
;
m_RadarBrightness
.
SetCalFactor
(
val
);
};
double
GetCalFactor
()
const
{
return
m_CalFactor
;
};
void
SetNoiseRangeValidityMin
(
double
val
)
{
m_NoiseRangeValidityMin
=
val
;
};
double
GetNoiseRangeValidityMin
()
const
{
return
m_NoiseRangeValidityMin
;
};
void
SetNoiseRangeValidityMax
(
double
val
)
{
m_NoiseRangeValidityMax
=
val
;
};
double
GetNoiseRangeValidityMax
()
const
{
return
m_NoiseRangeValidityMax
;
};
void
SetNoiseRangeValidityRef
(
double
val
)
{
m_NoiseRangeValidityRef
=
val
;
};
double
GetNoiseRangeValidityRef
()
const
{
return
m_NoiseRangeValidityRef
;
};
void
SetLocalIncidentAngle
(
double
val
)
{
m_LocalIncidentAngle
=
val
;
m_SinLocalIncidentAngle
=
vcl_sin
(
m_LocalIncidentAngle
*
CONST_PI_180
);
};
double
GetLocalIncidentAngle
()
const
{
return
m_LocalIncidentAngle
;
};
double
GetSinLocalIncidentAngle
()
const
{
return
m_SinLocalIncidentAngle
;
};
void
SetNoisePolynomialCoefficientsList
(
DoubleVectorVectorType
vect
)
{
m_NoisePolynomialCoefficientsList
=
vect
;
};
DoubleVectorVectorType
GetNoisePolynomialCoefficientsList
()
const
{
return
m_NoisePolynomialCoefficientsList
;
};
void
SetImageSize
(
SizeType
size
)
{
m_ImageSize
=
size
;
};
SizeType
GetImageSize
()
const
{
return
m_ImageSize
;
};
void
SetUseFastCalibrationMethod
(
bool
b
)
{
m_UseFastCalibrationMethod
=
b
;
};
bool
GetUseFastCalibrationMethod
()
const
{
return
m_UseFastCalibrationMethod
;
};
void
SetTimeUTC
(
LIntVectorType
vect
)
{
m_TimeUTC
=
vect
;
};
LIntVectorType
GetTimeUTC
()
const
{
return
m_TimeUTC
;
};
void
SetPRF
(
double
val
)
{
m_PRF
=
val
;
m_InvPRF
=
1.
/
m_PRF
;
};
double
GetPRF
()
const
{
return
m_PRF
;
};
double
GetInvPRF
()
const
{
return
m_InvPRF
;
};
double
ComputeCurrentNoise
(
unsigned
int
colId
);
DoubleVectorType
ComputeCurrentCoeffs
(
unsigned
int
lineId
);
inline
TOutput
operator
()
(
const
TInputIt
&
inIt
);
private
:
/** Calibration Factor */
double
m_CalFactor
;
/** Noise minimal range validity */
double
m_NoiseRangeValidityMin
;
/** Noise maxinimal range validity */
double
m_NoiseRangeValidityMax
;
/** Noise reference range */
double
m_NoiseRangeValidityRef
;
/** Sensor local incident angle in degree */
double
m_LocalIncidentAngle
;
/** sin of the LocalIncidentAngle */
double
m_SinLocalIncidentAngle
;
/** Vector of vector that contain noise polinomial coefficient */
DoubleVectorVectorType
m_NoisePolynomialCoefficientsList
;
/** Image Size */
SizeType
m_ImageSize
;
/** Fast Calibration Method. If set to trus, will consider only the first noise coefficient else,
* will use all of them and applied it according to its acquisition UTC time and the coordinates
* of the pixel in the image. */
bool
m_UseFastCalibrationMethod
;
/** TimeUTC for each noise coefficient acquisition (in second). */
LIntVectorType
m_TimeUTC
;
/** Pulse Repetition Frequency */
double
m_PRF
;
/** Inverse Pulse Repetition Frequency */
double
m_InvPRF
;
/** Radar Brightness functor */
BrightnessFunctorType
m_RadarBrightness
;
};
}
/** \class TerraSarCalibrationImageFilter
* \brief Calculates the calibration of TerraSar sensor images.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment