Commit 5a6307ad authored by Cédric Traizet's avatar Cédric Traizet

Merge branch 'develop' into 1769_drop_support_gdal_1

parents 7da14c69 b6432bd9
#
# Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES)
#
# This file is part of Orfeo Toolbox
#
# https://www.orfeo-toolbox.org/
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# - Find Mapnik
# Find the native Mapnik includes and library
#
# MAPNIK_FOUND - True if MAPNIK found.
# MAPNIK_INCLUDE_DIRS - where to find mapnik/map.hpp, etc.
# MAPNIK_LIBRARIES - List of libraries when using MAPNIK
#
find_path( MAPNIK_INCLUDE_DIR mapnik/map.hpp )
find_library( MAPNIK_LIBRARY
NAMES mapnik2 mapnik )
# handle the QUIETLY and REQUIRED arguments and set MAPNIK_FOUND to TRUE if
# all listed variables are TRUE
include( FindPackageHandleStandardArgs )
FIND_PACKAGE_HANDLE_STANDARD_ARGS( Mapnik DEFAULT_MSG MAPNIK_LIBRARY MAPNIK_INCLUDE_DIR )
mark_as_advanced( MAPNIK_INCLUDE_DIR MAPNIK_LIBRARY )
if(MAPNIK_FOUND)
set(MAPNIK_INCLUDE_DIRS ${MAPNIK_INCLUDE_DIR})
set(MAPNIK_LIBRARIES ${MAPNIK_LIBRARY})
else()
set(MAPNIK_INCLUDE_DIRS)
set(MAPNIK_LIBRARIES)
endif()
......@@ -196,8 +196,6 @@ foreach(otb-module ${OTB_MODULES_ALL})
if(OTB_MODULE_${otb-module}_ACTIVATION_OPTION
AND NOT ${OTB_MODULE_${otb-module}_ACTIVATION_OPTION})
otb_module_disable("${otb-module}" "${OTB_MODULE_${otb-module}_ACTIVATION_OPTION}")
elseif(OTB_MODULE_${otb-module}_IS_DEPRECATED AND NOT OTB_USE_DEPRECATED)
otb_module_disable("${otb-module}" "OTB_USE_DEPRECATED")
endif()
endforeach()
......
......@@ -219,11 +219,6 @@ else()
set(OTB_CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS OFF)
endif()
#-----------------------------------------------------------------------------
# Option to activate deprecated classes
option(OTB_USE_DEPRECATED "Turn on the use and test of deprecated classes" OFF)
mark_as_advanced(OTB_USE_DEPRECATED)
# Although the OpenMP option looks like a 3rd party module, it is NOT. This option
# is handled with other compilation flags in file OTBSetStandardCompilerFlags.cmake
# before any module is parsed or enabled (see OTBModuleEnablement.cmake later on
......
......@@ -18,17 +18,6 @@ def parameter_warnings(app_warn, app, key):
if "." in name:
warn("name contains a special character (.)")
# disabled because there are so many for now
#if description == "":
#warn("missing description")
# disabled because there are so many for now
#if len(description) > 0 and description[-1] != ".":
#warn("description does not end with a period")
if len(description) > 0 and " :" in description:
warn("description has a space before a colon")
def application_documentation_warnings(app):
"Emit warnings about application documentation"
......@@ -38,16 +27,9 @@ def application_documentation_warnings(app):
description = app.GetDescription()
longdescription = app.GetDocLongDescription()
# disable because there are so many for now
#if not longdescription[-1] == ".":
#warn("Application Long Description does not end with a period (.)")
if re.search("\\n [a-zA-Z]", longdescription):
warn("Application Long Description contains '\\n ' pattern (usually not intended)")
if " :" in longdescription:
warn("Application Long Description has a space before a colon")
if app.GetNumberOfExamples() == 0:
warn("Application has no examples")
......
......@@ -396,10 +396,10 @@ Some examples are provided below:
::
$ otbcli_Convert -in OTB-Data/Examples/QB_1_ortho.tif -out "/tmp/example1.tif?&gdal:co:TILED=YES&gdal:co:COMPRESS=DEFLATE"
$ otbcli_DynamicConvert -in OTB-Data/Examples/QB_1_ortho.tif -out "/tmp/example1.tif?&gdal:co:TILED=YES&gdal:co:COMPRESS=DEFLATE"
- Process only first band from a file
::
$ otbcli_Convert -in "OTB-Data/Examples/QB_1_ortho.tif?&bands=1" -out /tmp/example2.tif
$ otbcli_DynamicConvert -in "OTB-Data/Examples/QB_1_ortho.tif?&bands=1" -out /tmp/example2.tif
......@@ -33,9 +33,9 @@ The complete list of applications is described in the Chapter :ref:`apprefdoc`.
All standard applications share the same implementation and automatically expose
generated interfaces.
However they are accessed in a slightly different way: the command-line interface is prefixed by ``otbcli_``, while the Qt interface is prefixed by
``otbgui_``. For cwinstance, calling ``otbcli_Convert`` will launch the
command-line interface of the Convert application, while
``otbgui_Convert`` will launch the GUI.
``otbgui_``. For instance, calling ``otbcli_DynamicConvert`` will launch the
command-line interface of the DynamicConvert application, while
``otbgui_DynamicConvert`` will launch the GUI.
Command-line launcher
---------------------
......
......@@ -249,7 +249,6 @@ SET( OTB_EXAMPLES_SRCS
${OTB_SOURCE_DIR}/Examples/IO/OGRWrappersExample.cxx
${OTB_SOURCE_DIR}/Examples/IO/DEMToImageGenerator.cxx
${OTB_SOURCE_DIR}/Examples/IO/DEMHandlerExample.cxx
${OTB_SOURCE_DIR}/Examples/IO/TileMapImageIOExample.cxx
${OTB_SOURCE_DIR}/Examples/Filtering/BinaryThresholdImageFilter.cxx
${OTB_SOURCE_DIR}/Examples/Filtering/ThresholdImageFilter.cxx
${OTB_SOURCE_DIR}/Examples/Filtering/CannyEdgeDetectionImageFilter.cxx
......@@ -302,8 +301,8 @@ SET( OTB_EXAMPLES_SRCS
${OTB_SOURCE_DIR}/Examples/FeatureExtraction/CorrelationLineDetectorExample.cxx
${OTB_SOURCE_DIR}/Examples/FeatureExtraction/AsymmetricFusionOfLineDetectorExample.cxx
${OTB_SOURCE_DIR}/Examples/FeatureExtraction/LocalHoughExample.cxx
#${OTB_SOURCE_DIR}/Examples/FeatureExtraction/LineSegmentDetectorExample.cxx
#${OTB_SOURCE_DIR}/Examples/FeatureExtraction/RightAngleDetectionExample.cxx
${OTB_SOURCE_DIR}/Examples/FeatureExtraction/LineSegmentDetectorExample.cxx
${OTB_SOURCE_DIR}/Examples/FeatureExtraction/RightAngleDetectionExample.cxx
${OTB_SOURCE_DIR}/Examples/FeatureExtraction/ExtractSegmentsByStepsExample.cxx
${OTB_SOURCE_DIR}/Examples/FeatureExtraction/ExtractSegmentsExample.cxx
${OTB_SOURCE_DIR}/Examples/FeatureExtraction/ParallelLineDetectionExample.cxx
......
......@@ -105,12 +105,13 @@ More features are available in \doxygen{otb}{ScalarImageToAdvancedTexturesFilter
\input{LocalHoughExample}
%\input{ExtractSegmentsByStepsExample}
%\input{ExtractSegmentsExample}
%\subsubsection{Line Segment Detector}
%\label{sec:LSD}
%\input{LineSegmentDetectorExample}
%\subsection{Right Angle Detector}
%\label{sec:RightAngleDetector}
%\input{RightAngleDetectionExample}
\subsubsection{Line Segment Detector}
\label{sec:LSD}
\input{LineSegmentDetectorExample}
\subsection{Right Angle Detector}
\label{sec:RightAngleDetector}
\input{RightAngleDetectionExample}
\section{Density Features}
......
......@@ -468,18 +468,6 @@ The Markov Random Field framework for OTB is more detailed in \ref{sec:MarkovRan
\fi
%\section{Rasterization}
%Rasterization is the process of rendering vectorial data on a raster
%grid. This rasterization can be either binary or more complete,
%including different styles and labels for the vectorial features.For
%rasterization purposes, OTB uses the Mapnik library through the
%\doxygen{otb}{VectorDataToImageFilter}. Hence, rasterization will be
%only available to users compiling OTB with the Mapnik CMake option
%set to ON, or using a binary package with Mapnik activated.
%\input{RasterizationExample.tex}
%% \ifitkFullVersion
%% %\input{SignedDanielssonDistanceMapImageFilter.tex}
......
......@@ -114,8 +114,6 @@ See table \ref{tab:otb-dependencies} for the full list of dependencies.
\hline
\textbf{libSVM} & \url{http://www.csie.ntu.edu.tw/~cjlin/libsvm} & no & 2.0 \\
\hline
\textbf{Mapnik} & \url{http://www.mapnik.org} & no & 2.x \\
\hline
\textbf{MPI} & \url{https://www.open-mpi.org/} & no & - \\
\hline
\textbf{MuParser} & \url{http://www.muparser.sourceforge.net} & no & - \\
......@@ -431,8 +429,6 @@ $ make install
\hline
\textbf{OTB\_USE\_SHARK} & OTBShark & optional for OTBSupervised OTBAppClassification \\
\hline
\textbf{OTB\_USE\_MAPNIK} & OTBMapnik & OTBVectorDataRendering \\
\hline
\textbf{OTB\_USE\_6S} & OTB6S & OTBOpticalCalibration OTBAppOpticalCalibration OTBSimulation \\
\hline
\textbf{OTB\_USE\_SIFTFAST} & OTBSiftFast & \\
......
\chapter{Online data}\label{sec:Online}
With almost every computer connected to the Internet, the amount of
online information is steadily growing. It is quite easy to retrieve
valuable information. OTB has a few experimental classes for this
purpose.
For these examples to work, you need to have OTB compiled with the
\texttt{OTB\_USE\_CURL} option to \texttt{ON} (and the curl library
installed somewhere).
Let's see what we can do.
\section{Name to Coordinates}
\label{sec:NamesToCoordinates}
\input{PlaceNameToLonLatExample.tex}
\section{Open Street Map}
\label{sec:OpenStreetMap}
The power of sharing which is a driving force in open source software such
as OTB can also be demonstrated for data collection. One good example is
Open Street Map (\url{http://www.openstreetmap.org/}).
In this project, hundreds of thousands of users upload GPS data and draw maps of their
surroundings. The coverage is impressive and this data is freely available.
It is even possible to get the vector data (not covered yet by OTB), but
here we will focus on retrieving some nice maps for any place in the world. The following
example describes the method. This part is pretty experimental and the code is
not as polished as the rest of the library. You've been warned!
\input{TileMapImageIOExample.tex}
......@@ -246,7 +246,6 @@ colorlinks,linkcolor={blue},citecolor={blue},urlcolor={blue},
\input{ChangeDetection.tex}
\input{Hyperspectral.tex}
\input{Visualization.tex}
\input{Online.tex}
%%% \input{Applications.tex}
......
......@@ -68,13 +68,11 @@ target_link_libraries(HarrisExample ${OTB_LIBRARIES})
add_executable(HuMomentsImageFunctionExample HuMomentsImageFunctionExample.cxx)
target_link_libraries(HuMomentsImageFunctionExample ${OTB_LIBRARIES})
if (Module_OTBVectorDataRendering AND OTB_USE_MAPNIK)
add_executable(LineSegmentDetectorExample LineSegmentDetectorExample.cxx)
target_link_libraries(LineSegmentDetectorExample ${OTB_LIBRARIES})
add_executable(LineSegmentDetectorExample LineSegmentDetectorExample.cxx)
target_link_libraries(LineSegmentDetectorExample ${OTB_LIBRARIES})
add_executable(RightAngleDetectionExample RightAngleDetectionExample.cxx)
target_link_libraries(RightAngleDetectionExample ${OTB_LIBRARIES})
endif()
add_executable(RightAngleDetectionExample RightAngleDetectionExample.cxx)
target_link_libraries(RightAngleDetectionExample ${OTB_LIBRARIES})
add_executable(LocalHoughExample LocalHoughExample.cxx)
target_link_libraries(LocalHoughExample ${OTB_LIBRARIES})
......
......@@ -19,16 +19,14 @@
*/
#include "otbImageFileReader.h"
#include "otbVectorDataToMapFilter.h"
#include "otbAlphaBlendingFunctor.h"
#include "itkBinaryFunctorImageFilter.h"
#include "otbImageFileWriter.h"
#include "otbVectorDataFileWriter.h"
// Software Guide : BeginCommandLineArgs
// INPUTS: {Scene.png}
// OUTPUTS: {LSDOutput.png}
// OUTPUTS: {LSDOutput.shp}
// Software Guide : EndCommandLineArgs
// Software Guide : BeginLatex
......@@ -48,8 +46,14 @@
int main(int argc, char * argv[])
{
const char * infname = argv[1];
const char * outfname = argv[2];
if (argc != 3)
{
std::cerr << "Usage: ./LineSegmentDetectorExample input output\n";
return EXIT_FAILURE;
}
const char* infname = argv[1];
const char* outfname = argv[2];
typedef unsigned char InputPixelType;
typedef double PrecisionType;
......@@ -89,45 +93,21 @@ int main(int argc, char * argv[])
// Software Guide : EndLatex
// Software Guide : BeginCodeSnippet
typedef otb::LineSegmentDetector<ImageType,
PrecisionType> LsdFilterType;
typedef otb::LineSegmentDetector<ImageType, PrecisionType> LsdFilterType;
LsdFilterType::Pointer lsdFilter = LsdFilterType::New();
// Software Guide : EndCodeSnippet
// Software Guide : BeginLatex
//
// In order to be able to display the results, we will draw the
// detected segments on top of the input image. For this matter, we
// will use a \doxygen{otb}{VectorDataToMapFilter} which
// is templated over the input vector data type and the output image
// type, and a combination of a \doxygen{itk}{binaryFunctorImageFilter}
// and the \doxygen{otb}{Functor}{AlphaBlendingFunctor}.
//
// Software Guide : EndLatex
// Software Guide : BeginCodeSnippet
typedef otb::VectorData<PrecisionType> VectorDataType;
typedef otb::VectorDataToMapFilter<VectorDataType,
ImageType> VectorDataRendererType;
VectorDataRendererType::Pointer vectorDataRenderer = VectorDataRendererType::New();
typedef otb::Functor::AlphaBlendingFunctor<InputPixelType,
InputPixelType, InputPixelType> FunctorType;
typedef itk::BinaryFunctorImageFilter<ImageType, ImageType,
ImageType, FunctorType> BlendingFilterType;
BlendingFilterType::Pointer blendingFilter = BlendingFilterType::New();
// Software Guide : EndCodeSnippet
// Software Guide : BeginLatex
//
// We can now define the type for the writer, instantiate it and set
// the file name for the output image.
// the file name for the output vector data.
//
// Software Guide : EndLatex
// Software Guide : BeginCodeSnippet
typedef otb::ImageFileWriter<ImageType> WriterType;
typedef otb::VectorDataFileWriter<LsdFilterType::VectorDataType> WriterType;
WriterType::Pointer writer = WriterType::New();
writer->SetFileName(outfname);
// Software Guide : EndCodeSnippet
......@@ -140,16 +120,7 @@ int main(int argc, char * argv[])
// Software Guide : BeginCodeSnippet
lsdFilter->SetInput(reader->GetOutput());
vectorDataRenderer->SetInput(lsdFilter->GetOutput());
vectorDataRenderer->SetSize(reader->GetOutput()->GetLargestPossibleRegion().GetSize());
vectorDataRenderer->SetRenderingStyleType(VectorDataRendererType::Binary);
blendingFilter->SetInput1(reader->GetOutput());
blendingFilter->SetInput2(vectorDataRenderer->GetOutput());
blendingFilter->GetFunctor().SetAlpha(0.25);
writer->SetInput(blendingFilter->GetOutput());
writer->SetInput(lsdFilter->GetOutput());
// Software Guide : EndCodeSnippet
// Software Guide : BeginLatex
......@@ -166,19 +137,5 @@ int main(int argc, char * argv[])
writer->Update();
// Software Guide : EndCodeSnippet
// Software Guide : BeginLatex
// Figure~\ref{fig:LSD} shows the result of applying the line segment
// detection to an image.
// \begin{figure}
// \center
// \includegraphics[width=0.35\textwidth]{Scene.eps}
// \includegraphics[width=0.35\textwidth]{LSDOutput.eps}
// \itkcaption[LSD Application]{Result of applying the
// \doxygen{otb}{LineSegmentDetector} to an image.}
// \label{fig:LSD}
// \end{figure}
//
// Software Guide : EndLatex
return EXIT_SUCCESS;
}
......@@ -22,18 +22,11 @@
#include "otbImageFileReader.h"
#include "otbLineSegmentDetector.h"
#include "otbVectorDataToMapFilter.h"
#include "otbAlphaBlendingFunctor.h"
#include "itkBinaryFunctorImageFilter.h"
#include "otbImageFileWriter.h"
#include "itkRescaleIntensityImageFilter.h"
#include "otbVectorDataFileWriter.h"
// Software Guide : BeginCommandLineArgs
// INPUTS: {Scene.png}
// OUTPUTS: {RighAngleOutput.tif}, {PrettyRighAngleInput.png}, {PrettyRighAngleOutput.png}
// OUTPUTS: {rightAngleOutput.shp}
// 0.1 20
// Software Guide : EndCommandLineArgs
......@@ -57,25 +50,27 @@
int main(int argc, char * argv[])
{
const char * infname = argv[1];
const char * outfname = argv[2];
const char * inprettyfname = argv[3];
const char * outprettyfname = argv[4];
double angleThreshold = atof(argv[5]);
double distanceThreshold = atof(argv[6]);
const unsigned int Dimension = 2;
if (argc != 5)
{
std::cerr << "Usage: ./RightAngleDetectionExample input rightAngleOutput angleThreshold distanceThreshold\n";
return EXIT_FAILURE;
}
const char* infname = argv[1];
const char* rightAngleOutputFilename = argv[2];
double angleThreshold = atof(argv[3]);
double distanceThreshold = atof(argv[4]);
const unsigned int Dimension = 2;
typedef unsigned char PixelType;
typedef double PrecisionType;
typedef otb::Image<PixelType, Dimension> ImageType;
typedef otb::ImageFileReader<ImageType> ReaderType;
typedef otb::ImageFileWriter<ImageType> WriterType;
ReaderType::Pointer reader = ReaderType::New();
auto reader = ReaderType::New();
reader->SetFileName(infname);
reader->GenerateOutputInformation();
WriterType::Pointer writer = WriterType::New();
// Software Guide : BeginLatex
//
......@@ -124,8 +119,8 @@ int main(int argc, char * argv[])
// Software Guide : EndLatex
// Software Guide : BeginCodeSnippet
LsdFilterType::Pointer lsdFilter = LsdFilterType::New();
RightAngleFilterType::Pointer rightAngleFilter = RightAngleFilterType::New();
auto lsdFilter = LsdFilterType::New();
auto rightAngleFilter = RightAngleFilterType::New();
// Software Guide : EndCodeSnippet
// Software Guide : BeginLatex
......@@ -151,48 +146,16 @@ int main(int argc, char * argv[])
rightAngleFilter->SetDistanceThreshold(distanceThreshold);
// Software Guide : EndCodeSnippet
// Software Guide : BeginLatex
//
// We will now draw the right angles on top of the input image. For
// this, we will draw the detected points on top of the input
// image. For this matter, we will use a
// \doxygen{otb}{VectorDataToMapFilter} which is templated over
// the input vector data type and the output image type, and a
// combination of a \doxygen{itk}{binaryFunctorImageFilter}
// and the \doxygen{otb}{Functor}{UnaryFunctorImageFilter}.
//
// Software Guide : EndLatex
typedef otb::VectorDataFileWriter<LsdFilterType::VectorDataType> WriterType;
// Software Guide : BeginCodeSnippet
typedef otb::VectorDataToMapFilter<VectorDataType,
ImageType> VectorDataRendererType;
VectorDataRendererType::Pointer vectorDataRenderer = VectorDataRendererType::New();
typedef otb::Functor::AlphaBlendingFunctor<PixelType,
PixelType, PixelType> FunctorType;
typedef itk::BinaryFunctorImageFilter<ImageType, ImageType,
ImageType, FunctorType> BlendingFilterType;
BlendingFilterType::Pointer blendingFilter = BlendingFilterType::New();
vectorDataRenderer->SetInput(1, lsdFilter->GetOutput());
vectorDataRenderer->SetInput(rightAngleFilter->GetOutput());
vectorDataRenderer->SetSize(reader->GetOutput()->GetLargestPossibleRegion().GetSize());
vectorDataRenderer->SetOrigin(reader->GetOutput()->GetOrigin());
vectorDataRenderer->SetSpacing(reader->GetOutput()->GetSignedSpacing());
vectorDataRenderer->SetRenderingStyleType(VectorDataRendererType::Binary);
blendingFilter->SetInput1(reader->GetOutput());
blendingFilter->SetInput2(vectorDataRenderer->GetOutput());
blendingFilter->GetFunctor().SetAlpha(0.25);
writer->SetInput(blendingFilter->GetOutput());
writer->SetFileName(outfname);
// Software Guide : EndCodeSnippet
auto rightAngleWriter = WriterType::New();
rightAngleWriter->SetInput(rightAngleFilter->GetOutput());
rightAngleWriter->SetFileName(rightAngleOutputFilename);
// Software Guide : BeginLatex
//
// Before calling the \code{Update()} method of the writer in order to
// Before calling the \code{Update()} method of the writers in order to
// trigger the pipeline execution, we call the
// \code{GenerateOutputInformation()} of the reader, so the
// filter gets the information about image size and spacing.
......@@ -201,50 +164,8 @@ int main(int argc, char * argv[])
// Software Guide : BeginCodeSnippet
reader->GenerateOutputInformation();
writer->Update();
rightAngleWriter->Update();
// Software Guide : EndCodeSnippet
// Software Guide : BeginLatex
// Figure~\ref{fig:RIGHTANGLE_FILTER} shows the result of applying
// the right angle detection filter to an image.
// \begin{figure}
// \center
// \includegraphics[width=0.25\textwidth]{PrettyRighAngleInput.eps}
// \includegraphics[width=0.25\textwidth]{PrettyRighAngleOutput.eps}
// \itkcaption[Right Angle Detection Filter]{Result of applying the
// \doxygen{otb}{LineSegmentDetector} and the
// \doxygen{otb}{VectorDataToRightAngleVectorDataFilter} to an image. From left to right :
// original image, detected right angles.}
// \label{fig:RIGHTANGLE_FILTER}
// \end{figure}
//
// Software Guide : EndLatex
/************** images for printing *********/
typedef unsigned char OutputPixelType;
typedef otb::Image<OutputPixelType,
Dimension> OutputImageType;
typedef otb::ImageFileWriter<OutputImageType>
OutputWriterType;
typedef itk::RescaleIntensityImageFilter<ImageType,
OutputImageType> RescalerType;
RescalerType::Pointer rescaler = RescalerType::New();
OutputWriterType::Pointer outwriter = OutputWriterType::New();
rescaler->SetOutputMinimum(0);
rescaler->SetOutputMaximum(255);
rescaler->SetInput(reader->GetOutput());
outwriter->SetInput(rescaler->GetOutput());
outwriter->SetFileName(inprettyfname);
outwriter->Update();
rescaler->SetInput(blendingFilter->GetOutput());
outwriter->SetInput(rescaler->GetOutput());
outwriter->SetFileName(outprettyfname);
outwriter->Update();
return EXIT_SUCCESS;
}
......@@ -214,30 +214,25 @@ otb_add_test(NAME feTeCloudDetectionExampleTest COMMAND ${OTB_TEST_DRIVER}
553 467 734 581 0.4 0.6 1.0
)
if (Module_OTBVectorDataRendering AND OTB_USE_MAPNIK)
# ------- Line Segment Detector test----------
otb_add_test(NAME feTeLineSegmentDetectorExampleTest COMMAND ${OTB_TEST_DRIVER}
--compare-image ${NOTOL}
${BASELINE}/feTeLineSegmentDetectorExampleOutput.png
${TEMP}/feTeLineSegmentDetectorExampleOutput.png
Execute $<TARGET_FILE:LineSegmentDetectorExample>
${INPUTDATA}/Scene.png
${TEMP}/feTeLineSegmentDetectorExampleOutput.png
)
# ------- Right Angle Detection test----------
otb_add_test(NAME feTeRightAngleDetectionExample COMMAND ${OTB_TEST_DRIVER}
--compare-image ${NOTOL}
${BASELINE}/feTeRightAngleDetectionExampleOutput.png
${TEMP}/feTeRightAngleDetectionExampleOutput.png
Execute $<TARGET_FILE:RightAngleDetectionExample>
${INPUTDATA}/Scene.png
${TEMP}/feTeRightAngleDetectionExampleOutput.png
${TEMP}/PrettyRightAngleInput.png
${TEMP}/PrettyRightAngleOutput.png
0.1
10.
)
endif()
# ------- Line Segment Detector test----------
otb_add_test(NAME feTeLineSegmentDetectorExampleTest COMMAND ${OTB_TEST_DRIVER}
--compare-ogr ${NOTOL}
${BASELINE}/feTeLineSegmentDetectorExampleOutput.shp
${TEMP}/feTeLineSegmentDetectorExampleOutput.shp
Execute $<TARGET_FILE:LineSegmentDetectorExample>
${INPUTDATA}/QB_Toulouse_Ortho_PAN.tif
${TEMP}/feTeLineSegmentDetectorExampleOutput.shp
)
# ------- Right Angle Detection test----------
otb_add_test(NAME feTeRightAngleDetectionExample COMMAND ${OTB_TEST_DRIVER}
--compare-ogr ${NOTOL}
${BASELINE}/feTeRightAngleDetectionExampleOutput.shp
${TEMP}/feTeRightAngleDetectionExampleOutput.shp
Execute $<TARGET_FILE:RightAngleDetectionExample>
${INPUTDATA}/QB_Toulouse_Ortho_PAN.tif
${TEMP}/feTeRightAngleDetectionExampleOutput.shp
0.1
10.
)
/*
* Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES)
*
* This file is part of Orfeo Toolbox
*
* https://www.orfeo-toolbox.org/
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Software Guide : BeginCommandLineArgs
// INPUTS: {w002n44e.shp}
// OUTPUTS: {ArcachonRasterizedCoastline.png}
// Software Guide : EndCommandLineArgs
// Software Guide : BeginLatex
//
// The \doxygen{otb}{VectorDataToMapFilter} allows performing
// rasterization of a given vector data as a binary mask. This example
// will demonstrate how to use this filter to perform rasterization of
// the SRTM water body masks available here:
// \url{http://dds.cr.usgs.gov/srtm/version2_1/SWBD/}.
//
// First step to use this filter is to include the appropriate headers:
//