Commit 097b518c authored by Tristan Klempka's avatar Tristan Klempka
Browse files

ENH: add spot mode for any spot images

parent 1bc7a05b
......@@ -9,7 +9,7 @@ To read more about this product (in French):
* [Slides Séminaire GEOSUD](http://www.equipex-geosud.fr/documents/10180/233868/7_GascoinHagolle2015-THEIA+CES+surface+enneigee_S%C3%A9minaire+Theia+Geosud+2015.pdf)
The input files are SPOT-4 or Landsat-8 Level-2A images from Theia Land and the SRTM digital elevation model.
The input files are SPOT or Landsat-8 Level-2A images from Theia Land and the SRTM digital elevation model.
## Code Example
......
......@@ -4,7 +4,7 @@
"shadow_value":64,
"ram":1024,
"nbThreads":1,
"mode":"spot4",
"mode":"spot",
"generate_vector":false,
"preprocessing":false,
"postprocessing":false
......
......@@ -143,7 +143,7 @@ class snow_detector :
self.nSWIR=0
self.nRed=0
self.nodata=0
if self.mode == "spot4" or mode == "spot5":
if self.mode == "spot"
self.nGreen=1 # Index of green band
self.nSWIR=4 # Index of SWIR band (1 to 3 µm) = band 11 (1.6 µm) in S2
self.nRed=2 # Index of red band
......
......@@ -248,7 +248,7 @@ void print_histogram (const itk::Statistics::ImageToHistogramFilter<
<< " Total frequency = " << histogram.GetTotalFrequency()
<< " Dimension sizes = " << histogram.GetSize() << std::endl;
myfile << "z_center, Nz, fcloud_z, fsnow_z" << std::endl;
myfile << "z_center, Nz, fcloud_z, fsnow_z, fnosnow_z" << std::endl;
for (unsigned int i=0; i< histogram.GetSize()[0];++i)
{
......@@ -276,8 +276,9 @@ void print_histogram (const itk::Statistics::ImageToHistogramFilter<
const int Nz = histogram.GetFrequency(idx1) + histogram.GetFrequency(idx2);
const int fcloud_z = histogram.GetFrequency(idx3) + histogram.GetFrequency(idx4);
const int fsnow_z = histogram.GetFrequency(idx2) + histogram.GetFrequency(idx4);
const int fnosnow_z = Nz - (fcloud_z + fsnow_z);
myfile << z_center << ", " << Nz << ", "<< fcloud_z << ", "<< fsnow_z << std::endl;
myfile << z_center << ", " << Nz << ", "<< fcloud_z << ", "<< fsnow_z << ", "<< fnosnow_z << std::endl;
}
myfile.close();
......
Markdown is supported
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