Skip to content
Snippets Groups Projects
Unverified Commit a25c79f9 authored by Kerautret Bertrand's avatar Kerautret Bertrand :thinking:
Browse files

DEmo: ajout version

parent 8082c796
No related branches found
No related tags found
No related merge requests found
#include "bsdetector.h"
const string BSDetector::VERSION = "0.1";
const int BSDetector::STEP_FINAL = 0;
const int BSDetector::STEP_INITIAL = 1;
const int BSDetector::STEP_PRELIM = 2;
......@@ -748,3 +748,9 @@ void BSDetector::switchPreliminary ()
if (bst1->orthoScansOn ()) bst0->switchOrthoScans ();
}
}
std::string BSDetector::version ()
{
return BSDetector::VERSION;
}
......@@ -17,6 +17,9 @@ class BSDetector
public:
/** Version number **/
static const string VERSION;
/** Identifier for the final detection step. */
static const int STEP_FINAL;
/** Identifier for the initial detection step. */
......@@ -138,7 +141,16 @@ public:
* @param step Detection step.
*/
BlurredSegment *getBlurredSegment (int step = STEP_FINAL) const;
/**
* \brief Returns the current version of the detector.
* @return the current version.
*/
std::string version();
/**
* \brief Returns the list of detected blurred segments at final step.
*/
......@@ -588,6 +600,7 @@ public:
* \brief Toggles the detector used (between IWCIA '09 and present).
*/
inline void switchDetector () { oldp = ! oldp; }
private :
......@@ -716,5 +729,6 @@ private :
*/
void freeMultiSelection ();
};
#endif
......@@ -449,3 +449,5 @@ void BSTracker::switchScanExtent ()
maxScan = (maxScan == gMap->getHeightWidthMax () ?
DEFAULT_MAX_SCAN : gMap->getHeightWidthMax ());
}
......@@ -19,13 +19,24 @@ void usage(std::string str)
int main (int argc, char *argv[])
{
for (int i = 1; i < argc; i++)
{
if (string(argv[i]) == "--version")
{
BSDetector detector;
std::cout << detector.version()<< std::endl;
return 0;
}
}
if (argc < 4)
{
usage(argv[0]);
exit(EXIT_FAILURE);
}
// getting parameters:
// - input image file
string input_filename = argv[1];
......
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