From 90cb8ffbb5fbf91e5e0728b3b7f860458a6cbb7a Mon Sep 17 00:00:00 2001 From: Fabien Spindler Date: Wed, 26 Jun 2024 18:22:37 +0200 Subject: [PATCH] Make doxygen skip useless documentation --- .../framegrabber/grabV4l2MultiCpp11Thread.cpp | 3 ++- .../device/framegrabber/saveRealSenseData.cpp | 16 ++++++++++------ modules/core/include/visp3/core/vpIoTools.h | 5 +++-- .../core/src/camera/vpColorDepthConversion.cpp | 4 ++++ modules/core/src/tools/file/basisu_miniz.h | 4 ++++ modules/core/src/tools/histogram/vpHistogram.cpp | 2 ++ modules/detection/src/tag/vpDetectorAprilTag.cpp | 3 ++- .../visp3/imgproc/vpCircleHoughTransform.h | 2 ++ modules/io/include/visp3/io/vpImageQueue.h | 4 ++++ modules/tracker/blob/src/dots/vpDot2_freeman.cpp | 2 ++ modules/tracker/mbt/src/klt/vpMbKltTracker.cpp | 4 ++++ modules/vision/src/key-point/vpKeyPoint.cpp | 3 +++ .../src/plane-estimation/vpPlaneEstimation.cpp | 3 +++ modules/vision/src/pose-estimation/vpPose.cpp | 2 ++ .../vision/src/pose-estimation/vpPoseRansac.cpp | 3 +++ tutorial/mean-drift/tutorial-meandrift.cpp | 2 ++ .../ibvs/tutorial-ibvs-4pts-json.cpp | 8 +++++--- 17 files changed, 57 insertions(+), 13 deletions(-) diff --git a/example/device/framegrabber/grabV4l2MultiCpp11Thread.cpp b/example/device/framegrabber/grabV4l2MultiCpp11Thread.cpp index b342de21bc..30551968ca 100644 --- a/example/device/framegrabber/grabV4l2MultiCpp11Thread.cpp +++ b/example/device/framegrabber/grabV4l2MultiCpp11Thread.cpp @@ -134,6 +134,7 @@ bool getOptions(int argc, char **argv, unsigned int &deviceCount, bool &saveVide return true; } +#ifndef DOXYGEN_SHOULD_SKIP_THIS // Code adapted from the original author Dan MaĊĦek to be compatible with ViSP // image class vpFrameQueue @@ -204,7 +205,6 @@ class vpFrameQueue class vpStorageWorker { - public: vpStorageWorker(vpFrameQueue &queue, const std::string &filename, unsigned int width, unsigned int height) : m_queue(queue), m_filename(filename), m_width(width), m_height(height) @@ -430,6 +430,7 @@ void display(unsigned int width, unsigned int height, int win_x, int win_y, unsi } } // Namespace +#endif // DOXYGEN_SHOULD_SKIP_THIS int main(int argc, char *argv[]) { diff --git a/example/device/framegrabber/saveRealSenseData.cpp b/example/device/framegrabber/saveRealSenseData.cpp index 6bc764d7e7..c9d1ef30d5 100644 --- a/example/device/framegrabber/saveRealSenseData.cpp +++ b/example/device/framegrabber/saveRealSenseData.cpp @@ -254,6 +254,8 @@ bool getOptions(int argc, const char *argv[], bool &save, std::string &pattern, return true; } +#ifndef DOXYGEN_SHOULD_SKIP_THIS + // Code adapted from: https://stackoverflow.com/a/37146523 class vpFrameQueue { @@ -575,7 +577,7 @@ class vpStorageWorker } else if (m_save_pcl_npz_format) { #ifdef VISP_HAVE_MINIZ -// Write Npz headers + // Write Npz headers std::vector vec_filename(filename_point_cloud.begin(), filename_point_cloud.end()); // Null-terminated character is handled at reading // For null-terminated character handling, see: @@ -662,6 +664,8 @@ class vpStorageWorker }; } // Namespace +#endif // DOXYGEN_SHOULD_SKIP_THIS + int main(int argc, const char *argv[]) { bool save = false; @@ -935,10 +939,10 @@ int main(int argc, const char *argv[]) #else if (save_pointcloud) { ptr_pointCloud = std::make_unique>(pointCloud); - } + } save_queue.push(ptr_colorImg, ptr_depthImg, ptr_pointCloud, ptr_infraredImg); #endif - } + } double delta_time = vpTime::measureTimeMs() - start; vec_delta_time.push_back(delta_time); @@ -982,10 +986,10 @@ int main(int argc, const char *argv[]) #else if (save_pointcloud) { ptr_pointCloud = std::make_unique>(pointCloud); - } + } save_queue.push(ptr_colorImg, ptr_depthImg, ptr_pointCloud, ptr_infraredImg); #endif - } + } break; case vpMouseButton::button2: @@ -995,9 +999,9 @@ int main(int argc, const char *argv[]) quit = true; save_queue.cancel(); break; + } } } -} } double mean_vec_delta_time = vpMath::getMean(vec_delta_time); diff --git a/modules/core/include/visp3/core/vpIoTools.h b/modules/core/include/visp3/core/vpIoTools.h index d44988f20b..9d1b93be15 100644 --- a/modules/core/include/visp3/core/vpIoTools.h +++ b/modules/core/include/visp3/core/vpIoTools.h @@ -56,6 +56,8 @@ #include #if VISP_CXX_STANDARD > VISP_CXX_STANDARD_98 + +#ifndef DOXYGEN_SHOULD_SKIP_THIS namespace visp { // https://github.com/BinomialLLC/basis_universal/blob/ad9386a4a1cf2a248f7bbd45f543a7448db15267/encoder/basisu_miniz.h#L665 @@ -73,6 +75,7 @@ static inline unsigned long vp_mz_crc32(unsigned long crc, const unsigned char * } return ~crcu32; } +#endif // DOXYGEN_SHOULD_SKIP_THIS #ifdef VISP_HAVE_MINIZ namespace cnpy @@ -126,8 +129,6 @@ struct NpyArray using npz_t = std::map; VISP_EXPORT npz_t npz_load(std::string fname); - - VISP_EXPORT char BigEndianTest(); VISP_EXPORT char map_type(const std::type_info &t); template std::vector create_npy_header(const std::vector &shape); diff --git a/modules/core/src/camera/vpColorDepthConversion.cpp b/modules/core/src/camera/vpColorDepthConversion.cpp index df2adc8920..a2d8e5967d 100644 --- a/modules/core/src/camera/vpColorDepthConversion.cpp +++ b/modules/core/src/camera/vpColorDepthConversion.cpp @@ -47,6 +47,8 @@ #include BEGIN_VISP_NAMESPACE + +#ifndef DOXYGEN_SHOULD_SKIP_THIS namespace { @@ -134,6 +136,8 @@ vpColVector deproject(const vpCameraParameters &intrinsic_cam_params, const vpIm } // namespace +#endif // DOXYGEN_SHOULD_SKIP_THIS + /*! * Project color image point to depth frame. * diff --git a/modules/core/src/tools/file/basisu_miniz.h b/modules/core/src/tools/file/basisu_miniz.h index 1b3c6bac3a..96df9d5e3f 100644 --- a/modules/core/src/tools/file/basisu_miniz.h +++ b/modules/core/src/tools/file/basisu_miniz.h @@ -89,6 +89,7 @@ #define MINIZ_HAS_64BIT_REGISTERS 1 #endif +#ifndef DOXYGEN_SHOULD_SKIP_THIS namespace buminiz { @@ -598,6 +599,7 @@ mz_uint tdefl_create_comp_flags_from_zip_params(int level, int window_bits, int } // namespace buminiz +#endif // DOXYGEN_SHOULD_SKIP_THIS #endif // MINIZ_HEADER_INCLUDED // ------------------- End of Header: Implementation follows. (If you only want the header, define MINIZ_HEADER_FILE_ONLY.) @@ -607,6 +609,7 @@ mz_uint tdefl_create_comp_flags_from_zip_params(int level, int window_bits, int #include #include +#ifndef DOXYGEN_SHOULD_SKIP_THIS namespace buminiz { @@ -2419,4 +2422,5 @@ void *tdefl_write_image_to_png_file_in_memory(const void *pImage, mz_uint8 w, mz } // namespace buminiz +#endif // DOXYGEN_SHOULD_SKIP_THIS #endif // MINIZ_HEADER_FILE_ONLY diff --git a/modules/core/src/tools/histogram/vpHistogram.cpp b/modules/core/src/tools/histogram/vpHistogram.cpp index 51b4b34024..98afaa87af 100644 --- a/modules/core/src/tools/histogram/vpHistogram.cpp +++ b/modules/core/src/tools/histogram/vpHistogram.cpp @@ -50,6 +50,7 @@ BEGIN_VISP_NAMESPACE #if defined(VISP_HAVE_THREADS) #include +#ifndef DOXYGEN_SHOULD_SKIP_THIS namespace { struct vpHistogram_Param_t @@ -172,6 +173,7 @@ void computeHistogramThread(vpHistogram_Param_t *histogram_param) } } } // namespace +#endif // DOXYGEN_SHOULD_SKIP_THIS #endif bool compare_vpHistogramPeak(vpHistogramPeak first, vpHistogramPeak second); diff --git a/modules/detection/src/tag/vpDetectorAprilTag.cpp b/modules/detection/src/tag/vpDetectorAprilTag.cpp index 7d9bffd1c8..ad252963aa 100644 --- a/modules/detection/src/tag/vpDetectorAprilTag.cpp +++ b/modules/detection/src/tag/vpDetectorAprilTag.cpp @@ -831,12 +831,13 @@ class vpDetectorAprilTag::Impl zarray_t *m_detections; bool m_zAlignedWithCameraFrame; }; -#endif // DOXYGEN_SHOULD_SKIP_THIS namespace { const unsigned int def_tagThickness = 2; } +#endif // DOXYGEN_SHOULD_SKIP_THIS + vpDetectorAprilTag::vpDetectorAprilTag(const vpAprilTagFamily &tagFamily, const vpPoseEstimationMethod &poseEstimationMethod) : m_displayTag(false), m_displayTagColor(vpColor::none), m_displayTagThickness(def_tagThickness), diff --git a/modules/imgproc/include/visp3/imgproc/vpCircleHoughTransform.h b/modules/imgproc/include/visp3/imgproc/vpCircleHoughTransform.h index eae732d5f6..17e10b61be 100644 --- a/modules/imgproc/include/visp3/imgproc/vpCircleHoughTransform.h +++ b/modules/imgproc/include/visp3/imgproc/vpCircleHoughTransform.h @@ -667,6 +667,7 @@ class VISP_EXPORT vpCircleHoughTransform typedef vpCircleHoughTransformParams vpCircleHoughTransformParameters; #endif +#ifndef DOXYGEN_SHOULD_SKIP_THIS /** * \brief Data storage for the computation of the center candidates. */ @@ -675,6 +676,7 @@ class VISP_EXPORT vpCircleHoughTransform std::pair m_position; float m_votes; } vpCenterVotes; +#endif /** * \brief Construct a new vpCircleHoughTransform object with default parameters. diff --git a/modules/io/include/visp3/io/vpImageQueue.h b/modules/io/include/visp3/io/vpImageQueue.h index d7c1da9c5b..37100a0960 100644 --- a/modules/io/include/visp3/io/vpImageQueue.h +++ b/modules/io/include/visp3/io/vpImageQueue.h @@ -48,6 +48,8 @@ #include BEGIN_VISP_NAMESPACE + +#ifndef DOXYGEN_SHOULD_SKIP_THIS /*! \class vpImageQueue @@ -283,6 +285,8 @@ template class vpImageQueue bool m_directory_to_create; bool m_recording_trigger; }; + +#endif // DOXYGEN_SHOULD_SKIP_THIS END_VISP_NAMESPACE #endif #endif diff --git a/modules/tracker/blob/src/dots/vpDot2_freeman.cpp b/modules/tracker/blob/src/dots/vpDot2_freeman.cpp index 7f8554e1f4..2402681651 100644 --- a/modules/tracker/blob/src/dots/vpDot2_freeman.cpp +++ b/modules/tracker/blob/src/dots/vpDot2_freeman.cpp @@ -36,6 +36,7 @@ BEGIN_VISP_NAMESPACE +#ifndef DOXYGEN_SHOULD_SKIP_THIS namespace { /*! @@ -119,6 +120,7 @@ void computeDownLeftWithMoment(const int &u_p, const int &v_p, float &dMuv, floa } } +#endif // DOXYGEN_SHOULD_SKIP_THIS /*! Gets the list of Freeman chain code used to turn around the dot diff --git a/modules/tracker/mbt/src/klt/vpMbKltTracker.cpp b/modules/tracker/mbt/src/klt/vpMbKltTracker.cpp index 1f06395fb2..5187dde08c 100644 --- a/modules/tracker/mbt/src/klt/vpMbKltTracker.cpp +++ b/modules/tracker/mbt/src/klt/vpMbKltTracker.cpp @@ -47,6 +47,8 @@ #endif BEGIN_VISP_NAMESPACE + +#ifndef DOXYGEN_SHOULD_SKIP_THIS namespace { /*! @@ -107,6 +109,8 @@ vpMatrix homography2collineation(const vpMatrix &H, const vpCameraParameters &ca } } // namespace +#endif // DOXYGEN_SHOULD_SKIP_THIS + vpMbKltTracker::vpMbKltTracker() : cur(), c0Mo(), firstInitialisation(true), maskBorder(5), threshold_outlier(0.5), percentGood(0.6), ctTc0(), tracker(), diff --git a/modules/vision/src/key-point/vpKeyPoint.cpp b/modules/vision/src/key-point/vpKeyPoint.cpp index af463e54ef..e49545002c 100644 --- a/modules/vision/src/key-point/vpKeyPoint.cpp +++ b/modules/vision/src/key-point/vpKeyPoint.cpp @@ -45,6 +45,7 @@ BEGIN_VISP_NAMESPACE +#ifndef DOXYGEN_SHOULD_SKIP_THIS namespace { // Specific Type transformation functions @@ -64,6 +65,8 @@ inline vpImagePoint matchRansacToVpImage(const std::pair BEGIN_VISP_NAMESPACE + +#ifndef DOXYGEN_SHOULD_SKIP_THIS // Local helpers namespace { @@ -194,6 +196,7 @@ vpPlane estimatePlaneEquationSVD(const std::vector &point_cloud, vpColVe } // namespace +#endif // DOXYGEN_SHOULD_SKIP_THIS std::optional vpPlaneEstimation::estimatePlane(const vpImage &I_depth_raw, double depth_scale, const vpCameraParameters &depth_intrinsics, const vpPolygon &roi, diff --git a/modules/vision/src/pose-estimation/vpPose.cpp b/modules/vision/src/pose-estimation/vpPose.cpp index e021853c99..6bee3a938f 100644 --- a/modules/vision/src/pose-estimation/vpPose.cpp +++ b/modules/vision/src/pose-estimation/vpPose.cpp @@ -53,12 +53,14 @@ BEGIN_VISP_NAMESPACE +#ifndef DOXYGEN_SHOULD_SKIP_THIS namespace { const int def_vvsIterMax = 200; const unsigned int def_ransacNbInlier = 4; const int def_ransacMaxTrials = 1000; } +#endif // DOXYGEN_SHOULD_SKIP_THIS vpPose::vpPose() : npt(0), listP(), residual(0), m_lambda(0.9), m_dementhonSvThresh(1e-6), vvsIterMax(def_vvsIterMax), c3d(), diff --git a/modules/vision/src/pose-estimation/vpPoseRansac.cpp b/modules/vision/src/pose-estimation/vpPoseRansac.cpp index 75b65e2dea..a3641e850a 100644 --- a/modules/vision/src/pose-estimation/vpPoseRansac.cpp +++ b/modules/vision/src/pose-estimation/vpPoseRansac.cpp @@ -56,6 +56,8 @@ #define EPS 1e-6 BEGIN_VISP_NAMESPACE + +#ifndef DOXYGEN_SHOULD_SKIP_THIS namespace { // For std::map @@ -156,6 +158,7 @@ struct FindDegeneratePoint vpPoint m_pt; }; } // namespace +#endif // DOXYGEN_SHOULD_SKIP_THIS bool vpPose::vpRansacFunctor::poseRansacImpl() { diff --git a/tutorial/mean-drift/tutorial-meandrift.cpp b/tutorial/mean-drift/tutorial-meandrift.cpp index fb3b3de9e6..5d9758ae76 100644 --- a/tutorial/mean-drift/tutorial-meandrift.cpp +++ b/tutorial/mean-drift/tutorial-meandrift.cpp @@ -308,6 +308,7 @@ unsigned int meanDriftArrayToNbActivated(const bool array[vpStatisticalTestAbstr return nbActivated; } +#ifndef DOXYGEN_SHOULD_SKIP_THIS //! [Structure_Parameters] /** * \brief Structure that contains the parameters of the different algorithms. @@ -350,6 +351,7 @@ typedef struct ParametersForAlgo }ParametersForAlgo; //! [Structure_Parameters] } +#endif // DOXYGEN_SHOULD_SKIP_THIS int testOnSynthetic(const TutorialMeanDrift::TypeTest &type, const TutorialMeanDrift::ParametersForAlgo parameters, const float &mean, const float &mean_drift, const float &stdev) diff --git a/tutorial/visual-servo/ibvs/tutorial-ibvs-4pts-json.cpp b/tutorial/visual-servo/ibvs/tutorial-ibvs-4pts-json.cpp index 15e5e5a113..237f924134 100644 --- a/tutorial/visual-servo/ibvs/tutorial-ibvs-4pts-json.cpp +++ b/tutorial/visual-servo/ibvs/tutorial-ibvs-4pts-json.cpp @@ -15,6 +15,7 @@ using json = nlohmann::json; //! json namespace shortcut using namespace VISP_NAMESPACE_NAME; #endif +#ifndef DOXYGEN_SHOULD_SKIP_THIS //! [Enum] enum vpInteractionMatrixTypeSubset { @@ -30,10 +31,10 @@ NLOHMANN_JSON_SERIALIZE_ENUM(vpInteractionMatrixTypeSubset, { {CURRENT, "current"}, {DESIRED, "desired"}, {MEAN, "mean"} } -); -//! [Enum conversion] + ); + //! [Enum conversion] -//! [Arguments] + //! [Arguments] class Arguments { public: @@ -224,6 +225,7 @@ void saveResults(const ServoingExperimentData &results, const std::string &path) file.close(); } //! [write json to file] +#endif // DOXYGEN_SHOULD_SKIP_THIS int main(int argc, char *argv[]) {