diff --git a/app/otbSARCorrelationPrecise.cxx b/app/otbSARCorrelationPrecise.cxx index 15a0a6fb91df5f8499778695f21b7d35acdc24fd..fb32ef84219f525787e4e8b2106682ea45ff8d81 100644 --- a/app/otbSARCorrelationPrecise.cxx +++ b/app/otbSARCorrelationPrecise.cxx @@ -144,14 +144,14 @@ void DoExecute() override minMaxFilter->SetImage(correlationFilter->GetOutput()); minMaxFilter->ComputeMaximum(); - float shiftSLC_range = ((correlationFilter->GetOutput()->GetLargestPossibleRegion().GetSize()[0]/2)- + float shiftSLC_range = ((correlationFilter->GetOutput()->GetLargestPossibleRegion().GetSize()[0]/2.)- minMaxFilter->GetIndexOfMaximum()[0]) * static_cast<float>(factorML_ran); - float shiftSLC_azimut = ((correlationFilter->GetOutput()->GetLargestPossibleRegion().GetSize()[1]/2) + float shiftSLC_azimut = ((correlationFilter->GetOutput()->GetLargestPossibleRegion().GetSize()[1]/2.) -minMaxFilter->GetIndexOfMaximum()[1]) * static_cast<float>(factorML_azi); - float shiftML_range = ((correlationFilter->GetOutput()->GetLargestPossibleRegion().GetSize()[0]/2)- + float shiftML_range = ((correlationFilter->GetOutput()->GetLargestPossibleRegion().GetSize()[0]/2.)- minMaxFilter->GetIndexOfMaximum()[0]); - float shiftML_azimut = ((correlationFilter->GetOutput()->GetLargestPossibleRegion().GetSize()[1]/2) + float shiftML_azimut = ((correlationFilter->GetOutput()->GetLargestPossibleRegion().GetSize()[1]/2.) -minMaxFilter->GetIndexOfMaximum()[1]); // Correlation Grid Filter diff --git a/app/otbSARCorrelationRough.cxx b/app/otbSARCorrelationRough.cxx index 644fb89ee3046a13344f4b8e425f620afdbd7e37..39f9e00c0a841fa6909933b3e3e51917261dbafb 100644 --- a/app/otbSARCorrelationRough.cxx +++ b/app/otbSARCorrelationRough.cxx @@ -140,14 +140,14 @@ void DoExecute() override minMaxFilter->SetImage(correlationFilter->GetOutput()); minMaxFilter->ComputeMaximum(); - float shiftSLC_range = ((correlationFilter->GetOutput()->GetLargestPossibleRegion().GetSize()[0]/2)- + float shiftSLC_range = ((correlationFilter->GetOutput()->GetLargestPossibleRegion().GetSize()[0]/2.)- minMaxFilter->GetIndexOfMaximum()[0]) * static_cast<float>(factorML_ran); - float shiftSLC_azimut = ((correlationFilter->GetOutput()->GetLargestPossibleRegion().GetSize()[1]/2) + float shiftSLC_azimut = ((correlationFilter->GetOutput()->GetLargestPossibleRegion().GetSize()[1]/2.) -minMaxFilter->GetIndexOfMaximum()[1]) * static_cast<float>(factorML_azi); - float shiftML_range = ((correlationFilter->GetOutput()->GetLargestPossibleRegion().GetSize()[0]/2)- + float shiftML_range = ((correlationFilter->GetOutput()->GetLargestPossibleRegion().GetSize()[0]/2.)- minMaxFilter->GetIndexOfMaximum()[0]); - float shiftML_azimut = ((correlationFilter->GetOutput()->GetLargestPossibleRegion().GetSize()[1]/2) + float shiftML_azimut = ((correlationFilter->GetOutput()->GetLargestPossibleRegion().GetSize()[1]/2.) -minMaxFilter->GetIndexOfMaximum()[1]); // Assigne Outputs