Skip to content

Commit

Permalink
Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
jlblancoc committed Aug 31, 2024
1 parent e5d783c commit 743f93e
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 52 deletions.
7 changes: 5 additions & 2 deletions doc/source/doxygen-docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
\page changelog Change Log

# Version 2.13.8: UNRELEASED
- Build system:
- Fix all C++ build warnings in pymrpt.
- Changes in libraries:
- \ref mrpt_vision_grp:
- mrpt::vision::TMatchingOptions: Remove useless custom "operator=".
- pymrpt:
- Fix all C++ build warnings in pymrpt.
- BUG FIXES:
- Avoid failing KLT unit tests in the loong64 architecture.
- Fix tons of typos and Debian-specific spare install files (lintian --pedantic).
Expand Down
5 changes: 4 additions & 1 deletion libs/slam/include/mrpt/slam/CMetricMapBuilderICP.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ class CMetricMapBuilderICP : public mrpt::slam::CMetricMapBuilder
/** Initializer */
TConfigParams(mrpt::system::VerbosityLevel& parent_verbosity_level);
TConfigParams& operator=(const TConfigParams& other); // Copy
// assignment
TConfigParams(const TConfigParams& other) : verbosity_level(other.verbosity_level)
{
*this = other;
}

void loadFromConfigFile(
const mrpt::config::CConfigFileBase& source,
Expand Down
31 changes: 1 addition & 30 deletions libs/vision/include/mrpt/vision/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -435,14 +435,13 @@ struct TMatchingOptions : public mrpt::config::CLoadableOptions
// double fx,cx,cy,baseline;

/** Constructor */
TMatchingOptions();
TMatchingOptions() = default;

void loadFromConfigFile(
const mrpt::config::CConfigFileBase& source,
const std::string& section) override; // See base docs
void dumpToTextStream(std::ostream& out) const override; // See base docs

#define COPY_MEMBER(_m) this->_m = o._m;
#define CHECK_MEMBER(_m) this->_m == o._m

bool operator==(const TMatchingOptions& o) const
Expand All @@ -459,34 +458,6 @@ struct TMatchingOptions : public mrpt::config::CLoadableOptions
CHECK_MEMBER(rCC_TH) && CHECK_MEMBER(SAD_RATIO);
}

void operator=(const TMatchingOptions& o)
{
COPY_MEMBER(useXRestriction)
COPY_MEMBER(useDisparityLimits)
COPY_MEMBER(useEpipolarRestriction)
COPY_MEMBER(addMatches)
COPY_MEMBER(EDD_RATIO)
COPY_MEMBER(EDSD_RATIO)
COPY_MEMBER(enable_robust_1to1_match)
COPY_MEMBER(epipolar_TH)
COPY_MEMBER(estimateDepth)
COPY_MEMBER(F)
COPY_MEMBER(hasFundamentalMatrix)
COPY_MEMBER(matching_method)
COPY_MEMBER(maxDepthThreshold)
COPY_MEMBER(maxEDD_TH)
COPY_MEMBER(maxEDSD_TH)
COPY_MEMBER(maxORB_dist)
COPY_MEMBER(maxSAD_TH)
COPY_MEMBER(max_disp)
COPY_MEMBER(minCC_TH)
COPY_MEMBER(minDCC_TH)
COPY_MEMBER(min_disp)
COPY_MEMBER(parallelOpticalAxis)
COPY_MEMBER(rCC_TH)
COPY_MEMBER(SAD_RATIO)
}

}; // end struct TMatchingOptions

/** Struct containing the output after matching multi-resolution SIFT-like
Expand Down
10 changes: 0 additions & 10 deletions libs/vision/src/vision_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1889,16 +1889,6 @@ void TStereoSystemParams::dumpToTextStream(std::ostream& out) const
out << "-------------------------------------------------------- \n";
}

/*-------------------------------------------------------------
TMatchingOptions: constructor
-------------------------------------------------------------*/
TMatchingOptions::TMatchingOptions()

= default; // end constructor TMatchingOptions

/*-------------------------------------------------------------
TMatchingOptions: loadFromConfigFile
-------------------------------------------------------------*/
void TMatchingOptions::loadFromConfigFile(const CConfigFileBase& iniFile, const string& section)
{
int mm = iniFile.read_int(section.c_str(), "matching_method", matching_method);
Expand Down
2 changes: 1 addition & 1 deletion python/src/mrpt/opengl/COctreePointRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ void bind_mrpt_opengl_COctreePointRenderer(std::function< pybind11::module &(std
M("mrpt::global_settings").def("OCTREE_RENDER_MAX_DENSITY_POINTS_PER_SQPIXEL", (float (*)()) &mrpt::global_settings::OCTREE_RENDER_MAX_DENSITY_POINTS_PER_SQPIXEL, "C++: mrpt::global_settings::OCTREE_RENDER_MAX_DENSITY_POINTS_PER_SQPIXEL() --> float");

// mrpt::global_settings::OCTREE_RENDER_MAX_POINTS_PER_NODE() file:mrpt/opengl/COctreePointRenderer.h line:40
M("mrpt::global_settings").def("OCTREE_RENDER_MAX_POINTS_PER_NODE", (size_t (*)()) &mrpt::global_settings::OCTREE_RENDER_MAX_POINTS_PER_NODE, "Default value = 1e5. Maximum number of elements in each octree node before\nspliting. Affects to these classes (read their docs for further details):\n - mrpt::opengl::CPointCloud\n - mrpt::opengl::CPointCloudColoured\n \n\n\n \n\nC++: mrpt::global_settings::OCTREE_RENDER_MAX_POINTS_PER_NODE() --> size_t");
M("mrpt::global_settings").def("OCTREE_RENDER_MAX_POINTS_PER_NODE", (size_t (*)()) &mrpt::global_settings::OCTREE_RENDER_MAX_POINTS_PER_NODE, "Default value = 1e5. Maximum number of elements in each octree node before\nsplitting. Affects to these classes (read their docs for further details):\n - mrpt::opengl::CPointCloud\n - mrpt::opengl::CPointCloudColoured\n \n\n\n \n\nC++: mrpt::global_settings::OCTREE_RENDER_MAX_POINTS_PER_NODE() --> size_t");

// mrpt::global_settings::OCTREE_RENDER_MAX_POINTS_PER_NODE(size_t) file:mrpt/opengl/COctreePointRenderer.h line:41
M("mrpt::global_settings").def("OCTREE_RENDER_MAX_POINTS_PER_NODE", (void (*)(size_t)) &mrpt::global_settings::OCTREE_RENDER_MAX_POINTS_PER_NODE, "C++: mrpt::global_settings::OCTREE_RENDER_MAX_POINTS_PER_NODE(size_t) --> void", pybind11::arg("value"));
Expand Down
2 changes: 1 addition & 1 deletion python/src/mrpt/vision/chessboard_camera_calib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ void bind_mrpt_vision_chessboard_camera_calib(std::function< pybind11::module &(
M("mrpt::vision").def("computeStereoRectificationMaps", (void (*)(const class mrpt::img::TCamera &, const class mrpt::img::TCamera &, const class mrpt::poses::CPose3D &, void *, void *, void *, void *)) &mrpt::vision::computeStereoRectificationMaps, "Computes a pair of x-and-y maps for stereo rectification from a pair of\ncameras and the relative pose of the second one wrt the first one.\n \n\n cam2 [IN] The pair of involved cameras\n \n\n [IN] The change in pose of the second camera\nwrt the first one\n \n\n [OUT] The x-and-y maps corresponding to cam1\n(should be converted to *cv::Mat)\n \n\n [OUT] The x-and-y maps corresponding to cam2\n(should be converted to *cv::Mat)\n \n\n An easier to use class for stereo rectification\nmrpt::vision::CStereoRectifyMap\n\nC++: mrpt::vision::computeStereoRectificationMaps(const class mrpt::img::TCamera &, const class mrpt::img::TCamera &, const class mrpt::poses::CPose3D &, void *, void *, void *, void *) --> void", pybind11::arg("cam1"), pybind11::arg("cam2"), pybind11::arg("rightCameraPose"), pybind11::arg("outMap1x"), pybind11::arg("outMap1y"), pybind11::arg("outMap2x"), pybind11::arg("outMap2y"));

{ // mrpt::vision::CFeatureExtraction file:mrpt/vision/CFeatureExtraction.h line:71
pybind11::class_<mrpt::vision::CFeatureExtraction, std::shared_ptr<mrpt::vision::CFeatureExtraction>> cl(M("mrpt::vision"), "CFeatureExtraction", "The central class from which images can be analyzed in search of different\nkinds of interest points and descriptors computed for them.\n To extract features from an image, create an instance of\nCFeatureExtraction,\n fill out its CFeatureExtraction::options field, including the algorithm to\nuse (see\n CFeatureExtraction::TOptions::featsType), and call\nCFeatureExtraction::detectFeatures.\n This will return a set of features of the class mrpt::vision::CFeature,\nwhich include\n details for each interest point as well as the desired descriptors and/or\npatches.\n\n By default, a 21x21 patch is extracted for each detected feature. If the\npatch is not needed,\n set patchSize to 0 in CFeatureExtraction::options\n\n The implemented detection algorithms are (see\nCFeatureExtraction::TOptions::featsType):\n - KLT (Kanade-Lucas-Tomasi): A detector (no descriptor vector).\n - Harris: A detector (no descriptor vector).\n - BCD (Binary Corner Detector): A detector (no descriptor vector) (Not\nimplemented yet).\n - SIFT: An implementation of the SIFT detector and descriptor. The\nimplemention may be selected with\nCFeatureExtraction::TOptions::SIFTOptions::implementation.\n - SURF: OpenCV's implementation of SURF detector and descriptor.\n - The FAST feature detector (OpenCV's implementation)\n\n Additionally, given a list of interest points onto an image, the following\n descriptors can be computed for each point by calling\nCFeatureExtraction::computeDescriptors :\n - SIFT descriptor (Lowe's descriptors).\n - SURF descriptor (OpenCV's implementation - Requires OpenCV 1.1.0 from\nSVN\nor later).\n - Intensity-domain spin images (SpinImage): Creates a vector descriptor\nwith the 2D histogram as a single row.\n - A circular patch in polar coordinates (Polar images): The matrix\ndescriptor is a 2D polar image centered at the interest point.\n - A log-polar image patch (Log-polar images): The matrix descriptor is\nthe\n2D log-polar image centered at the interest point.\n\n \n The descriptor \"Intensity-domain spin images\" is described in \"A\nsparse texture representation using affine-invariant regions\", S Lazebnik, C\nSchmid, J Ponce, 2003 IEEE Computer Society Conference on Computer Vision.\n \n\n mrpt::vision::CFeature\n \n\n\n ");
pybind11::class_<mrpt::vision::CFeatureExtraction, std::shared_ptr<mrpt::vision::CFeatureExtraction>> cl(M("mrpt::vision"), "CFeatureExtraction", "The central class from which images can be analyzed in search of different\nkinds of interest points and descriptors computed for them.\n To extract features from an image, create an instance of\nCFeatureExtraction,\n fill out its CFeatureExtraction::options field, including the algorithm to\nuse (see\n CFeatureExtraction::TOptions::featsType), and call\nCFeatureExtraction::detectFeatures.\n This will return a set of features of the class mrpt::vision::CFeature,\nwhich include\n details for each interest point as well as the desired descriptors and/or\npatches.\n\n By default, a 21x21 patch is extracted for each detected feature. If the\npatch is not needed,\n set patchSize to 0 in CFeatureExtraction::options\n\n The implemented detection algorithms are (see\nCFeatureExtraction::TOptions::featsType):\n - KLT (Kanade-Lucas-Tomasi): A detector (no descriptor vector).\n - Harris: A detector (no descriptor vector).\n - BCD (Binary Corner Detector): A detector (no descriptor vector) (Not\nimplemented yet).\n - SIFT: An implementation of the SIFT detector and descriptor. The\nimplementation may be selected with\nCFeatureExtraction::TOptions::SIFTOptions::implementation.\n - SURF: OpenCV's implementation of SURF detector and descriptor.\n - The FAST feature detector (OpenCV's implementation)\n\n Additionally, given a list of interest points onto an image, the following\n descriptors can be computed for each point by calling\nCFeatureExtraction::computeDescriptors :\n - SIFT descriptor (Lowe's descriptors).\n - SURF descriptor (OpenCV's implementation - Requires OpenCV 1.1.0 from\nSVN\nor later).\n - Intensity-domain spin images (SpinImage): Creates a vector descriptor\nwith the 2D histogram as a single row.\n - A circular patch in polar coordinates (Polar images): The matrix\ndescriptor is a 2D polar image centered at the interest point.\n - A log-polar image patch (Log-polar images): The matrix descriptor is\nthe\n2D log-polar image centered at the interest point.\n\n \n The descriptor \"Intensity-domain spin images\" is described in \"A\nsparse texture representation using affine-invariant regions\", S Lazebnik, C\nSchmid, J Ponce, 2003 IEEE Computer Society Conference on Computer Vision.\n \n\n mrpt::vision::CFeature\n \n\n\n ");
cl.def( pybind11::init( [](){ return new mrpt::vision::CFeatureExtraction(); } ) );
cl.def( pybind11::init( [](mrpt::vision::CFeatureExtraction const &o){ return new mrpt::vision::CFeatureExtraction(o); } ) );

Expand Down
2 changes: 1 addition & 1 deletion python/src/mrpt/vision/types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,6 @@ void bind_mrpt_vision_types(std::function< pybind11::module &(std::string const
cl.def_readwrite("maxDepthThreshold", &mrpt::vision::TMatchingOptions::maxDepthThreshold);
cl.def("loadFromConfigFile", (void (mrpt::vision::TMatchingOptions::*)(const class mrpt::config::CConfigFileBase &, const std::string &)) &mrpt::vision::TMatchingOptions::loadFromConfigFile, "C++: mrpt::vision::TMatchingOptions::loadFromConfigFile(const class mrpt::config::CConfigFileBase &, const std::string &) --> void", pybind11::arg("source"), pybind11::arg("section"));
cl.def("__eq__", (bool (mrpt::vision::TMatchingOptions::*)(const struct mrpt::vision::TMatchingOptions &) const) &mrpt::vision::TMatchingOptions::operator==, "C++: mrpt::vision::TMatchingOptions::operator==(const struct mrpt::vision::TMatchingOptions &) const --> bool", pybind11::arg("o"));
cl.def("assign", (void (mrpt::vision::TMatchingOptions::*)(const struct mrpt::vision::TMatchingOptions &)) &mrpt::vision::TMatchingOptions::operator=, "C++: mrpt::vision::TMatchingOptions::operator=(const struct mrpt::vision::TMatchingOptions &) --> void", pybind11::arg("o"));
cl.def("assign", (struct mrpt::vision::TMatchingOptions & (mrpt::vision::TMatchingOptions::*)(const struct mrpt::vision::TMatchingOptions &)) &mrpt::vision::TMatchingOptions::operator=, "C++: mrpt::vision::TMatchingOptions::operator=(const struct mrpt::vision::TMatchingOptions &) --> struct mrpt::vision::TMatchingOptions &", pybind11::return_value_policy::automatic, pybind11::arg(""));
}
}
10 changes: 5 additions & 5 deletions python/src/mrpt/vision/types_1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
PYBIND11_MAKE_OPAQUE(std::shared_ptr<void>)
#endif

// mrpt::vision::TMultiResDescMatchOptions file:mrpt/vision/types.h line:518
// mrpt::vision::TMultiResDescMatchOptions file:mrpt/vision/types.h line:489
struct PyCallBack_mrpt_vision_TMultiResDescMatchOptions : public mrpt::vision::TMultiResDescMatchOptions {
using mrpt::vision::TMultiResDescMatchOptions::TMultiResDescMatchOptions;

Expand Down Expand Up @@ -56,7 +56,7 @@ struct PyCallBack_mrpt_vision_TMultiResDescMatchOptions : public mrpt::vision::T
}
};

// mrpt::vision::TMultiResDescOptions file:mrpt/vision/types.h line:603
// mrpt::vision::TMultiResDescOptions file:mrpt/vision/types.h line:574
struct PyCallBack_mrpt_vision_TMultiResDescOptions : public mrpt::vision::TMultiResDescOptions {
using mrpt::vision::TMultiResDescOptions::TMultiResDescOptions;

Expand Down Expand Up @@ -90,7 +90,7 @@ struct PyCallBack_mrpt_vision_TMultiResDescOptions : public mrpt::vision::TMulti

void bind_mrpt_vision_types_1(std::function< pybind11::module &(std::string const &namespace_) > &M)
{
{ // mrpt::vision::TMultiResMatchingOutput file:mrpt/vision/types.h line:495
{ // mrpt::vision::TMultiResMatchingOutput file:mrpt/vision/types.h line:466
pybind11::class_<mrpt::vision::TMultiResMatchingOutput, std::shared_ptr<mrpt::vision::TMultiResMatchingOutput>> cl(M("mrpt::vision"), "TMultiResMatchingOutput", "Struct containing the output after matching multi-resolution SIFT-like\n descriptors");
cl.def( pybind11::init( [](){ return new mrpt::vision::TMultiResMatchingOutput(); } ) );
cl.def( pybind11::init( [](mrpt::vision::TMultiResMatchingOutput const &o){ return new mrpt::vision::TMultiResMatchingOutput(o); } ) );
Expand All @@ -101,7 +101,7 @@ void bind_mrpt_vision_types_1(std::function< pybind11::module &(std::string cons
cl.def_readwrite("firstListDistance", &mrpt::vision::TMultiResMatchingOutput::firstListDistance);
cl.def("assign", (struct mrpt::vision::TMultiResMatchingOutput & (mrpt::vision::TMultiResMatchingOutput::*)(const struct mrpt::vision::TMultiResMatchingOutput &)) &mrpt::vision::TMultiResMatchingOutput::operator=, "C++: mrpt::vision::TMultiResMatchingOutput::operator=(const struct mrpt::vision::TMultiResMatchingOutput &) --> struct mrpt::vision::TMultiResMatchingOutput &", pybind11::return_value_policy::automatic, pybind11::arg(""));
}
{ // mrpt::vision::TMultiResDescMatchOptions file:mrpt/vision/types.h line:518
{ // mrpt::vision::TMultiResDescMatchOptions file:mrpt/vision/types.h line:489
pybind11::class_<mrpt::vision::TMultiResDescMatchOptions, std::shared_ptr<mrpt::vision::TMultiResDescMatchOptions>, PyCallBack_mrpt_vision_TMultiResDescMatchOptions, mrpt::config::CLoadableOptions> cl(M("mrpt::vision"), "TMultiResDescMatchOptions", "Struct containing the options when matching multi-resolution SIFT-like\n descriptors");
cl.def( pybind11::init( [](){ return new mrpt::vision::TMultiResDescMatchOptions(); }, [](){ return new PyCallBack_mrpt_vision_TMultiResDescMatchOptions(); } ) );
cl.def( pybind11::init<bool, double, bool, double, double, const unsigned int &, const unsigned int &, const unsigned int &, const unsigned int &, int, int, int, int, int>(), pybind11::arg("_useOriFilter"), pybind11::arg("_oriThreshold"), pybind11::arg("_useDepthFilter"), pybind11::arg("_th"), pybind11::arg("_th2"), pybind11::arg("_lwscl1"), pybind11::arg("_lwscl2"), pybind11::arg("_hwscl1"), pybind11::arg("_hwscl2"), pybind11::arg("_searchAreaSize"), pybind11::arg("_lsth"), pybind11::arg("_tsth"), pybind11::arg("_minFeaturesToFind"), pybind11::arg("_minFeaturesToBeLost") );
Expand All @@ -126,7 +126,7 @@ void bind_mrpt_vision_types_1(std::function< pybind11::module &(std::string cons
cl.def("saveToConfigFile", (void (mrpt::vision::TMultiResDescMatchOptions::*)(class mrpt::config::CConfigFileBase &, const std::string &) const) &mrpt::vision::TMultiResDescMatchOptions::saveToConfigFile, "C++: mrpt::vision::TMultiResDescMatchOptions::saveToConfigFile(class mrpt::config::CConfigFileBase &, const std::string &) const --> void", pybind11::arg("cfg"), pybind11::arg("section"));
cl.def("assign", (struct mrpt::vision::TMultiResDescMatchOptions & (mrpt::vision::TMultiResDescMatchOptions::*)(const struct mrpt::vision::TMultiResDescMatchOptions &)) &mrpt::vision::TMultiResDescMatchOptions::operator=, "C++: mrpt::vision::TMultiResDescMatchOptions::operator=(const struct mrpt::vision::TMultiResDescMatchOptions &) --> struct mrpt::vision::TMultiResDescMatchOptions &", pybind11::return_value_policy::automatic, pybind11::arg(""));
}
{ // mrpt::vision::TMultiResDescOptions file:mrpt/vision/types.h line:603
{ // mrpt::vision::TMultiResDescOptions file:mrpt/vision/types.h line:574
pybind11::class_<mrpt::vision::TMultiResDescOptions, std::shared_ptr<mrpt::vision::TMultiResDescOptions>, PyCallBack_mrpt_vision_TMultiResDescOptions, mrpt::config::CLoadableOptions> cl(M("mrpt::vision"), "TMultiResDescOptions", "Struct containing the options when computing the multi-resolution SIFT-like\n descriptors");
cl.def( pybind11::init( [](){ return new mrpt::vision::TMultiResDescOptions(); }, [](){ return new PyCallBack_mrpt_vision_TMultiResDescOptions(); } ) );
cl.def( pybind11::init( [](PyCallBack_mrpt_vision_TMultiResDescOptions const &o){ return new PyCallBack_mrpt_vision_TMultiResDescOptions(o); } ) );
Expand Down
2 changes: 1 addition & 1 deletion python/stubs-out/mrpt/pymrpt/mrpt/vision.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ class TMatchingOptions(mrpt.pymrpt.mrpt.config.CLoadableOptions):
def __init__(self, arg0: TMatchingOptions) -> None: ...
@overload
def __init__(self, arg0: TMatchingOptions) -> None: ...
def assign(self, o: TMatchingOptions) -> None: ...
def assign(self) -> TMatchingOptions: ...
@overload
def loadFromConfigFile(self, source: mrpt.pymrpt.mrpt.config.CConfigFileBase, section: str) -> None: ...
@overload
Expand Down

0 comments on commit 743f93e

Please sign in to comment.