Commit 0efa28b9 authored by Rashad Kanavath's avatar Rashad Kanavath
Browse files

adding otbtest for inxml and outxml

parent 12743023
......@@ -87,6 +87,32 @@ IF(OTB_USE_OPENCV)
${TEMP}/${OUTMODELFILE}
)
OTB_TEST_APPLICATION(
NAME apTvClTrainMethod${classifier}ImagesClassifierQB1_OutXML1
APP TrainImagesClassifier
OPTIONS -io.il ${INPUTDATA}/Classification/QB_1_ortho${raster_input_format}
-io.vd ${INPUTDATA}/Classification/VectorData_${${lclassifier}_input}QB1${vector_input_format}
-io.imstat ${ascii_ref_path}/clImageStatisticsQB1${stat_input_format}
-classifier ${lclassifier}
${${lclassifier}_parameters}
-io.out ${TEMP}/OutXML1_${OUTMODELFILE}
-rand 121212
-outxml ${TEMP}/cl${classifier}_OutXML1.xml
VALID ${ascii_comparison}
${ascii_ref_path}/${OUTMODELFILE}
${TEMP}/OutXML1_${OUTMODELFILE}
)
OTB_TEST_APPLICATION(
NAME apTvClTrainMethod${classifier}ImagesClassifierQB1_InXML1
APP TrainImagesClassifier
OPTIONS -inxml ${TEMP}/cl${classifier}_OutXML1.xml
VALID ${ascii_comparison}
${ascii_ref_path}/${OUTMODELFILE}
${TEMP}/OutXML1_${OUTMODELFILE}
)
OTB_TEST_APPLICATION(
NAME apTvClMethod${classifier}ImageClassifierQB1
......@@ -119,6 +145,32 @@ OTB_TEST_APPLICATION(NAME apTvClTrainSVMImagesClassifierQB1
SET_TESTS_PROPERTIES(apTvClTrainSVMImagesClassifierQB1 PROPERTIES DEPENDS apTvClComputeImagesStatisticsQB1)
OTB_TEST_APPLICATION(NAME apTvClTrainSVMImagesClassifierQB1_OutXML
APP TrainImagesClassifier
OPTIONS -io.il ${INPUTDATA}/Classification/QB_1_ortho.tif
-io.vd ${INPUTDATA}/Classification/VectorData_QB1.shp
-io.imstat ${TEMP}/apTvClEstimateImageStatisticsQB1.xml
-classifier libsvm
-classifier.libsvm.opt true
-io.out ${TEMP}/clsvmModelQB1_OutXML.svm
-rand 121212
-outxml ${TEMP}/clsvmModelQB1_OutXML.xml
VALID --compare-ascii ${NOTOL}
${OTBAPP_BASELINE_FILES}/clsvmModelQB1.svm
${TEMP}/clsvmModelQB1_OutXML.svm)
SET_TESTS_PROPERTIES(apTvClTrainSVMImagesClassifierQB1_OutXML PROPERTIES DEPENDS apTvClComputeImagesStatisticsQB1)
OTB_TEST_APPLICATION(NAME apTvClTrainSVMImagesClassifierQB1_InXML1
APP TrainImagesClassifier
OPTIONS -inxml ${TEMP}/clsvmModelQB1_OutXML.xml
-rand 121212
VALID --compare-ascii ${NOTOL}
${OTBAPP_BASELINE_FILES}/clsvmModelQB1.svm
${TEMP}/clsvmModelQB1_OutXML.svm)
SET_TESTS_PROPERTIES(apTvClTrainSVMImagesClassifierQB1_InXML1 PROPERTIES DEPENDS apTvClComputeImagesStatisticsQB1)
OTB_TEST_APPLICATION(NAME apTvClTrainSVMImagesClassifierQB1_allOpt
APP TrainImagesClassifier
......@@ -139,6 +191,22 @@ OTB_TEST_APPLICATION(NAME apTvClTrainSVMImagesClassifierQB1_allOpt
SET_TESTS_PROPERTIES(apTvClTrainSVMImagesClassifierQB1_allOpt PROPERTIES DEPENDS apTvClComputeImagesStatisticsQB1)
OTB_TEST_APPLICATION(NAME apTvClTrainSVMImagesClassifierQB1_allOpt_InXML
APP TrainImagesClassifier
OPTIONS -inxml ${TEMP}/clsvmModelQB1_OutXML.xml
-sample.mv 100
-sample.mt 100
-sample.vtr 0.5
-classifier.libsvm.opt true
-rand 121212
-io.out ${TEMP}/clsvmModelQB1_allOpt_InXML.svm
VALID --compare-ascii ${NOTOL}
${OTBAPP_BASELINE_FILES}/clsvmModelQB1.svm
${TEMP}/clsvmModelQB1_allOpt_InXML.svm)
SET_TESTS_PROPERTIES(apTvClTrainSVMImagesClassifierQB1_allOpt_InXML PROPERTIES DEPENDS apTvClComputeImagesStatisticsQB1)
OTB_TEST_APPLICATION(NAME apTvClImageSVMClassifierQB1
APP ImageClassifier
OPTIONS -in ${INPUTDATA}/Classification/QB_1_ortho.tif
......@@ -177,6 +245,30 @@ OTB_TEST_APPLICATION(NAME apTvClImageSVMClassifierQB3
SET_TESTS_PROPERTIES(apTvClImageSVMClassifierQB3 PROPERTIES DEPENDS apTvClTrainSVMImagesClassifierQB1)
OTB_TEST_APPLICATION(NAME apTvClImageSVMClassifierQB3_OutXML
APP ImageClassifier
OPTIONS -in ${INPUTDATA}/Classification/QB_3_ortho.tif
-imstat ${TEMP}/apTvClEstimateImageStatisticsQB1.xml
-model ${TEMP}/clsvmModelQB1.svm
-out ${TEMP}/clLabeledImageQB3.tif
-outxml ${TEMP}/clLabeledImageQB3_OutXML.xml
VALID --compare-image ${NOTOL}
${OTBAPP_BASELINE}/clLabeledImageQB3.tif
${TEMP}/clLabeledImageQB3.tif)
SET_TESTS_PROPERTIES(apTvClImageSVMClassifierQB3_OutXML PROPERTIES DEPENDS apTvClTrainSVMImagesClassifierQB1)
OTB_TEST_APPLICATION(NAME apTvClImageSVMClassifierQB3_InXML
APP ImageClassifier
OPTIONS -inxml ${TEMP}/clLabeledImageQB3_OutXML.xml
VALID --compare-image ${NOTOL}
${OTBAPP_BASELINE}/clLabeledImageQB3.tif
${TEMP}/clLabeledImageQB3.tif)
SET_TESTS_PROPERTIES(apTvClImageSVMClassifierQB3_InXML PROPERTIES DEPENDS apTvClTrainSVMImagesClassifierQB1)
#--------
# QB multi chain
......
......@@ -19,6 +19,64 @@ OTB_TEST_APPLICATION(NAME apTvPrOrthorectification_UTM
${BASELINE}/owTvOrthorectifTest_UTM.tif
${TEMP}/apTvPrOrthorectifTest_UTM.tif)
OTB_TEST_APPLICATION(NAME apTvPrOrthorectification_UTM_OutXML1
APP OrthoRectification
OPTIONS -io.in ${OTB_DATA_LARGEINPUT_ROOT}/QUICKBIRD/TOULOUSE/000000128955_01_P001_PAN/02APR01105228-P1BS-000000128955_01_P001.TIF
-io.out ${TEMP}/apTvPrOrthorectifTest_UTM_OutXML1.tif
-elev.dem ${INPUTDATA}/DEM/srtm_directory/
-outputs.ulx 374100.8
-outputs.uly 4829184.8
-outputs.sizex 500
-outputs.sizey 500
-outputs.spacingx 0.5
-outputs.spacingy -0.5
-map utm
-opt.gridspacing 4 # Spacing of the deformation field
-outxml ${TEMP}/apTvPrOrthorectifTest_UTM_OutXML1.xml
-interpolator linear
VALID --compare-image ${EPSILON_4}
${BASELINE}/owTvOrthorectifTest_UTM.tif
${TEMP}/apTvPrOrthorectifTest_UTM_OutXML1.tif)
OTB_TEST_APPLICATION(NAME apTvPrOrthorectification_UTM_OutXML2
APP OrthoRectification
OPTIONS -io.in ${OTB_DATA_LARGEINPUT_ROOT}/QUICKBIRD/TOULOUSE/000000128955_01_P001_PAN/02APR01105228-P1BS-000000128955_01_P001.TIF
-io.out ${TEMP}/apTvPrOrthorectifTest_UTM_OutXML2.tif #should be moved to baseline
-elev.dem ${INPUTDATA}/DEM/srtm_directory/
-outputs.ulx 374100.8
-outputs.uly 4829184.8
-outputs.sizex 400
-outputs.sizey 400
-outputs.spacingx 0.5
-outputs.spacingy -0.5
-map utm
-opt.gridspacing 3 # Spacing of the deformation field
-outxml ${TEMP}/apTvPrOrthorectifTest_UTM_OutXML2.xml
-interpolator linear
VALID --compare-image ${EPSILON_4}
${TEMP}/apTvPrOrthorectifTest_UTM_OutXML2.tif
${BASELINE}/apTvPrOrthorectifTest_UTM2.tif)
OTB_TEST_APPLICATION(NAME apTvPrOrthorectification_UTM_InXML1
APP OrthoRectification
OPTIONS
-inxml ${TEMP}/apTvPrOrthorectifTest_UTM_OutXML1.xml
VALID --compare-image ${EPSILON_4}
${BASELINE}/owTvOrthorectifTest_UTM.tif
${TEMP}/apTvPrOrthorectifTest_UTM_OutXML1.tif)
OTB_TEST_APPLICATION(NAME apTvPrOrthorectification_UTM_InXML2
APP OrthoRectification
OPTIONS
-inxml ${TEMP}/apTvPrOrthorectifTest_UTM_OutXML1.xml
-outputs.sizex 400
-outputs.sizey 400
-opt.gridspacing 3
VALID --compare-image ${EPSILON_4}
${TEMP}/apTvPrOrthorectifTest_UTM_OutXML1.tif
${BASELINE}/apTvPrOrthorectifTest_UTM2.tif)
ENDIF(OTB_DATA_USE_LARGEINPUT)
OTB_TEST_APPLICATION(NAME apTvPrRigidTransformResample
......
......@@ -18,6 +18,24 @@ OTB_TEST_APPLICATION(NAME apTvUtSmoothingTest
VALID --compare-image ${NOTOL}
${BASELINE}/apTvUtSmoothingTest.tif
${TEMP}/apTvUtSmoothingTest.tif)
OTB_TEST_APPLICATION(NAME apTvUtSmoothingTest_OutXML
APP Smoothing
OPTIONS -in ${INPUTDATA}/poupees.tif
-out ${TEMP}/apTvUtSmoothingTest.tif
-type mean
-outxml ${TEMP}/apTvUtSmoothingTest_OutXML.xml
VALID --compare-image ${NOTOL}
${BASELINE}/apTvUtSmoothingTest.tif
${TEMP}/apTvUtSmoothingTest.tif)
OTB_TEST_APPLICATION(NAME apTvUtSmoothingTest_InXML
APP Smoothing
OPTIONS -inxml ${TEMP}/apTvUtSmoothingTest_OutXML.xml
-type mean
VALID --compare-image ${NOTOL}
${BASELINE}/apTvUtSmoothingTest.tif
${TEMP}/apTvUtSmoothingTest.tif)
#--- ReadImageInfo ---#
OTB_TEST_APPLICATION(NAME apTvUtReadImageInfoTest
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment