34 #include <visp3/ustk_confidence_map/usScanlineConfidence2D.h>
35 #include <visp3/ustk_core/usImageIo.h>
36 #include <visp3/ustk_core/usImagePreScan2D.h>
38 #if defined(VISP_HAVE_XML2)
41 std::string filename, filenameConfidence;
44 if (filename.empty()) {
46 if (!env_ipath.empty()) {
47 filename = env_ipath +
"/pre-scan/2D_xml/prescan2d.xml";
48 filenameConfidence = env_ipath +
"/pre-scan/2D_xml/confidenceResult/confidencePreScan.xml";
50 std::cout <<
"You should set USTK_DATASET_PATH environment var to access to ustk dataset" << std::endl;
61 confidenceProcess.
run(confidenceTest, image);
63 std::cout <<
"Output image : \n";
64 std::cout << confidenceTest;
65 std::cout <<
"\nGround truth image : \n";
66 std::cout << confidenceGroundTruth;
68 if (confidenceTest == confidenceGroundTruth) {
69 std::cout <<
"Test passed\n";
73 std::cout <<
"Test failed\n";
79 std::cout <<
"This test requires xml2 to run.\n";
static void read(usImageRF2D< short int > &imageRf2D, const std::string &headerFileName)
Process a pre-scan image to determine the confidence map.
void run(usImagePreScan2D< unsigned char > &preScanConfidence, const usImagePreScan2D< unsigned char > &preScanImage)
VISP_EXPORT std::string getDataSetPath()