Skip to content
Snippets Groups Projects
Commit f698f1f5 authored by Manuel Grizonnet's avatar Manuel Grizonnet
Browse files

ENH:modify cmakelists and test to compile SIFT as patented

parent 00bcbb10
No related branches found
No related tags found
No related merge requests found
......@@ -9,13 +9,6 @@ ADD_EXECUTABLE(NCCRegistrationFilterExample NCCRegistrationFilterExample.cxx )
TARGET_LINK_LIBRARIES(NCCRegistrationFilterExample OTBFeatureExtraction OTBCommon OTBIO
ITKIO)
ADD_EXECUTABLE(SIFTDisparityMapEstimation SIFTDisparityMapEstimation.cxx )
TARGET_LINK_LIBRARIES(SIFTDisparityMapEstimation OTBFeatureExtraction OTBCommon OTBIO
ITKIO)
ADD_EXECUTABLE(EstimateAffineTransformationExample EstimateAffineTransformationExample.cxx )
TARGET_LINK_LIBRARIES(EstimateAffineTransformationExample OTBFeatureExtraction OTBCommon OTBIO OTBProjections
ITKIO)
IF( NOT OTB_DISABLE_CXX_TESTING AND BUILD_TESTING )
......@@ -45,28 +38,6 @@ ADD_TEST(dmTeSimpleDisparityMapEstimationExampleTest ${EXE_TESTS}
100 10 15 10 10 250 0.9
)
ADD_TEST(dmTeEstimateAffineTransformationExampleTest ${EXE_TESTS}
--compare-image ${TOL}
${BASELINE}/EstimateAffineTransformationOutput.png
${TEMP}/AffineTransformationOutput.png
EstimateAffineTransformationExampleTest
${INPUTDATA}/QB_Suburb.png
${INPUTDATA}/QB_SuburbR10X13Y17.png
${TEMP}/AffineTransformationOutput.png
${TEMP}/AffineTransformationTxtOutput.txt
2 3 0 0 0.5 1
)
ADD_TEST(dmTeSIFTDisparityMapEstimationTest ${EXE_TESTS}
--compare-image ${TOL}
${BASELINE}/SIFTdeformationFieldOutput.png
${TEMP}/SIFTdeformationFieldOutput.png
SIFTDisparityMapEstimationTest
${INPUTDATA}/ROISpot5.png
${INPUTDATA}/ROISpot5Warped.png
${TEMP}/SIFTdeformationFieldOutput.png
)
INCLUDE_DIRECTORIES(${OTB_SOURCE_DIR}/Testing/Code)
ADD_EXECUTABLE(otbDisparityMapExamplesTests otbDisparityMapExamplesTests.cxx)
TARGET_LINK_LIBRARIES(otbDisparityMapExamplesTests ITKAlgorithms ITKStatistics OTBBasicFilters OTBCommon OTBDisparityMap OTBIO OTBSpatialReasoning OTBChangeDetection OTBFeatureExtraction OTBLearning OTBMultiScale OTBTesting)
......
......@@ -26,18 +26,8 @@
void RegisterTests()
{
REGISTER_TEST(SimpleDisparityMapEstimationExampleTest);
REGISTER_TEST(EstimateAffineTransformationExampleTest);
REGISTER_TEST(SIFTDisparityMapEstimationTest);
}
#undef main
#define main SimpleDisparityMapEstimationExampleTest
#include "SimpleDisparityMapEstimationExample.cxx"
#undef main
#define main EstimateAffineTransformationExampleTest
#include "EstimateAffineTransformationExample.cxx"
#undef main
#define main SIFTDisparityMapEstimationTest
#include "SIFTDisparityMapEstimation.cxx"
......@@ -76,13 +76,6 @@ ADD_EXECUTABLE(ThresholdToPointSetExample ThresholdToPointSetExample.cxx)
TARGET_LINK_LIBRARIES(ThresholdToPointSetExample OTBIO OTBCommon OTBFeatureExtraction
ITKCommon ITKBasicFilters)
ADD_EXECUTABLE(SIFTExample SIFTExample.cxx)
TARGET_LINK_LIBRARIES(SIFTExample OTBIO OTBCommon OTBFeatureExtraction
ITKCommon ITKBasicFilters)
ADD_EXECUTABLE(SIFTFastExample SIFTFastExample.cxx)
TARGET_LINK_LIBRARIES(SIFTFastExample OTBIO OTBCommon OTBFeatureExtraction
ITKCommon ITKBasicFilters)
ADD_EXECUTABLE(SURFExample SURFExample.cxx)
TARGET_LINK_LIBRARIES(SURFExample OTBIO OTBCommon OTBFeatureExtraction
......@@ -109,9 +102,6 @@ TARGET_LINK_LIBRARIES(SFSExample OTBIO OTBCommon OTBFeatureExtraction ITKCommon
ADD_EXECUTABLE(EdgeDensityExample EdgeDensityExample.cxx)
TARGET_LINK_LIBRARIES(EdgeDensityExample OTBIO OTBCommon OTBBasicFilters ITKCommon ITKBasicFilters)
ADD_EXECUTABLE(SIFTDensityExample SIFTDensityExample.cxx)
TARGET_LINK_LIBRARIES(SIFTDensityExample OTBIO OTBCommon OTBBasicFilters ITKCommon ITKBasicFilters)
IF( NOT OTB_DISABLE_CXX_TESTING AND BUILD_TESTING )
......@@ -302,37 +292,6 @@ ADD_TEST(feTeSeamCarvingOtherExampleTest ${EXE_TESTS2}
# 6 3 0.08 10
#)
ADD_TEST(feTeScaleInvariantFeatureImageFilterTest ${EXE_TESTS2}
--compare-n-images ${TOL} 4
${BASELINE}/ScaleInvariantFeatureImageFilterOutput1.png
${TEMP}/ScaleInvariantFeatureImageFilterOutput1.png
${BASELINE}/ScaleInvariantFeatureImageFilterOutput2.png
${TEMP}/ScaleInvariantFeatureImageFilterOutput2.png
${BASELINE}/ScaleInvariantFeatureImageFilterOutputKeys1.png
${TEMP}/ScaleInvariantFeatureImageFilterOutputKeys1.png
${BASELINE}/ScaleInvariantFeatureImageFilterOutputKeys2.png
${TEMP}/ScaleInvariantFeatureImageFilterOutputKeys2.png
ScaleInvariantFeatureImageFilterTest
${INPUTDATA}/Scene.png
${TEMP}/ScaleInvariantFeatureImageFilterOutput1.png
${TEMP}/ScaleInvariantFeatureImageFilterOutput2.png
${TEMP}/ScaleInvariantFeatureImageFilterOutputKeys1.png
${TEMP}/ScaleInvariantFeatureImageFilterOutputKeys2.png
1 10 0.5 0
)
ADD_TEST(feTeSIFTFastExampleTest ${EXE_TESTS2}
--compare-image ${TOL}
${BASELINE}/ROISpot5SiftFast.png
${TEMP}/ROISpot5SiftFast.png
SIFTFastExampleTest
${INPUTDATA}/ROISpot5.png
${TEMP}/ROISpot5SiftFast.png
3
)
# ------- CloudDetectionExampleTest----------
......
......@@ -29,10 +29,8 @@ void RegisterTests()
REGISTER_TEST(ExtractRoadExampleTest);
REGISTER_TEST(SeamCarvingExampleTest);
REGISTER_TEST(SeamCarvingOtherExampleTest);
REGISTER_TEST(ScaleInvariantFeatureImageFilterTest);
REGISTER_TEST(CloudDetectionExampleTest);
REGISTER_TEST(RightAngleDetectionExample);
REGISTER_TEST(SIFTFastExampleTest);
}
#undef main
......@@ -51,14 +49,6 @@ void RegisterTests()
#define main SeamCarvingOtherExampleTest
#include "SeamCarvingOtherExample.cxx"
#undef main
#define main ScaleInvariantFeatureImageFilterTest
#include "ScaleInvariantFeatureImageFilter.cxx"
#undef main
#define main SIFTFastExampleTest
#include "SIFTFastExample.cxx"
#undef main
#define main CloudDetectionExampleTest
#include "CloudDetectionExample.cxx"
......
......@@ -8,6 +8,26 @@ TARGET_LINK_LIBRARIES(FuzzyConnectednessImageFilter OTBIO OTBCommon ITKNumerics)
#ADD_EXECUTABLE(HybridSegmentationFuzzyVoronoi HybridSegmentationFuzzyVoronoi.cxx )
#TARGET_LINK_LIBRARIES(HybridSegmentationFuzzyVoronoi OTBIO OTBCommon ITKNumerics)
#Examples using SIFT
ADD_EXECUTABLE(SIFTDisparityMapEstimation SIFTDisparityMapEstimation.cxx )
TARGET_LINK_LIBRARIES(SIFTDisparityMapEstimation OTBFeatureExtraction OTBCommon OTBIO
ITKIO)
ADD_EXECUTABLE(EstimateAffineTransformationExample EstimateAffineTransformationExample.cxx )
TARGET_LINK_LIBRARIES(EstimateAffineTransformationExample OTBFeatureExtraction OTBCommon OTBIO OTBProjections
ITKIO)
#Feature extraction examples based on SIFT
ADD_EXECUTABLE(SIFTExample SIFTExample.cxx)
TARGET_LINK_LIBRARIES(SIFTExample OTBIO OTBCommon OTBFeatureExtraction
ITKCommon ITKBasicFilters)
ADD_EXECUTABLE(SIFTFastExample SIFTFastExample.cxx)
TARGET_LINK_LIBRARIES(SIFTFastExample OTBIO OTBCommon OTBFeatureExtraction
ITKCommon ITKBasicFilters)
ADD_EXECUTABLE(SIFTDensityExample SIFTDensityExample.cxx)
TARGET_LINK_LIBRARIES(SIFTDensityExample OTBIO OTBCommon OTBBasicFilters ITKCommon ITKBasicFilters)
IF( NOT OTB_DISABLE_CXX_TESTING AND BUILD_TESTING )
......@@ -34,6 +54,65 @@ ADD_TEST(paTeHybridSegmentationFuzzyVoronoiTest ${EXE_TESTS}
111 38 75 20 0.5 3.0
)
# -----EstimateAffineTransformationExampleTest---------
ADD_TEST(dmTeEstimateAffineTransformationExampleTest ${EXE_TESTS}
--compare-image ${TOL}
${BASELINE}/EstimateAffineTransformationOutput.png
${TEMP}/AffineTransformationOutput.png
EstimateAffineTransformationExampleTest
${INPUTDATA}/QB_Suburb.png
${INPUTDATA}/QB_SuburbR10X13Y17.png
${TEMP}/AffineTransformationOutput.png
${TEMP}/AffineTransformationTxtOutput.txt
2 3 0 0 0.5 1
)
# -----SIFTDisparityMapEstimationTest---------
ADD_TEST(dmTeSIFTDisparityMapEstimationTest ${EXE_TESTS}
--compare-image ${TOL}
${BASELINE}/SIFTdeformationFieldOutput.png
${TEMP}/SIFTdeformationFieldOutput.png
SIFTDisparityMapEstimationTest
${INPUTDATA}/ROISpot5.png
${INPUTDATA}/ROISpot5Warped.png
${TEMP}/SIFTdeformationFieldOutput.png
)
ADD_TEST(feTeScaleInvariantFeatureImageFilterTest ${EXE_TESTS2}
--compare-n-images ${TOL} 4
${BASELINE}/ScaleInvariantFeatureImageFilterOutput1.png
${TEMP}/ScaleInvariantFeatureImageFilterOutput1.png
${BASELINE}/ScaleInvariantFeatureImageFilterOutput2.png
${TEMP}/ScaleInvariantFeatureImageFilterOutput2.png
${BASELINE}/ScaleInvariantFeatureImageFilterOutputKeys1.png
${TEMP}/ScaleInvariantFeatureImageFilterOutputKeys1.png
${BASELINE}/ScaleInvariantFeatureImageFilterOutputKeys2.png
${TEMP}/ScaleInvariantFeatureImageFilterOutputKeys2.png
ScaleInvariantFeatureImageFilterTest
${INPUTDATA}/Scene.png
${TEMP}/ScaleInvariantFeatureImageFilterOutput1.png
${TEMP}/ScaleInvariantFeatureImageFilterOutput2.png
${TEMP}/ScaleInvariantFeatureImageFilterOutputKeys1.png
${TEMP}/ScaleInvariantFeatureImageFilterOutputKeys2.png
1 10 0.5 0
)
ADD_TEST(feTeSIFTFastExampleTest ${EXE_TESTS2}
--compare-image ${TOL}
${BASELINE}/ROISpot5SiftFast.png
${TEMP}/ROISpot5SiftFast.png
SIFTFastExampleTest
${INPUTDATA}/ROISpot5.png
${TEMP}/ROISpot5SiftFast.png
3
)
INCLUDE_DIRECTORIES(${OTB_SOURCE_DIR}/Testing/Code)
ADD_EXECUTABLE(otbPatentedExamplesTests otbPatentedExamplesTests.cxx)
TARGET_LINK_LIBRARIES(otbPatentedExamplesTests ITKAlgorithms ITKStatistics OTBBasicFilters OTBCommon OTBDisparityMap OTBIO OTBSpatialReasoning OTBChangeDetection OTBFeatureExtraction OTBLearning OTBMultiScale OTBTesting)
......
......@@ -27,8 +27,28 @@
void RegisterTests()
{
REGISTER_TEST(HybridSegmentationFuzzyVoronoiTest);
REGISTER_TEST(EstimateAffineTransformationExampleTest);
REGISTER_TEST(SIFTDisparityMapEstimationTest);
REGISTER_TEST(SIFTFastExampleTest);
REGISTER_TEST(ScaleInvariantFeatureImageFilterTest);
}
#undef main
#define main HybridSegmentationFuzzyVoronoiTest
#include "HybridSegmentationFuzzyVoronoi.cxx"
#undef main
#define main EstimateAffineTransformationExampleTest
#include "EstimateAffineTransformationExample.cxx"
#undef main
#define main SIFTDisparityMapEstimationTest
#include "SIFTDisparityMapEstimation.cxx"
#undef main
#define main ScaleInvariantFeatureImageFilterTest
#include "ScaleInvariantFeatureImageFilter.cxx"
#undef main
#define main SIFTFastExampleTest
#include "SIFTFastExample.cxx"
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