Replace Macros with constants
Some of the parameters throughout recognition and tracking are provided as macros where constants could be used, e.g., from MarkerCasern.h
:
#define HEAD_SIZE_MIN 13
#define HEAD_SIZE_MAX 37
#define SPOT_SIZE_MIN 1
#define SPOT_SIZE_MAX 9
better:
constexpr double/float headSizeMin = 13.;
constexpr double/float headSizeMax = 37.;
constexpr double/float spotSizeMin = 1.;
constexpr double/float spotSizeMax = 9.;
From cpp core guidelines (https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#es31-dont-use-macros-for-constants-or-functions):
Don’t use macros for constants or “functions”
Reason Macros are a major source of bugs. Macros don’t obey the usual scope and type rules. Macros don’t obey the usual rules for argument passing. Macros ensure that the human reader sees something different from what the compiler sees. Macros complicate tool building.