Commit 49366a8470fa29bd96c805cf993ebf4361496bea

Authored by Pierre Lassalle
1 parent 84788f22
Exists in master

Add the GRM Remote Module

app/CMakeLists.txt~
... ... @@ -1,4 +0,0 @@
1   -OTB_CREATE_APPLICATION(NAME GRMSegmentation
2   - SOURCES otbGRM.cxx
3   - LINK_LIBRARIES ${${otb-module}_LIBRARIES}
4   -)
app/otbGRM.cxx~
... ... @@ -1,174 +0,0 @@
1   -/*=======================================================================
2   - Program: ORFEO Toolbox
3   - Language: C++
4   - Date: $Date$
5   - Version: $Revision$
6   -
7   - Author: Lassalle Pierre
8   - Contact: lassallepierre34@gmail.com
9   - Website: http://pierre33.github.io/
10   -
11   - Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
12   - See OTBCopyright.txt for details.
13   -
14   - This software is distributed WITHOUT ANY WARRANTY; without even
15   - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
16   - PURPOSE. See the above copyright notices for more information.
17   -
18   - =======================================================================*/
19   -#include "otbImage.h"
20   -#include "otbVectorImage.h"
21   -#include "otbImageFileReader.h"
22   -#include "otbImageFileWriter.h"
23   -#include "grmSpringSegmenter.h"
24   -#include "grmFullLambdaScheduleSegmenter.h"
25   -#include "grmBaatzSegmenter.h"
26   -#include "otbWrapperApplication.h"
27   -
28   -namespace otb
29   -{
30   - namespace Wrapper
31   - {
32   - class otbGRM : public Application
33   - {
34   - public:
35   - typedef otbGRM Self;
36   - typedef itk::SmartPointer<Self> Pointer;
37   -
38   - typedef FloatVectorImageType ImageType;
39   - typedef UInt32ImageType LabelImageType;
40   -
41   - itkNewMacro(Self);
42   - itkTypeMacro(otbGRM, otb::Application);
43   -
44   - private:
45   -
46   - void DoInit()
47   - {
48   - SetName("otbGRM");
49   - SetDescription("This application allows to use the Generic Region Merging library (GRM) and provides currently 3 homogeneity criteria: Euclidean Distance, Full Lambda Schedule and Baatz & Schape criterion.");
50   -
51   - AddParameter(ParameterType_InputImage, "in", "Input Image");
52   - AddParameter(ParameterType_OutputFilename, "out", "Ouput Label Image");
53   -
54   - AddParameter(ParameterType_Choice, "criterion", "Homogeneity criterion to use");
55   - AddChoice("bs", "Baatz & Schape");
56   - AddChoice("ed", "Euclidean Distance");
57   - AddChoice("fls", "Full Lambda Schedule");
58   -
59   - AddParameter(ParameterType_Float, "threshold", "Threshold for the criterion");
60   -
61   - AddParameter(ParameterType_Int, "niter", "Number of iterations");
62   - SetDefaultParameterFloat("niter", 0);
63   - MandatoryOff("niter");
64   -
65   - AddParameter(ParameterType_Int, "speed", "Activate it to boost the segmentation speed");
66   - SetDefaultParameterFloat("speed", 0);
67   - MandatoryOff("speed");
68   -
69   - // For Baatz & Schape
70   - AddParameter(ParameterType_Float, "cw", "Weight for the spectral homogeneity");
71   - SetDefaultParameterFloat("cw", 0.5);
72   - MandatoryOff("cw");
73   - AddParameter(ParameterType_Float, "sw", "Weight for the spatial homogeneity");
74   - SetDefaultParameterFloat("sw", 0.5);
75   - MandatoryOff("sw");
76   - }
77   -
78   - void DoUpdateParameters()
79   - {
80   - }
81   -
82   - void DoExecute()
83   - {
84   -
85   -
86   - // Mandatory parameters
87   - // Input Image
88   - ImageType::Pointer image = GetParameterImage("in");
89   - image->Update();
90   -
91   - // Output label file name.
92   - const std::string labelImageFileName = GetParameterString("out");
93   -
94   - // Criterion selected
95   - const std::string selectedCriterion = GetParameterString("criterion");
96   -
97   - // Threshold
98   - float threshold = GetParameterFloat("threshold");
99   -
100   - const unsigned int niter = GetParameterInt("niter");
101   - const int speed = GetParameterInt("speed");
102   -
103   - typedef otb::ImageFileWriter<LabelImageType> LabelImageWriter;
104   -
105   - if(selectedCriterion == "bs")
106   - {
107   - const float cw = GetParameterFloat("cw");
108   - const float sw = GetParameterFloat("sw");
109   -
110   - grm::BaatzParam params;
111   - params.m_SpectralWeight = cw;
112   - params.m_ShapeWeight = sw;
113   -
114   - grm::BaatzSegmenter<ImageType> segmenter;
115   - segmenter.SetParam(params);
116   - segmenter.SetThreshold(threshold*threshold);
117   - segmenter.SetInput(image);
118   -
119   - if(niter > 0)
120   - segmenter.SetNumberOfIterations(niter);
121   -
122   - if(speed > 0)
123   - segmenter.SetDoFastSegmentation(true);
124   -
125   - segmenter.Update();
126   -
127   -
128   - LabelImageWriter::Pointer labelWriter = LabelImageWriter::New();
129   - labelWriter->SetFileName(labelImageFileName);
130   - labelWriter->SetInput(segmenter.GetLabeledClusteredOutput());
131   - labelWriter->Update();
132   - }
133   - else if(selectedCriterion == "ed")
134   - {
135   - grm::SpringSegmenter<ImageType> segmenter;
136   - segmenter.SetThreshold(threshold);
137   - segmenter.SetInput(image);
138   - if(niter > 0)
139   - segmenter.SetNumberOfIterations(niter);
140   -
141   - if(speed > 0)
142   - segmenter.SetDoFastSegmentation(true);
143   -
144   - segmenter.Update();
145   -
146   - LabelImageWriter::Pointer labelWriter = LabelImageWriter::New();
147   - labelWriter->SetFileName(labelImageFileName);
148   - labelWriter->SetInput(segmenter.GetLabeledClusteredOutput());
149   - labelWriter->Update();
150   - }
151   - else if(selectedCriterion == "fls")
152   - {
153   - grm::FullLambdaScheduleSegmenter<ImageType> segmenter;
154   - segmenter.SetThreshold(threshold);
155   - segmenter.SetInput(image);
156   - if(niter > 0)
157   - segmenter.SetNumberOfIterations(niter);
158   -
159   - if(speed > 0)
160   - segmenter.SetDoFastSegmentation(true);
161   -
162   - segmenter.Update();
163   -
164   - LabelImageWriter::Pointer labelWriter = LabelImageWriter::New();
165   - labelWriter->SetFileName(labelImageFileName);
166   - labelWriter->SetInput(segmenter.GetLabeledClusteredOutput());
167   - labelWriter->Update();
168   - }
169   - }
170   - };
171   - } // end of namespace Wrapper
172   -
173   -} // end of namespace otb
174   -
src/grmGraphOperations.h~
... ... @@ -1,210 +0,0 @@
1   -/*=========================================================================
2   -
3   - Program: Generic Region Merging Library
4   - Language: C++
5   - author: Lassalle Pierre
6   - contact: lassallepierre34@gmail.com
7   -
8   -
9   -
10   - Copyright (c) Centre National d'Etudes Spatiales. All rights reserved
11   -
12   -
13   - This software is distributed WITHOUT ANY WARRANTY; without even
14   - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15   - PURPOSE. See the above copyright notices for more information.
16   -
17   -=========================================================================*/
18   -#ifndef __GRM_GRAPH_OPERATIONS_H
19   -#define __GRM_GRAPH_OPERATIONS_H
20   -#include "grmGraph.h"
21   -#include "grmNeighborhood.h"
22   -#include <iostream>
23   -#include <cassert>
24   -#include <limits>
25   -#include <map>
26   -#include <utility>
27   -#include <set>
28   -#include <random>
29   -#include <numeric>
30   -
31   -namespace grm
32   -{
33   - template<class TSegmenter>
34   - class GraphOperations
35   - {
36   - public:
37   -
38   - /* Some convenient typedefs */
39   - typedef TSegmenter SegmenterType;
40   - typedef typename SegmenterType::ImageType ImageType;
41   - typedef typename SegmenterType::GraphType GraphType;
42   - typedef typename GraphType::NodeType NodeType;
43   - typedef typename GraphType::EdgeType EdgeType;
44   - typedef typename GraphType::NodePointerType NodePointerType;
45   - typedef typename GraphType::NodeListType NodeList;
46   - typedef typename GraphType::NodeIteratorType NodeIterator;
47   - typedef typename GraphType::NodeConstIteratorType NodeConstIterator;
48   - typedef typename GraphType::EdgeListType EdgeList;
49   - typedef typename GraphType::EdgeIteratorType EdgeIterator;
50   - typedef typename GraphType::EdgeConstIteratorType EdgeConstIterator;
51   -
52   - using ContourOperator = lp::ContourOperations;
53   -
54   -
55   - /*
56   - * Given the size of the input image and the mask of the
57   - * neighborhood, we initialize a new graph of nodes
58   - *
59   - * @params:
60   - * GraphType& graph: reference to a graph of nodes
61   - * const unsigned int width: width of the input image
62   - * const unsigned int height: height of the input image
63   - * CONNECTIVITY mask : mask of the neighborhood (4X4 or 8X8)
64   - */
65   - static void InitNodes(ImageType * inputImg,
66   - SegmenterType& seg,
67   - CONNECTIVITY mask);
68   -
69   - /*
70   - * Given a graph of nodes, we explore all the nodes
71   - * and for each node we compute his merging costs
72   - * with all its neighboring nodes given a function
73   - * to compute the merging cost between two nodes.
74   - *
75   - * @params:
76   - * GraphType& graph: reference to the graph of nodes
77   - * float(*fptr)(NodeType*, NodeType*): pointer to the function
78   - * to compute the merging cost between two adjacent nodes.
79   - */
80   - static void UpdateMergingCosts(SegmenterType& seg);
81   -
82   - /*
83   - * Given a node A, we analyse its best node B.
84   - * If the node A is also node B's best node
85   - * then it returns a pointer to node B if node A 's id
86   - * is smaller or a pointer to node A if node B's id is
87   - * smaller
88   - * else it returns a null pointer.
89   - * (Local Mutual Best Fitting Heuristic)
90   - *
91   - * @params:
92   - * NodeType * a : Pointer to the node A
93   - * float t : threshold of the criterion
94   - */
95   - static NodePointerType CheckLMBF(NodePointerType, float t);
96   -
97   - /*
98   - * Given a node A, we analyse its best node B.
99   - * If the criterion is checked and the node B
100   - * is valid then it returns a pointer to the
101   - * node A if node's A id is smaller or a pointer
102   - * to node B if node B's id is smaller
103   - * else it returns a null pointer.
104   - *
105   - * @params:
106   - * NodeType * a : pointer to node A
107   - * float t : threshold of the criterion
108   - */
109   - static NodePointerType CheckBF(NodePointerType a, float t);
110   -
111   - /*
112   - * Given the current node and the target node, it returns
113   - * the edge from the current node targeting to the target
114   - * node.
115   - *
116   - * @params
117   - * const NodeType * n : pointer to the current node.
118   - * const NodeType * target : pointer to the target node.
119   - * @return an iterator pointing to the candidate edge.
120   - */
121   - static EdgeIterator FindEdge(NodePointerType n, NodePointerType target);
122   -
123   - /*
124   - * Given a node a and the node b to be merged into node a,
125   - * it updates the neighbors of node a with respect to the
126   - * neighbors of node b.
127   - *
128   - * @params
129   - * NodeType * a : pointer to node a.
130   - * NodeType * b : pointer to node b.
131   - */
132   - static void UpdateNeighbors(NodePointerType a, NodePointerType b);
133   -
134   - /*
135   - * Given 2 nodes A and B (node B being merged into node A)
136   - * we update the internal attributes of node A with respect
137   - * to node B.
138   - *
139   - * @params:
140   - * NodeType * a: pointer to node A.
141   - * NodeType * b: pointer to node B.
142   - */
143   - static void UpdateInternalAttributes(NodePointerType a,
144   - NodePointerType b,
145   - const unsigned int width);
146   -
147   - /*
148   - * Given a graph, it removes all the expired nodes.
149   - *
150   - * @params
151   - * GraphType& graph : reference to the graph.
152   - */
153   - static void RemoveExpiredNodes(GraphType& graph);
154   -
155   -
156   - /*
157   - * Given a graph, a region merging algorithm, a threshold
158   - * and the dimension of the image, it performs one iteration
159   - * of the merging process using the local mutual best fitting
160   - * heuristic.
161   - *
162   - * @params
163   - * GraphType& graph : reference to the graph
164   - * SegmenterType& seg : reference to the region merging algorithm.
165   - * const float threshold : threshold for this iteration.
166   - * const unsigned int width : width of the image.
167   - * const unsigned int height : height of the image.
168   - *
169   - * @return a boolean pointing out if there was at least a fusion
170   - * of nodes.
171   - */
172   - static bool PerfomOneIterationWithLMBF(SegmenterType& seg);
173   -
174   - /*
175   - * Given a graph, a region merging algorithm, a threshold,
176   - * the number of iterations to apply and the dimension of the image,
177   - * it performs all the iterations of the merging process using the
178   - * local mutual best fitting heuristic.
179   - * This method can be used when the threshold is constant during
180   - * the region merging process.
181   - *
182   - * @params
183   - * GraphType& graph : reference to the graph
184   - * SegmenterType& seg : reference to the region merging algorithm.
185   - * const float threshold : threshold for this iteration.
186   - * const unsigned int numberOfIterations: number of iteration to perform.
187   - * const unsigned int width : width of the image.
188   - * const unsigned int height : height of the image.
189   - *
190   - * @return a boolean pointing out if there was at least a fusion
191   - * of nodes.
192   - */
193   - static bool PerfomAllIterationsWithLMBFAndConstThreshold(SegmenterType& seg);
194   -
195   -
196   - static bool PerfomAllDitheredIterationsWithBF(SegmenterType& seg);
197   -
198   - static bool PerfomOneDitheredIterationWithBF(SegmenterType& seg);
199   -
200   - static void ComputeMergingCostsUsingDither(NodePointerType r, SegmenterType& seg);
201   -
202   - };
203   -} // end of namespace lsrm
204   -
205   -#include "grmGraphOperations.txx"
206   -#endif
207   -
208   -
209   -
210   -
src/grmGraphToOtbImage.h~
... ... @@ -1,62 +0,0 @@
1   -/*=========================================================================
2   -
3   - Program: Generic Region Merging Library
4   - Language: C++
5   - author: Lassalle Pierre
6   - contact: lassallepierre34@gmail.com
7   -
8   -
9   -
10   - Copyright (c) Centre National d'Etudes Spatiales. All rights reserved
11   -
12   -
13   - This software is distributed WITHOUT ANY WARRANTY; without even
14   - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15   - PURPOSE. See the above copyright notices for more information.
16   -
17   -=========================================================================*/
18   -#ifndef __GRM_GRAPH_TO_OTBIMAGE_H
19   -#define __GRM_GRAPH_TO_OTBIMAGE_H
20   -#include <itkRGBPixel.h>
21   -#include <itkImageRegion.h>
22   -#include <otbImage.h>
23   -#include <otbVectorImage.h>
24   -#include <otbImageFileReader.h>
25   -#include <otbImageFileWriter.h>
26   -#include "grmGraph.h"
27   -#include <string>
28   -#include <stdlib.h>
29   -#include <time.h>
30   -#include "lpContour.h"
31   -
32   -namespace grm
33   -{
34   - template<class TGraph>
35   - class GraphToOtbImage
36   - {
37   - public:
38   -
39   - /* Some convenient typedefs */
40   - typedef TGraph GraphType;
41   - typedef typename GraphType::NodeType NodeType;
42   - typedef std::vector< std::shared_ptr<NodeType> > NodeList;
43   - typedef typename NodeList::const_iterator NodeConstIterator;
44   - typedef unsigned int LabelPixelType;
45   - typedef otb::Image<LabelPixelType, 2> LabelImageType;
46   - typedef unsigned char ClusterPixelType;
47   - typedef otb::VectorImage<ClusterPixelType, 2> ClusteredImageType;
48   - using ContourOperator = lp::ContourOperations;
49   -
50   -
51   - LabelImageType::Pointer GetLabelImage(const GraphType& graph,
52   - const unsigned int width,
53   - const unsigned int height);
54   -
55   - ClusteredImageType::Pointer GetClusteredOutput(const GraphType& graph,
56   - const unsigned int width,
57   - const unsigned int height);
58   - };
59   -
60   -} // end of namespace grm
61   -#include "grmGraphToOtbImage.txx"
62   -#endif
src/grmGraphToOtbImage.txx~
... ... @@ -1,146 +0,0 @@
1   -/*=========================================================================
2   -
3   - Program: Generic Region Merging Library
4   - Language: C++
5   - author: Lassalle Pierre
6   - contact: lassallepierre34@gmail.com
7   -
8   -
9   -
10   - Copyright (c) Centre National d'Etudes Spatiales. All rights reserved
11   -
12   -
13   - This software is distributed WITHOUT ANY WARRANTY; without even
14   - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15   - PURPOSE. See the above copyright notices for more information.
16   -
17   -=========================================================================*/
18   -#ifndef __GRM_GRAPH_TO_OTBIMAGE_TXX
19   -#define __GRM_GRAPH_TO_OTBIMAGE_TXX
20   -#include "grmGraphToOtbImage.h"
21   -#include "itkImageRegionIterator.h"
22   -
23   -namespace grm
24   -{
25   - template<class TGraph>
26   - typename GraphToOtbImage<TGraph>::LabelImageType::Pointer
27   - GraphToOtbImage<TGraph>::GetLabelImage(const GraphType& graph,
28   - const unsigned int width,
29   - const unsigned int height)
30   - {
31   - LabelImageType::IndexType index;
32   - LabelImageType::SizeType size;
33   - LabelImageType::RegionType region;
34   -
35   - index[0] = 0; index[1] = 0;
36   - size[0] = width; size[1] = height;
37   - region.SetIndex(index);
38   - region.SetSize(size);
39   -
40   - LabelImageType::Pointer label_img = LabelImageType::New();
41   - label_img->SetRegions(region);
42   - label_img->Allocate();
43   -
44   - using LabelImageIterator = itk::ImageRegionIterator<LabelImageType>;
45   - LabelImageIterator it(label_img, label_img->GetLargestPossibleRegion());
46   - for(it.GoToBegin();!it.IsAtEnd(); ++it)
47   - it.Set(0);
48   -
49   - // Start at 1 (value 0 can be used for invalid pixels)
50   - unsigned int label = 1;
51   - for(auto& node : graph.m_Nodes)
52   - {
53   - lp::CellLists borderPixels;
54   - ContourOperator::GenerateBorderCells(borderPixels, node->m_Contour, node->m_Id, width);
55   -
56   - for (auto& pix: borderPixels)
57   - {
58   - index[0] = pix % width;
59   - index[1] = pix / width;
60   - label_img->SetPixel(index, label);
61   - }
62   - ++label;
63   - }
64   -
65   - long unsigned int pixelValue = 0;
66   - for(it.GoToBegin(); !it.IsAtEnd(); ++it)
67   - {
68   - auto pixel = it.Get();
69   - if(pixel == 0)
70   - it.Set(pixelValue);
71   - else
72   - pixelValue = pixel;
73   - }
74   -
75   - return label_img;
76   - }
77   -
78   - template<class TGraph>
79   - typename GraphToOtbImage<TGraph>::ClusteredImageType::Pointer
80   - GraphToOtbImage<TGraph>::GetClusteredOutput(const GraphType& graph,
81   - const unsigned int width,
82   - const unsigned int height)
83   - {
84   - ClusteredImageType::IndexType index;
85   - ClusteredImageType::SizeType size;
86   - ClusteredImageType::RegionType region;
87   -
88   - index[0] = 0; index[1] = 0;
89   - size[0] = width; size[1] = height;
90   - region.SetIndex(index);
91   - region.SetSize(size);
92   -
93   - ClusteredImageType::Pointer clusterImg = ClusteredImageType::New();
94   - clusterImg->SetRegions(region);
95   - clusterImg->SetNumberOfComponentsPerPixel(3);
96   - clusterImg->Allocate();
97   -
98   - ClusteredImageType::PixelType pixelValue;
99   - pixelValue.Reserve(3);
100   - pixelValue[0] = 255;
101   - pixelValue[1] = 255;
102   - pixelValue[2] = 255;
103   -
104   - using ClusterImageIterator = itk::ImageRegionIterator<ClusteredImageType>;
105   - ClusterImageIterator it(clusterImg, clusterImg->GetLargestPossibleRegion());
106   - for(it.GoToBegin();!it.IsAtEnd(); ++it)
107   - it.Set(pixelValue);
108   -
109   - srand(time(NULL));
110   - unsigned char c1, c2, c3;
111   - for(auto& node : graph.m_Nodes)
112   - {
113   - auto rv = rand() % 255;
114   - c1 = rv;//rand() % 256;
115   - c2 = rv;//rand() % 256;
116   - c3 = rv;//rand() % 256;
117   -
118   - lp::CellLists borderPixels;
119   - ContourOperator::GenerateBorderCells(borderPixels, node->m_Contour, node->m_Id, width);
120   -
121   - for (auto& pix : borderPixels)
122   - {
123   - index[0] = pix % width;
124   - index[1] = pix / width;
125   - pixelValue[0] = c1;
126   - pixelValue[1] = c2;
127   - pixelValue[2] = c3;
128   - clusterImg->SetPixel(index, pixelValue);
129   - }
130   - }
131   -
132   -
133   - for(it.GoToBegin(); !it.IsAtEnd(); ++it)
134   - {
135   - auto pixel = it.Get();
136   - if(pixel[0] == 255 && pixel[1] == 255 && pixel[2] == 255)
137   - it.Set(pixelValue);
138   - else
139   - pixelValue = pixel;
140   - }
141   -
142   - return clusterImg;
143   - }
144   -
145   -} // end of namespace grm
146   -#endif
test/CMakeLists.txt~
... ... @@ -1,85 +0,0 @@
1   -otb_module_test()
2   -
3   -otb_test_application(NAME apOTBGRM
4   - APP otbGRM
5   - OPTIONS -in ${INPUTDATA}/QB_Toulouse_Ortho_XS.tif
6   - -out ${TEMP}/apGRMLabeledImage.tif int16
7   - -criterion bs
8   - -threshold 60
9   - -cw 0.7
10   - -sw 0.3
11   -)
12   -
13   -otb_test_application(NAME apOTBGRM
14   - APP otbGRM
15   - OPTIONS -in ${INPUTDATA}/QB_Toulouse_Ortho_XS.tif
16   - -out ${TEMP}/apGRMLabeledImage.tif int16
17   - -criterion ed
18   - -threshold 30
19   -)
20   -
21   -otb_test_application(NAME apOTBGRM
22   - APP otbGRM
23   - OPTIONS -in ${INPUTDATA}/QB_Toulouse_Ortho_XS.tif
24   - -out ${TEMP}/apGRMLabeledImage.tif int16
25   - -criterion fls
26   - -threshold 500
27   -)
28   -
29   -otb_test_application(NAME apOTBGRM
30   - APP otbGRM
31   - OPTIONS -in ${INPUTDATA}/QB_Toulouse_Ortho_XS.tif
32   - -out ${TEMP}/apGRMLabeledImage.tif int16
33   - -speed 1
34   - -criterion bs
35   - -threshold 60
36   - -cw 0.7
37   - -sw 0.3
38   -)
39   -
40   -otb_test_application(NAME apOTBGRM
41   - APP otbGRM
42   - OPTIONS -in ${INPUTDATA}/QB_Toulouse_Ortho_XS.tif
43   - -out ${TEMP}/apGRMLabeledImage.tif int16
44   - -speed 1
45   - -criterion ed
46   - -threshold 30
47   -)
48   -
49   -otb_test_application(NAME apOTBGRM
50   - APP otbGRM
51   - OPTIONS -in ${INPUTDATA}/QB_Toulouse_Ortho_XS.tif
52   - -out ${TEMP}/apGRMLabeledImage.tif int16
53   - -speed 1
54   - -criterion fls
55   - -threshold 500
56   -)
57   -
58   -otb_test_application(NAME apOTBGRM
59   - APP otbGRM
60   - OPTIONS -in ${INPUTDATA}/QB_Toulouse_Ortho_XS.tif
61   - -out ${TEMP}/apGRMLabeledImage.tif int16
62   - -niter 75
63   - -criterion bs
64   - -threshold 60
65   - -cw 0.7
66   - -sw 0.3
67   -)
68   -
69   -otb_test_application(NAME apOTBGRM
70   - APP otbGRM
71   - OPTIONS -in ${INPUTDATA}/QB_Toulouse_Ortho_XS.tif
72   - -out ${TEMP}/apGRMLabeledImage.tif int16
73   - -niter 75
74   - -criterion ed
75   - -threshold 30
76   -)
77   -
78   -otb_test_application(NAME apOTBGRM
79   - APP otbGRM
80   - OPTIONS -in ${INPUTDATA}/QB_Toulouse_Ortho_XS.tif
81   - -out ${TEMP}/apGRMLabeledImage.tif int16
82   - -niter 75
83   - -criterion fls
84   - -threshold 500
85   -)