diff --git a/Examples/DisparityMap/CMakeLists.txt b/Examples/DisparityMap/CMakeLists.txt index da3667d00044ec09cb390162e8d1584fff5a135d..61f10cfba250f13caede5c348532677a61e7be49 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 47e8e78df90c71348c09ebba0d2d539df901a55b..1e68216902e677508d8b181e6bd1dc9efab6e529 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);