From e5b38a3f25acc7d73e1fb64731370fe9aec9292d Mon Sep 17 00:00:00 2001 From: Cyrille Valladeau <cyrille.valladeau@c-s.fr> Date: Tue, 5 Apr 2011 15:27:37 +0200 Subject: [PATCH] ENH : improve SARPol latex description --- ...MuellerToCircularPolarisationImageFilter.h | 17 +++++- .../otbMuellerToCovarianceImageFilter.h | 25 +++++--- ...rToPolarisationDegreeAndPowerImageFilter.h | 59 ++++++++++++++----- ...MultiChannelsPolarimetricSynthesisFilter.h | 7 ++- .../otbPolarimetricSynthesisFilter.h | 1 + ...bReciprocalCoherencyToMuellerImageFilter.h | 3 + ...varianceToReciprocalCoherencyImageFilter.h | 3 + ...oReciprocalCircularCovarianceImageFilter.h | 3 + Code/SARPolarimetry/otbSinclairImageFilter.h | 8 +-- ...inclairToCircularCovarianceMatrixFunctor.h | 3 + .../otbSinclairToCoherencyMatrixFunctor.h | 3 + .../otbSinclairToCovarianceMatrixFunctor.h | 3 + .../otbSinclairToMuellerMatrixFunctor.h | 9 ++- ...eciprocalCircularCovarianceMatrixFunctor.h | 3 + ...nclairToReciprocalCoherencyMatrixFunctor.h | 3 + ...clairToReciprocalCovarianceMatrixFunctor.h | 3 + 16 files changed, 122 insertions(+), 31 deletions(-) diff --git a/Code/SARPolarimetry/otbMuellerToCircularPolarisationImageFilter.h b/Code/SARPolarimetry/otbMuellerToCircularPolarisationImageFilter.h index 89ae7bdcb1..f8dbb63242 100644 --- a/Code/SARPolarimetry/otbMuellerToCircularPolarisationImageFilter.h +++ b/Code/SARPolarimetry/otbMuellerToCircularPolarisationImageFilter.h @@ -27,8 +27,21 @@ namespace otb namespace Functor { /** \class otbMuellerToCircularPolarisationFunctor - * \brief Evaluate the Circular Polarisation image - * (3 channels : LL, RR and LR) from the Mueller image + * \brief Evaluate the Circular Polarisation image from the Mueller image. + * + * The input Mueller image has 16 channels, one for each matrix element. + * The order of the channels corresponds to : + * \f$ \begin{pmatrix} + * {channel #0 }&{channel #1 }&{channel #2 }&{channel #3 } \\ + * {channel #4 }&{channel #5 }&{channel #6 }&{channel #7 } \\ + * {channel #8 }&{channel #9 }&{channel #10}&{channel #11} \\ + * {channel #12}&{channel #13}&{channel #14}&{channel #15} \\ + * \end{pmatrix} + * + * Output value are: + * channel #0 : \f$ LL = M_{11}+M_{14}+M_{41}+M_{44} \f$ \\ + * channel #1 : \f$ RR = M_{11}-M_{14}+M_{41}+M_{44} \f$ \\ + * channel #2 : \f$ LR = M_{11}-M_{44}\f$ \\ * * \ingroup Functor * \ingroup SARPolarimetry diff --git a/Code/SARPolarimetry/otbMuellerToCovarianceImageFilter.h b/Code/SARPolarimetry/otbMuellerToCovarianceImageFilter.h index 1977e47b50..fbaac7b713 100644 --- a/Code/SARPolarimetry/otbMuellerToCovarianceImageFilter.h +++ b/Code/SARPolarimetry/otbMuellerToCovarianceImageFilter.h @@ -30,16 +30,25 @@ namespace Functor { * \brief Evaluate the MLC image from the Mueller image * * Output value are: - * channel #0 : \f$ M_{11} + M_{22} + 2*M_{12} \f$ \\ - * channel #1 : \f$ M_{11} - M_{22} \f$ \\ - * channel #2 : \f$ M_{11} + M_{22} - 2*M_{12} \f$ \\ - * channel #3 : \f$ M_{13} + M_{23} + i*(M_{14}+M_{24}) \f$ \\ - * channel #4 : \f$ M_{3Coherency3} - M_{44} - 2*i*M_{34} \f$ \\ - * channel #5 : \f$ M_{13} - M_{23} - i*(M_{14}-M_{24}) \f$ \\ + * channel #0 : \f$ M_{11} + M_{22} + 2*M_{12} \f$ \\ + * channel #1 : \f$ M_{11} - M_{22} \f$ \\ + * channel #2 : \f$ M_{11} + M_{22} - 2*M_{12} \f$ \\ + * channel #3 : \f$ M_{13} + M_{23} + i*(M_{14}+M_{24}) \f$ \\ + * channel #4 : \f$ M_{3Coherency3} - M_{44} - 2*i*M_{34} \f$ \\ + * channel #5 : \f$ M_{13} - M_{23} - i*(M_{14}-M_{24}) \f$ \\ * - * Where \f$ M_{ij} are the coefficients of the input Mueeler matrix. + * Where \f$ M_{ij} are the coefficients of the input Mueller matrix. * Input pixel must have 10 channels (one for each Mueller matrix coeffcients). - * The returned output pixel have 6 channles. + * The order of the channels corresponds to : + * \f$ \begin{pmatrix} + * {channel #0 }&{channel #1 }&{channel #2 }&{channel #3 } \\ + * {channel #4 }&{channel #5 }&{channel #6 }&{channel #7 } \\ + * {channel #8 }&{channel #9 }&{channel #10}&{channel #11} \\ + * {channel #12}&{channel #13}&{channel #14}&{channel #15} \\ + * \end{pmatrix} + * + * The output image has 6 channels : the diagonal and the upper element of the reciprocal matrix. + * Element are stored from left to right, line by line. * * \ingroup Functor * \ingroup SARPolarimetry diff --git a/Code/SARPolarimetry/otbMuellerToPolarisationDegreeAndPowerImageFilter.h b/Code/SARPolarimetry/otbMuellerToPolarisationDegreeAndPowerImageFilter.h index 5e434d0501..b94d066751 100644 --- a/Code/SARPolarimetry/otbMuellerToPolarisationDegreeAndPowerImageFilter.h +++ b/Code/SARPolarimetry/otbMuellerToPolarisationDegreeAndPowerImageFilter.h @@ -34,6 +34,35 @@ namespace Functor { * \brief Evaluate the min and max polarisation degree and min and max power * from the Mueller image * + * The order of the channels of the input image corresponds to : + * \f$ \begin{pmatrix} + * {channel #0 }&{channel #1 }&{channel #2 }&{channel #3 } \\ + * {channel #4 }&{channel #5 }&{channel #6 }&{channel #7 } \\ + * {channel #8 }&{channel #9 }&{channel #10}&{channel #11} \\ + * {channel #12}&{channel #13}&{channel #14}&{channel #15} \\ + * \end{pmatrix} + * + * The class process step by step while \f$ \tau <= 45° \f$ and for each \f$ \tau \f$, while \f$ \psi <= 90° \f : + * \begin{itemize} + * \item Define the incident Stokes vector: + * \f$ Si_{0} = 1 \f$ \\ + * \f$ Si_{1} = \cos{\psi * \frac{\pi}{90}} * \cos{\tau * \frac{\pi}{90}} \f$ \\ + * \f$ Si_{2} = \sin{\psi * \frac{\pi}{90}} * \cos{\tau * \frac{\pi}{90}} \f$ \\ + * \f$ Si_{3} = \sin{\tau * \frac{\pi}{90}}\f$ \\ + * \item Evaluate the received Stokes vector + * \f$ Sr = Si * MuellerMatrix \f$ \\ + * \item Evaluate power \f$ P \f$ and polarisation degree \f$ DegP \f$ \\ + * \f$ P = \max{0, Sr_0} \f$ \\ + * \f$ DegP = \sqrt{Sr_{1}^{2} + Sr_{2}^{2} + Sr_{3}^{2}} / Sr_{0} \f$ \\ + * \item Keep le smaller and the bigger power (\f$ P_{min}, P_{max} \f$) and \f$\f$ ) and polarisation degree (\f$ DegP_{min}, DegP_{max} \f$) ). + * \end{itemize} + * + * Output value are: + * channel #0 : \f$ P_{min} \f$ \\ + * channel #1 : \f$ P_{max} \f$ \\ + * channel #2 : \f$ DegP_{min} \f$ \\ + * channel #3 : \f$ DegP_{max} \f$ \\ + * * \ingroup Functor * \ingroup SARPolarimetry * @@ -58,10 +87,10 @@ public: StokesVectorType Si; StokesVectorType Sr; - double m_PowerMin(itk::NumericTraits<double>::max()); - double m_PowerMax(itk::NumericTraits<double>::min()); - double m_PolarisationDegreeMin(itk::NumericTraits<double>::max()); - double m_PolarisationDegreeMax(itk::NumericTraits<double>::min()); + double l_PowerMin(itk::NumericTraits<double>::max()); + double l_PowerMax(itk::NumericTraits<double>::min()); + double l_PolarisationDegreeMin(itk::NumericTraits<double>::max()); + double l_PolarisationDegreeMax(itk::NumericTraits<double>::min()); TOutput result; result.SetSize(m_NumberOfComponentsPerPixel); @@ -111,32 +140,32 @@ public: deg_pol = vcl_sqrt(Sr[1] * Sr[1] + Sr[2] * Sr[2] + Sr[3] * Sr[3]) / Sr[0]; } - if (P > m_PowerMax) + if (P > l_PowerMax) { - m_PowerMax = P; + l_PowerMax = P; } else { - m_PowerMin = P; + l_PowerMin = P; } - if (deg_pol > m_PolarisationDegreeMax) + if (deg_pol > l_PolarisationDegreeMax) { - m_PolarisationDegreeMax = deg_pol; + l_PolarisationDegreeMax = deg_pol; } else { - m_PolarisationDegreeMin = deg_pol; + l_PolarisationDegreeMin = deg_pol; } psi += 5.0; } tau += 5.0; } - result[0] = m_PowerMin; - result[1] = m_PowerMax; - result[2] = m_PolarisationDegreeMin; - result[3] = m_PolarisationDegreeMax; + result[0] = l_PowerMin; + result[1] = l_PowerMax; + result[2] = l_PolarisationDegreeMin; + result[3] = l_PolarisationDegreeMax; return result; @@ -162,7 +191,7 @@ private: /** \class otbMuellerToPolarisationDegreeAndPowerImageFilter - * \brief Compute the circular polarisation image (3 channels : LL, RR and LR) + * \brief Compute the polarization degree and power (4 channels : Power min and max, Polarization degree min and max) * from the Mueller image (16 real channels) */ template <class TInputImage, class TOutputImage, class TFunction = Functor::MuellerToPolarisationDegreeAndPowerFunctor< diff --git a/Code/SARPolarimetry/otbMultiChannelsPolarimetricSynthesisFilter.h b/Code/SARPolarimetry/otbMultiChannelsPolarimetricSynthesisFilter.h index 7af729534c..fe9f8a0bc4 100644 --- a/Code/SARPolarimetry/otbMultiChannelsPolarimetricSynthesisFilter.h +++ b/Code/SARPolarimetry/otbMultiChannelsPolarimetricSynthesisFilter.h @@ -28,9 +28,14 @@ namespace otb { /** \class MultiChannelsPolarimetricSynthesisFilter - * \brief TODO + * \brief This class computes the polarimetric synthesis from two to four radar images, depening on the polarimetric architecture. * + * It has the same behaviour as the PolarimetricSynthesisImageFilter expect the fact that it + * considers a VectorImage as input which each channels is HH, HV, VH and VV (in this particular order). * + * \ingroup SARPolarimetry + * \sa PolarimetricSynthesisFilter + * \sa PolarimetricSynthesisFunctor * */ diff --git a/Code/SARPolarimetry/otbPolarimetricSynthesisFilter.h b/Code/SARPolarimetry/otbPolarimetricSynthesisFilter.h index cb5b2cdf8b..7dc21ad92b 100644 --- a/Code/SARPolarimetry/otbPolarimetricSynthesisFilter.h +++ b/Code/SARPolarimetry/otbPolarimetricSynthesisFilter.h @@ -57,6 +57,7 @@ namespace otb * * \ingroup SARPolarimetry * \sa PolarimetricSynthesisFunctor + * \sa MultiChannelsPolarimetricSynthesisFilter * */ diff --git a/Code/SARPolarimetry/otbReciprocalCoherencyToMuellerImageFilter.h b/Code/SARPolarimetry/otbReciprocalCoherencyToMuellerImageFilter.h index 17e9ae305f..39977f8d21 100644 --- a/Code/SARPolarimetry/otbReciprocalCoherencyToMuellerImageFilter.h +++ b/Code/SARPolarimetry/otbReciprocalCoherencyToMuellerImageFilter.h @@ -49,6 +49,9 @@ namespace Functor { * channel #4 : \f$ (S_{hh}-S_{vv}).(2*S_{hv})^{*} \f$ \\ * channel #5 : \f$ (2*S_{hv}).(2*S_{hv})^{*} \f$ \\ * + * The output pixel has 10 channels : the diagonal and the upper element of the matrix. + * Element are stored from left to right, line by line. + * * \ingroup SARPolarimetry */ template< class TInput, class TOutput> diff --git a/Code/SARPolarimetry/otbReciprocalCovarianceToReciprocalCoherencyImageFilter.h b/Code/SARPolarimetry/otbReciprocalCovarianceToReciprocalCoherencyImageFilter.h index c98f87b30e..85ad74e3fd 100644 --- a/Code/SARPolarimetry/otbReciprocalCovarianceToReciprocalCoherencyImageFilter.h +++ b/Code/SARPolarimetry/otbReciprocalCovarianceToReciprocalCoherencyImageFilter.h @@ -37,6 +37,9 @@ namespace Functor { * channel #4 : \f$ (S_{hh}-S_{vv}.(S_{hv})^{*} \f$ \\ * channel #5 : \f$ 2.0*S_{hv}.S_{hv}^{*} \f$ \\ * + * The output pixel has 6 channels : the diagonal and the upper element of the reciprocal matrix. + * Element are stored from left to right, line by line. + * * \infgroup Functor * \ingroup SARPolarimetry * diff --git a/Code/SARPolarimetry/otbReciprocalLinearCovarianceToReciprocalCircularCovarianceImageFilter.h b/Code/SARPolarimetry/otbReciprocalLinearCovarianceToReciprocalCircularCovarianceImageFilter.h index c07f6940ce..7fa9efaa1e 100644 --- a/Code/SARPolarimetry/otbReciprocalLinearCovarianceToReciprocalCircularCovarianceImageFilter.h +++ b/Code/SARPolarimetry/otbReciprocalLinearCovarianceToReciprocalCircularCovarianceImageFilter.h @@ -49,6 +49,9 @@ namespace Functor { * \f$ C_{8} = \mathcal{Re}(S_{hv}*S_{vv}}^{*}) = \mathcal{Re}(input[4]) \f$ \\ * \f$ C_{9} = \mathcal{Im}(S_{hv}*S_{vv}}^{*} = \mathcal{Im}(input[4])) \f$ \\ * + * The output pixel has 6 channels : the diagonal and the upper element of the reciprocal matrix. + * Element are stored from left to right, line by line. + * * \infgroup Functor * \ingroup SARPolarimetry * diff --git a/Code/SARPolarimetry/otbSinclairImageFilter.h b/Code/SARPolarimetry/otbSinclairImageFilter.h index 6bd519f4ab..ad58fec992 100644 --- a/Code/SARPolarimetry/otbSinclairImageFilter.h +++ b/Code/SARPolarimetry/otbSinclairImageFilter.h @@ -26,14 +26,14 @@ namespace otb { /** \class SinclairImageFilter - * \brief Convert the Sinclair matrix + * \brief Computes the Covariance matrix for the sinclair one. * * This class is parameterized over the type of the input images and - * the type of the output image. It is also parameterized by the + * the type of the output image. It is also parameterized by the * operation to be applied, using a Functor style. * - * The output image has 10 channels : the diagonal and the upper element of the matrix. - * Element a sotored from left to right, line by line. + * The output image has 10 channels : the diagonal and the upper element of the matrix. + * Element are stored from left to right, line by line. * * \ingroup SARPolarimetry * diff --git a/Code/SARPolarimetry/otbSinclairToCircularCovarianceMatrixFunctor.h b/Code/SARPolarimetry/otbSinclairToCircularCovarianceMatrixFunctor.h index 4e9f388f30..0f3f8314ed 100644 --- a/Code/SARPolarimetry/otbSinclairToCircularCovarianceMatrixFunctor.h +++ b/Code/SARPolarimetry/otbSinclairToCircularCovarianceMatrixFunctor.h @@ -48,6 +48,9 @@ namespace Functor * \f$ S_{rr} = 0.5 * (-S_{hh}+i*S_{hv}+i*S_{vh}+S_{vv}) \f$ \\ * Extract from Antennas for radar and communications Harold Mott p 317. * + * The output pixel has 10 channels : the diagonal and the upper element of the matrix. + * Element are stored from left to right, line by line. + * * \ingroup Functor * \ingroup SARPolarimetry * diff --git a/Code/SARPolarimetry/otbSinclairToCoherencyMatrixFunctor.h b/Code/SARPolarimetry/otbSinclairToCoherencyMatrixFunctor.h index ca5ad16509..fa41a40e17 100644 --- a/Code/SARPolarimetry/otbSinclairToCoherencyMatrixFunctor.h +++ b/Code/SARPolarimetry/otbSinclairToCoherencyMatrixFunctor.h @@ -40,6 +40,9 @@ namespace Functor * channel #8 : \f$ (S_{hv}+S_{vh}).(j(S_{hv}-S_{vh}))^{*} \f$ \\ * channel #9 : \f$ j(S_{hv}-S_{vh}).(j(S_{hv}-S_{vh}))^{*} \f$ \\ * + * The output pixel has 10 channels : the diagonal and the upper element of the matrix. + * Element are stored from left to right, line by line. + * * \ingroup Functor * \ingroup SARPolarimetry * diff --git a/Code/SARPolarimetry/otbSinclairToCovarianceMatrixFunctor.h b/Code/SARPolarimetry/otbSinclairToCovarianceMatrixFunctor.h index e3d4a05bf5..c1c767c693 100644 --- a/Code/SARPolarimetry/otbSinclairToCovarianceMatrixFunctor.h +++ b/Code/SARPolarimetry/otbSinclairToCovarianceMatrixFunctor.h @@ -40,6 +40,9 @@ namespace Functor * channel #8 : \f$ S_{vh}.S_{vv}^{*} \f$ \\ * channel #9 : \f$ S_{vv}.S_{vv}^{*} \f$ \\ * + * The output pixel has 10 channels : the diagonal and the upper element of the matrix. + * Element are stored from left to right, line by line. + * * \ingroup Functor * \ingroup SARPolarimetry * diff --git a/Code/SARPolarimetry/otbSinclairToMuellerMatrixFunctor.h b/Code/SARPolarimetry/otbSinclairToMuellerMatrixFunctor.h index 467f72c95f..599e6532e5 100644 --- a/Code/SARPolarimetry/otbSinclairToMuellerMatrixFunctor.h +++ b/Code/SARPolarimetry/otbSinclairToMuellerMatrixFunctor.h @@ -53,7 +53,14 @@ namespace Functor * \f$ T_{yx} = -S_{vh} \f$ \\ * \f$ T_{yy} = -S_{vv} \f$ \\ * - * Output is a not a complex. + * Output is a not a complex. The output pixel has 16 channels : each element of the Mueller matrix. + * The order of the channels corresponds to : + * \f$ \begin{pmatrix} + * {channel #0 }&{channel #1 }&{channel #2 }&{channel #3 } \\ + * {channel #4 }&{channel #5 }&{channel #6 }&{channel #7 } \\ + * {channel #8 }&{channel #9 }&{channel #10}&{channel #11} \\ + * {channel #12}&{channel #13}&{channel #14}&{channel #15} \\ + * \end{pmatrix} * * \ingroup Functor * \ingroup SARPolarimetry diff --git a/Code/SARPolarimetry/otbSinclairToReciprocalCircularCovarianceMatrixFunctor.h b/Code/SARPolarimetry/otbSinclairToReciprocalCircularCovarianceMatrixFunctor.h index 5cd5af261a..3712e2015c 100644 --- a/Code/SARPolarimetry/otbSinclairToReciprocalCircularCovarianceMatrixFunctor.h +++ b/Code/SARPolarimetry/otbSinclairToReciprocalCircularCovarianceMatrixFunctor.h @@ -39,6 +39,9 @@ namespace Functor * * This is a adaptation of the SinclairToCircularCovarianceMatrixFunctor, where \f$ S_{hv}=S_{vh} \f$. * + * The output pixel has 6 channels : the diagonal and the upper element of the reciprocal matrix. + * Element are stored from left to right, line by line. + * * \ingroup Functor * \ingroup SARPolarimetry * diff --git a/Code/SARPolarimetry/otbSinclairToReciprocalCoherencyMatrixFunctor.h b/Code/SARPolarimetry/otbSinclairToReciprocalCoherencyMatrixFunctor.h index f60c2f9adc..f53e0adec0 100644 --- a/Code/SARPolarimetry/otbSinclairToReciprocalCoherencyMatrixFunctor.h +++ b/Code/SARPolarimetry/otbSinclairToReciprocalCoherencyMatrixFunctor.h @@ -38,6 +38,9 @@ namespace Functor * * This is a adaptation of the SinclairToCoherencyFunctor, where \f$ S_{hv}=S_{vh} \f$. * + * The output pixel has 6 channels : the diagonal and the upper element of the reciprocal matrix. + * Element are stored from left to right, line by line. + * * \ingroup Functor * \ingroup SARPolarimetry * diff --git a/Code/SARPolarimetry/otbSinclairToReciprocalCovarianceMatrixFunctor.h b/Code/SARPolarimetry/otbSinclairToReciprocalCovarianceMatrixFunctor.h index 424b9932aa..1e7e853732 100644 --- a/Code/SARPolarimetry/otbSinclairToReciprocalCovarianceMatrixFunctor.h +++ b/Code/SARPolarimetry/otbSinclairToReciprocalCovarianceMatrixFunctor.h @@ -38,6 +38,9 @@ namespace Functor * * This is a adaptation of the SinclairToCovarianceMatrixFunctor, where \f$ S_{hv}=S_{vh} \f$. * + * The output pixel has 6 channels : the diagonal and the upper element of the reciprocal matrix. + * Element are stored from left to right, line by line. + * * \ingroup Functor * \ingroup SARPolarimetry * -- GitLab