From a260c30f74a3fa1198ca6eedc2acac78f71c161b Mon Sep 17 00:00:00 2001 From: Manuel Grizonnet <manuel.grizonnet@orfeo-toolbox.org> Date: Mon, 10 Sep 2012 14:58:14 +0200 Subject: [PATCH] ENH: add Pleiades in the list of supported sensors in toa optical calibration app --- .../Radiometry/otbOpticalCalibration.cxx | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/Applications/Radiometry/otbOpticalCalibration.cxx b/Applications/Radiometry/otbOpticalCalibration.cxx index b873e4eb82..dda196c4a7 100644 --- a/Applications/Radiometry/otbOpticalCalibration.cxx +++ b/Applications/Radiometry/otbOpticalCalibration.cxx @@ -61,7 +61,7 @@ namespace otb typedef ImageToLuminanceImageFilter<UInt16VectorImageType, DoubleVectorImageType> ImageToLuminanceImageFilterType; - + typedef LuminanceToReflectanceImageFilter<DoubleVectorImageType, DoubleVectorImageType> LuminanceToReflectanceImageFilterType; @@ -79,14 +79,14 @@ namespace otb void DoInit() { SetName("OpticalCalibration"); - SetDescription("Perform optical calibration TOA/TOC (Top Of Atmosphere/Top Of Canopy). Supported sensors: QuickBird, Ikonos, WorldView2, Formosat, Spot5"); + SetDescription("Perform optical calibration TOA/TOC (Top Of Atmosphere/Top Of Canopy). Supported sensors: QuickBird, Ikonos, WorldView2, Formosat, Spot5, Pleiades"); // Documentation SetDocName("Optical calibration"); SetDocLongDescription("The application allows to convert pixel values from DN (for Digital Numbers) to physically interpretable and comparable values. Calibrated values are called surface reflectivity and its values lie in the range [0, 1].\nThe first level is called Top Of Atmosphere (TOA) reflectivity. It takes into account the sensor gain, sensor spectral response and the solar illumination.\nThe second level is called Top Of Canopy (TOC) reflectivity. In addition to sensor gain and solar illumination, it takes into account the optical thickness of the atmosphere, the atmospheric pressure, the water vapor amount, the ozone amount, as well as the composition and amount of aerosol gasses.\nIt is also possible to indicate an AERONET file which contains atmospheric parameters (version 1 and version 2 of Aeronet file are supported."); SetDocLimitations("None"); SetDocAuthors("OTB-Team"); SetDocSeeAlso("The OTB CookBook"); - + AddDocTag(Tags::Calibration); AddParameter(ParameterType_InputImage, "in", "Input"); @@ -126,13 +126,13 @@ namespace otb AddParameter(ParameterType_Float, "atmo.oz", "Ozone Amount"); SetParameterDescription("atmo.oz", "Ozone Amount"); - + AddParameter(ParameterType_Float, "atmo.wa", "Water Vapor Amount"); SetParameterDescription("atmo.wa", "Water Vapor Amount (in saturation fraction of water)"); - + AddParameter(ParameterType_Float, "atmo.pressure", "Atmospheric Pressure"); SetParameterDescription("atmo.pressure", "Atmospheric Pressure (in hPa)"); - + AddParameter(ParameterType_Float, "atmo.opt", "Aerosol Optical Thickness"); SetParameterDescription("atmo.opt", "Aerosol Optical Thickness"); @@ -180,7 +180,7 @@ namespace otb // LuminanceToReflectance lImageMetadataInterface->GetDay(); lImageMetadataInterface->GetMonth(); - + lImageMetadataInterface->GetSolarIrradiance(); lImageMetadataInterface->GetSunElevation(); @@ -233,7 +233,7 @@ namespace otb m_AtmosphericParam->SetWaterVaporAmount(GetParameterFloat("atmo.wa")); m_AtmosphericParam->SetAtmosphericPressure(GetParameterFloat("atmo.pressure")); m_AtmosphericParam->SetAerosolOptical(GetParameterFloat("atmo.opt")); - + // Relative Spectral Response File if (IsParameterEnabled("rsr")) { @@ -242,6 +242,9 @@ namespace otb else { m_ReflectanceToSurfaceReflectanceFilter->SetFilterFunctionCoef(lImageMetadataInterface->GetSpectralSensitivity()); + OpticalImageMetadataInterface::WavelengthSpectralBandVectorType tmp = lImageMetadataInterface->GetSpectralSensitivity(); + std::cout << "ICI" << std::endl; + std::cout << "tmp->GetNthElement(0)->GetFilterFunctionValues()[0] " << tmp->GetNthElement(0)->GetFilterFunctionValues()[0] << std::endl; } // Aeronet file -- GitLab