Commit 1345dd53 authored by Gaëlle USSEGLIO's avatar Gaëlle USSEGLIO
Browse files

ENH : New strategy for S1IW chain to avoid GCP into projection estimation

parent 49218662
......@@ -215,6 +215,25 @@ void DoExecute() override
std::cout << "diffMeanRange = " << diffMeanRange << std::endl;
std::cout << "diffMeanAzimut = " << diffMeanAzimut << std::endl;
// Correction Filter to replace value into DEMGrid with no occurences (high gap and high threshold)
// by mean value
CorrectionGridFilterType::Pointer filterCorrectionGrid = CorrectionGridFilterType::New();
m_Ref.push_back(filterCorrectionGrid.GetPointer());
// Configure CorrectionGrid Filter
filterCorrectionGrid->SetThreshold(1.5);
filterCorrectionGrid->SetGap(1000000);
filterCorrectionGrid->SetMeanRange(meanRangeDEM);
filterCorrectionGrid->SetMeanAzimut(meanAzimutDEM);
// Define the main pipeline
filterCorrectionGrid->SetDEMGridInput(DEMGridPtr);
filterCorrectionGrid->SetCorGridInput(CorGridPtr);
filterCorrectionGrid->UpdateOutputInformation();
RegisterPipeline();
// Offset for DEMGrid (Correction with the difference)
// Instanciate all filters
ListConcatenerFilterType::Pointer m_Concatener =
......@@ -227,7 +246,7 @@ void DoExecute() override
ImageListType::New();
// Check number of components (at least two : range and azimut)
unsigned int nbComponents = DEMGridPtr->GetNumberOfComponentsPerPixel();
unsigned int nbComponents = filterCorrectionGrid->GetOutput()->GetNumberOfComponentsPerPixel();
if (nbComponents < 2)
{
otbAppLogFATAL(<< "Input grid has to contain at least two components");
......@@ -243,7 +262,7 @@ void DoExecute() override
AddFilterType::New();
// Set the channel to extract
extractor->SetInput(DEMGridPtr);
extractor->SetInput(filterCorrectionGrid->GetOutput());
extractor->SetChannel(i+1);
extractor->UpdateOutputInformation();
m_ExtractorList->PushBack(extractor);
......
......@@ -192,7 +192,7 @@ private:
GetInternalApplication("CorGridApp")->SetParameterInt("mlazi", factor_azi);
GetInternalApplication("CorGridApp")->SetParameterInt("gridsteprange", grid_step_ran);
GetInternalApplication("CorGridApp")->SetParameterInt("gridstepazimut", grid_step_azi);
if (demGridToFavor)
//if (demGridToFavor)
{
GetInternalApplication("CorGridApp")->SetParameterInt("nooffset", 1);
}
......
......@@ -451,6 +451,7 @@ if __name__ == "__main__":
appFineDeformationGrid.SetParameterInt("gridstepazimut", geoGrid_gridstep_azimut)
appFineDeformationGrid.SetParameterFloat("threshold", geoGrid_threshold)
appFineDeformationGrid.SetParameterFloat("gap", geoGrid_gap)
appFineDeformationGrid.SetParameterString("advantage", "correlation")
appFineDeformationGrid.SetParameterString("out", os.path.join(burst_dir, fine_grid))
appFineDeformationGrid.SetParameterString("ram", "4000")
appFineDeformationGrid.ExecuteAndWriteOutput()
......
Supports Markdown
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