Skip to content

Commit e19c982

Browse files
committed
[pipeline] SphereDetection: Add new command line parameters for manual detection
1 parent febb825 commit e19c982

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

src/software/pipeline/main_sphereDetection.cpp

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
#include <onnxruntime_cxx_api.h>
3131

32-
#define ALICEVISION_SOFTWARE_VERSION_MAJOR 1
32+
#define ALICEVISION_SOFTWARE_VERSION_MAJOR 2
3333
#define ALICEVISION_SOFTWARE_VERSION_MINOR 0
3434

3535
namespace fs = std::filesystem;
@@ -47,6 +47,9 @@ int aliceVision_main(int argc, char** argv)
4747
float inputMinScore;
4848

4949
bool autoDetect;
50+
std::vector<std::string> x, y, radius;
51+
std::string sphereFile;
52+
bool fillMissingSpheres;
5053
Eigen::Vector2f sphereCenter(0, 0);
5154
double sphereRadius = 1.0;
5255

@@ -66,12 +69,16 @@ int aliceVision_main(int argc, char** argv)
6669
optionalParams.add_options()
6770
("minScore,s", po::value<float>(&inputMinScore)->default_value(0.0),
6871
"Minimum detection score.")
69-
("x,x", po::value<float>(&sphereCenter(0))->default_value(0.0),
72+
("x,x", po::value<std::vector<std::string>>(&x)->multitoken(),
7073
"Sphere's center X (pixels).")
71-
("y,y", po::value<float>(&sphereCenter(1))->default_value(0.0),
74+
("y,y", po::value<std::vector<std::string>>(&y)->multitoken(),
7275
"Sphere's center Y (pixels).")
73-
("sphereRadius,r", po::value<double>(&sphereRadius)->default_value(1.0),
74-
"Sphere's radius (pixels).");
76+
("radius,r", po::value<std::vector<std::string>>(&radius)->multitoken(),
77+
"Sphere's radius (pixels).")
78+
("sphereFile,f", po::value<std::string>(&sphereFile)->default_value(""),
79+
"File containing the positions for the spheres in all the images.")
80+
("fillMissingSpheres,m", po::value<bool>(&fillMissingSpheres)->default_value(true),
81+
"True if a sphere position is to be written as detected although it was not provided. In that case, the position of the last known sphere will be used.");
7582
// clang-format on
7683

7784
CmdLine cmdline("AliceVision sphereDetection");

0 commit comments

Comments
 (0)