Commit 63188ae8 authored by lafabregue's avatar lafabregue

add Pyramid generation

parent 94aa5dfc
......@@ -358,26 +358,109 @@ public class ExecCommand {
RadiometricIndices.ExecuteAndWriteOutput();
System.out.println(" --- Application RadiometricIndices (NDWI) DONE! ---");
}
/**
* BandMath application to compute an index image from a given expression
*
* @param il
* input image list
* @param out
* output image
* @param expression
* the expression to compute the index
* (im1b1 for first image first band, im2b3 for second image third band)
*/
public static void BandMath(String[] il, String out, String expression) {
System.out.println(" +++ Application BandMath +++ ");
System.out.println("Input files : " + il);
System.out.println("Expression computed : " + expression);
initRegistry();
Application BandMath = Registry
.CreateApplication("BandMath");
BandMath.SetParameterStringList("il", il);
BandMath.SetParameterString("out", out);
BandMath.SetParameterString("exp", expression);
BandMath.ExecuteAndWriteOutput();
System.out.println(" --- Application BandMath DONE! ---");
}
/**
* ConcatenateImages application to concatenate multiple images in one
*
* @param il
* input image list
* @param out
* output image
*/
public static void ConcatenateImages(String[] il, String out) {
System.out.println(" +++ Application Rescale +++ ");
System.out.println("Input files : " + il);
initRegistry();
Application Concatenate = Registry.CreateApplication("ConcatenateImages");
Concatenate.SetParameterStringList("il", il);
Concatenate.SetParameterString("out", out);
Concatenate.ExecuteAndWriteOutput();
System.out.println(" --- Application ConcatenateImages DONE! ---");
}
/**
* Application Rescale de OTB
* Rescale application to rescales image's channels between
* two values
*
* @param in
* input image
* @param out
* output image
* @param outmin
* minimum boundary
* @param outmax
* maximum boundary
*/
public static void Rescale(String in, String out) {
public static void Rescale(String in, String out, float outmin, float outmax) {
System.out.println(" +++ Application Rescale +++ ");
System.out.println("Input file : " + in);
initRegistry();
Application Rescale = Registry.CreateApplication("Rescale");
Rescale.SetParameterString("in", in);
Rescale.SetParameterString("out", out);
Rescale.SetParameterFloat("outmin", 0);
Rescale.SetParameterFloat("outmax", 255);
Rescale.SetParameterFloat("outmin", outmin);
Rescale.SetParameterFloat("outmax", outmax);
Rescale.ExecuteAndWriteOutput();
System.out.println(" --- Application Rescale DONE! ---");
}
/**
* MutliResolutionPyramid application to create one sublevel of
* pyramid from an image.
*
* @param in
* input image
* @param out
* output image
* @param sfactor
* subsampling factor between input and output
* @param vfactor
* variance factor use in smoothing (0.6 recommended)
*/
public static Application MutliResolutionPyramid(String in, String out, int sfactor, float vfactor) {
System.out.println(" +++ Application MutliResolutionPyramid +++ ");
System.out.println("Input file : " + in);
initRegistry();
Application MutliResolutionPyramid = Registry.CreateApplication("MultiResolutionPyramid");
MutliResolutionPyramid.SetParameterString("in", in);
MutliResolutionPyramid.SetParameterString("out", out);
MutliResolutionPyramid.SetParameterInt("level", 1);
MutliResolutionPyramid.SetParameterInt("sfactor", sfactor);
MutliResolutionPyramid.SetParameterFloat("vfactor", vfactor);
MutliResolutionPyramid.ExecuteAndWriteOutput();
System.out.println(" --- Application MutliResolutionPyramid DONE! ---");
return MutliResolutionPyramid;
}
/**
* Application Segmentation (MeanShift) de OTB
*
......
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