diff --git a/Modules/Filtering/Polarimetry/include/otbSinclairToCircularCovarianceMatrixFunctor.h b/Modules/Filtering/Polarimetry/include/otbSinclairToCircularCovarianceMatrixFunctor.h index c3d4f81404863d17f6b9bcd8ae54354d2b35d4eb..08e10da87a53b51cbd79ae565c598240911c4965 100644 --- a/Modules/Filtering/Polarimetry/include/otbSinclairToCircularCovarianceMatrixFunctor.h +++ b/Modules/Filtering/Polarimetry/include/otbSinclairToCircularCovarianceMatrixFunctor.h @@ -42,9 +42,9 @@ namespace Functor * - channel #9 : \f$ S_{rr}.S_{rr}^{*} \f$ * * With: - * - \f$ S_{ll} = 0.5 * (-S_{hh}-i*S_{hv}-i*S_{vh}+S_{vv}) \f$ - * - \f$ S_{lr} = 0.5 * (-S_{hh}+i*S_{hv}-i*S_{vh}+S_{vv}) \f$ - * - \f$ S_{rl} = 0.5 * (-S_{hh}-i*S_{hv}+i*S_{vh}-S_{vv}) \f$ + * - \f$ S_{ll} = 0.5 * (S_{hh}+i*S_{hv}+i*S_{vh}-S_{vv}) \f$ + * - \f$ S_{lr} = 0.5 * (i*S_{hh}+S_{hv}-S_{vh}+i*S_{vv}) \f$ + * - \f$ S_{rl} = 0.5 * (i*S_{hh}-S_{hv}+S_{vh}+i*S_{vv}) \f$ * - \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. @@ -89,12 +89,14 @@ public: result.SetSize(m_NumberOfComponentsPerPixel); const ComplexType jS_hv = S_hv * ComplexType(0., 1.); const ComplexType jS_vh = S_vh * ComplexType(0., 1.); - + const ComplexType jS_hh = S_hh * ComplexType(0., 1.); + const ComplexType jS_vv = S_vv * ComplexType(0., 1.); + const ComplexType coef(0.5); - const ComplexType Sll = coef*( -S_hh-jS_hv-jS_vh+S_vv ); - const ComplexType Slr = coef*( -S_hh+jS_hv-jS_vh-S_vv ); - const ComplexType Srl = coef*( -S_hh-jS_hv+jS_vh-S_vv ); + const ComplexType Sll = coef*( S_hh+jS_hv+jS_vh-S_vv ); + const ComplexType Slr = coef*( jS_hh+S_hv-S_vh+jS_vv ); + const ComplexType Srl = coef*( jS_hh-S_hv+S_vh+jS_vv ); const ComplexType Srr = coef*( -S_hh+jS_hv+jS_vh+S_vv ); //const ComplexType conjSll = vcl_conj(Sll); diff --git a/Modules/Filtering/Polarimetry/test/otbSinclairToCircularCovarianceMatrixFunctor.cxx b/Modules/Filtering/Polarimetry/test/otbSinclairToCircularCovarianceMatrixFunctor.cxx index c883bdef933ac1ec90774d660e887c80d54bf66a..030cc9b5d4fdcecd6a6bacd7530423a2cde0baed 100644 --- a/Modules/Filtering/Polarimetry/test/otbSinclairToCircularCovarianceMatrixFunctor.cxx +++ b/Modules/Filtering/Polarimetry/test/otbSinclairToCircularCovarianceMatrixFunctor.cxx @@ -31,14 +31,14 @@ int otbSinclairToCircularCovarianceMatrixFunctor(int itkNotUsed(argc), char * it OutputType outputFunct; result[0] = ComplexType( 32., 0. ); - result[1] = ComplexType( 0., 24. ); - result[2] = ComplexType( 0., 16.); - result[3] = ComplexType( -8., 0 ); + result[1] = ComplexType( 24., 0. ); + result[2] = ComplexType( 16., 0.); + result[3] = ComplexType( 8., 0 ); result[4] = ComplexType( 18., 0. ); result[5] = ComplexType( 12. , 0. ); - result[6] = ComplexType( 0. , 6. ); + result[6] = ComplexType( 6. , 0. ); result[7] = ComplexType( 8, 0. ); - result[8] = ComplexType( 0, 4. ); + result[8] = ComplexType( 4., 0. ); result[9] = ComplexType( 2, 0. ); outputFunct = funct.operator ()( ComplexType(1., 4.), ComplexType(2., 3.), ComplexType(3., 2.), ComplexType(4., 1.) );