Skip to content
Snippets Groups Projects
Commit acc8ceab authored by Emmanuel Christophe's avatar Emmanuel Christophe
Browse files

nomsg

parent c2f1ac61
No related branches found
No related tags found
No related merge requests found
...@@ -33,9 +33,9 @@ ...@@ -33,9 +33,9 @@
// Software Guide : BeginLatex // Software Guide : BeginLatex
// //
// This example illustrates the detail of the \doxygen{otb}{RoadExtractionFilter}. // This example illustrates the detail of the \doxygen{otb}{RoadExtractionFilter}.
// This filter is a composite filter including all the steps below. Individual // This filter, describeb in the previous section, is a composite filter including
// filters can be replaced to design a road detector targeted at SAR images for // all the steps below. Individual filters can be replaced to design a road detector
// example. // targeted at SAR images for example.
// //
// The first step required to use this filter is to include header files. // The first step required to use this filter is to include header files.
// //
...@@ -97,7 +97,7 @@ int main( int argc, char * argv[] ) ...@@ -97,7 +97,7 @@ int main( int argc, char * argv[] )
MultispectralReaderType::Pointer multispectralReader = MultispectralReaderType::New(); MultispectralReaderType::Pointer multispectralReader = MultispectralReaderType::New();
multispectralReader->SetFileName(argv[1]); multispectralReader->SetFileName(argv[1]);
/// Create an 3 band image for the software guide /// Create a 3 band image for the software guide
typedef itk::Vector<double,4> InPType; typedef itk::Vector<double,4> InPType;
typedef itk::Vector<unsigned short, 3> OutPType; typedef itk::Vector<unsigned short, 3> OutPType;
typedef otb::Image<OutPType,2> InImType; typedef otb::Image<OutPType,2> InImType;
...@@ -116,9 +116,6 @@ int main( int argc, char * argv[] ) ...@@ -116,9 +116,6 @@ int main( int argc, char * argv[] )
w->SetInput(r->GetOutput()); w->SetInput(r->GetOutput());
w->Update(); w->Update();
// NB: There might be a better way to pass this parameter (coordinate of the reference ?)
// plan combination with the viewer
// possibility to give 2 parameters (just in future use)
MultiSpectralImageType::PixelType pixelRef; MultiSpectralImageType::PixelType pixelRef;
pixelRef.SetSize(4); pixelRef.SetSize(4);
pixelRef[0]=atoi(argv[3]); pixelRef[0]=atoi(argv[3]);
...@@ -131,9 +128,17 @@ int main( int argc, char * argv[] ) ...@@ -131,9 +128,17 @@ int main( int argc, char * argv[] )
// Software Guide : BeginLatex // Software Guide : BeginLatex
// //
// The spectral angle is used to compute a grayscale images from the // The spectral angle is used to compute a grayscale images from the
// multispectral original image. Pixels corresponding to roads are in // multispectral original image. The spectral angle is illustrated on
// \ref{fig:RoadExtractionSpectralAngleDiagram} Pixels corresponding to roads are in
// darker color. // darker color.
// //
// \begin{figure}
// \center
// \includegraphics[width=0.44\textwidth]{RoadExtractionSpectralAngleDiagram.eps}
// \itkcaption[Spectral Angle]{Illustration of the spectral angle for a three-band image.}
// \label{fig:RoadExtractionSpectralAngleDiagram}
// \end{figure}
//
// Software Guide : EndLatex // Software Guide : EndLatex
// Software Guide : BeginCodeSnippet // Software Guide : BeginCodeSnippet
......
...@@ -32,9 +32,14 @@ ...@@ -32,9 +32,14 @@
// Software Guide : BeginLatex // Software Guide : BeginLatex
// //
// The easiest way to use the road extraction filter provided by OTB is to use the composite
// filter. If a modification in the pipeline is required to adapt to a particular situation,
// the step by step example, described in the next section can be adapted.
//
// This example demonstrates the use of the \doxygen{otb}{RoadExtractionFilter}. // This example demonstrates the use of the \doxygen{otb}{RoadExtractionFilter}.
// This filter is a composite filter achieving road extraction according to the algorithm // This filter is a composite filter achieving road extraction according to the algorithm
// proposed by E. Christophe and J. Inglada !TODO: reference here!. // adapted by E. Christophe and J. Inglada \cite{Christophe2007} from an original method
// proposed in \cite{Lacroix1998}.
// //
// The first step toward the use of this filter is the inclusion of the proper header files. // The first step toward the use of this filter is the inclusion of the proper header files.
// //
...@@ -73,7 +78,7 @@ int main( int argc, char * argv[] ) ...@@ -73,7 +78,7 @@ int main( int argc, char * argv[] )
// Software Guide : BeginLatex // Software Guide : BeginLatex
// //
// Then we must decide what pixel type to use for the image. We choose to do // Then we must decide what pixel type to use for the image. We choose to do
// All the computation in floating point precision and rescale the results // all the computation in floating point precision and rescale the results
// between 0 and 255 in order to export PNG images. // between 0 and 255 in order to export PNG images.
// //
// Software Guide : EndLatex // Software Guide : EndLatex
...@@ -88,7 +93,8 @@ int main( int argc, char * argv[] ) ...@@ -88,7 +93,8 @@ int main( int argc, char * argv[] )
// Software Guide : BeginLatex // Software Guide : BeginLatex
// //
// The images are defined using the pixel type and the dimension. Please note that // The images are defined using the pixel type and the dimension. Please note that
// the doxygen{otb}{RoadExtractionFilter} needs an \doxygen{otb}{VectorImage} as input. // the doxygen{otb}{RoadExtractionFilter} needs an \doxygen{otb}{VectorImage} as input
// to handle multispectral images.
// //
// Software Guide : EndLatex // Software Guide : EndLatex
...@@ -102,9 +108,9 @@ int main( int argc, char * argv[] ) ...@@ -102,9 +108,9 @@ int main( int argc, char * argv[] )
// Software Guide : BeginLatex // Software Guide : BeginLatex
// //
// We then define the type of the polyline that the filter produces. We use the // We define the type of the polyline that the filter produces. We use the
// \doxygen{otb}{PolyLineParametricPathWithValue}, which allows the filter to produce // \doxygen{otb}{PolyLineParametricPathWithValue}, which allows the filter to produce
// a likehood value along with each polyline. The filter is of course able to produce // a likehood value along with each polyline. The filter is able to produce
// \doxygen{itk}{PolyLineParametricPath} as well. // \doxygen{itk}{PolyLineParametricPath} as well.
// //
// Software Guide : EndLatex // Software Guide : EndLatex
...@@ -118,7 +124,7 @@ int main( int argc, char * argv[] ) ...@@ -118,7 +124,7 @@ int main( int argc, char * argv[] )
// Software Guide : BeginLatex // Software Guide : BeginLatex
// //
// Now we can define the \doxygen{otb}{RoadExtractionFilter} that takes a multi-spectral // Now we can define the \doxygen{otb}{RoadExtractionFilter} that takes a multi-spectral
// image as input and produce a list of polyline. // image as input and produces a list of polylines.
// //
// Software Guide : EndLatex // Software Guide : EndLatex
...@@ -130,8 +136,8 @@ int main( int argc, char * argv[] ) ...@@ -130,8 +136,8 @@ int main( int argc, char * argv[] )
// Software Guide : BeginLatex // Software Guide : BeginLatex
// //
// We also define an \doxygen{otb}{DrawPathListFilter}, which will help us drawing the output // We also define an \doxygen{otb}{DrawPathListFilter} to draw the output
// polylines to an image, taking their likehood values into account. // polylines on an image, taking their likehood values into account.
// //
// Software Guide : EndLatex // Software Guide : EndLatex
...@@ -224,7 +230,7 @@ int main( int argc, char * argv[] ) ...@@ -224,7 +230,7 @@ int main( int argc, char * argv[] )
// Software Guide : BeginLatex // Software Guide : BeginLatex
// //
// We must also set the alpha parameter of the filter which allows us to tune the width of the roads // We must also set the alpha parameter of the filter which allows us to tune the width of the roads
// we want to extract. Typical value is $1.0$. // we want to extract. Typical value is $1.0$ and should be working in most situations.
// //
// Software Guide : EndLatex // Software Guide : EndLatex
...@@ -236,6 +242,9 @@ int main( int argc, char * argv[] ) ...@@ -236,6 +242,9 @@ int main( int argc, char * argv[] )
// Software Guide : BeginLatex // Software Guide : BeginLatex
// //
// All other parameter should not influence the results too much in most situation and can
// be kept at a default value.
//
// The amplitude threshold parameter tunes the sensitivity of the vectorization step. A typical // The amplitude threshold parameter tunes the sensitivity of the vectorization step. A typical
// value is $5 \cdot 10^{-5}$. // value is $5 \cdot 10^{-5}$.
// //
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment