Skip to content
Snippets Groups Projects
Commit d3461749 authored by Jordi Inglada's avatar Jordi Inglada
Browse files

Correction dessin paths

parent ec0f5a69
No related branches found
No related tags found
No related merge requests found
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
// Software Guide : BeginCommandLineArgs // Software Guide : BeginCommandLineArgs
// INPUTS: {QB_Suburb.png} // INPUTS: {QB_Suburb.png}
// OUTPUTS: {QB_SuburbAlign.png} // OUTPUTS: {QB_SuburbAlign.png}
// 2
// Software Guide : EndCommandLineArgs // Software Guide : EndCommandLineArgs
// Software Guide : BeginLatex // Software Guide : BeginLatex
...@@ -75,10 +76,10 @@ ...@@ -75,10 +76,10 @@
int main( int argc, char *argv[] ) int main( int argc, char *argv[] )
{ {
if(argc!=3) if(argc!=4)
{ {
std::cout << "Usage : " << argv[0] << " inputImage outputImage" << std::endl; std::cout << "Usage : " << argv[0] << " inputImage outputImage epsilon" << std::endl;
return EXIT_FAILURE; return EXIT_FAILURE;
} }
...@@ -141,7 +142,7 @@ int main( int argc, char *argv[] ) ...@@ -141,7 +142,7 @@ int main( int argc, char *argv[] )
// Software Guide : EndLatex // Software Guide : EndLatex
// Software Guide : BeginCodeSnippet // Software Guide : BeginCodeSnippet
alignFilter->SetEps( 5 ); alignFilter->SetEps( atoi(argv[3]) );
// Software Guide : EndCodeSnippet // Software Guide : EndCodeSnippet
alignFilter->Update(); alignFilter->Update();
...@@ -159,7 +160,7 @@ int main( int argc, char *argv[] ) ...@@ -159,7 +160,7 @@ int main( int argc, char *argv[] )
typedef otb::DrawPathFilter< InputImageType, PathType, typedef otb::DrawPathFilter< InputImageType, PathType,
OutputImageType > DrawPathFilterType; OutputImageType > DrawPathFilterType;
DrawPathFilterType::Pointer drawPathFilter = DrawPathFilterType::New();
// Software Guide : EndCodeSnippet // Software Guide : EndCodeSnippet
// Software Guide : BeginLatex // Software Guide : BeginLatex
// We will now go through the list of detected paths and feed them // We will now go through the list of detected paths and feed them
...@@ -197,6 +198,7 @@ int main( int argc, char *argv[] ) ...@@ -197,6 +198,7 @@ int main( int argc, char *argv[] )
while( listIt != pathList->End()) while( listIt != pathList->End())
{ {
DrawPathFilterType::Pointer drawPathFilter = DrawPathFilterType::New();
drawPathFilter->SetImageInput( backgroundImage ); drawPathFilter->SetImageInput( backgroundImage );
drawPathFilter->SetPathInput( listIt.Get() ); drawPathFilter->SetPathInput( listIt.Get() );
...@@ -209,7 +211,7 @@ int main( int argc, char *argv[] ) ...@@ -209,7 +211,7 @@ int main( int argc, char *argv[] )
} }
writer->SetInput( drawPathFilter->GetOutput() ); writer->SetInput( backgroundImage );
// Software Guide : EndCodeSnippet // Software Guide : EndCodeSnippet
writer->Update(); writer->Update();
......
...@@ -179,6 +179,7 @@ ADD_TEST(AlignmentsExampleTest ${EXE_TESTS} ...@@ -179,6 +179,7 @@ ADD_TEST(AlignmentsExampleTest ${EXE_TESTS}
AlignmentsExampleTest AlignmentsExampleTest
${INPUTDATA}/QB_Suburb.png ${INPUTDATA}/QB_Suburb.png
${TEMP}/QB_SuburbAlign.png ${TEMP}/QB_SuburbAlign.png
5
) )
# ------- RoadExtractionExamplesTest---------- # ------- RoadExtractionExamplesTest----------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment