From c3e8b67ac3b482f7486b34f8c63ffaed4f9498cb Mon Sep 17 00:00:00 2001 From: Manuel Grizonnet <manuel.grizonnet@gmail.com> Date: Sun, 17 Jan 2010 22:17:35 +0100 Subject: [PATCH] DOX:sift --- Examples/DisparityMap/CMakeLists.txt | 12 ++++++------ .../EstimateAffineTransformationExample.cxx | 13 +++++++------ 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/Examples/DisparityMap/CMakeLists.txt b/Examples/DisparityMap/CMakeLists.txt index da3667d000..61f10cfba2 100644 --- a/Examples/DisparityMap/CMakeLists.txt +++ b/Examples/DisparityMap/CMakeLists.txt @@ -47,13 +47,13 @@ ADD_TEST(dmTeSimpleDisparityMapEstimationExampleTest ${EXE_TESTS} ADD_TEST(dmTeEstimateAffineTransformationExampleTest ${EXE_TESTS} --compare-image ${TOL} - ${BASELINE}/ROISpot5.png - ${TEMP}/otbEstimateAffineTransformationOutput.tif + ${BASELINE}/EstimateAffineTransformationOutput.png + ${TEMP}/AffineTransformationOutput.png EstimateAffineTransformationExampleTest - ${INPUTDATA}/ROISpot5.png - ${INPUTDATA}/ROISpot5Warped.png - ${TEMP}/otbEstimateAffineTransformationOutput.tif - 2 3 0 0 0.5 + ${INPUTDATA}/QB_Suburb.png + ${INPUTDATA}/QB_Suburb13x17y.png + ${TEMP}/AffineTransformationOutput.png + 2 3 0 0 0.5 1 ) INCLUDE_DIRECTORIES(${OTB_SOURCE_DIR}/Testing/Code) diff --git a/Examples/DisparityMap/EstimateAffineTransformationExample.cxx b/Examples/DisparityMap/EstimateAffineTransformationExample.cxx index 47e8e78df9..1e68216902 100644 --- a/Examples/DisparityMap/EstimateAffineTransformationExample.cxx +++ b/Examples/DisparityMap/EstimateAffineTransformationExample.cxx @@ -75,10 +75,10 @@ int main (int argc, char* argv[]) { - if (argc!= 9) + if (argc!= 10) { std::cerr <<"Usage: "<<argv[0]; - std::cerr<<"fixedFileName movingFileName resamplingImageFileName octaves scales threshold ratio secondOrderThreshold" << std::endl; + std::cerr<<"fixedFileName movingFileName resamplingImageFileName octaves scales threshold ratio secondOrderThreshold useBackMatching" << std::endl; return EXIT_FAILURE; } @@ -91,7 +91,7 @@ int main (int argc, char* argv[]) float threshold = atof(argv[6]); float ratio = atof(argv[7]); const double secondOrderThreshold = atof(argv[8]); - + const bool useBackMatching = atoi(argv[9]); const unsigned int Dimension = 2; // Software Guide : BeginLatex @@ -244,7 +244,7 @@ int main (int argc, char* argv[]) filter2->SetDoGThreshold(threshold); filter2->SetEdgeThreshold(ratio); // Software Guide : EndCodeSnippet - +/* std::cout << "SIFT process fixed image" << std::endl; filter1->Update(); std::cout << "SIFT process moving image" << std::endl; @@ -259,7 +259,7 @@ int main (int argc, char* argv[]) typedef PointSetType::PointsContainer PointsContainer; PointsContainer::Pointer ptContainer1,ptContainer2; - + //Save point container to extract 2 points container with size = min (container1, container2) //TODO simplify subset selection in this itk::PointSet ptContainer1 = ptSet1->GetPoints(); @@ -306,10 +306,11 @@ int main (int argc, char* argv[]) //TODO use SIFT filters outputs or subset of pointset??? //euclideanMatcher->SetInput1(ptSet1); //euclideanMatcher->SetInput2(ptSet2); + */ euclideanMatcher->SetInput1(filter1->GetOutput()); euclideanMatcher->SetInput2(filter2->GetOutput()); - bool useBackMatching = 0; + //bool useBackMatching = 0; euclideanMatcher->SetDistanceThreshold(secondOrderThreshold); euclideanMatcher->SetUseBackMatching(useBackMatching); -- GitLab