diff --git a/.vscode/settings.json b/.vscode/settings.json
index 1a735c4e79..2a31aeaf5f 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -16,7 +16,7 @@
"files.associations": {
"bitset": "cpp",
"optional": "cpp",
- "*.in": "cpp",
+ "*.in": "cmake",
"cctype": "cpp",
"clocale": "cpp",
"cmath": "cpp",
@@ -109,7 +109,12 @@
"__string": "cpp",
"compare": "cpp",
"concepts": "cpp",
- "*.ipp": "cpp"
+ "*.ipp": "cpp",
+ "any": "cpp",
+ "numbers": "cpp",
+ "semaphore": "cpp",
+ "stop_token": "cpp",
+ "view": "cpp"
},
"C_Cpp.vcFormat.indent.namespaceContents": false,
"editor.formatOnSave": true,
diff --git a/ChangeLog.txt b/ChangeLog.txt
index 88b1bede12..2a6ce1e923 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -825,7 +825,7 @@ ViSP 2.9.0 (released February 18th, 2014)
. [16919] Unable to link with OpenCV 2.4.8 under Windows
. [16924] MinGW: unable to build ViSP as a shared library
. [16928] vpVideoReader is unable to find the number of the first image
- from a generic sequence of images
+ from a generic sequence of images
----------------------------------------------
ViSP 2.8.0 (released July 24th, 2013)
- New features
@@ -975,21 +975,21 @@ ViSP 2.6.2 (released July 15, 2012)
- Bug fixed
- [13536] Division by zero in vpMeLine
- [13548] ViSP-2.6.1 produces several warnings with g++ 4.4.3, a const
- is missing in vpMbtDistanceLine.h
+ is missing in vpMbtDistanceLine.h
- [13575] ViSP sporadic segmentation fault in vpMeLine
- [13625] trackMeNurbs example produce an assertion failed with MSVC:
"list iterator not incrementable"
- [13626] testXmlParser produre a Debug assertion failed with MSVC
- [13678] Cannot build all the examples if no display capability is
- available
+ available
- [13679] GDI not detected on Windows 7 (64 bit) with Visual C++ Express
- 2010
+ 2010
- [13689] Memory leaks in jpeg reader: vpImageIo::readJPEG()
- [13690] Memory leaks in NURBS tracker
- [13843] In vpPolygon, isInside() may produce a segfault and getArea()
or getCenter() give bad results
- [13850] visp-config.bat produces a non compatible msvc 2010 output
- format
+ format
- [13955] vpBasicFeature::error() is not virtual
- [13963] Under Windows, vpDisplay::getClickUp() doesn't work
- [14081] Error in vpThetaUVector when angles are near 180 deg +/- epsilon
@@ -1123,7 +1123,7 @@ ViSP 2.6.0 (released September 23rd, 2010)
- Documentation improvements
- Deprecated
. Some deprecated classes were removed: vpItifg8Grabber,
- vpEulerVector, vpSubPixel, vpRA
+ vpEulerVector, vpSubPixel, vpRA
. Deprecated functions since ViSP 2.4.4 where also removed
- Examples:
- New example calibrateTsai.cpp to show how to use the vpCalibration
@@ -1144,7 +1144,7 @@ ViSP 2.6.0 (released September 23rd, 2010)
- [10748] PThread and Win32 Conflict
- [10928] vpPlane: rayIntersection from 2 points
- [10985] In vpPlot, 2D curve plotting starts with point (0,0)
- and not with the first specified point.
+ and not with the first specified point.
----------------------------------------------
ViSP 2.4.4 (released January 8th, 2010)
@@ -1210,23 +1210,23 @@ ViSP 2.4.4-rc1 (released December 21th, 2009)
- Bug fixed
- [7638] Memory leak in all vpFeature... classes was reopened
- [7888] vpV4l2Grabber cannot acquire an image from an analog camera
- on Ubuntu 8.04 Hardy Heron
+ on Ubuntu 8.04 Hardy Heron
- [7994] vpMeLine : initialization problem for horizontal lines
- [8001] Coin and SoQt are not detected during CMake configuration
- under Fedora 10
+ under Fedora 10
- [8032] Link error with GSL while compiling HelloWorld.cpp on OSX
- [8225] Bug in the multiplication of a twist matrix (6x6) by a matrix (6xn)
- [8248] Compilation error under Windows MSCV8 if deprecated functions
- are not build
+ are not build
- [8249] Compilation error under Windows MSCV8 when building ViSP
- as a shared library (DLL)
+ as a shared library (DLL)
- [8257] Bug in vp1394TwoGrabber::resetBus()
- [8259] Segfault in vpDisplayX
- [8389] vpKltOpencv : Bug in the copy constructor
- [8493] Problem to build ViSP as a dynamic library under windows
- (Visual C++)
+ (Visual C++)
- [8495] Segmentation fault during the execution of the example
- grabDirectShow
+ grabDirectShow
- [8831] Possible bug when extracting axis/angle from theta/u vector
----------------------------------------------
ViSP 2.4.3 (released April 10th, 2009)
@@ -1243,7 +1243,7 @@ ViSP 2.4.3 (released April 10th, 2009)
- [7494] Division by 0 in vpHomography
- [7424] Coin3D version 3 not supported under Windows
- [7613] vpSimulator::getInternalImage() function yields to an infinite
- loop.
+ loop.
- [7607] vpDisplayGTK bad window positioning
- [7638] Memory leak in all vpFeature... classes
@@ -1370,15 +1370,15 @@ ViSP 2.4.2 (released March 27th, 2008)
vpServoException::notKilledProperly is launched by
vpServo::~vpServo() destructor.
- vpMatrix : Change Infinity Norm and Euclidean Norm formula to match with
- the standard matrix norms definitions.
+ the standard matrix norms definitions.
Change determinant formula for 3x3 matrices to match with
the standard determinant definition.
- vpImageConvert :
- Add IplImage to vpImage and vpImage to IplImage conversion tool.
- Add MONO16 to grey (MONO8) conversion tool.
+ Add IplImage to vpImage and vpImage to IplImage conversion tool.
+ Add MONO16 to grey (MONO8) conversion tool.
- vp1394TwoGrabber :
- Supports libdc1394-2.0.0-rc7 and libdc1394-2.0.1
- MONO16 color coding is supported
+ Supports libdc1394-2.0.0-rc7 and libdc1394-2.0.1
+ MONO16 color coding is supported
- Testing and examples:
- example/calibration/calibrate2dGrid.cpp was added
- example/tracking/trackKltOpencv.cpp was added
@@ -1399,104 +1399,104 @@ ViSP 2.4.1 (released May 16th, 2007)
- New classes
- vpRect class for rectangle manipulations, display
- vpHistogram,vpHistogramPeak and vpHistogramValey classes to
- handle gray level image histogram
- - vpSubPixel for sub-pixel manipulations
- - vpMouseButton for mouse click identification
+ handle gray level image histogram
+ - vpSubPixel for sub-pixel manipulations
+ - vpMouseButton for mouse click identification
- New Features
- MinGW supported
- - ViSP as a third party library in an other project.
- It is now possible to use ViSP as a third party project without
- installing ViSP by make install. ViSP can now be used
- directly from the build dir, or from the install dir, or
- from a package (NSIS, ...)
- - vpRobotCamera It is now possible to add a sampling time so that
- the behavior of this simulated camera is quite realistic. This
- sampling time is set by default to 40 ms.
- - vpExponentialMap A sampling time was introduced.
+ - ViSP as a third party library in an other project.
+ It is now possible to use ViSP as a third party project without
+ installing ViSP by make install. ViSP can now be used
+ directly from the build dir, or from the install dir, or
+ from a package (NSIS, ...)
+ - vpRobotCamera It is now possible to add a sampling time so that
+ the behavior of this simulated camera is quite realistic. This
+ sampling time is set by default to 40 ms.
+ - vpExponentialMap A sampling time was introduced.
- Bug fix and improvement
- - vpImage: getWidth() and getHeight() replace getCols() and getRows()
- which are now obsolete.
- - More restrictive types in vpImage, vpDisplay..., and vp...Grabber
- classes: const are added, unsigned int replace int for pixel
- manipulations and image or display size.
- - In vpDisplay classes:
- . vpMouseButton::vpMouseButtonType was introduced to handle
- mouse clicks
- . vpColor::vpColorType was introduced to handle colors to display
- - Simulator functionality based on Coin usage is now available
- under windows. It allows the use of vpSimulator class under this
- platform.
- - Compatibility with Windows platform.
- - Reference documentation improvement
- - cfox and std namespace were removed. To use cout you need to call
- std::cout, std::endl, std::cin ...
+ - vpImage: getWidth() and getHeight() replace getCols() and getRows()
+ which are now obsolete.
+ - More restrictive types in vpImage, vpDisplay..., and vp...Grabber
+ classes: const are added, unsigned int replace int for pixel
+ manipulations and image or display size.
+ - In vpDisplay classes:
+ . vpMouseButton::vpMouseButtonType was introduced to handle
+ mouse clicks
+ . vpColor::vpColorType was introduced to handle colors to display
+ - Simulator functionality based on Coin usage is now available
+ under windows. It allows the use of vpSimulator class under this
+ platform.
+ - Compatibility with Windows platform.
+ - Reference documentation improvement
+ - cfox and std namespace were removed. To use cout you need to call
+ std::cout, std::endl, std::cin ...
----------------------------------------------
ViSP 2.4.0 (released February 6th, 2007)
- New Feature
- - add new framegrabber interface for itifg8 driver from Coreco
- Imaging Technology (http://sourceforge.net/projects/itifg)
- Tested with AM-STD COMP framegrabber board on 2.4 and 2.6
- linux kernel (see vpItifg8Grabber).
- - add new framegrabber interface and test for firewire 1394
- cameras using libdc1394-2.x. Need a newer version than
- libdc1394-2.0.0-rc4.
- Tested with the svn version of libdc1394-2 and Marlin F033C and
- F131B cameras (see vp1394TwoGrabber). Format 7 is supported
- in vp1394TwoGrabber.
- vp1394Grabber will be obsolete soon.
+ - add new framegrabber interface for itifg8 driver from Coreco
+ Imaging Technology (http://sourceforge.net/projects/itifg)
+ Tested with AM-STD COMP framegrabber board on 2.4 and 2.6
+ linux kernel (see vpItifg8Grabber).
+ - add new framegrabber interface and test for firewire 1394
+ cameras using libdc1394-2.x. Need a newer version than
+ libdc1394-2.0.0-rc4.
+ Tested with the svn version of libdc1394-2 and Marlin F033C and
+ F131B cameras (see vp1394TwoGrabber). Format 7 is supported
+ in vp1394TwoGrabber.
+ vp1394Grabber will be obsolete soon.
- Bug fix and improvement
- - tests and examples
- - Video For Linux Two grabber (see vpV4l2Grabber)
- - memory leaks suppression
- - works fully under windows
- - doxygen documentation
+ - tests and examples
+ - Video For Linux Two grabber (see vpV4l2Grabber)
+ - memory leaks suppression
+ - works fully under windows
+ - doxygen documentation
----------------------------------------------
ViSP 2.2.0 (released August 25th, 2006)
- Build
- - To increase the code portability, especially under windows),
- all the build process is now based on CMake
- (see http://www.cmake.org).
- - Supported platforms:
- Linux, Mac OSX, SunOS: g++ 2.95.3, 2.96, 3.3.x, 3.4.x, 4.1.0)
- Windows: MSVC7 (2003.NET), MSVC8 (2005)
- - Suppression of autotools support (configure)
- - Allows shared library building (.so and .dll)
+ - To increase the code portability, especially under windows),
+ all the build process is now based on CMake
+ (see http://www.cmake.org).
+ - Supported platforms:
+ Linux, Mac OSX, SunOS: g++ 2.95.3, 2.96, 3.3.x, 3.4.x, 4.1.0)
+ Windows: MSVC7 (2003.NET), MSVC8 (2005)
+ - Suppression of autotools support (configure)
+ - Allows shared library building (.so and .dll)
- New Feature
- - add control for Traclabs biclops pan-tilt head
- - add control for Directed Perception ptu-46 pan-tilt head
- - add vpDisplayGTK display under Windows
- - add vpDirectShowGrabber framegrabber under Windows
- - add vpDisplayGDI display under windows
+ - add control for Traclabs biclops pan-tilt head
+ - add control for Directed Perception ptu-46 pan-tilt head
+ - add vpDisplayGTK display under Windows
+ - add vpDirectShowGrabber framegrabber under Windows
+ - add vpDisplayGDI display under windows
- Bug fix and improvement
- - vp1394Grabber settings (format, mode, framerate, shutter, gain)
- - vpDot (Moment computation)
- - some fixes in vpDisplayGTK
+ - vp1394Grabber settings (format, mode, framerate, shutter, gain)
+ - vpDot (Moment computation)
+ - some fixes in vpDisplayGTK
----------------------------------------------
ViSP 2.1.1 (released January 6th, 2006)
- - New examples
- - create an example directory
- - add vpDotExample.cpp
- - add vpDot2Example.cpp
- - add vpPoseExample.cpp
- - add 2D0.5.VisualServoingSimulation.cpp
+ - New examples
+ - create an example directory
+ - add vpDotExample.cpp
+ - add vpDot2Example.cpp
+ - add vpPoseExample.cpp
+ - add 2D0.5.VisualServoingSimulation.cpp
- New Feature
- - add this ChangleLog file
- - add a vpDisplayGTK class with the GTK2+ window system
- - new member function in vpDisplay (_uv)
- - add function getInteractionMatrix() in vpGenericFeature
+ - add this ChangleLog file
+ - add a vpDisplayGTK class with the GTK2+ window system
+ - new member function in vpDisplay (_uv)
+ - add function getInteractionMatrix() in vpGenericFeature
- Specification modifications
- - change the vpDot and vpDot2 specifications
- - supress demo directory
+ - change the vpDot and vpDot2 specifications
+ - supress demo directory
- Bug fix and improvement
- - add a runtime warning when vpGenericFeature is not correctly used
- - comment in english in vpDisplayX
- - suppress a trace in vpPoseVirtualVisualServoing.cpp
- - directory.mk : add -p option to mkdir
- - improve XP compatibility
- - in vp1394Grabber, latency and memory leaks suppression
+ - add a runtime warning when vpGenericFeature is not correctly used
+ - comment in english in vpDisplayX
+ - suppress a trace in vpPoseVirtualVisualServoing.cpp
+ - directory.mk : add -p option to mkdir
+ - improve XP compatibility
+ - in vp1394Grabber, latency and memory leaks suppression
- WWW
- add an image sequence to download on the www site cube.tar.gz
diff --git a/LICENSE.txt b/LICENSE.txt
index 7dc01a39fb..06f4de5e7d 100644
--- a/LICENSE.txt
+++ b/LICENSE.txt
@@ -1,4 +1,4 @@
- GNU GENERAL PUBLIC LICENSE
+ GNU GENERAL PUBLIC LICENSE
Version 2 or (at your option) any later version, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
@@ -6,7 +6,7 @@
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
- Preamble
+ Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
@@ -56,7 +56,7 @@ patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
- GNU GENERAL PUBLIC LICENSE
+ GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
@@ -255,7 +255,7 @@ make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
- NO WARRANTY
+ NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
@@ -277,9 +277,9 @@ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
- END OF TERMS AND CONDITIONS
+ END OF TERMS AND CONDITIONS
- How to Apply These Terms to Your New Programs
+ How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
diff --git a/cmake/VISPGenerateConfigScript.cmake b/cmake/VISPGenerateConfigScript.cmake
index 45f33e7285..c55a219a4c 100644
--- a/cmake/VISPGenerateConfigScript.cmake
+++ b/cmake/VISPGenerateConfigScript.cmake
@@ -67,7 +67,7 @@ macro(fix_prefix lst isown)
list(APPEND _lst "${item}")
elseif(item MATCHES "^-framework") # MacOS framework (assume single entry "-framework OpenCL")
list(APPEND _lst "${item}")
- elseif(item MATCHES "^-") #could be "-pthread" (occured with Ubuntu 18.04)
+ elseif(item MATCHES "^-") #could be "-pthread" (occurred with Ubuntu 18.04)
list(APPEND _lst "${item}")
elseif(item MATCHES ".framework/" OR item MATCHES "/([^/]+)\\.framework$")
vp_get_framework(_fmk_name "${item}" NAME)
@@ -180,6 +180,8 @@ if(NOT DEFINED CMAKE_HELPER_SCRIPT)
VISP_RUNTIME
VISP_HAVE_OPENMP
+ WITH_CATCH2
+
FILE_VISP_SCRIPT_CONFIG
FILE_VISP_SCRIPT_CONFIG_INSTALL
FILE_VISP_SCRIPT_PC_INSTALL
@@ -272,11 +274,15 @@ else() # DEFINED CMAKE_HELPER_SCRIPT
"${_includes_modules}"
"${_includes_extra}")
+ if(WITH_CATCH2)
+ list(APPEND VISP_SONARQUBE_INCLUDE_DIRS "${VISP_SOURCE_DIR}/3rdparty/catch2")
+ endif()
+
vp_list_replace_separator(VISP_SONARQUBE_INCLUDE_DIRS ", ")
configure_file("${VISP_SOURCE_DIR}/cmake/templates/sonar-project.properties.in"
"${VISP_BINARY_DIR}/sonar-project.properties"
- @ONLY )
+ @ONLY)
#######################################################################
#
diff --git a/cmake/templates/sonar-project.properties.in b/cmake/templates/sonar-project.properties.in
index 63b33bfb59..f2881e205d 100644
--- a/cmake/templates/sonar-project.properties.in
+++ b/cmake/templates/sonar-project.properties.in
@@ -7,15 +7,14 @@ sonar.projectKey=rainbow:visp:master
# Project description
sonar.projectName=rainbow:visp:master
# Used to compare metrics with v1.10 for example
-sonar.projectVersion=3.2
+sonar.projectVersion=@VISP_VERSION@
# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
sonar.sources=@VISP_SOURCE_DIR@
sonar.projectBaseDir=@VISP_SOURCE_DIR@
-sonar.exclusions=3rdparty/**/*,cmake/**/*,platforms/**/*,doc/**/*,modules/**/*.txt,modules/**/*.py,modules/java/**/*,tutorial/java/**/*,**/arms/*,**/scene/*
+sonar.exclusions=codecov.yml,appveyor.yml,3rdparty/**/*,cmake/**/*,doc/**/*,modules/**/*.txt,modules/**/*.py,modules/core/src/image/private/stb_truetype.h,platforms/**/*,script/**/*,**/arms/*,**/scene/*,**/*.pb,**/*.pbtxt,**/*.skeleton,**/*.exr,**/*.FCStd,**/*.blend,**/*.mesh,**/*.pfm,**/*.sb2,**/*.java,ci/**/*
# Source code language
sonar.language=c++
sonar.cxx.includeDirectories=@VISP_SONARQUBE_INCLUDE_DIRS@
-# Empty c lang patterns to avoid error:
-# "Language of file '*.h' can not be decided as the file matches patterns of both
-# sonar.lang.patterns.c++ and sonar.lang.patterns.c"
-sonar.lang.patterns.c=""
+sonar.cxx.file.suffixes=.cxx,.cpp,.cc,.c,.hxx,.hpp,.hh,.h
+sonar.cxx.defines=VISP_EXPORT \n\
+ DOXYGEN_SHOULD_SKIP_THIS \n\
diff --git a/doc/tutorial/visual-servo/tutorial-franka-pbvs.dox b/doc/tutorial/visual-servo/tutorial-franka-pbvs.dox
index f8d080a448..9d3a4c6e4f 100644
--- a/doc/tutorial/visual-servo/tutorial-franka-pbvs.dox
+++ b/doc/tutorial/visual-servo/tutorial-franka-pbvs.dox
@@ -309,7 +309,7 @@ Franka network exception: libfranka: Connection to FCI refused. Please install F
Check if you are connected to the Franka robot or if you specified the right IP using --ip command line option set by default to 192.168.1.1.
\endverbatim
-This error occured with our robot after upgrading the Franka system from 4.0.2 to 4.2.2 version.
+This error occurred with our robot after upgrading the Franka system from 4.0.2 to 4.2.2 version.
\image html img-franka-system-version.jpg The Dashboard shows that after a synchonization using Franka World, our System version is 4.2.2.
diff --git a/doc/tutorial/visual-servo/tutorial-pixhawk-vs.dox b/doc/tutorial/visual-servo/tutorial-pixhawk-vs.dox
index 50b9a292c4..a34dd17df7 100644
--- a/doc/tutorial/visual-servo/tutorial-pixhawk-vs.dox
+++ b/doc/tutorial/visual-servo/tutorial-pixhawk-vs.dox
@@ -97,7 +97,7 @@ it will enable vpRobotMavlink usage.
When using PX4, it is important to install [QGroundControl](http://qgroundcontrol.com/) (QGC) following instructions
[here](https://docs.qgroundcontrol.com/master/en/getting_started/download_and_install.html).
- \note When launching `QGroundControl` if you experience the following error (occured with Ubuntu 22.04):
+ \note When launching `QGroundControl` if you experience the following error (occurred with Ubuntu 22.04):
\verbatim
$ ./QGroundControl.AppImage
dlopen(): error loading libfuse.so.2
diff --git a/example/device/display/displayD3D.cpp b/example/device/display/displayD3D.cpp
index 987d01b79c..934b2cf5ae 100644
--- a/example/device/display/displayD3D.cpp
+++ b/example/device/display/displayD3D.cpp
@@ -88,7 +88,7 @@ the image and the overlayed features in an image on the disk\n\
\n\
SYNOPSIS\n\
%s [-i ] [-o ]\n\
- [-c] [-d] [-h]\n \
+ [-c] [-d] [-h]\n \
",
name);
diff --git a/example/device/display/displayGDI.cpp b/example/device/display/displayGDI.cpp
index fcfa04e8b3..17bebbd21f 100644
--- a/example/device/display/displayGDI.cpp
+++ b/example/device/display/displayGDI.cpp
@@ -89,7 +89,7 @@ the image and the overlayed features in an image on the disk\n\
\n\
SYNOPSIS\n\
%s [-i ] [-o ]\n\
- [-c] [-d] [-h]\n \
+ [-c] [-d] [-h]\n \
",
name);
diff --git a/example/device/display/displayGTK.cpp b/example/device/display/displayGTK.cpp
index 7cbcb9132c..a80883c498 100644
--- a/example/device/display/displayGTK.cpp
+++ b/example/device/display/displayGTK.cpp
@@ -90,7 +90,7 @@ the image and the overlayed features in an image on the disk\n\
\n\
SYNOPSIS\n\
%s [-i ] [-o ]\n\
- [-c] [-d] [-h]\n \
+ [-c] [-d] [-h]\n \
",
name);
diff --git a/example/device/display/displayOpenCV.cpp b/example/device/display/displayOpenCV.cpp
index 83c37f289b..a0968ada52 100644
--- a/example/device/display/displayOpenCV.cpp
+++ b/example/device/display/displayOpenCV.cpp
@@ -88,7 +88,7 @@ the image and the overlayed features in an image on the disk.\n\
\n\
SYNOPSIS\n\
%s [-i ] [-o ]\n\
- [-c] [-d] [-h]\n \
+ [-c] [-d] [-h]\n \
",
name);
diff --git a/example/device/display/displayX.cpp b/example/device/display/displayX.cpp
index 5ccf902cac..595c794d3a 100644
--- a/example/device/display/displayX.cpp
+++ b/example/device/display/displayX.cpp
@@ -86,7 +86,7 @@ the image and the overlayed features in an image on the disk.\n\
\n\
SYNOPSIS\n\
%s [-i ] [-o ]\n\
- [-c] [-d] [-h]\n \
+ [-c] [-d] [-h]\n \
",
name);
diff --git a/example/device/display/displayXMulti.cpp b/example/device/display/displayXMulti.cpp
index 2df1e2fe37..0981c574f6 100644
--- a/example/device/display/displayXMulti.cpp
+++ b/example/device/display/displayXMulti.cpp
@@ -89,7 +89,7 @@ the image and the overlayed features in an image on the disk.\n\
\n\
SYNOPSIS\n\
%s [-i ] [-o ]\n\
- [-c] [-d] [-h]\n \
+ [-c] [-d] [-h]\n\
",
name);
diff --git a/example/device/framegrabber/grabDirectShowMulti.cpp b/example/device/framegrabber/grabDirectShowMulti.cpp
index 3a916f12c1..6fb595223f 100644
--- a/example/device/framegrabber/grabDirectShowMulti.cpp
+++ b/example/device/framegrabber/grabDirectShowMulti.cpp
@@ -60,7 +60,6 @@
#include
// List of allowed command line options
-// #define GETOPTARGS "dhn:o:"
#define GETOPTARGS "c:df:hmn:io:st:?"
#define GRAB_COLOR
diff --git a/example/device/laserscanner/SickLDMRS-Process.cpp b/example/device/laserscanner/SickLDMRS-Process.cpp
index 85ab22eb25..188424f736 100644
--- a/example/device/laserscanner/SickLDMRS-Process.cpp
+++ b/example/device/laserscanner/SickLDMRS-Process.cpp
@@ -142,9 +142,6 @@ void *laser_display_and_save_loop(void *)
pthread_mutex_unlock(&shm_mutex);
#endif
- // std::cout << "laser start timestamp "
- // << laserscan[0].getStartTimestamp() - time_offset << std::endl;
-
// Parse the four layers
for (int layer = 0; layer < 4; layer++) {
if (!((0x1 << layer) & layerToDisplay)) {
@@ -172,8 +169,6 @@ void *laser_display_and_save_loop(void *)
vpImagePoint E; // Beam echo
double resolution = 5; // 100 pixels = 1 meter - increase this value to
// see better near info
- // std::cout << "display layer " << layer << " nb points: "
- // << pointsLayer.size() << std::endl;
for (unsigned int i = 0; i < pointsLayer.size(); i++) {
p = pointsLayer[i];
E.set_i(height - resolution * p.getRadialDist() * cos(p.getHAngle()));
diff --git a/example/device/light/ringLight.cpp b/example/device/light/ringLight.cpp
index 39d96bd374..955a58ace0 100644
--- a/example/device/light/ringLight.cpp
+++ b/example/device/light/ringLight.cpp
@@ -75,7 +75,7 @@ during %d s.\n\
By default, that means without parameters, send a pulse which duration\n\
is fixed by the harware. To control the duration of the pulse, use \n\
\"-t \" option. To turn on the light permanently, \n\
-use \"-o -n ]\"\n \
+use \"-o -n ]\"\n\
\n\
SYNOPSIS\n\
%s [-o] [-n ] [-t ] [-h]\n\
diff --git a/example/direct-visual-servoing/photometricVisualServoingWithoutVpServo.cpp b/example/direct-visual-servoing/photometricVisualServoingWithoutVpServo.cpp
index 0c178012f8..31e590054c 100644
--- a/example/direct-visual-servoing/photometricVisualServoingWithoutVpServo.cpp
+++ b/example/direct-visual-servoing/photometricVisualServoingWithoutVpServo.cpp
@@ -392,7 +392,7 @@ int main(int argc, const char **argv)
vpColVector v; // camera velocity send to the robot
// ----------------------------------------------------------
- // Minimisation
+ // minimization
double mu; // mu = 0 : Gauss Newton ; mu != 0 : LM
double lambdaGN;
@@ -453,7 +453,7 @@ int main(int argc, const char **argv)
{
H = ((mu * diagHsd) + Hsd).inverseByLU();
}
- // compute the control law
+ // Compute the control law
e = H * Lsd.t() * error;
v = -lambda * e;
diff --git a/example/image/imageDiskRW.cpp b/example/image/imageDiskRW.cpp
index b8325bbb74..10af918a45 100644
--- a/example/image/imageDiskRW.cpp
+++ b/example/image/imageDiskRW.cpp
@@ -79,7 +79,7 @@ Read and write PGM images on the disk. Also test exceptions.\n\
\n\
SYNOPSIS\n\
%s [-i ] [-o ]\n\
- [-h]\n \
+ [-h]\n\
",
name);
diff --git a/example/manual/ogre/HelloWorldOgre.cpp b/example/manual/ogre/HelloWorldOgre.cpp
index 9ab0a164a0..96eba8cf33 100644
--- a/example/manual/ogre/HelloWorldOgre.cpp
+++ b/example/manual/ogre/HelloWorldOgre.cpp
@@ -109,7 +109,7 @@ int main()
// Create a basic scene
// -----------------------------------
- // Loading things
+ // Loading things
// -----------------------------------
// As you will see in section 5, our
// application knows locations where
diff --git a/example/ogre-simulator/AROgre.cpp b/example/ogre-simulator/AROgre.cpp
index 0fef65564f..2ba72b250c 100644
--- a/example/ogre-simulator/AROgre.cpp
+++ b/example/ogre-simulator/AROgre.cpp
@@ -510,13 +510,12 @@ void computeInitialPose(vpCameraParameters *mcam, vpImage &I, vpP
}
// compute the initial pose using Dementhon method followed by a non linear
- // minimisation method
+ // minimization method
// Compute initial pose
mPose->computePose(vpPose::DEMENTHON_LAGRANGE_VIRTUAL_VS, *cMo);
- // Display breifly just to have a glimpse a the ViSP pose
- // while(cpt<500){
+ // Display briefly just to have a glimpse a the ViSP pose
if (opt_display) {
// Display the computed pose
mPose->display(I, *cMo, *mcam, 0.05, vpColor::red);
diff --git a/example/ogre-simulator/AROgreBasic.cpp b/example/ogre-simulator/AROgreBasic.cpp
index cd5313a0ed..17ecd07bbe 100644
--- a/example/ogre-simulator/AROgreBasic.cpp
+++ b/example/ogre-simulator/AROgreBasic.cpp
@@ -376,13 +376,12 @@ void computeInitialPose(vpCameraParameters *mcam, vpImage &I, vpP
}
// compute the initial pose using Dementhon method followed by a non linear
- // minimisation method
+ // minimization method
// Compute initial pose
mPose->computePose(vpPose::DEMENTHON_LAGRANGE_VIRTUAL_VS, *cMo);
- // Display breifly just to have a glimpse a the ViSP pose
- // while(cpt<500){
+ // Display briefly just to have a glimpse a the ViSP pose
if (opt_display) {
// Display the computed pose
mPose->display(I, *cMo, *mcam, 0.05, vpColor::red);
@@ -449,14 +448,7 @@ int main(int argc, const char **argv)
return EXIT_FAILURE;
}
- // Declare an image, this is a gray level image (unsigned char)
- // it size is not defined yet, it will be defined when the image will
- // read on the disk
- // vpImage I ;
-
- // unsigned iter = 0;
std::ostringstream s;
- // char cfilename[FILENAME_MAX];
if (opt_ppath.empty()) {
// Set the path location of the image sequence
diff --git a/example/pose-estimation/poseVirtualVS.cpp b/example/pose-estimation/poseVirtualVS.cpp
index 1a4f275a9f..728e2156f9 100644
--- a/example/pose-estimation/poseVirtualVS.cpp
+++ b/example/pose-estimation/poseVirtualVS.cpp
@@ -510,7 +510,7 @@ int main(int argc, const char **argv)
}
// compute the initial pose using Dementhon method followed by a non
- // linear minimisation method
+ // linear minimization method
// Pose by Dementhon or Lagrange provides an initialization of the non linear virtual visual-servoing pose estimation
pose.computePose(vpPose::DEMENTHON_LAGRANGE_VIRTUAL_VS, cMo);
diff --git a/example/robot-simulator/camera/CMakeLists.txt b/example/robot-simulator/camera/CMakeLists.txt
index 58fb4410f7..f5182b886f 100644
--- a/example/robot-simulator/camera/CMakeLists.txt
+++ b/example/robot-simulator/camera/CMakeLists.txt
@@ -104,24 +104,24 @@ foreach(cpp ${example_cpp})
endforeach()
# Add test
-add_test(servoSimu3D_cdMc_CamVelocity servoSimu3D_cdMc_CamVelocity )
-add_test(servoSimu3D_cdMc_CamVelocityWithoutVpServo servoSimu3D_cdMc_CamVelocityWithoutVpServo )
-add_test(servoSimu3D_cMcd_CamVelocity servoSimu3D_cMcd_CamVelocity )
-add_test(servoSimu3D_cMcd_CamVelocityWithoutVpServo servoSimu3D_cMcd_CamVelocityWithoutVpServo )
-add_test(servoSimuCircle2DCamVelocity servoSimuCircle2DCamVelocity )
-add_test(servoSimuCircle2DCamVelocityDisplay servoSimuCircle2DCamVelocityDisplay -c ${OPTION_TO_DESACTIVE_DISPLAY} )
-add_test(servoSimuCylinder2DCamVelocityDisplay servoSimuCylinder2DCamVelocityDisplay -c ${OPTION_TO_DESACTIVE_DISPLAY} )
-add_test(servoSimuFourPoints2DCamVelocity servoSimuFourPoints2DCamVelocity )
-add_test(servoSimuFourPoints2DCamVelocityDisplay servoSimuFourPoints2DCamVelocityDisplay -c ${OPTION_TO_DESACTIVE_DISPLAY} )
-add_test(servoSimuLine2DCamVelocityDisplay servoSimuLine2DCamVelocityDisplay -c ${OPTION_TO_DESACTIVE_DISPLAY} )
-add_test(servoSimuPoint2DCamVelocity1 servoSimuPoint2DCamVelocity1 )
-add_test(servoSimuPoint2DCamVelocity2 servoSimuPoint2DCamVelocity2 )
-add_test(servoSimuPoint2DCamVelocity3 servoSimuPoint2DCamVelocity3 )
-add_test(servoSimuPoint2DhalfCamVelocity1 servoSimuPoint2DhalfCamVelocity1 )
-add_test(servoSimuPoint2DhalfCamVelocity2 servoSimuPoint2DhalfCamVelocity2 )
-add_test(servoSimuPoint2DhalfCamVelocity3 servoSimuPoint2DhalfCamVelocity3 )
-add_test(servoSimuPoint3DCamVelocity servoSimuPoint3DCamVelocity )
-add_test(servoSimuSphere2DCamVelocity servoSimuSphere2DCamVelocity )
-add_test(servoSimuSphere2DCamVelocityDisplay servoSimuSphere2DCamVelocityDisplay -c ${OPTION_TO_DESACTIVE_DISPLAY} )
-add_test(servoSimuSphere2DCamVelocityDisplaySecondaryTask servoSimuSphere2DCamVelocityDisplaySecondaryTask -c ${OPTION_TO_DESACTIVE_DISPLAY} )
-add_test(servoSimuThetaUCamVelocity servoSimuThetaUCamVelocity )
+add_test(servoSimu3D_cdMc_CamVelocity servoSimu3D_cdMc_CamVelocity)
+add_test(servoSimu3D_cdMc_CamVelocityWithoutVpServo servoSimu3D_cdMc_CamVelocityWithoutVpServo)
+add_test(servoSimu3D_cMcd_CamVelocity servoSimu3D_cMcd_CamVelocity)
+add_test(servoSimu3D_cMcd_CamVelocityWithoutVpServo servoSimu3D_cMcd_CamVelocityWithoutVpServo)
+add_test(servoSimuCircle2DCamVelocity servoSimuCircle2DCamVelocity)
+add_test(servoSimuCircle2DCamVelocityDisplay servoSimuCircle2DCamVelocityDisplay -c ${OPTION_TO_DESACTIVE_DISPLAY})
+add_test(servoSimuCylinder2DCamVelocityDisplay servoSimuCylinder2DCamVelocityDisplay -c ${OPTION_TO_DESACTIVE_DISPLAY})
+add_test(servoSimuFourPoints2DCamVelocity servoSimuFourPoints2DCamVelocity)
+add_test(servoSimuFourPoints2DCamVelocityDisplay servoSimuFourPoints2DCamVelocityDisplay -c ${OPTION_TO_DESACTIVE_DISPLAY})
+add_test(servoSimuLine2DCamVelocityDisplay servoSimuLine2DCamVelocityDisplay -c ${OPTION_TO_DESACTIVE_DISPLAY} )
+add_test(servoSimuPoint2DCamVelocity1 servoSimuPoint2DCamVelocity1)
+add_test(servoSimuPoint2DCamVelocity2 servoSimuPoint2DCamVelocity2)
+add_test(servoSimuPoint2DCamVelocity3 servoSimuPoint2DCamVelocity3)
+add_test(servoSimuPoint2DhalfCamVelocity1 servoSimuPoint2DhalfCamVelocity1)
+add_test(servoSimuPoint2DhalfCamVelocity2 servoSimuPoint2DhalfCamVelocity2)
+add_test(servoSimuPoint2DhalfCamVelocity3 servoSimuPoint2DhalfCamVelocity3)
+add_test(servoSimuPoint3DCamVelocity servoSimuPoint3DCamVelocity)
+add_test(servoSimuSphere2DCamVelocity servoSimuSphere2DCamVelocity)
+add_test(servoSimuSphere2DCamVelocityDisplay servoSimuSphere2DCamVelocityDisplay -c ${OPTION_TO_DESACTIVE_DISPLAY})
+add_test(servoSimuSphere2DCamVelocityDisplaySecondaryTask servoSimuSphere2DCamVelocityDisplaySecondaryTask -c ${OPTION_TO_DESACTIVE_DISPLAY})
+add_test(servoSimuThetaUCamVelocity servoSimuThetaUCamVelocity)
diff --git a/example/servo-afma4/moveAfma4.cpp b/example/servo-afma4/moveAfma4.cpp
index 387b50aa0e..ad8444e67e 100644
--- a/example/servo-afma4/moveAfma4.cpp
+++ b/example/servo-afma4/moveAfma4.cpp
@@ -75,10 +75,10 @@ void usage(const char *name, const char *badparam)
{
fprintf(stdout, "\n\
Example of a positioning control followed by a velocity control \n\
-of the Afma4 robot.\n \
+of the Afma4 robot.\n\
\n\
SYNOPSIS\n\
- %s [-m] [-h]\n \
+ %s [-m] [-h]\n\
",
name);
diff --git a/example/servo-afma6/servoAfma6FourPoints2DArtVelocity.cpp b/example/servo-afma6/servoAfma6FourPoints2DArtVelocity.cpp
index b40a669092..4a35a880f5 100644
--- a/example/servo-afma6/servoAfma6FourPoints2DArtVelocity.cpp
+++ b/example/servo-afma6/servoAfma6FourPoints2DArtVelocity.cpp
@@ -301,9 +301,6 @@ int main()
// Flush the display
vpDisplay::flush(I);
-
- // vpTRACE("\t\t || s - s* || = %f ", ( task.getError()
- //).sumSquare()) ;
}
vpTRACE("Display task information ");
diff --git a/example/servo-afma6/servoAfma6MegaposePBVS.cpp b/example/servo-afma6/servoAfma6MegaposePBVS.cpp
index aa6a53ff7f..25530a7f6d 100644
--- a/example/servo-afma6/servoAfma6MegaposePBVS.cpp
+++ b/example/servo-afma6/servoAfma6MegaposePBVS.cpp
@@ -86,7 +86,7 @@
#include
#ifdef VISP_HAVE_NLOHMANN_JSON
-using json = nlohmann::json;
+using json = nlohmann::json; //! json namespace shortcut
#endif
std::optional detectObjectForInitMegaposeClick(const vpImage &I)
diff --git a/example/servo-afma6/servoAfma6Points2DCamVelocityEyeToHand.cpp b/example/servo-afma6/servoAfma6Points2DCamVelocityEyeToHand.cpp
index 1ee88cadf4..1c07b79024 100644
--- a/example/servo-afma6/servoAfma6Points2DCamVelocityEyeToHand.cpp
+++ b/example/servo-afma6/servoAfma6Points2DCamVelocityEyeToHand.cpp
@@ -176,7 +176,7 @@ int main()
}
// compute the initial pose using Dementhon method followed by a non
- // linear minimisation method
+ // linear minimization method
pose.computePose(vpPose::DEMENTHON_LAGRANGE_VIRTUAL_VS, cMo);
std::cout << cMo << std::endl;
@@ -286,7 +286,7 @@ int main()
exit(1);
}
- // compute the initial pose using a non linear minimisation method
+ // compute the initial pose using a non linear minimization method
pose.clearPoint();
for (i = 0; i < nbPoint; i++) {
diff --git a/example/servo-biclops/moveBiclops.cpp b/example/servo-biclops/moveBiclops.cpp
index 3529ef1c1f..245afa21b1 100644
--- a/example/servo-biclops/moveBiclops.cpp
+++ b/example/servo-biclops/moveBiclops.cpp
@@ -78,7 +78,7 @@ void usage(const char *name, const char *badparam, std::string conf)
Move the biclops robot\n\
\n\
SYNOPSIS\n\
- %s [-c ] [-h]\n \
+ %s [-c ] [-h]\n\
",
name);
diff --git a/example/servo-biclops/servoBiclopsPoint2DArtVelocity.cpp b/example/servo-biclops/servoBiclopsPoint2DArtVelocity.cpp
index 162c3c3218..7cf6e1cce1 100644
--- a/example/servo-biclops/servoBiclopsPoint2DArtVelocity.cpp
+++ b/example/servo-biclops/servoBiclopsPoint2DArtVelocity.cpp
@@ -377,9 +377,6 @@ int main(int argc, const char **argv)
dot.track(I);
- // vpDisplay::displayCross(I,(int)dot.I(), (int)dot.J(),
- // 10,vpColor::green) ;
-
vpFeatureBuilder::create(p, cam, dot);
// get the jacobian
diff --git a/example/servo-ptu46/servoPtu46Point2DArtVelocity.cpp b/example/servo-ptu46/servoPtu46Point2DArtVelocity.cpp
index d71a1a0fec..def4c02299 100644
--- a/example/servo-ptu46/servoPtu46Point2DArtVelocity.cpp
+++ b/example/servo-ptu46/servoPtu46Point2DArtVelocity.cpp
@@ -228,9 +228,6 @@ int main()
dot.track(I);
- // vpDisplay::displayCross(I,(int)dot.I(), (int)dot.J(),
- // 10,vpColor::green) ;
-
vpFeatureBuilder::create(p, cam, dot);
// get the jacobian
diff --git a/example/servo-viper650/servoViper650FourPoints2DArtVelocityLs_cur.cpp b/example/servo-viper650/servoViper650FourPoints2DArtVelocityLs_cur.cpp
index ff3a8a7968..414b834aff 100644
--- a/example/servo-viper650/servoViper650FourPoints2DArtVelocityLs_cur.cpp
+++ b/example/servo-viper650/servoViper650FourPoints2DArtVelocityLs_cur.cpp
@@ -280,7 +280,7 @@ int main()
}
// During the servo, we compute the pose using LOWE method. For the
- // initial pose used in the non linear minimisation we use the pose
+ // initial pose used in the non linear minimization we use the pose
// computed at the previous iteration.
compute_pose(point, dot, cam, cMo, false);
diff --git a/example/servo-viper650/servoViper650FourPoints2DCamVelocityLs_cur-SR300.cpp b/example/servo-viper650/servoViper650FourPoints2DCamVelocityLs_cur-SR300.cpp
index ed87efaaa3..fc24418c70 100644
--- a/example/servo-viper650/servoViper650FourPoints2DCamVelocityLs_cur-SR300.cpp
+++ b/example/servo-viper650/servoViper650FourPoints2DCamVelocityLs_cur-SR300.cpp
@@ -275,7 +275,7 @@ int main()
}
// During the servo, we compute the pose using a non linear method. For
- // the initial pose used in the non linear minimisation we use the pose
+ // the initial pose used in the non linear minimization we use the pose
// computed at the previous iteration.
compute_pose(point, dot, cam, cMo, false);
diff --git a/example/servo-viper650/servoViper650FourPoints2DCamVelocityLs_cur.cpp b/example/servo-viper650/servoViper650FourPoints2DCamVelocityLs_cur.cpp
index e011f94706..b0eee66934 100644
--- a/example/servo-viper650/servoViper650FourPoints2DCamVelocityLs_cur.cpp
+++ b/example/servo-viper650/servoViper650FourPoints2DCamVelocityLs_cur.cpp
@@ -270,7 +270,7 @@ int main()
}
// During the servo, we compute the pose using a non linear method. For
- // the initial pose used in the non linear minimisation we use the pose
+ // the initial pose used in the non linear minimization we use the pose
// computed at the previous iteration.
compute_pose(point, dot, cam, cMo, false);
diff --git a/example/servo-viper850/servoViper850Point2DArtVelocity-jointAvoidance-basic.cpp b/example/servo-viper850/servoViper850Point2DArtVelocity-jointAvoidance-basic.cpp
index 8e99005b13..b09f9e0a49 100644
--- a/example/servo-viper850/servoViper850Point2DArtVelocity-jointAvoidance-basic.cpp
+++ b/example/servo-viper850/servoViper850Point2DArtVelocity-jointAvoidance-basic.cpp
@@ -337,7 +337,6 @@ int main()
unsigned int k = 0;
for (unsigned int j = 0; j < 6; j++) // j is the joint
- // if (pb[j]==1) {
if (std::fabs(pb[j] - 1) <= std::numeric_limits::epsilon()) {
for (unsigned int i = 0; i < dimKernelL; i++)
E[k][i] = kernelJ1[j][i];
diff --git a/example/servo-viper850/servoViper850Point2DArtVelocity-jointAvoidance-gpa.cpp b/example/servo-viper850/servoViper850Point2DArtVelocity-jointAvoidance-gpa.cpp
index 52725a9f78..e966f7e772 100644
--- a/example/servo-viper850/servoViper850Point2DArtVelocity-jointAvoidance-gpa.cpp
+++ b/example/servo-viper850/servoViper850Point2DArtVelocity-jointAvoidance-gpa.cpp
@@ -284,7 +284,6 @@ int main()
}
h_s = beta * h_s / 2.0; // cost function
e2 *= beta;
- // std::cout << e2.t() << std::endl;
std::cout << "Cost function h_s: " << h_s << std::endl;
sec_task = task.secondaryTask(e2, de2dt);
diff --git a/example/video/videoReader.cpp b/example/video/videoReader.cpp
index 9e94015a1a..9b64d22d65 100644
--- a/example/video/videoReader.cpp
+++ b/example/video/videoReader.cpp
@@ -81,7 +81,7 @@ Read a video file on the disk.\n\
\n\
SYNOPSIS\n\
%s [-i ] \n\
- [-h]\n \
+ [-h]\n\
",
name);
diff --git a/modules/ar/include/visp3/ar/vpSimulatorException.h b/modules/ar/include/visp3/ar/vpSimulatorException.h
index d09a88ad56..e5a75bffe8 100644
--- a/modules/ar/include/visp3/ar/vpSimulatorException.h
+++ b/modules/ar/include/visp3/ar/vpSimulatorException.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,16 +29,15 @@
*
* Description:
* Exceptions that can be emitted by the simulator classes.
- *
-*****************************************************************************/
+ */
#ifndef _vpSimulatorException_h_
#define _vpSimulatorException_h_
-/* \file vpSimulatorException.h
- \brief Error that can be emitted by the vpSimulator class and its derivatives
+/*!
+ * \file vpSimulatorException.h
+ * \brief Error that can be emitted by the vpSimulator class and its derivatives
*/
-/* Classes standards. */
#include
@@ -48,18 +46,18 @@
#include /* Classe string. */
/*!
-
- \class vpSimulatorException
- \brief Error that can be emitted by the vpSimulator class and its derivatives.
+ * \class vpSimulatorException
+ * \brief Error that can be emitted by the vpSimulator class and its derivatives.
*/
class VISP_EXPORT vpSimulatorException : public vpException
{
public:
/*!
- \brief Lists the possible error than can be emitted while calling
- vpSimulator member
- */
- enum errorSimulatorCodeEnum {
+ * Lists the possible error than can be emitted while calling
+ * vpSimulator member
+ */
+ enum errorSimulatorCodeEnum
+ {
ioError, //!< I/O error
noFileNameError, //!< Filename error
notInitializedError, //!< Initialization error
@@ -68,8 +66,19 @@ class VISP_EXPORT vpSimulatorException : public vpException
};
public:
+ /*!
+ * Constructor.
+ */
vpSimulatorException(int id, const char *format, ...);
+
+ /*!
+ * Constructor.
+ */
vpSimulatorException(int id, const std::string &msg);
+
+ /*!
+ * Constructor.
+ */
explicit vpSimulatorException(int id);
};
diff --git a/modules/ar/src/ogre-simulator/vpAROgre.cpp b/modules/ar/src/ogre-simulator/vpAROgre.cpp
index 235cd6ef48..bbd4cf952c 100644
--- a/modules/ar/src/ogre-simulator/vpAROgre.cpp
+++ b/modules/ar/src/ogre-simulator/vpAROgre.cpp
@@ -382,11 +382,11 @@ void vpAROgre::init(bool
//-----------------------------------------------------
// 4 Create the SceneManager
//
- // ST_GENERIC = octree
- // ST_EXTERIOR_CLOSE = simple terrain
- // ST_EXTERIOR_FAR = nature terrain (depreciated)
- // ST_EXTERIOR_REAL_FAR = paging landscape
- // ST_INTERIOR = Quake3 BSP
+ // ST_GENERIC = octree
+ // ST_EXTERIOR_CLOSE = simple terrain
+ // ST_EXTERIOR_FAR = nature terrain (depreciated)
+ // ST_EXTERIOR_REAL_FAR = paging landscape
+ // ST_INTERIOR = Quake3 BSP
//-----------------------------------------------------
mSceneMgr = mRoot->createSceneManager(Ogre::ST_GENERIC);
diff --git a/modules/core/include/visp3/core/vpArray2D.h b/modules/core/include/visp3/core/vpArray2D.h
index ccf05299d2..b3248c656f 100644
--- a/modules/core/include/visp3/core/vpArray2D.h
+++ b/modules/core/include/visp3/core/vpArray2D.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,8 +29,7 @@
*
* Description:
* This class implements an 2D array as a template class.
- *
-*****************************************************************************/
+ */
#ifndef _vpArray2D_h_
#define _vpArray2D_h_
diff --git a/modules/core/include/visp3/core/vpBSpline.h b/modules/core/include/visp3/core/vpBSpline.h
index ee2ebefa53..29debfaf87 100644
--- a/modules/core/include/visp3/core/vpBSpline.h
+++ b/modules/core/include/visp3/core/vpBSpline.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,8 +29,7 @@
*
* Description:
* This class implements the B-Spline
- *
-*****************************************************************************/
+ */
#ifndef vpBSpline_H
#define vpBSpline_H
diff --git a/modules/core/include/visp3/core/vpCPUFeatures.h b/modules/core/include/visp3/core/vpCPUFeatures.h
index 14a10a8653..1fe8d37c2a 100644
--- a/modules/core/include/visp3/core/vpCPUFeatures.h
+++ b/modules/core/include/visp3/core/vpCPUFeatures.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,8 +29,7 @@
*
* Description:
* CPU features (hardware capabilities).
- *
-*****************************************************************************/
+ */
#ifndef _vpCPUFeatures_h_
#define _vpCPUFeatures_h_
diff --git a/modules/core/include/visp3/core/vpCameraParameters.h b/modules/core/include/visp3/core/vpCameraParameters.h
index 5bc255eccf..06b36d5e25 100644
--- a/modules/core/include/visp3/core/vpCameraParameters.h
+++ b/modules/core/include/visp3/core/vpCameraParameters.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,8 +29,7 @@
*
* Description:
* Camera intrinsic parameters.
- *
-*****************************************************************************/
+ */
/*!
\file vpCameraParameters.h
@@ -292,8 +290,8 @@
\code{.unparsed}
Read camera parameters from cam.json:
Camera parameters for perspective projection without distortion:
- px = 801 py = 802
- u0 = 325 v0 = 245
+ px = 801 py = 802
+ u0 = 325 v0 = 245
\endcode
The content of the `cam.json` file is the following:
diff --git a/modules/core/include/visp3/core/vpCannyEdgeDetection.h b/modules/core/include/visp3/core/vpCannyEdgeDetection.h
index e75e95807e..0ca547ddac 100644
--- a/modules/core/include/visp3/core/vpCannyEdgeDetection.h
+++ b/modules/core/include/visp3/core/vpCannyEdgeDetection.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -27,8 +26,7 @@
*
* This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
* WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
-*****************************************************************************/
+ */
#ifndef _vpCannyEdgeDetection_h_
#define _vpCannyEdgeDetection_h_
@@ -45,7 +43,7 @@
// 3rd parties include
#ifdef VISP_HAVE_NLOHMANN_JSON
#include
-using json = nlohmann::json;
+using json = nlohmann::json; //! json namespace shortcut
#endif
class VISP_EXPORT vpCannyEdgeDetection
diff --git a/modules/core/include/visp3/core/vpCircle.h b/modules/core/include/visp3/core/vpCircle.h
index 567efc23be..3407516fdc 100644
--- a/modules/core/include/visp3/core/vpCircle.h
+++ b/modules/core/include/visp3/core/vpCircle.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,8 +29,7 @@
*
* Description:
* Visual feature circle.
- *
-*****************************************************************************/
+ */
/*!
\file vpCircle.h
diff --git a/modules/core/include/visp3/core/vpClient.h b/modules/core/include/visp3/core/vpClient.h
index 0c24b5e0a3..10ae2923ad 100644
--- a/modules/core/include/visp3/core/vpClient.h
+++ b/modules/core/include/visp3/core/vpClient.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,11 +29,7 @@
*
* Description:
* TCP Client
- *
- * Authors:
- * Aurelien Yol
- *
-*****************************************************************************/
+ */
#ifndef vpClient_H
#define vpClient_H
diff --git a/modules/core/include/visp3/core/vpColVector.h b/modules/core/include/visp3/core/vpColVector.h
index 5133b4c640..1ba64d3fe6 100644
--- a/modules/core/include/visp3/core/vpColVector.h
+++ b/modules/core/include/visp3/core/vpColVector.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,10 +29,7 @@
*
* Description:
* Provide some simple operation on column vectors.
- *
- * Authors:
- *
-*****************************************************************************/
+ */
#ifndef _vpColVector_h_
#define _vpColVector_h_
diff --git a/modules/core/include/visp3/core/vpColor.h b/modules/core/include/visp3/core/vpColor.h
index 114f5f7a65..509a736aa8 100644
--- a/modules/core/include/visp3/core/vpColor.h
+++ b/modules/core/include/visp3/core/vpColor.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,8 +29,7 @@
*
* Description:
* Color definition.
- *
-*****************************************************************************/
+ */
#ifndef vpColor_hh
#define vpColor_hh
diff --git a/modules/core/include/visp3/core/vpColorDepthConversion.h b/modules/core/include/visp3/core/vpColorDepthConversion.h
index 7570e1f43b..5b34e0739d 100644
--- a/modules/core/include/visp3/core/vpColorDepthConversion.h
+++ b/modules/core/include/visp3/core/vpColorDepthConversion.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,11 +29,7 @@
*
* Description:
* Color to Depth conversion.
- *
- * Authors:
- * Julien Dufour
- *
-*****************************************************************************/
+ */
#pragma once
diff --git a/modules/core/include/visp3/core/vpColormap.h b/modules/core/include/visp3/core/vpColormap.h
index f04babc34a..e30ddd189c 100644
--- a/modules/core/include/visp3/core/vpColormap.h
+++ b/modules/core/include/visp3/core/vpColormap.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -31,8 +30,7 @@
* Description:
* Colormap class to recolor an image with different grayscale values into
* some corresponding color values, for better visualization for example.
- *
-*****************************************************************************/
+ */
#ifndef _vpColormap_h_
#define _vpColormap_h_
diff --git a/modules/core/include/visp3/core/vpConvert.h b/modules/core/include/visp3/core/vpConvert.h
index e4de413125..b87095f7bc 100644
--- a/modules/core/include/visp3/core/vpConvert.h
+++ b/modules/core/include/visp3/core/vpConvert.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,8 +29,7 @@
*
* Description:
* Directory management.
- *
-*****************************************************************************/
+ */
#ifndef _vpConvert_h_
#define _vpConvert_h_
diff --git a/modules/core/include/visp3/core/vpCylinder.h b/modules/core/include/visp3/core/vpCylinder.h
index 1feebd16e8..5347c78658 100644
--- a/modules/core/include/visp3/core/vpCylinder.h
+++ b/modules/core/include/visp3/core/vpCylinder.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,8 +29,7 @@
*
* Description:
* Cylinder feature.
- *
-*****************************************************************************/
+ */
/*!
\file vpCylinder.h
diff --git a/modules/core/include/visp3/core/vpDebug.h b/modules/core/include/visp3/core/vpDebug.h
index 9712030e82..abce2f9162 100644
--- a/modules/core/include/visp3/core/vpDebug.h
+++ b/modules/core/include/visp3/core/vpDebug.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -32,21 +31,17 @@
* Debug and trace macro.
*
* - TRACING: vpTRACE and vpERROR_TRACE work like printf with carreer
- *return at the end of the string. vpCERROR et vpCTRACE work like the C++
- *output streams std::cout and std::cerr.
+ * return at the end of the string. vpCERROR et vpCTRACE work like the C++
+ * output streams std::cout and std::cerr.
* - DEBUGING: vpDEBUG_TRACE(niv) and vpDERROR_TRACE(niv), work like
- *printf, but print only if the tracing level niv is greater than the debug
- *level VP_DEBUG_MODE. vpCDEBUG(niv) work like the C++ output
- *stream std::cout. vpDEBUG_ENABLE(niv) is equal to 1 if the
- *debug level niv is greater than the debug mode
+ * printf, but print only if the tracing level niv is greater than the debug
+ * level VP_DEBUG_MODE. vpCDEBUG(niv) work like the C++ output
+ * stream std::cout. vpDEBUG_ENABLE(niv) is equal to 1 if the
+ * debug level niv is greater than the debug mode
* VP_DEBUG_MODE, 0 else.
* - PROG DEFENSIVE: DEFENSIF(a) is equal to a if defensive mode is active,
- *0 else.
- *
- * Authors:
- * Nicolas Mansard, Bruno Renier
- *
-*****************************************************************************/
+ * 0 else.
+ */
#ifndef _vpDebug_h_
#define _vpDebug_h_
diff --git a/modules/core/include/visp3/core/vpDisplay.h b/modules/core/include/visp3/core/vpDisplay.h
index f45d4f8539..326a7e8ea4 100644
--- a/modules/core/include/visp3/core/vpDisplay.h
+++ b/modules/core/include/visp3/core/vpDisplay.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,8 +29,7 @@
*
* Description:
* Image display.
- *
-*****************************************************************************/
+ */
#ifndef _vpDisplay_h_
#define _vpDisplay_h_
diff --git a/modules/core/include/visp3/core/vpDisplayException.h b/modules/core/include/visp3/core/vpDisplayException.h
index 1156e50248..4214b7eaf3 100644
--- a/modules/core/include/visp3/core/vpDisplayException.h
+++ b/modules/core/include/visp3/core/vpDisplayException.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,58 +29,48 @@
*
* Description:
* Exception that can be emitted by the vpDisplay class and its derivatives.
- *
-*****************************************************************************/
+ */
#ifndef _vpDisplayException_h_
#define _vpDisplayException_h_
-/* -------------------------------------------------------------------------
- */
-/* --- INCLUDE -------------------------------------------------------------
- */
-/* -------------------------------------------------------------------------
+/*!
+ * \file vpDisplayException.h
+ * \brief error that can be emitted by the vpDisplay class and its derivatives
*/
-/* \file vpDisplayException.h
- \brief error that can be emitted by the vpDisplay class and its derivatives
- */
-/* Classes standards. */
-#include /* Classe std::ostream. */
-#include /* Classe string. */
+#include
+#include
#include
#include
-/* -------------------------------------------------------------------------
- */
-/* --- CLASS ---------------------------------------------------------------
- */
-/* -------------------------------------------------------------------------
- */
-
/*!
- \class vpDisplayException
- \ingroup group_core_debug
- \brief Error that can be emitted by the vpDisplay class and its derivatives.
+ * \class vpDisplayException
+ * \ingroup group_core_debug
+ * \brief Error that can be emitted by the vpDisplay class and its derivatives.
*/
class VISP_EXPORT vpDisplayException : public vpException
{
public:
/*!
- \brief Lists the possible error than can be emitted while calling
- vpDisplay member
- */
- enum errorDisplayCodeEnum {
- notInitializedError,
- cannotOpenWindowError,
- connexionError,
- XWindowsError,
- GTKWindowsError,
- colorAllocError,
- depthNotSupportedError
+ * Lists the possible error than can be emitted while calling
+ * vpDisplay member
+ */
+ enum errorDisplayCodeEnum
+ {
+ notInitializedError, //!< Display not initialized
+ cannotOpenWindowError, //!< Unable to open display window
+ connexionError, //!< Connection error
+ XWindowsError, //!< XWindow error
+ GTKWindowsError, //!< GTK error
+ colorAllocError, //!< Color allocation error
+ depthNotSupportedError //!< Color depth not supported
};
public:
+ /*!
+ * Constructor.
+ */
vpDisplayException(int id, const char *format, ...)
{
this->code = id;
@@ -91,9 +80,15 @@ class VISP_EXPORT vpDisplayException : public vpException
va_end(args);
}
- vpDisplayException(int id, const std::string &msg) : vpException(id, msg) {}
+ /*!
+ * Constructor.
+ */
+ vpDisplayException(int id, const std::string &msg) : vpException(id, msg) { }
- explicit vpDisplayException(int id) : vpException(id) {}
+ /*!
+ * Constructor.
+ */
+ explicit vpDisplayException(int id) : vpException(id) { }
};
#endif
diff --git a/modules/core/include/visp3/core/vpEigenConversion.h b/modules/core/include/visp3/core/vpEigenConversion.h
index 01d206a341..f1264eaccb 100644
--- a/modules/core/include/visp3/core/vpEigenConversion.h
+++ b/modules/core/include/visp3/core/vpEigenConversion.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,8 +29,7 @@
*
* Description:
* ViSP <--> Eigen conversion.
- *
-*****************************************************************************/
+ */
#ifndef _vpEigenConversion_h_
#define _vpEigenConversion_h_
diff --git a/modules/core/include/visp3/core/vpEndian.h b/modules/core/include/visp3/core/vpEndian.h
index 6f4a56bd0c..a55ec06854 100644
--- a/modules/core/include/visp3/core/vpEndian.h
+++ b/modules/core/include/visp3/core/vpEndian.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,8 +29,7 @@
*
* Description:
* Determine machine endianness and define VISP_LITTLE_ENDIAN, VISP_BIG_ENDIAN and VISP_PDP_ENDIAN macros.
- *
-*****************************************************************************/
+ */
/*!
\file vpEndian.h
diff --git a/modules/core/include/visp3/core/vpException.h b/modules/core/include/visp3/core/vpException.h
index 7094d2c8e6..70b74a51bd 100644
--- a/modules/core/include/visp3/core/vpException.h
+++ b/modules/core/include/visp3/core/vpException.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,43 +29,31 @@
*
* Description:
* Exception handling.
- *
- * Authors:
- * Nicolas Mansard
- *
-*****************************************************************************/
+ */
-/* \file vpException.h
- \brief error that can be emitted by the vp class and its derivatives
+/*!
+ * \file vpException.h
+ * \brief error that can be emitted by the vp class and its derivatives
*/
#ifndef _vpException_h_
#define _vpException_h_
-/* --------------------------------------------------------------------- */
-/* --- INCLUDE --------------------------------------------------------- */
-/* --------------------------------------------------------------------- */
-
#include
-/* Classes standards. */
-#include /* Classe std::ostream. */
+#include
#include
-#include /* Classe string. */
-
-/* --------------------------------------------------------------------- */
-/* --- CLASS ----------------------------------------------------------- */
-/* --------------------------------------------------------------------- */
+#include
/*!
- \class vpException
- \ingroup group_core_debug
- \brief error that can be emitted by ViSP classes.
-
- This class inherites from the standard std::exception contained in the C++
- STL.
- It is therefore possible to catch vpException with any other derivative of
- std::exception in the same catch.
+ * \class vpException
+ * \ingroup group_core_debug
+ * \brief error that can be emitted by ViSP classes.
+ *
+ * This class inherits from the standard std::exception contained in the C++
+ * STL.
+ * It is therefore possible to catch vpException with any other derivative of
+ * std::exception in the same catch.
*/
class VISP_EXPORT vpException : public std::exception
{
@@ -81,10 +68,11 @@ class VISP_EXPORT vpException : public std::exception
void setMessage(const char *format, va_list args);
//! forbid the empty constructor (protected)
- vpException() : code(notInitialized), message(""){};
+ vpException() : code(notInitialized), message("") { };
public:
- enum generalExceptionEnum {
+ enum generalExceptionEnum
+ {
memoryAllocationError, //!< Memory allocation error
memoryFreeError, //!< Memory free error
functionNotImplementedError, //!< Function not implemented
@@ -98,37 +86,66 @@ class VISP_EXPORT vpException : public std::exception
notInitialized //!< Used to indicate that a parameter is not initialized.
};
+ /*!
+ * Constructor.
+ */
vpException(int code, const char *format, va_list args);
+ /*!
+ * Constructor.
+ */
vpException(int code, const char *format, ...);
+
+ /*!
+ * Constructor.
+ */
vpException(int code, const std::string &msg);
+
+ /*!
+ * Constructor.
+ */
explicit vpException(int code);
/*!
- Basic destructor. Do nothing but implemented to fit the inheritance from
- std::exception
- */
+ * Destructor. Do nothing but implemented to fit the inheritance from
+ * std::exception
+ */
#if VISP_CXX_STANDARD > VISP_CXX_STANDARD_98
- virtual ~vpException() {}
+ virtual ~vpException() { }
#else
- virtual ~vpException() throw() {}
+ virtual ~vpException() throw() { }
#endif
/** @name Inherited functionalities from vpException */
//@{
- //! Send the object code.
+ /*!
+ * Send the object code.
+ */
int getCode() const;
- //! Send a reference (constant) related the error message (can be empty).
+ /*!
+ * Send a reference (constant) related the error message (can be empty).
+ */
const std::string &getStringMessage() const;
- //! send a pointer on the array of \e char related to the error string.
- //! Cannot be \e NULL.
+
+ /*!
+ * Send a pointer on the array of \e char related to the error string.
+ * Cannot be \e NULL.
+ */
const char *getMessage() const;
+
+ /*!
+ * Overloading of the what() method of std::exception to return the vpException
+ * message.
+ *
+ * \return pointer on the array of \e char related to the error string.
+ */
+ const char *what() const throw();
//@}
- //! Print the error structure.
+ /*!
+ * Print the error structure.
+ */
friend VISP_EXPORT std::ostream &operator<<(std::ostream &os, const vpException &art);
-
- const char *what() const throw();
};
-#endif /* #ifndef _vpException_h_ */
+#endif
diff --git a/modules/core/include/visp3/core/vpExponentialMap.h b/modules/core/include/visp3/core/vpExponentialMap.h
index a1a7c03697..eae27af3b0 100644
--- a/modules/core/include/visp3/core/vpExponentialMap.h
+++ b/modules/core/include/visp3/core/vpExponentialMap.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,11 +29,7 @@
*
* Description:
* Exponential map.
- *
- * Authors:
- * Francois Chaumette
- *
-*****************************************************************************/
+ */
/*!
\file vpExponentialMap.h
diff --git a/modules/core/include/visp3/core/vpFeatureDisplay.h b/modules/core/include/visp3/core/vpFeatureDisplay.h
index 6f53be3c17..66c3af9643 100644
--- a/modules/core/include/visp3/core/vpFeatureDisplay.h
+++ b/modules/core/include/visp3/core/vpFeatureDisplay.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,8 +29,7 @@
*
* Description:
* Interface with the image for feature display.
- *
-*****************************************************************************/
+ */
#ifndef vpFeatureDisplay_H
#define vpFeatureDisplay_H
diff --git a/modules/core/include/visp3/core/vpFont.h b/modules/core/include/visp3/core/vpFont.h
index b3194b1ae6..39031505c2 100644
--- a/modules/core/include/visp3/core/vpFont.h
+++ b/modules/core/include/visp3/core/vpFont.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,8 +29,7 @@
*
* Description:
* Draw text in an image.
- *
-*****************************************************************************/
+ */
#ifndef _vpFont_h_
#define _vpFont_h_
diff --git a/modules/core/include/visp3/core/vpForceTwistMatrix.h b/modules/core/include/visp3/core/vpForceTwistMatrix.h
index 0b216e72f7..993e66ef33 100644
--- a/modules/core/include/visp3/core/vpForceTwistMatrix.h
+++ b/modules/core/include/visp3/core/vpForceTwistMatrix.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -31,8 +30,7 @@
* Description:
* Twist transformation matrix that allows to transform forces from one
* frame to an other.
- *
-*****************************************************************************/
+ */
#ifndef vpForceTwistMatrix_h
#define vpForceTwistMatrix_h
diff --git a/modules/core/include/visp3/core/vpForwardProjection.h b/modules/core/include/visp3/core/vpForwardProjection.h
index e6d9534855..3cf257c87b 100644
--- a/modules/core/include/visp3/core/vpForwardProjection.h
+++ b/modules/core/include/visp3/core/vpForwardProjection.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,8 +29,7 @@
*
* Description:
* Forward projection.
- *
-*****************************************************************************/
+ */
#ifndef vpForwardProjection_H
#define vpForwardProjection_H
diff --git a/modules/core/include/visp3/core/vpFrameGrabber.h b/modules/core/include/visp3/core/vpFrameGrabber.h
index 43e50b93d2..0806476bd0 100644
--- a/modules/core/include/visp3/core/vpFrameGrabber.h
+++ b/modules/core/include/visp3/core/vpFrameGrabber.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,8 +29,7 @@
*
* Description:
* Frame grabbing.
- *
-*****************************************************************************/
+ */
#ifndef vpFrameGrabber_hh
#define vpFrameGrabber_hh
diff --git a/modules/core/include/visp3/core/vpFrameGrabberException.h b/modules/core/include/visp3/core/vpFrameGrabberException.h
index 3254507e93..1229b44cb5 100644
--- a/modules/core/include/visp3/core/vpFrameGrabberException.h
+++ b/modules/core/include/visp3/core/vpFrameGrabberException.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,52 +29,46 @@
*
* Description:
* Exceptions that can be emitted by the vpFrameGrabber class and its
- *derivates.
- *
-*****************************************************************************/
+ * derivates.
+ */
#ifndef _vpFrameGrabberException_h_
#define _vpFrameGrabberException_h_
-/* -------------------------------------------------------------------------
- */
-/* --- INCLUDE -------------------------------------------------------------
- */
-/* -------------------------------------------------------------------------
- */
-
-/* \file vpFrameGrabberException.h
- \brief error that can be emitted by the vpFrameGrabber class and its
- derivates
+/*!
+ * \file vpFrameGrabberException.h
+ * \brief error that can be emitted by the vpFrameGrabber class and its
+ * derivates
*/
-/* Classes standards. */
-#include /* Classe std::ostream. */
-#include /* Classe string. */
+#include
+#include
#include
#include
-/* -------------------------------------------------------------------------
- */
-/* --- CLASS ---------------------------------------------------------------
- */
-/* -------------------------------------------------------------------------
- */
/*!
- \brief Error that can be emitted by the vpFrameGrabber class and its
- derivates
+ * \brief Error that can be emitted by the vpFrameGrabber class and its
+ * derivates.
*/
class VISP_EXPORT vpFrameGrabberException : public vpException
{
public:
/*!
- \brief Lists the possible error than can be emitted while calling
- vpFrameGrabber member
- */
- enum errorFrameGrabberCodeEnum { settingError, initializationError, otherError };
+ * Lists the possible error than can be emitted while calling
+ * vpFrameGrabber member
+ */
+ enum errorFrameGrabberCodeEnum
+ {
+ settingError, //!< Grabber settings error
+ initializationError, //!< Grabber initialization error
+ otherError //!< Grabber returned an other error
+ };
public:
+ /*!
+ * Constructor.
+ */
vpFrameGrabberException(int id, const char *format, ...)
{
this->code = id;
@@ -84,8 +77,16 @@ class VISP_EXPORT vpFrameGrabberException : public vpException
setMessage(format, args);
va_end(args);
}
+
+ /*!
+ * Constructor.
+ */
vpFrameGrabberException(int id, const std::string &msg) : vpException(id, msg) { }
+
+ /*!
+ * Constructor.
+ */
explicit vpFrameGrabberException(int id) : vpException(id) { }
};
-#endif /* #ifndef _vpFrameGrabberException_h_ */
+#endif
diff --git a/modules/core/include/visp3/core/vpGEMM.h b/modules/core/include/visp3/core/vpGEMM.h
index b7f88bb9a3..4e6a9e4ba6 100644
--- a/modules/core/include/visp3/core/vpGEMM.h
+++ b/modules/core/include/visp3/core/vpGEMM.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,11 +29,7 @@
*
* Description:
* Matrix generalized multiplication.
- *
- * Authors:
- * Laneurit Jean
- *
-*****************************************************************************/
+ */
#ifndef _vpGEMM_h_
#define _vpGEMM_h_
diff --git a/modules/core/include/visp3/core/vpGaussRand.h b/modules/core/include/visp3/core/vpGaussRand.h
index 6a0dd49e68..79c5f1d356 100644
--- a/modules/core/include/visp3/core/vpGaussRand.h
+++ b/modules/core/include/visp3/core/vpGaussRand.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,8 +29,7 @@
*
* Description:
* Generation of random number with uniform and normal probability density.
- *
-*****************************************************************************/
+ */
#ifndef vpGaussRand_hh
#define vpGaussRand_hh
diff --git a/modules/core/include/visp3/core/vpGaussianFilter.h b/modules/core/include/visp3/core/vpGaussianFilter.h
index d559e35026..5795ea4530 100644
--- a/modules/core/include/visp3/core/vpGaussianFilter.h
+++ b/modules/core/include/visp3/core/vpGaussianFilter.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,8 +29,7 @@
*
* Description:
* Gaussian filter class.
- *
-*****************************************************************************/
+ */
/*!
\file vpGaussianFilter.h
diff --git a/modules/core/include/visp3/core/vpHinkley.h b/modules/core/include/visp3/core/vpHinkley.h
index 6445571090..d24760c2d6 100644
--- a/modules/core/include/visp3/core/vpHinkley.h
+++ b/modules/core/include/visp3/core/vpHinkley.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,8 +29,7 @@
*
* Description:
* Hinkley's cumulative sum test implementation.
- *
-*****************************************************************************/
+ */
#ifndef vpHinkley_H
#define vpHinkley_H
diff --git a/modules/core/include/visp3/core/vpHistogram.h b/modules/core/include/visp3/core/vpHistogram.h
index 9741606ed1..36afaeaec2 100644
--- a/modules/core/include/visp3/core/vpHistogram.h
+++ b/modules/core/include/visp3/core/vpHistogram.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,9 +29,7 @@
*
* Description:
* Gray level histogram manipulation.
- *
- *
-*****************************************************************************/
+ */
/*!
\file vpHistogram.h
diff --git a/modules/core/include/visp3/core/vpHistogramPeak.h b/modules/core/include/visp3/core/vpHistogramPeak.h
index 02cbf87a36..8d5f63eb89 100644
--- a/modules/core/include/visp3/core/vpHistogramPeak.h
+++ b/modules/core/include/visp3/core/vpHistogramPeak.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,15 +29,12 @@
*
* Description:
* Gray level histogram manipulation.
- *
- *
-*****************************************************************************/
+ */
/*!
\file vpHistogramPeak.h
\brief Declaration of the vpHistogramPeak class.
Class vpHistogramPeak defines a gray level histogram peak.
-
*/
#ifndef vpHistogramPeak_h
diff --git a/modules/core/include/visp3/core/vpHistogramValey.h b/modules/core/include/visp3/core/vpHistogramValey.h
index 1fdb828da2..d4ab3f463c 100644
--- a/modules/core/include/visp3/core/vpHistogramValey.h
+++ b/modules/core/include/visp3/core/vpHistogramValey.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,9 +29,7 @@
*
* Description:
* Gray level histogram manipulation.
- *
- *
-*****************************************************************************/
+ */
/*!
\file vpHistogramValey.h
diff --git a/modules/core/include/visp3/core/vpHomogeneousMatrix.h b/modules/core/include/visp3/core/vpHomogeneousMatrix.h
index 2d290a04f8..2468493586 100644
--- a/modules/core/include/visp3/core/vpHomogeneousMatrix.h
+++ b/modules/core/include/visp3/core/vpHomogeneousMatrix.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,8 +29,7 @@
*
* Description:
* Homogeneous matrix.
- *
-*****************************************************************************/
+ */
/*!
\file vpHomogeneousMatrix.h
diff --git a/modules/core/include/visp3/core/vpImage.h b/modules/core/include/visp3/core/vpImage.h
index 1f9eebcffc..0f56a92b36 100644
--- a/modules/core/include/visp3/core/vpImage.h
+++ b/modules/core/include/visp3/core/vpImage.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,8 +29,7 @@
*
* Description:
* Image handling.
- *
-*****************************************************************************/
+ */
/*!
\file vpImage.h
@@ -486,7 +484,7 @@ inline std::ostream &operator<<(std::ostream &s, const vpImage &I)
#if defined(VISP_HAVE_PTHREAD) || (defined(_WIN32) && !defined(WINRT_8_0))
namespace
{
-struct ImageLut_Param_t
+struct vpImageLut_Param_t
{
unsigned int m_start_index;
unsigned int m_end_index;
@@ -494,16 +492,16 @@ struct ImageLut_Param_t
unsigned char m_lut[256];
unsigned char *m_bitmap;
- ImageLut_Param_t() : m_start_index(0), m_end_index(0), m_lut(), m_bitmap(NULL) { }
+ vpImageLut_Param_t() : m_start_index(0), m_end_index(0), m_lut(), m_bitmap(NULL) { }
- ImageLut_Param_t(unsigned int start_index, unsigned int end_index, unsigned char *bitmap)
+ vpImageLut_Param_t(unsigned int start_index, unsigned int end_index, unsigned char *bitmap)
: m_start_index(start_index), m_end_index(end_index), m_lut(), m_bitmap(bitmap)
{ }
};
vpThread::Return performLutThread(vpThread::Args args)
{
- ImageLut_Param_t *imageLut_param = static_cast(args);
+ vpImageLut_Param_t *imageLut_param = static_cast(args);
unsigned int start_index = imageLut_param->m_start_index;
unsigned int end_index = imageLut_param->m_end_index;
@@ -554,7 +552,7 @@ vpThread::Return performLutThread(vpThread::Args args)
return 0;
}
-struct ImageLutRGBa_Param_t
+struct vpImageLutRGBa_Param_t
{
unsigned int m_start_index;
unsigned int m_end_index;
@@ -562,16 +560,16 @@ struct ImageLutRGBa_Param_t
vpRGBa m_lut[256];
unsigned char *m_bitmap;
- ImageLutRGBa_Param_t() : m_start_index(0), m_end_index(0), m_lut(), m_bitmap(NULL) { }
+ vpImageLutRGBa_Param_t() : m_start_index(0), m_end_index(0), m_lut(), m_bitmap(NULL) { }
- ImageLutRGBa_Param_t(unsigned int start_index, unsigned int end_index, unsigned char *bitmap)
+ vpImageLutRGBa_Param_t(unsigned int start_index, unsigned int end_index, unsigned char *bitmap)
: m_start_index(start_index), m_end_index(end_index), m_lut(), m_bitmap(bitmap)
{ }
};
vpThread::Return performLutRGBaThread(vpThread::Args args)
{
- ImageLutRGBa_Param_t *imageLut_param = static_cast(args);
+ vpImageLutRGBa_Param_t *imageLut_param = static_cast(args);
unsigned int start_index = imageLut_param->m_start_index;
unsigned int end_index = imageLut_param->m_end_index;
@@ -2060,7 +2058,7 @@ template <> inline void vpImage::performLut(const unsigned char(&
// Multi-threads
std::vector threadpool;
- std::vector imageLutParams;
+ std::vector imageLutParams;
unsigned int image_size = getSize();
unsigned int step = image_size / nbThreads;
@@ -2074,7 +2072,7 @@ template <> inline void vpImage::performLut(const unsigned char(&
end_index = start_index + last_step;
}
- ImageLut_Param_t *imageLut_param = new ImageLut_Param_t(start_index, end_index, bitmap);
+ vpImageLut_Param_t *imageLut_param = new vpImageLut_Param_t(start_index, end_index, bitmap);
memcpy(imageLut_param->m_lut, lut, 256 * sizeof(unsigned char));
imageLutParams.push_back(imageLut_param);
@@ -2147,7 +2145,7 @@ template <> inline void vpImage::performLut(const vpRGBa(&lut)[256], uns
#if defined(VISP_HAVE_PTHREAD) || (defined(_WIN32) && !defined(WINRT_8_0))
// Multi-threads
std::vector threadpool;
- std::vector imageLutParams;
+ std::vector imageLutParams;
unsigned int image_size = getSize();
unsigned int step = image_size / nbThreads;
@@ -2161,7 +2159,7 @@ template <> inline void vpImage::performLut(const vpRGBa(&lut)[256], uns
end_index = start_index + last_step;
}
- ImageLutRGBa_Param_t *imageLut_param = new ImageLutRGBa_Param_t(start_index, end_index, (unsigned char *)bitmap);
+ vpImageLutRGBa_Param_t *imageLut_param = new vpImageLutRGBa_Param_t(start_index, end_index, (unsigned char *)bitmap);
memcpy(static_cast(imageLut_param->m_lut), lut, 256 * sizeof(vpRGBa));
imageLutParams.push_back(imageLut_param);
diff --git a/modules/core/include/visp3/core/vpImageCircle.h b/modules/core/include/visp3/core/vpImageCircle.h
index e3648b7259..6f1150f0c2 100644
--- a/modules/core/include/visp3/core/vpImageCircle.h
+++ b/modules/core/include/visp3/core/vpImageCircle.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,8 +29,7 @@
*
* Description:
* Image circle, i.e. circle in the image space.
- *
-*****************************************************************************/
+ */
/*!
\file vpImageCircle.h
diff --git a/modules/core/include/visp3/core/vpImageConvert.h b/modules/core/include/visp3/core/vpImageConvert.h
index a9c0039d36..2c7c9c57fb 100644
--- a/modules/core/include/visp3/core/vpImageConvert.h
+++ b/modules/core/include/visp3/core/vpImageConvert.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,8 +29,7 @@
*
* Description:
* Convert image types.
- *
-*****************************************************************************/
+ */
/*!
\file vpImageConvert.h
diff --git a/modules/core/include/visp3/core/vpImageDraw.h b/modules/core/include/visp3/core/vpImageDraw.h
index 0b54430db4..88425623a6 100644
--- a/modules/core/include/visp3/core/vpImageDraw.h
+++ b/modules/core/include/visp3/core/vpImageDraw.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,8 +29,7 @@
*
* Description:
* Drawing functions.
- *
-*****************************************************************************/
+ */
#ifndef _vpImageDraw_h_
#define _vpImageDraw_h_
@@ -58,6 +56,7 @@
*/
class VISP_EXPORT vpImageDraw
{
+
public:
static void drawArrow(vpImage &I, const vpImagePoint &ip1, const vpImagePoint &ip2,
unsigned char color, unsigned int w = 4, unsigned int h = 2, unsigned int thickness = 1);
diff --git a/modules/core/include/visp3/core/vpImageException.h b/modules/core/include/visp3/core/vpImageException.h
index 34f6a0cefb..9770d62326 100644
--- a/modules/core/include/visp3/core/vpImageException.h
+++ b/modules/core/include/visp3/core/vpImageException.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,59 +29,48 @@
*
* Description:
* Exceptions that can be emitted by the vpImage class and its derivatives.
- *
-*****************************************************************************/
+ */
#ifndef _vpImageException_h_
#define _vpImageException_h_
-/* -------------------------------------------------------------------------
- */
-/* --- INCLUDE -------------------------------------------------------------
- */
-/* -------------------------------------------------------------------------
- */
-
-/* \file vpImageException.h
- \brief error that can be emitted by the vpImage class and its derivatives
+/*!
+ * \file vpImageException.h
+ * \brief error that can be emitted by the vpImage class and its derivatives
*/
-/* Classes standards. */
#include
#include
-#include /* Classe std::ostream. */
-#include /* Classe string. */
+#include
+#include
-/* -------------------------------------------------------------------------
- */
-/* --- CLASS ---------------------------------------------------------------
- */
-/* -------------------------------------------------------------------------
- */
/*!
-
- \class vpImageException
- \ingroup group_core_debug
- \brief Error that can be emitted by the vpImage class and its derivatives.
+ * \class vpImageException
+ * \ingroup group_core_debug
+ * \brief Error that can be emitted by the vpImage class and its derivatives.
*/
class VISP_EXPORT vpImageException : public vpException
{
public:
/*!
- \brief Lists the possible error than can be emitted while calling
- vpImage member
- */
- enum errorImageCodeEnum {
- ioError,
- noFileNameError,
- notInitializedError,
- incorrectInitializationError,
- notInTheImage
+ * \brief Lists the possible error than can be emitted while calling
+ * vpImage member
+ */
+ enum errorImageCodeEnum
+ {
+ ioError, //!< Image io error
+ noFileNameError, //!< Image file name error
+ notInitializedError, //!< Image not initialized
+ incorrectInitializationError, //!< Wrong image initialization
+ notInTheImage //!< Pixel not in the image
};
public:
+ /*!
+ * Constructor.
+ */
vpImageException(int id, const char *format, ...)
{
this->code = id;
@@ -91,7 +79,15 @@ class VISP_EXPORT vpImageException : public vpException
setMessage(format, args);
va_end(args);
}
+
+ /*!
+ * Constructor.
+ */
vpImageException(int id, const std::string &msg) : vpException(id, msg) { }
+
+ /*!
+ * Constructor.
+ */
explicit vpImageException(int id) : vpException(id) { }
};
diff --git a/modules/core/include/visp3/core/vpImageFilter.h b/modules/core/include/visp3/core/vpImageFilter.h
index ec03c45e55..054fcba05b 100644
--- a/modules/core/include/visp3/core/vpImageFilter.h
+++ b/modules/core/include/visp3/core/vpImageFilter.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,8 +29,7 @@
*
* Description:
* Various image tools, convolution, ...
- *
-*****************************************************************************/
+ */
#ifndef _vpImageFilter_h_
#define _vpImageFilter_h_
diff --git a/modules/core/include/visp3/core/vpImageMorphology.h b/modules/core/include/visp3/core/vpImageMorphology.h
index 4c9e025d7f..2fd2b6408b 100644
--- a/modules/core/include/visp3/core/vpImageMorphology.h
+++ b/modules/core/include/visp3/core/vpImageMorphology.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,8 +29,7 @@
*
* Description:
* Morphology tools.
- *
-*****************************************************************************/
+ */
#ifndef _vpImageMorphology_h_
#define _vpImageMorphology_h_
diff --git a/modules/core/include/visp3/core/vpImagePoint.h b/modules/core/include/visp3/core/vpImagePoint.h
index b308257214..9618b273e4 100644
--- a/modules/core/include/visp3/core/vpImagePoint.h
+++ b/modules/core/include/visp3/core/vpImagePoint.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,11 +29,7 @@
*
* Description:
* 2D point useful for image processing
- *
- * Authors:
- * Julien Dufour
- *
-*****************************************************************************/
+ */
#ifndef _vpImagePoint_h_
#define _vpImagePoint_h_
diff --git a/modules/core/include/visp3/core/vpImageTools.h b/modules/core/include/visp3/core/vpImageTools.h
index 1505532e52..a9a12d081a 100644
--- a/modules/core/include/visp3/core/vpImageTools.h
+++ b/modules/core/include/visp3/core/vpImageTools.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,8 +29,7 @@
*
* Description:
* Image tools.
- *
-*****************************************************************************/
+ */
#ifndef vpImageTools_H
#define vpImageTools_H
diff --git a/modules/core/include/visp3/core/vpIoException.h b/modules/core/include/visp3/core/vpIoException.h
index 2d0c202e70..55cf163360 100644
--- a/modules/core/include/visp3/core/vpIoException.h
+++ b/modules/core/include/visp3/core/vpIoException.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,22 +29,14 @@
*
* Description:
* Exceptions that can be emitted by the vpIo class and its derivatives.
- *
-*****************************************************************************/
+ */
#ifndef _vpIoException_h_
#define _vpIoException_h_
-/* -------------------------------------------------------------------------
- */
-/* --- INCLUDE -------------------------------------------------------------
- */
-/* -------------------------------------------------------------------------
- */
-
/*!
- \file vpIoException.h
- \brief Error that can be emitted by the vpIoTools class and its derivatives.
+ * \file vpIoException.h
+ * \brief Error that can be emitted by the vpIoTools class and its derivatives.
*/
#include
@@ -54,33 +45,30 @@
#include
#include
-/* -------------------------------------------------------------------------
- */
-/* --- CLASS ---------------------------------------------------------------
- */
-/* -------------------------------------------------------------------------
- */
-
/*!
- \class vpIoException
- \ingroup group_core_debug
- \brief Error that can be emitted by the vpIoTools class and its derivatives.
+ * \class vpIoException
+ * \ingroup group_core_debug
+ * \brief Error that can be emitted by the vpIoTools class and its derivatives.
*/
class VISP_EXPORT vpIoException : public vpException
{
public:
/*!
- \brief Lists the possible error than can be emitted while calling
- vpIo member.
- */
- enum error {
- invalidDirectoryName, /*! Directory name is invalid. */
- cantCreateDirectory, /*! Unable to create a directory. */
- cantGetUserName, /*! User name is not available. */
- cantGetenv /*! Cannot get environment variable value. */
+ * \brief Lists the possible error than can be emitted while calling
+ * vpIo member.
+ */
+ enum error
+ {
+ invalidDirectoryName, //!< Directory name is invalid.
+ cantCreateDirectory, //!< Unable to create a directory.
+ cantGetUserName, //!< User name is not available.
+ cantGetenv //!< Cannot get environment variable value.
};
public:
+ /*!
+ * Constructor.
+ */
vpIoException(int id, const char *format, ...)
{
this->code = id;
@@ -89,7 +77,15 @@ class VISP_EXPORT vpIoException : public vpException
setMessage(format, args);
va_end(args);
}
+
+ /*!
+ * Constructor.
+ */
vpIoException(int id, const std::string &msg) : vpException(id, msg) { }
+
+ /*!
+ * Constructor.
+ */
explicit vpIoException(int id) : vpException(id) { }
};
diff --git a/modules/core/include/visp3/core/vpIoTools.h b/modules/core/include/visp3/core/vpIoTools.h
index 3e88c230e4..6854533379 100644
--- a/modules/core/include/visp3/core/vpIoTools.h
+++ b/modules/core/include/visp3/core/vpIoTools.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,8 +29,7 @@
*
* Description:
* Directory management.
- *
-*****************************************************************************/
+ */
#ifndef _vpIoTools_h_
#define _vpIoTools_h_
diff --git a/modules/core/include/visp3/core/vpJsonParsing.h b/modules/core/include/visp3/core/vpJsonParsing.h
index daf106df9b..967cdee2e2 100644
--- a/modules/core/include/visp3/core/vpJsonParsing.h
+++ b/modules/core/include/visp3/core/vpJsonParsing.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,8 +29,7 @@
*
* Description:
* JSON parsing helpers.
- *
-*****************************************************************************/
+ */
#ifndef _vpJsonParsing_h_
#define _vpJsonParsing_h_
diff --git a/modules/core/include/visp3/core/vpKalmanFilter.h b/modules/core/include/visp3/core/vpKalmanFilter.h
index ccc704cf43..b9461884ec 100644
--- a/modules/core/include/visp3/core/vpKalmanFilter.h
+++ b/modules/core/include/visp3/core/vpKalmanFilter.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,8 +29,7 @@
*
* Description:
* Kalman filtering.
- *
-*****************************************************************************/
+ */
#ifndef vpKalmanFilter_h
#define vpKalmanFilter_h
diff --git a/modules/core/include/visp3/core/vpLinProg.h b/modules/core/include/visp3/core/vpLinProg.h
index 8b58d15a77..38586d341b 100644
--- a/modules/core/include/visp3/core/vpLinProg.h
+++ b/modules/core/include/visp3/core/vpLinProg.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,11 +29,7 @@
*
* Description:
* Linear Programming with simplex
- *
- * Authors:
- * Olivier Kermorgant
- *
-*****************************************************************************/
+ */
#ifndef vpLinProgh
#define vpLinProgh
diff --git a/modules/core/include/visp3/core/vpLine.h b/modules/core/include/visp3/core/vpLine.h
index 7c305203df..83ae2471b2 100644
--- a/modules/core/include/visp3/core/vpLine.h
+++ b/modules/core/include/visp3/core/vpLine.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,8 +29,7 @@
*
* Description:
* Line feature.
- *
-*****************************************************************************/
+ */
#ifndef vpLine_H
#define vpLine_H
diff --git a/modules/core/include/visp3/core/vpLinearKalmanFilterInstantiation.h b/modules/core/include/visp3/core/vpLinearKalmanFilterInstantiation.h
index dee0cdf513..54e39faa6c 100644
--- a/modules/core/include/visp3/core/vpLinearKalmanFilterInstantiation.h
+++ b/modules/core/include/visp3/core/vpLinearKalmanFilterInstantiation.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,8 +29,7 @@
*
* Description:
* Kalman filtering.
- *
-*****************************************************************************/
+ */
#ifndef vpLinearKalmanFilterInstantiation_h
#define vpLinearKalmanFilterInstantiation_h
diff --git a/modules/core/include/visp3/core/vpList.h b/modules/core/include/visp3/core/vpList.h
index a74b6e362b..f1cd034b63 100644
--- a/modules/core/include/visp3/core/vpList.h
+++ b/modules/core/include/visp3/core/vpList.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,11 +29,7 @@
*
* Description:
* List data structure.
- *
- * Authors:
- * Nicolas Mansard : Toward const-specification respect
- *
-*****************************************************************************/
+ */
#ifndef VP_LIST_H
#define VP_LIST_H
diff --git a/modules/core/include/visp3/core/vpMath.h b/modules/core/include/visp3/core/vpMath.h
index 16cd30c5f2..f082ab5d33 100644
--- a/modules/core/include/visp3/core/vpMath.h
+++ b/modules/core/include/visp3/core/vpMath.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,8 +29,7 @@
*
* Description:
* Simple mathematical function not available in the C math library (math.h).
- *
-*****************************************************************************/
+ */
/*!
\file vpMath.h
diff --git a/modules/core/include/visp3/core/vpMatrix.h b/modules/core/include/visp3/core/vpMatrix.h
index b334fc6f9f..2b6b65bdf6 100644
--- a/modules/core/include/visp3/core/vpMatrix.h
+++ b/modules/core/include/visp3/core/vpMatrix.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,8 +29,7 @@
*
* Description:
* Matrix manipulation.
- *
-*****************************************************************************/
+ */
#ifndef vpMatrix_H
#define vpMatrix_H
diff --git a/modules/core/include/visp3/core/vpMatrixException.h b/modules/core/include/visp3/core/vpMatrixException.h
index bf237a4ada..c38ee9a49a 100644
--- a/modules/core/include/visp3/core/vpMatrixException.h
+++ b/modules/core/include/visp3/core/vpMatrixException.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,66 +29,57 @@
*
* Description:
* Exceptions that can be emitted by the vpMatrix class and its derivatives.
- *
-*****************************************************************************/
+ */
#ifndef _vpMatrixException_h_
#define _vpMatrixException_h_
-/* -------------------------------------------------------------------------
- */
-/* --- INCLUDE -------------------------------------------------------------
- */
-/* -------------------------------------------------------------------------
- */
-
-/* Classes standards. */
-//
-
#include
#include
-#include /* Classe std::ostream. */
-#include /* Classe string. */
-
-/* -------------------------------------------------------------------------
- */
-/* --- CLASS ---------------------------------------------------------------
- */
-/* -------------------------------------------------------------------------
- */
+#include
+#include
/*!
- \class vpMatrixException
- \ingroup group_core_debug
- \brief error that can be emitted by the vpMatrix class and its derivatives
+ * \class vpMatrixException
+ * \ingroup group_core_debug
+ * \brief error that can be emitted by the vpMatrix class and its derivatives
*/
class VISP_EXPORT vpMatrixException : public vpException
{
public:
/*!
- \brief Lists the possible error than can be emitted while calling
- vpMatrix member
- */
- enum errorCodeEnum {
- //! error returns by a constructor
+ * \brief Lists the possible error than can be emitted while calling
+ * vpMatrix member
+ */
+ enum errorCodeEnum
+ {
+//! Error returns by a constructor
constructionError,
- //! something is not initialized
+ //! Something is not initialized
notInitializedError,
- //! function not implemented
+ //! Function not implemented
notImplementedError,
- //! index out of range
+ //! Index out of range
outOfRangeError,
- //! iterative algorithm doesn't converge (ex SVD)
+ //! Iterative algorithm doesn't converge (ex SVD)
convergencyError,
+ //! Incorrect matrix size
incorrectMatrixSizeError,
+ //! Forbidden operation
forbiddenOperatorError,
+ //! Sub operation matrix error
subMatrixError,
+ //! Matrix operation error
matrixError,
+ //! Rank deficient
rankDeficient
};
public:
+ /*!
+ * Constructor.
+ */
vpMatrixException(int id, const char *format, ...)
{
this->code = id;
@@ -98,9 +88,16 @@ class VISP_EXPORT vpMatrixException : public vpException
setMessage(format, args);
va_end(args);
}
+
+ /*!
+ * Constructor.
+ */
vpMatrixException(int id, const std::string &msg) : vpException(id, msg) { }
+
+ /*!
+ * Constructor.
+ */
explicit vpMatrixException(int id) : vpException(id) { }
- // vpMatrixException() : vpException() { ;}
};
#endif
diff --git a/modules/core/include/visp3/core/vpMeterPixelConversion.h b/modules/core/include/visp3/core/vpMeterPixelConversion.h
index 40a6bc4cb7..29c3f969ed 100644
--- a/modules/core/include/visp3/core/vpMeterPixelConversion.h
+++ b/modules/core/include/visp3/core/vpMeterPixelConversion.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,8 +29,7 @@
*
* Description:
* Meter to pixel conversion.
- *
-*****************************************************************************/
+ */
#ifndef _vpMeterPixelConversion_h_
#define _vpMeterPixelConversion_h_
diff --git a/modules/core/include/visp3/core/vpMoment.h b/modules/core/include/visp3/core/vpMoment.h
index 3319e2547c..1074561c3b 100644
--- a/modules/core/include/visp3/core/vpMoment.h
+++ b/modules/core/include/visp3/core/vpMoment.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,11 +29,7 @@
*
* Description:
* Base for 2D moment descriptor
- *
- * Authors:
- * Filip Novotny
- *
-*****************************************************************************/
+ */
/*!
\file vpMoment.h
diff --git a/modules/core/include/visp3/core/vpMomentAlpha.h b/modules/core/include/visp3/core/vpMomentAlpha.h
index 2ff967d4b8..6c52aeed00 100644
--- a/modules/core/include/visp3/core/vpMomentAlpha.h
+++ b/modules/core/include/visp3/core/vpMomentAlpha.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,11 +29,7 @@
*
* Description:
* Alpha moment descriptor for in-plane orientation.
- *
- * Authors:
- * Filip Novotny
- *
-*****************************************************************************/
+ */
/*!
\file vpMomentAlpha.h
@@ -178,7 +173,7 @@ This program outputs:
\code
--- Reference object ---
alphaRef=25.3019 deg
-mu3=1.80552 0.921882 0.385828 0.122449
+mu3=1.80552 0.921882 0.385828 0.122449
--- current object ---
alpha=-25.3019 deg
\endcode
diff --git a/modules/core/include/visp3/core/vpMomentArea.h b/modules/core/include/visp3/core/vpMomentArea.h
index d47c498f1e..d9467c12e4 100644
--- a/modules/core/include/visp3/core/vpMomentArea.h
+++ b/modules/core/include/visp3/core/vpMomentArea.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,11 +29,7 @@
*
* Description:
* Just the area m00 = mu00
- *
- * Authors:
- * Manikandan Bakthavatchalam
- *
-*****************************************************************************/
+ */
#ifndef _vpMomentArea_h_
#define _vpMomentArea_h_
diff --git a/modules/core/include/visp3/core/vpMomentAreaNormalized.h b/modules/core/include/visp3/core/vpMomentAreaNormalized.h
index 6fd8beadbb..ab512fd9d7 100644
--- a/modules/core/include/visp3/core/vpMomentAreaNormalized.h
+++ b/modules/core/include/visp3/core/vpMomentAreaNormalized.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,11 +29,7 @@
*
* Description:
* 2D normalized surface moment descriptor (usually described as An)
- *
- * Authors:
- * Filip Novotny
- *
-*****************************************************************************/
+ */
/*!
\file vpMomentAreaNormalized.h
\brief 2D normalized surface moment descriptor (usually described as An).
diff --git a/modules/core/include/visp3/core/vpMomentBasic.h b/modules/core/include/visp3/core/vpMomentBasic.h
index a11694ede0..5d8acf8dc1 100644
--- a/modules/core/include/visp3/core/vpMomentBasic.h
+++ b/modules/core/include/visp3/core/vpMomentBasic.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,11 +29,7 @@
*
* Description:
* Basic moment descriptor
- *
- * Authors:
- * Filip Novotny
- *
-*****************************************************************************/
+ */
/*!
\file vpMomentBasic.h
diff --git a/modules/core/include/visp3/core/vpMomentCInvariant.h b/modules/core/include/visp3/core/vpMomentCInvariant.h
index fdd3b545bc..6323fa859f 100644
--- a/modules/core/include/visp3/core/vpMomentCInvariant.h
+++ b/modules/core/include/visp3/core/vpMomentCInvariant.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -29,16 +28,12 @@
* WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* Description:
- * Descriptor for various invariants used to drive space roations around X and
- *Y axis.
- *
- * Authors:
- * Filip Novotny
- *
-*****************************************************************************/
+ * Descriptor for various invariants used to drive space rotations around X and
+ * Y axis.
+ */
/*!
\file vpMomentCInvariant.h
- \brief Descriptor for various invariants used to drive space roations around
+ \brief Descriptor for various invariants used to drive space rotations around
X and Y axis.
*/
#ifndef _vpMomentCInvariant_h_
@@ -145,7 +140,7 @@ class VISP_EXPORT vpMomentCInvariant : public vpMoment
public:
explicit vpMomentCInvariant(bool flg_sxsynormalization = false);
- virtual ~vpMomentCInvariant(){};
+ virtual ~vpMomentCInvariant() { };
/*!
Shorcut for getting the value of \f$C_1\f$.
diff --git a/modules/core/include/visp3/core/vpMomentCentered.h b/modules/core/include/visp3/core/vpMomentCentered.h
index 885d5723b0..2e0a8043a9 100644
--- a/modules/core/include/visp3/core/vpMomentCentered.h
+++ b/modules/core/include/visp3/core/vpMomentCentered.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,11 +29,7 @@
*
* Description:
* Centered moment descriptor
- *
- * Authors:
- * Filip Novotny
- *
-*****************************************************************************/
+ */
#ifndef _vpMomentCentered_h_
#define _vpMomentCentered_h_
diff --git a/modules/core/include/visp3/core/vpMomentCommon.h b/modules/core/include/visp3/core/vpMomentCommon.h
index b95fd05212..5fbae91c2d 100644
--- a/modules/core/include/visp3/core/vpMomentCommon.h
+++ b/modules/core/include/visp3/core/vpMomentCommon.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,11 +29,7 @@
*
* Description:
* Pre-filled moment database with all commonly used moments.
- *
- * Authors:
- * Filip Novotny
- *
-*****************************************************************************/
+ */
/*!
\file vpMomentCommon.h
\brief Pre-filled moment database with all commonly used moments.
diff --git a/modules/core/include/visp3/core/vpMomentDatabase.h b/modules/core/include/visp3/core/vpMomentDatabase.h
index 84ddc1eed9..f9b4c80902 100644
--- a/modules/core/include/visp3/core/vpMomentDatabase.h
+++ b/modules/core/include/visp3/core/vpMomentDatabase.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,11 +29,7 @@
*
* Description:
* Pseudo-database used to handle dependencies between moments
- *
- * Authors:
- * Filip Novotny
- *
-*****************************************************************************/
+ */
/*!
\file vpMomentDatabase.h
\brief Pseudo-database used to handle dependencies between moments.
@@ -119,8 +114,8 @@ int main()
Gravity center:
Xg=1.5, Yg=1.5
Centered moments:
-2 0
-0 x
+2 0
+0 x
\endcode
A moment is identified in the database by it's vpMoment::name method.
@@ -132,11 +127,11 @@ class VISP_EXPORT vpMomentDatabase
{
private:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
- struct cmp_str {
+ struct vpCmpStr_t {
bool operator()(char const *a, char const *b) const { return std::strcmp(a, b) < 0; }
};
#endif
- std::map moments;
+ std::map moments;
void add(vpMoment &moment, const char *name);
public:
diff --git a/modules/core/include/visp3/core/vpMomentGravityCenter.h b/modules/core/include/visp3/core/vpMomentGravityCenter.h
index a421bb27b5..66e212ca76 100644
--- a/modules/core/include/visp3/core/vpMomentGravityCenter.h
+++ b/modules/core/include/visp3/core/vpMomentGravityCenter.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,11 +29,7 @@
*
* Description:
* 2D Gravity Center moment descriptor (usually described by the pair Xg,Yg)
- *
- * Authors:
- * Filip Novotny
- *
-*****************************************************************************/
+ */
/*!
\file vpMomentGravityCenter.h
\brief 2D Gravity Center moment descriptor (usually described by the pair
diff --git a/modules/core/include/visp3/core/vpMomentGravityCenterNormalized.h b/modules/core/include/visp3/core/vpMomentGravityCenterNormalized.h
index 7b03d9162a..a86e80af28 100644
--- a/modules/core/include/visp3/core/vpMomentGravityCenterNormalized.h
+++ b/modules/core/include/visp3/core/vpMomentGravityCenterNormalized.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,12 +29,8 @@
*
* Description:
* 2D normalized gravity center moment descriptor (usually described by the
- *pair Xn,Yn)
- *
- * Authors:
- * Filip Novotny
- *
-*****************************************************************************/
+ * pair Xn,Yn)
+ */
/*!
\file vpMomentGravityCenterNormalized.h
\brief 2D normalized gravity center moment descriptor (usually described by
diff --git a/modules/core/include/visp3/core/vpMomentObject.h b/modules/core/include/visp3/core/vpMomentObject.h
index dda4377171..1e39cec69d 100644
--- a/modules/core/include/visp3/core/vpMomentObject.h
+++ b/modules/core/include/visp3/core/vpMomentObject.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,11 +29,7 @@
*
* Description:
* Object input structure used by moments.
- *
- * Authors:
- * Filip Novotny
- * Manikandan Bakthavatchalam
- *****************************************************************************/
+ */
/*!
\file vpMomentObject.h
\brief Object input structure used by moments.
@@ -194,12 +189,12 @@ m04=0.00080625 m14=-7.125e-05
m05=-6.59375e-05
Basic moment available:
-4 0.1 0.21 0.019 0.0129 0.00211
--0.05 0.02 0.003 0.0023 0.00057 x
-0.0525 -0.0015 0.0026 9e-05 x x
--0.002375 0.000575 -4.5e-05 x x x
-0.00080625 -7.125e-05 x x x x
--6.59375e-05 x x x x x
+4 0.1 0.21 0.019 0.0129 0.00211
+-0.05 0.02 0.003 0.0023 0.00057 x
+0.0525 -0.0015 0.0026 9e-05 x x
+-0.002375 0.000575 -4.5e-05 x x x
+0.00080625 -7.125e-05 x x x x
+-6.59375e-05 x x x x x
Direct access to some basic moments:
m00: 4
@@ -225,7 +220,8 @@ class VISP_EXPORT vpMomentObject
/*!
Type of object that will be considered.
*/
- typedef enum {
+ typedef enum
+ {
DENSE_FULL_OBJECT = 0, /*!< A set of points (typically from an image)
which are interpreted as being dense. */
DENSE_POLYGON = 1, /*!< A set of points (stored in clockwise order)
@@ -237,7 +233,8 @@ class VISP_EXPORT vpMomentObject
/*!
Type of camera image background.
*/
- typedef enum {
+ typedef enum
+ {
BLACK = 0, //!< Black background
WHITE = 1, //!< Not functional right now
} vpCameraImgBckGrndType;
diff --git a/modules/core/include/visp3/core/vpMouseButton.h b/modules/core/include/visp3/core/vpMouseButton.h
index 16812388f2..3d68601f20 100644
--- a/modules/core/include/visp3/core/vpMouseButton.h
+++ b/modules/core/include/visp3/core/vpMouseButton.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,9 +29,7 @@
*
* Description:
* Color definition.
- *
- *
-*****************************************************************************/
+ */
#ifndef vpMouseButton_h
#define vpMouseButton_h
diff --git a/modules/core/include/visp3/core/vpMunkres.h b/modules/core/include/visp3/core/vpMunkres.h
index 1228f9d318..11db82c4d5 100644
--- a/modules/core/include/visp3/core/vpMunkres.h
+++ b/modules/core/include/visp3/core/vpMunkres.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,12 +29,7 @@
*
* Description:
* Class for Munkres Assignment Algorithm.
- *
- * Authors:
- * Souriya Trinh
- * Julien Dufour
- *
-*****************************************************************************/
+ */
#pragma once
@@ -44,7 +38,7 @@
#if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_17) && \
(!defined(_MSC_VER) || ((VISP_CXX_STANDARD >= VISP_CXX_STANDARD_17) && (_MSC_VER >= 1911)))
-// Visual Studio: Optionals are available from Visual Studio 2017 RTW (15.0) [1910]
+// Visual Studio: Optionals are available from Visual Studio 2017 RTW (15.0) [1910]
// Visual Studio: Structured bindings are available from Visual Studio 2017 version 15.3 [1911]
// System
diff --git a/modules/core/include/visp3/core/vpMutex.h b/modules/core/include/visp3/core/vpMutex.h
index 4faeff7944..96a8fc0501 100644
--- a/modules/core/include/visp3/core/vpMutex.h
+++ b/modules/core/include/visp3/core/vpMutex.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,11 +29,7 @@
*
* Description:
* Mutex protection.
- *
- * Authors:
- * Celine Teuliere
- *
-*****************************************************************************/
+ */
#ifndef _vpMutex_h_
#define _vpMutex_h_
diff --git a/modules/core/include/visp3/core/vpNetwork.h b/modules/core/include/visp3/core/vpNetwork.h
index e1f2427f8f..0daa9a5173 100644
--- a/modules/core/include/visp3/core/vpNetwork.h
+++ b/modules/core/include/visp3/core/vpNetwork.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,11 +29,7 @@
*
* Description:
* TCP Network
- *
- * Authors:
- * Aurelien Yol
- *
-*****************************************************************************/
+ */
#ifndef vpNetwork_H
#define vpNetwork_H
@@ -155,13 +150,13 @@ class VISP_EXPORT vpNetwork
bool verboseMode;
private:
- std::vector _handleRequests();
- int _handleFirstRequest();
+ std::vector privHandleRequests();
+ int privHandleFirstRequest();
- void _receiveRequest();
- void _receiveRequestFrom(const unsigned int &receptorEmitting);
- int _receiveRequestOnce();
- int _receiveRequestOnceFrom(const unsigned int &receptorEmitting);
+ void privReceiveRequest();
+ void privReceiveRequestFrom(const unsigned int &receptorEmitting);
+ int privReceiveRequestOnce();
+ int privReceiveRequestOnceFrom(const unsigned int &receptorEmitting);
public:
vpNetwork();
diff --git a/modules/core/include/visp3/core/vpNoise.h b/modules/core/include/visp3/core/vpNoise.h
index 06c61bfa71..eac6c7b780 100644
--- a/modules/core/include/visp3/core/vpNoise.h
+++ b/modules/core/include/visp3/core/vpNoise.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,8 +29,7 @@
*
* Description:
* Generation of random number with uniform and normal probability density.
- *
-*****************************************************************************/
+ */
#ifndef vpNoise_hh
#define vpNoise_hh
diff --git a/modules/core/include/visp3/core/vpPixelMeterConversion.h b/modules/core/include/visp3/core/vpPixelMeterConversion.h
index a9721431c2..0e546b1149 100644
--- a/modules/core/include/visp3/core/vpPixelMeterConversion.h
+++ b/modules/core/include/visp3/core/vpPixelMeterConversion.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,8 +29,7 @@
*
* Description:
* Pixel to meter conversion.
- *
-*****************************************************************************/
+ */
#ifndef _vpPixelMeterConversion_h_
#define _vpPixelMeterConversion_h_
diff --git a/modules/core/include/visp3/core/vpPlane.h b/modules/core/include/visp3/core/vpPlane.h
index d37cdf0d68..7c150a641f 100644
--- a/modules/core/include/visp3/core/vpPlane.h
+++ b/modules/core/include/visp3/core/vpPlane.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,8 +29,7 @@
*
* Description:
* Plane geometrical structure.
- *
-*****************************************************************************/
+ */
#ifndef vpPlane_hh
#define vpPlane_hh
diff --git a/modules/core/include/visp3/core/vpPoint.h b/modules/core/include/visp3/core/vpPoint.h
index a16eb1cb25..989859132d 100644
--- a/modules/core/include/visp3/core/vpPoint.h
+++ b/modules/core/include/visp3/core/vpPoint.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,8 +29,7 @@
*
* Description:
* Point feature.
- *
-*****************************************************************************/
+ */
#ifndef vpPoint_H
#define vpPoint_H
diff --git a/modules/core/include/visp3/core/vpPolygon.h b/modules/core/include/visp3/core/vpPolygon.h
index b62a23a7b8..4084ccf85f 100644
--- a/modules/core/include/visp3/core/vpPolygon.h
+++ b/modules/core/include/visp3/core/vpPolygon.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,8 +29,7 @@
*
* Description:
* Defines a generic 2D polygon.
- *
-*****************************************************************************/
+ */
#ifndef _vpPolygon_h_
#define _vpPolygon_h_
diff --git a/modules/core/include/visp3/core/vpPolygon3D.h b/modules/core/include/visp3/core/vpPolygon3D.h
index fd73a97686..cb3e5b3bb2 100644
--- a/modules/core/include/visp3/core/vpPolygon3D.h
+++ b/modules/core/include/visp3/core/vpPolygon3D.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,11 +29,7 @@
*
* Description:
* Implements a polygon of the model used by the model-based tracker.
- *
- * Authors:
- * Aurelien Yol
- *
-*****************************************************************************/
+ */
/*!
\file vpPolygon3D.h
diff --git a/modules/core/include/visp3/core/vpPoseVector.h b/modules/core/include/visp3/core/vpPoseVector.h
index e0b79d2f16..e98544a936 100644
--- a/modules/core/include/visp3/core/vpPoseVector.h
+++ b/modules/core/include/visp3/core/vpPoseVector.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -31,8 +30,7 @@
* Description:
* Pose object. A pose is a size 6 vector [t, tu]^T where tu is
* a rotation vector (theta u representation) and t is a translation vector.
- *
-*****************************************************************************/
+ */
#ifndef vpPOSEVECTOR_H
#define vpPOSEVECTOR_H
diff --git a/modules/core/include/visp3/core/vpQuadProg.h b/modules/core/include/visp3/core/vpQuadProg.h
index 72949a4ae6..e63d638631 100644
--- a/modules/core/include/visp3/core/vpQuadProg.h
+++ b/modules/core/include/visp3/core/vpQuadProg.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,11 +29,7 @@
*
* Description:
* Quadratic Programming
- *
- * Authors:
- * Olivier Kermorgant
- *
-*****************************************************************************/
+ */
#ifndef vpQuadProgh
#define vpQuadProgh
diff --git a/modules/core/include/visp3/core/vpQuaternionVector.h b/modules/core/include/visp3/core/vpQuaternionVector.h
index 7f8d3393f6..7b4d177535 100644
--- a/modules/core/include/visp3/core/vpQuaternionVector.h
+++ b/modules/core/include/visp3/core/vpQuaternionVector.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,11 +29,7 @@
*
* Description:
* Quaternion definition.
- *
- * Authors:
- * Filip Novotny
- *
-*****************************************************************************/
+ */
#ifndef _vpQuaternionVector_h_
#define _vpQuaternionVector_h_
diff --git a/modules/core/include/visp3/core/vpRGBa.h b/modules/core/include/visp3/core/vpRGBa.h
index 8cd8d265b3..f44bf0e735 100644
--- a/modules/core/include/visp3/core/vpRGBa.h
+++ b/modules/core/include/visp3/core/vpRGBa.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,8 +29,7 @@
*
* Description:
* RGBA pixel.
- *
-*****************************************************************************/
+ */
#ifndef vpRGBa_h
#define vpRGBa_h
diff --git a/modules/core/include/visp3/core/vpRGBf.h b/modules/core/include/visp3/core/vpRGBf.h
index 5e5a75d702..1db9f4b63e 100644
--- a/modules/core/include/visp3/core/vpRGBf.h
+++ b/modules/core/include/visp3/core/vpRGBf.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,8 +29,7 @@
*
* Description:
* 32-bit floating point RGB pixel.
- *
-*****************************************************************************/
+ */
#ifndef vpRGBf_h
#define vpRGBf_h
diff --git a/modules/core/include/visp3/core/vpRansac.h b/modules/core/include/visp3/core/vpRansac.h
index 3397bb366b..fedd345f98 100644
--- a/modules/core/include/visp3/core/vpRansac.h
+++ b/modules/core/include/visp3/core/vpRansac.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,8 +29,7 @@
*
* Description:
* Ransac robust algorithm.
- *
-*****************************************************************************/
+ */
/*!
\file vpRansac.h
diff --git a/modules/core/include/visp3/core/vpRect.h b/modules/core/include/visp3/core/vpRect.h
index 6154f70c57..985d0dbd73 100644
--- a/modules/core/include/visp3/core/vpRect.h
+++ b/modules/core/include/visp3/core/vpRect.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,8 +29,7 @@
*
* Description:
* Defines a rectangle in the plane.
- *
-*****************************************************************************/
+ */
#ifndef vpRect_h
#define vpRect_h
diff --git a/modules/core/include/visp3/core/vpRectOriented.h b/modules/core/include/visp3/core/vpRectOriented.h
index 2795f60cb5..bfdd116a07 100644
--- a/modules/core/include/visp3/core/vpRectOriented.h
+++ b/modules/core/include/visp3/core/vpRectOriented.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,8 +29,7 @@
*
* Description:
* Defines a (possibly oriented) rectangle in the plane.
- *
-*****************************************************************************/
+ */
#ifndef vpRectOriented_h
#define vpRectOriented_h
diff --git a/modules/core/include/visp3/core/vpRequest.h b/modules/core/include/visp3/core/vpRequest.h
index efec29ada0..c2370de1d6 100644
--- a/modules/core/include/visp3/core/vpRequest.h
+++ b/modules/core/include/visp3/core/vpRequest.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,11 +29,7 @@
*
* Description:
* Network Request.
- *
- * Authors:
- * Aurelien Yol
- *
-*****************************************************************************/
+ */
#ifndef vpRequest_H
#define vpRequest_H
diff --git a/modules/core/include/visp3/core/vpRobust.h b/modules/core/include/visp3/core/vpRobust.h
index 54ed46af0d..0746e9a23c 100644
--- a/modules/core/include/visp3/core/vpRobust.h
+++ b/modules/core/include/visp3/core/vpRobust.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,12 +29,7 @@
*
* Description:
* M-Estimator and various influence function.
- *
- * Authors:
- * Andrew Comport
- * Jean Laneurit
- *
-*****************************************************************************/
+ */
/*!
\file vpRobust.h
diff --git a/modules/core/include/visp3/core/vpRotationMatrix.h b/modules/core/include/visp3/core/vpRotationMatrix.h
index 1d9a9a76cb..0862fa8cbb 100644
--- a/modules/core/include/visp3/core/vpRotationMatrix.h
+++ b/modules/core/include/visp3/core/vpRotationMatrix.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,8 +29,7 @@
*
* Description:
* Rotation matrix.
- *
-*****************************************************************************/
+ */
#ifndef _vpRotationMatrix_h_
#define _vpRotationMatrix_h_
diff --git a/modules/core/include/visp3/core/vpRotationVector.h b/modules/core/include/visp3/core/vpRotationVector.h
index 9b580c47a4..3ded305a11 100644
--- a/modules/core/include/visp3/core/vpRotationVector.h
+++ b/modules/core/include/visp3/core/vpRotationVector.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,8 +29,7 @@
*
* Description:
* Generic rotation vector (cannot be used as is !).
- *
-*****************************************************************************/
+ */
#ifndef _vpRotationVector_h_
#define _vpRotationVector_h_
diff --git a/modules/core/include/visp3/core/vpRowVector.h b/modules/core/include/visp3/core/vpRowVector.h
index 7a2164771d..2e17c4ea18 100644
--- a/modules/core/include/visp3/core/vpRowVector.h
+++ b/modules/core/include/visp3/core/vpRowVector.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,8 +29,7 @@
*
* Description:
* Operation on row vectors.
- *
-*****************************************************************************/
+ */
#ifndef vpRowVector_H
#define vpRowVector_H
diff --git a/modules/core/include/visp3/core/vpRxyzVector.h b/modules/core/include/visp3/core/vpRxyzVector.h
index c5ecf7a073..330807fcec 100644
--- a/modules/core/include/visp3/core/vpRxyzVector.h
+++ b/modules/core/include/visp3/core/vpRxyzVector.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -31,8 +30,7 @@
* Description:
* Rxyz angle parameterization for the rotation.
* Rxyz(phi,theta,psi) = Rot(x,phi)Rot(y,theta)Rot(z,psi).
- *
-*****************************************************************************/
+ */
#ifndef _vpRxyzVector_h_
#define _vpRxyzVector_h_
diff --git a/modules/core/include/visp3/core/vpRzyxVector.h b/modules/core/include/visp3/core/vpRzyxVector.h
index b68f68fab9..fce560b5d1 100644
--- a/modules/core/include/visp3/core/vpRzyxVector.h
+++ b/modules/core/include/visp3/core/vpRzyxVector.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -31,8 +30,7 @@
* Description:
* Rzyx angle parameterization for the rotation.
* Rzyx(phi,theta,psi) = Rot(z,phi)Rot(y,theta)Rot(x,psi)
- *
-*****************************************************************************/
+ */
#ifndef _vpRzyxVector_h_
#define _vpRzyxVector_h_
diff --git a/modules/core/include/visp3/core/vpRzyzVector.h b/modules/core/include/visp3/core/vpRzyzVector.h
index 3c763a78c4..fce5874764 100644
--- a/modules/core/include/visp3/core/vpRzyzVector.h
+++ b/modules/core/include/visp3/core/vpRzyzVector.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -31,8 +30,7 @@
* Description:
* Euler angles parameterization for the rotation.
* Rzyz(phi,theta,psi) = Rot(z,phi)Rot(y,theta)Rot(z,psi)
- *
-*****************************************************************************/
+ */
#ifndef _vpRzyzVector_h_
#define _vpRzyzVector_h_
diff --git a/modules/core/include/visp3/core/vpScale.h b/modules/core/include/visp3/core/vpScale.h
index 6d19b1aabb..98da42ad49 100644
--- a/modules/core/include/visp3/core/vpScale.h
+++ b/modules/core/include/visp3/core/vpScale.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,12 +29,8 @@
*
* Description:
* Median Absolute Deviation (MAD), MPDE, Mean shift kernel density
- *estimation.
- *
- * Authors:
- * Andrew Comport
- *
-*****************************************************************************/
+ * estimation.
+ */
/*!
\file vpScale.h
@@ -45,7 +40,7 @@
/*!
* \brief Contains various estimators for scale.
* \n Methods : Median Absolute Deviation (MAD),
- * MPDE, Mean shift kernel
+ * MPDE, Mean shift kernel
* density estimation. \author Andrew Comport \date 24/10/03
*/
// ==========================================================
diff --git a/modules/core/include/visp3/core/vpSerial.h b/modules/core/include/visp3/core/vpSerial.h
index 3cc15717d8..1707e9c619 100644
--- a/modules/core/include/visp3/core/vpSerial.h
+++ b/modules/core/include/visp3/core/vpSerial.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,8 +29,7 @@
*
* Description:
* Serial communication.
- *
-*****************************************************************************/
+ */
#ifndef _vpSerial_h_
#define _vpSerial_h_
diff --git a/modules/core/include/visp3/core/vpServer.h b/modules/core/include/visp3/core/vpServer.h
index 3a6748845b..d5eac7597c 100644
--- a/modules/core/include/visp3/core/vpServer.h
+++ b/modules/core/include/visp3/core/vpServer.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,11 +29,7 @@
*
* Description:
* TCP Server
- *
- * Authors:
- * Aurelien Yol
- *
-*****************************************************************************/
+ */
#ifndef vpServer_H
#define vpServer_H
diff --git a/modules/core/include/visp3/core/vpSphere.h b/modules/core/include/visp3/core/vpSphere.h
index 8f39251cf9..4c818f7c5e 100644
--- a/modules/core/include/visp3/core/vpSphere.h
+++ b/modules/core/include/visp3/core/vpSphere.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,8 +29,7 @@
*
* Description:
* Sphere feature.
- *
-*****************************************************************************/
+ */
/*!
\file vpSphere.h
diff --git a/modules/core/include/visp3/core/vpSubColVector.h b/modules/core/include/visp3/core/vpSubColVector.h
index 21aa5059c7..58f9ec9d79 100644
--- a/modules/core/include/visp3/core/vpSubColVector.h
+++ b/modules/core/include/visp3/core/vpSubColVector.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -29,12 +28,8 @@
* WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* Description:
- * Mask on a vpColVector .
- *
- * Authors:
- * Laneurit Jean
- *
-*****************************************************************************/
+ * Mask on a vpColVector.
+ */
#ifndef _vpSubColVector_h_
#define _vpSubColVector_h_
diff --git a/modules/core/include/visp3/core/vpSubMatrix.h b/modules/core/include/visp3/core/vpSubMatrix.h
index e50e398247..8cabf02d03 100644
--- a/modules/core/include/visp3/core/vpSubMatrix.h
+++ b/modules/core/include/visp3/core/vpSubMatrix.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -29,12 +28,8 @@
* WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* Description:
- * Mask on a vpMatrix .
- *
- * Authors:
- * Laneurit Jean
- *
-*****************************************************************************/
+ * Mask on a vpMatrix.
+ */
#ifndef _vpSubMatrix_h_
#define _vpSubMatrix_h_
diff --git a/modules/core/include/visp3/core/vpSubRowVector.h b/modules/core/include/visp3/core/vpSubRowVector.h
index 1af4c75023..21660d7cf5 100644
--- a/modules/core/include/visp3/core/vpSubRowVector.h
+++ b/modules/core/include/visp3/core/vpSubRowVector.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -29,12 +28,8 @@
* WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* Description:
- * Mask on a vpRowVector .
- *
- * Authors:
- * Laneurit Jean
- *
-*****************************************************************************/
+ * Mask on a vpRowVector.
+ */
#ifndef _vpSubRowVector_h_
#define _vpSubRowVector_h_
diff --git a/modules/core/include/visp3/core/vpThetaUVector.h b/modules/core/include/visp3/core/vpThetaUVector.h
index 6487691a0c..b1c6d10dc9 100644
--- a/modules/core/include/visp3/core/vpThetaUVector.h
+++ b/modules/core/include/visp3/core/vpThetaUVector.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,8 +29,7 @@
*
* Description:
* Theta U parameterization for the rotation.
- *
-*****************************************************************************/
+ */
#ifndef _vpThetaUVector_h_
#define _vpThetaUVector_h_
diff --git a/modules/core/include/visp3/core/vpThread.h b/modules/core/include/visp3/core/vpThread.h
index d59708467c..f795aca60f 100644
--- a/modules/core/include/visp3/core/vpThread.h
+++ b/modules/core/include/visp3/core/vpThread.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,8 +29,7 @@
*
* Description:
* Threading capabilities
- *
-*****************************************************************************/
+ */
#ifndef _vpPthread_h_
#define _vpPthread_h_
diff --git a/modules/core/include/visp3/core/vpTime.h b/modules/core/include/visp3/core/vpTime.h
index 9ea5df19d2..3bc5d5ae2b 100644
--- a/modules/core/include/visp3/core/vpTime.h
+++ b/modules/core/include/visp3/core/vpTime.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,8 +29,7 @@
*
* Description:
* Time management and measurement.
- *
-*****************************************************************************/
+ */
#ifndef vpTime_h
#define vpTime_h
diff --git a/modules/core/include/visp3/core/vpTracker.h b/modules/core/include/visp3/core/vpTracker.h
index a227d70b42..25662d0f22 100644
--- a/modules/core/include/visp3/core/vpTracker.h
+++ b/modules/core/include/visp3/core/vpTracker.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,8 +29,7 @@
*
* Description:
* Generic tracker.
- *
-*****************************************************************************/
+ */
#ifndef vpTracker_H
#define vpTracker_H
diff --git a/modules/core/include/visp3/core/vpTrackingException.h b/modules/core/include/visp3/core/vpTrackingException.h
index d2c090b0bf..c17e6bcd9a 100644
--- a/modules/core/include/visp3/core/vpTrackingException.h
+++ b/modules/core/include/visp3/core/vpTrackingException.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,56 +29,45 @@
*
* Description:
* Exceptions that can be emitted by the vpTracking class and its derivatives.
- *
-*****************************************************************************/
+ */
#ifndef _vpTrackingException_H
#define _vpTrackingException_H
-/* -------------------------------------------------------------------------
- */
-/* --- INCLUDE -------------------------------------------------------------
- */
-/* -------------------------------------------------------------------------
- */
-
-/* \file vpTrackingException.h
- \brief error that can be emitted by the vpTracker class and its derivatives
+/*!
+ * \file vpTrackingException.h
+ * \brief error that can be emitted by the vpTracker class and its derivatives
*/
-/* Classes standards. */
-#include /* Classe std::ostream. */
-#include /* Classe string. */
+#include
+#include
#include
-/* -------------------------------------------------------------------------
- */
-/* --- CLASS ---------------------------------------------------------------
- */
-/* -------------------------------------------------------------------------
- */
/*!
- \class vpTrackingException
- \ingroup group_core_debug
- \brief Error that can be emitted by the vpTracker class and its derivatives.
+ * \class vpTrackingException
+ * \ingroup group_core_debug
+ * \brief Error that can be emitted by the vpTracker class and its derivatives.
*/
class VISP_EXPORT vpTrackingException : public vpException
{
public:
/*!
- \brief Lists the possible error than can be emitted while calling
- vpTracking member
- */
- enum errorTrackingCodeEnum {
- featureLostError,
-
+ * \brief Lists the possible error than can be emitted while calling
+ * vpTracking member
+ */
+ enum errorTrackingCodeEnum
+ {
+ featureLostError, //!< Tracker lost feature
// Moving edges
- notEnoughPointError,
- initializationError,
- fatalError
+ notEnoughPointError, //!< Not enough point to track
+ initializationError, //!< Tracker initialization error
+ fatalError //!< Tracker fatal error
};
public:
+ /*!
+ * Constructor.
+ */
vpTrackingException(int id, const char *format, ...)
{
this->code = id;
@@ -88,7 +76,15 @@ class VISP_EXPORT vpTrackingException : public vpException
setMessage(format, args);
va_end(args);
}
+
+ /*!
+ * Constructor.
+ */
vpTrackingException(int id, const std::string &msg) : vpException(id, msg) { }
+
+ /*!
+ * Constructor.
+ */
explicit vpTrackingException(int id) : vpException(id) { }
};
diff --git a/modules/core/include/visp3/core/vpTranslationVector.h b/modules/core/include/visp3/core/vpTranslationVector.h
index 0af1b6d39a..a48d24b509 100644
--- a/modules/core/include/visp3/core/vpTranslationVector.h
+++ b/modules/core/include/visp3/core/vpTranslationVector.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,8 +29,7 @@
*
* Description:
* Translation vector.
- *
-*****************************************************************************/
+ */
#ifndef vpTRANSLATIONVECTOR_H
#define vpTRANSLATIONVECTOR_H
diff --git a/modules/core/include/visp3/core/vpTriangle.h b/modules/core/include/visp3/core/vpTriangle.h
index 3424b91a9a..fd7ec5b651 100644
--- a/modules/core/include/visp3/core/vpTriangle.h
+++ b/modules/core/include/visp3/core/vpTriangle.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,10 +29,7 @@
*
* Description:
* Defines a 2D triangle.
- *
-
- *
-*****************************************************************************/
+ */
#ifndef vpTriangle_h
#define vpTriangle_h
diff --git a/modules/core/include/visp3/core/vpUDPClient.h b/modules/core/include/visp3/core/vpUDPClient.h
index dcd1365834..f48b31a7ef 100644
--- a/modules/core/include/visp3/core/vpUDPClient.h
+++ b/modules/core/include/visp3/core/vpUDPClient.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,8 +29,7 @@
*
* Description:
* UDP Client
- *
-*****************************************************************************/
+ */
#ifndef _vpUDPClient_h_
#define _vpUDPClient_h_
@@ -127,11 +125,11 @@ int main() {
#include
#include
-struct DataType {
+struct vpDataType_t {
double double_val;
int int_val;
- DataType() : double_val(0.0), int_val(0) {}
- DataType(double dbl, int i) : double_val(dbl), int_val(i) {}
+ vpDataType_t() : double_val(0.0), int_val(0) {}
+ vpDataType_t(double dbl, int i) : double_val(dbl), int_val(i) {}
};
int main() {
@@ -139,7 +137,7 @@ int main() {
std::string servername = "127.0.0.1";
unsigned int port = 50037;
vpUDPClient client(servername, port);
- DataType data_type(1234.56789, 123450);
+ vpDataType_t data_type(1234.56789, 123450);
char data[sizeof(data_type.double_val)+sizeof(data_type.int_val)];
memcpy(data, &data_type.double_val, sizeof(data_type.double_val));
diff --git a/modules/core/include/visp3/core/vpUDPServer.h b/modules/core/include/visp3/core/vpUDPServer.h
index 67920c70c1..351f20a2f7 100644
--- a/modules/core/include/visp3/core/vpUDPServer.h
+++ b/modules/core/include/visp3/core/vpUDPServer.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,8 +29,7 @@
*
* Description:
* UDP Server
- *
-*****************************************************************************/
+ */
#ifndef _vpUDPServer_h_
#define _vpUDPServer_h_
@@ -144,12 +142,12 @@ receive):
#include
#include
-struct DataType {
+struct vpDataType_t {
double double_val;
int int_val;
- DataType() : double_val(0.0), int_val(0) {}
- DataType(double dbl, int i) : double_val(dbl), int_val(i) {}
+ vpDataType_t() : double_val(0.0), int_val(0) {}
+ vpDataType_t(double dbl, int i) : double_val(dbl), int_val(i) {}
};
int main() {
@@ -160,7 +158,7 @@ int main() {
std::string msg = "", hostInfo = "";
int res = server.receive(msg, hostInfo);
if (res) {
- DataType data_type;
+ vpDataType_t data_type;
memcpy(&data_type.double_val, msg.c_str(),
sizeof(data_type.double_val)); memcpy(&data_type.int_val,
msg.c_str()+sizeof(data_type.double_val), sizeof(data_type.int_val));
diff --git a/modules/core/include/visp3/core/vpUniRand.h b/modules/core/include/visp3/core/vpUniRand.h
index 29574ec287..8b17b16a24 100644
--- a/modules/core/include/visp3/core/vpUniRand.h
+++ b/modules/core/include/visp3/core/vpUniRand.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,8 +29,7 @@
*
* Description:
* Pseudo random number generator.
- *
-*****************************************************************************/
+ */
/*
* PCG Random Number Generation for C.
*
@@ -75,11 +73,11 @@ typedef unsigned __int32 uint32_t;
#endif
#if (VISP_CXX_STANDARD <= VISP_CXX_STANDARD_11)
- #include // std::random_shuffle
+#include // std::random_shuffle
#else
- #include // std::shuffle
- #include // std::mt19937
- #include // std::iota
+#include // std::shuffle
+#include // std::mt19937
+#include // std::iota
#endif
#include
@@ -116,24 +114,24 @@ typedef unsigned __int32 uint32_t;
4.86741
2
5.65826
- Original vector = [ 0 1 2 3 4 5 6 7 8 9 ]
- Shuffled vector = [ 2 4 7 8 5 1 3 6 9 0 ]
+ Original vector = [ 0 1 2 3 4 5 6 7 8 9 ]
+ Shuffled vector = [ 2 4 7 8 5 1 3 6 9 0 ]
\endcode
*/
class VISP_EXPORT vpUniRand
{
private:
- struct pcg_state_setseq_64 { // Internals are *Private*.
+ struct vpPcgStateSetseq_64_t
+ { // Internals are *Private*.
uint64_t state; // RNG state. All values are possible.
uint64_t inc; // Controls which RNG sequence (stream) is
// selected. Must *always* be odd.
- pcg_state_setseq_64(uint64_t state_ = 0x853c49e6748fea9bULL, uint64_t inc_ = 0xda3e39cb94b95bdbULL)
+ vpPcgStateSetseq_64_t(uint64_t state_ = 0x853c49e6748fea9bULL, uint64_t inc_ = 0xda3e39cb94b95bdbULL)
: state(state_), inc(inc_)
- {
- }
+ { }
};
- typedef struct pcg_state_setseq_64 pcg32_random_t;
+ typedef struct vpPcgStateSetseq_64_t pcg32_random_t;
public:
vpUniRand();
@@ -158,11 +156,11 @@ class VISP_EXPORT vpUniRand
inline static std::vector shuffleVector(const std::vector &inputVector)
{
std::vector shuffled = inputVector;
- #if (VISP_CXX_STANDARD <= VISP_CXX_STANDARD_11)
- std::random_shuffle ( shuffled.begin(), shuffled.end() );
- #else
- std::shuffle(shuffled.begin(), shuffled.end(), std::mt19937{std::random_device{}()});
- #endif
+#if (VISP_CXX_STANDARD <= VISP_CXX_STANDARD_11)
+ std::random_shuffle(shuffled.begin(), shuffled.end());
+#else
+ std::shuffle(shuffled.begin(), shuffled.end(), std::mt19937 { std::random_device{}() });
+#endif
return shuffled;
}
diff --git a/modules/core/include/visp3/core/vpVelocityTwistMatrix.h b/modules/core/include/visp3/core/vpVelocityTwistMatrix.h
index 756a492559..55530abdd6 100644
--- a/modules/core/include/visp3/core/vpVelocityTwistMatrix.h
+++ b/modules/core/include/visp3/core/vpVelocityTwistMatrix.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,8 +29,7 @@
*
* Description:
* Velocity twist transformation matrix.
- *
-*****************************************************************************/
+ */
#ifndef vpVelocityTwistMatrix_h
#define vpVelocityTwistMatrix_h
diff --git a/modules/core/include/visp3/core/vpXmlParser.h b/modules/core/include/visp3/core/vpXmlParser.h
index 7dac992018..e5970f1177 100644
--- a/modules/core/include/visp3/core/vpXmlParser.h
+++ b/modules/core/include/visp3/core/vpXmlParser.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -29,12 +28,8 @@
* WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* Description:
- * Tools to automatise the creation of xml parser based on the libXML2
- *
- * Authors:
- * Romain Tallonneau
- *
-*****************************************************************************/
+ * Tools to automatize the creation of xml parser based on the libXML2
+ */
#ifndef vpXmlParser_HH
#define vpXmlParser_HH
diff --git a/modules/core/include/visp3/core/vpXmlParserCamera.h b/modules/core/include/visp3/core/vpXmlParserCamera.h
index 0715f1b2c9..838a5f378d 100644
--- a/modules/core/include/visp3/core/vpXmlParserCamera.h
+++ b/modules/core/include/visp3/core/vpXmlParserCamera.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,8 +29,7 @@
*
* Description:
* XML parser to load and save camera intrinsic parameters.
- *
-*****************************************************************************/
+ */
/*!
\file vpXmlParserCamera.h
diff --git a/modules/core/include/visp3/core/vpXmlParserHomogeneousMatrix.h b/modules/core/include/visp3/core/vpXmlParserHomogeneousMatrix.h
index f23792e322..567c8fb631 100644
--- a/modules/core/include/visp3/core/vpXmlParserHomogeneousMatrix.h
+++ b/modules/core/include/visp3/core/vpXmlParserHomogeneousMatrix.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,8 +29,7 @@
*
* Description:
* XML parser to load and save Homogeneous Matrix in a XML file.
- *
-*****************************************************************************/
+ */
/*!
\file vpXmlParserHomogeneousMatrix.h
diff --git a/modules/core/include/visp3/core/vpXmlParserRectOriented.h b/modules/core/include/visp3/core/vpXmlParserRectOriented.h
index d290db48be..ce1073efe4 100644
--- a/modules/core/include/visp3/core/vpXmlParserRectOriented.h
+++ b/modules/core/include/visp3/core/vpXmlParserRectOriented.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -29,12 +28,8 @@
* WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* Description:
- * XML parser to load and save oriented rectangles in a XML file
- *
- * Authors:
- * Marc Pouliquen
- *
-*****************************************************************************/
+ * XML parser to load and save oriented rectangles in a XML file.
+ */
/*!
\file vpXmlParserRectOriented.h
diff --git a/modules/core/src/camera/vpCameraParameters.cpp b/modules/core/src/camera/vpCameraParameters.cpp
index 8c7a6c8ca5..1ef31179eb 100644
--- a/modules/core/src/camera/vpCameraParameters.cpp
+++ b/modules/core/src/camera/vpCameraParameters.cpp
@@ -187,8 +187,8 @@ int main()
It produces the following output:
\code
Camera parameters for perspective projection without distortion:
- px = 600 py = 600
- u0 = 320 v0 = 240
+ px = 600 py = 600
+ u0 = 320 v0 = 240
Field of view (horizontal: 56.145 and vertical: 43.6028 degrees)
\endcode
@@ -251,8 +251,8 @@ int main()
It produces the following output:
\code
Camera parameters for perspective projection with distortion:
- px = 600 py = 600
- u0 = 320 v0 = 240
+ px = 600 py = 600
+ u0 = 320 v0 = 240
kud = -0.19
kdu = 0.2
@@ -377,8 +377,8 @@ int main()
It produces the following output:
\code
Camera parameters for perspective projection without distortion:
- px = 601.832 py = 609.275
- u0 = 320 v0 = 240
+ px = 601.832 py = 609.275
+ u0 = 320 v0 = 240
Field of view (horizontal: 56 and vertical: 43 degrees)
\endcode
diff --git a/modules/core/src/image/vpColormap.cpp b/modules/core/src/image/vpColormap.cpp
index 9465601a46..982ac9eb6d 100644
--- a/modules/core/src/image/vpColormap.cpp
+++ b/modules/core/src/image/vpColormap.cpp
@@ -1,7 +1,6 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
- * Copyright (C) 2005 - 2022 Inria. All rights reserved.
+ * Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
* This software is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -30,9 +29,8 @@
*
* Description:
* Colormap class to recolor an image with different grayscale values into
- * some corresponding color values, for better visualisation for example.
- *
-*****************************************************************************/
+ * some corresponding color values, for better visualization for example.
+ */
#include
diff --git a/modules/core/src/image/vpImageConvert.cpp b/modules/core/src/image/vpImageConvert.cpp
index 90f76332c2..f1d6df0bf0 100644
--- a/modules/core/src/image/vpImageConvert.cpp
+++ b/modules/core/src/image/vpImageConvert.cpp
@@ -3946,16 +3946,16 @@ void vpImageConvert::split(const vpImage &src, vpImage *p
src.getWidth());
if (!pR) {
- delete [] ptrR;
+ delete[] ptrR;
}
if (!pG) {
- delete [] ptrG;
+ delete[] ptrG;
}
if (!pB) {
- delete [] ptrB;
+ delete[] ptrB;
}
if (!pa) {
- delete [] ptrA;
+ delete[] ptrA;
}
}
}
diff --git a/modules/core/src/math/kalman/vpLinearKalmanFilterInstantiation.cpp b/modules/core/src/math/kalman/vpLinearKalmanFilterInstantiation.cpp
index fe71a5d43f..9186d0a69c 100644
--- a/modules/core/src/math/kalman/vpLinearKalmanFilterInstantiation.cpp
+++ b/modules/core/src/math/kalman/vpLinearKalmanFilterInstantiation.cpp
@@ -814,7 +814,6 @@ void vpLinearKalmanFilterInstantiation::filter(vpColVector &z)
if (model == stateConstVel_MeasurePos) {
for (unsigned int i = 0; i < size_measure * nsignal; i++) {
double z_prev = Xest[size_state * i]; // Previous mesured position
- // std::cout << "Mesure pre: " << z_prev << std::endl;
Xest[size_state * i] = z[i];
Xest[size_state * i + 1] = (z[i] - z_prev) / dt;
}
diff --git a/modules/core/src/math/matrix/vpMatrix.cpp b/modules/core/src/math/matrix/vpMatrix.cpp
index 25979fb4ac..99d1b7b83b 100644
--- a/modules/core/src/math/matrix/vpMatrix.cpp
+++ b/modules/core/src/math/matrix/vpMatrix.cpp
@@ -1543,7 +1543,6 @@ void vpMatrix::negateMatrix(const vpMatrix &A, vpMatrix &C)
double **ArowPtrs = A.rowPtrs;
double **CrowPtrs = C.rowPtrs;
- // t0=vpTime::measureTimeMicros();
for (unsigned int i = 0; i < A.rowNum; i++)
for (unsigned int j = 0; j < A.colNum; j++)
CrowPtrs[i][j] = -ArowPtrs[i][j];
diff --git a/modules/core/src/math/matrix/vpMatrix_covariance.cpp b/modules/core/src/math/matrix/vpMatrix_covariance.cpp
index 762b04937c..24b0565f04 100644
--- a/modules/core/src/math/matrix/vpMatrix_covariance.cpp
+++ b/modules/core/src/math/matrix/vpMatrix_covariance.cpp
@@ -48,7 +48,7 @@
/*!
Compute the covariance matrix of the parameters x from a least squares
- minimisation defined as: Ax = b
+ minimization defined as: Ax = b
\param A : Matrix A from Ax = b.
@@ -77,7 +77,7 @@ vpMatrix vpMatrix::computeCovarianceMatrix(const vpMatrix &A, const vpColVector
/*!
Compute the covariance matrix of the parameters x from a least squares
- minimisation defined as: WAx = Wb
+ minimization defined as: WAx = Wb
\param A : Matrix A from WAx = Wb.
diff --git a/modules/core/src/math/misc/vpMath.cpp b/modules/core/src/math/misc/vpMath.cpp
index 1801681781..ba6b5a12a0 100644
--- a/modules/core/src/math/misc/vpMath.cpp
+++ b/modules/core/src/math/misc/vpMath.cpp
@@ -478,9 +478,18 @@ vpHomogeneousMatrix vpMath::ned2ecef(double lonDeg, double latDeg, double radius
double lat = vpMath::rad(latDeg);
vpHomogeneousMatrix ecef_M_ned;
- ecef_M_ned[0][0] = -sin(lat) * cos(lon); ecef_M_ned[0][1] = -sin(lon); ecef_M_ned[0][2] = -cos(lat) * cos(lon); ecef_M_ned[0][3] = radius * cos(lon) * cos(lat);
- ecef_M_ned[1][0] = -sin(lat) * sin(lon); ecef_M_ned[1][1] = cos(lon); ecef_M_ned[1][2] = -cos(lat) * sin(lon); ecef_M_ned[1][3] = radius * sin(lon) * cos(lat);
- ecef_M_ned[2][0] = cos(lat); ecef_M_ned[2][1] = 0; ecef_M_ned[2][2] = -sin(lat); ecef_M_ned[2][3] = radius * sin(lat);
+ ecef_M_ned[0][0] = -sin(lat) * cos(lon);
+ ecef_M_ned[0][1] = -sin(lon);
+ ecef_M_ned[0][2] = -cos(lat) * cos(lon);
+ ecef_M_ned[0][3] = radius * cos(lon) * cos(lat);
+ ecef_M_ned[1][0] = -sin(lat) * sin(lon);
+ ecef_M_ned[1][1] = cos(lon);
+ ecef_M_ned[1][2] = -cos(lat) * sin(lon);
+ ecef_M_ned[1][3] = radius * sin(lon) * cos(lat);
+ ecef_M_ned[2][0] = cos(lat);
+ ecef_M_ned[2][1] = 0;
+ ecef_M_ned[2][2] = -sin(lat);
+ ecef_M_ned[2][3] = radius * sin(lat);
return ecef_M_ned;
}
@@ -530,9 +539,18 @@ vpHomogeneousMatrix vpMath::enu2ecef(double lonDeg, double latDeg, double radius
double lat = vpMath::rad(latDeg);
vpHomogeneousMatrix ecef_M_enu;
- ecef_M_enu[0][0] = -sin(lon); ecef_M_enu[0][1] = -sin(lat) * cos(lon); ecef_M_enu[0][2] = cos(lat) * cos(lon); ecef_M_enu[0][3] = radius * cos(lon) * cos(lat);
- ecef_M_enu[1][0] = cos(lon); ecef_M_enu[1][1] = -sin(lat) * sin(lon); ecef_M_enu[1][2] = cos(lat) * sin(lon); ecef_M_enu[1][3] = radius * sin(lon) * cos(lat);
- ecef_M_enu[2][0] = 0; ecef_M_enu[2][1] = cos(lat); ecef_M_enu[2][2] = sin(lat); ecef_M_enu[2][3] = radius * sin(lat);
+ ecef_M_enu[0][0] = -sin(lon);
+ ecef_M_enu[0][1] = -sin(lat) * cos(lon);
+ ecef_M_enu[0][2] = cos(lat) * cos(lon);
+ ecef_M_enu[0][3] = radius * cos(lon) * cos(lat);
+ ecef_M_enu[1][0] = cos(lon);
+ ecef_M_enu[1][1] = -sin(lat) * sin(lon);
+ ecef_M_enu[1][2] = cos(lat) * sin(lon);
+ ecef_M_enu[1][3] = radius * sin(lon) * cos(lat);
+ ecef_M_enu[2][0] = 0;
+ ecef_M_enu[2][1] = cos(lat);
+ ecef_M_enu[2][2] = sin(lat);
+ ecef_M_enu[2][3] = radius * sin(lat);
return ecef_M_enu;
}
@@ -646,9 +664,18 @@ vpHomogeneousMatrix vpMath::lookAt(const vpColVector &from, const vpColVector &t
vpColVector up = vpColVector::crossProd(forward, right).normalize();
vpHomogeneousMatrix wMc;
- wMc[0][0] = right[0]; wMc[0][1] = up[0]; wMc[0][2] = forward[0]; wMc[0][3] = from[0];
- wMc[1][0] = right[1]; wMc[1][1] = up[1]; wMc[1][2] = forward[1]; wMc[1][3] = from[1];
- wMc[2][0] = right[2]; wMc[2][1] = up[2]; wMc[2][2] = forward[2]; wMc[2][3] = from[2];
+ wMc[0][0] = right[0];
+ wMc[0][1] = up[0];
+ wMc[0][2] = forward[0];
+ wMc[0][3] = from[0];
+ wMc[1][0] = right[1];
+ wMc[1][1] = up[1];
+ wMc[1][2] = forward[1];
+ wMc[1][3] = from[1];
+ wMc[2][0] = right[2];
+ wMc[2][1] = up[2];
+ wMc[2][2] = forward[2];
+ wMc[2][3] = from[2];
return wMc;
}
diff --git a/modules/core/src/math/spline/vpBSpline.cpp b/modules/core/src/math/spline/vpBSpline.cpp
index 7370bddd8d..408757f339 100644
--- a/modules/core/src/math/spline/vpBSpline.cpp
+++ b/modules/core/src/math/spline/vpBSpline.cpp
@@ -44,9 +44,8 @@
*/
vpBSpline::vpBSpline()
: controlPoints(), knots(), p(3), // By default : p=3 for clubic spline
- crossingPoints()
-{
-}
+ crossingPoints()
+{ }
/*!
Copy constructor.
@@ -54,13 +53,12 @@ vpBSpline::vpBSpline()
*/
vpBSpline::vpBSpline(const vpBSpline &bspline)
: controlPoints(bspline.controlPoints), knots(bspline.knots), p(bspline.p), // By default : p=3 for clubic spline
- crossingPoints(bspline.crossingPoints)
-{
-}
+ crossingPoints(bspline.crossingPoints)
+{ }
/*!
Basic destructor.
*/
-vpBSpline::~vpBSpline() {}
+vpBSpline::~vpBSpline() { }
/*!
Find the knot interval in which the parameter \f$ l_u \f$ lies. Indeed \f$
@@ -68,9 +66,9 @@ vpBSpline::~vpBSpline() {}
Example : The knot vector is the following \f$ U = \{0, 0 , 1 , 2 ,3 , 3\}
\f$ with \f$ p \f$ is equal to 1.
- - For \f$ l_u \f$ equal to 0.5 the method will retun 1.
- - For \f$ l_u \f$ equal to 2.5 the method will retun 3.
- - For \f$ l_u \f$ equal to 3 the method will retun 3.
+ - For \f$ l_u \f$ equal to 0.5 the method will return 1.
+ - For \f$ l_u \f$ equal to 2.5 the method will return 3.
+ - For \f$ l_u \f$ equal to 3 the method will return 3.
\param l_u : The knot whose knot interval is seeked.
\param l_p : Degree of the B-Spline basis functions.
@@ -114,9 +112,9 @@ unsigned int vpBSpline::findSpan(double l_u, unsigned int l_p, std::vector
#include
#include "cpu_x86.h"
-namespace FeatureDetector{
+namespace FeatureDetector
+{
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
@@ -39,7 +40,7 @@ uint64_t _xgetbv(unsigned int ext_ctrl_reg)
mov ecx, [ext_ctrl_reg]
__asm _emit 0x0f __asm _emit 0x01 __asm _emit 0xd0 /* xgetbv() */
mov eax_, eax
- mov edx_, edx
+ mov edx_, edx
}
return ((uint64_t)edx_ << 32) | eax_;
}
@@ -53,69 +54,70 @@ uint64_t _xgetbv(unsigned int)
unsigned __int64 _xgetbv(unsigned int index)
{
#if defined(__x86_64__) || defined(_AMD64_)
- unsigned __int64 val1, val2;
+ unsigned __int64 val1, val2;
#else
- unsigned __LONG32 val1, val2;
+ unsigned __LONG32 val1, val2;
#endif /* defined(__x86_64__) || defined(_AMD64_) */
- __asm__ __volatile__(
- "xgetbv"
- : "=a" (val1), "=d" (val2)
- : "c" (index));
+ __asm__ __volatile__(
+ "xgetbv"
+ : "=a" (val1), "=d" (val2)
+ : "c" (index));
- return (((unsigned __int64)val2) << 32) | val1;
+ return (((unsigned __int64)val2) << 32) | val1;
}
#endif
#if defined(__MINGW32__)
-void __cpuidex(int CPUInfo[4], int function_id, int subfunction_id) {
- __asm__ __volatile__ (
- "cpuid"
- : "=a" (CPUInfo [0]), "=b" (CPUInfo [1]), "=c" (CPUInfo [2]), "=d" (CPUInfo [3])
- : "a" (function_id), "c" (subfunction_id));
+void __cpuidex(int CPUInfo[4], int function_id, int subfunction_id)
+{
+ __asm__ __volatile__(
+ "cpuid"
+ : "=a" (CPUInfo[0]), "=b" (CPUInfo[1]), "=c" (CPUInfo[2]), "=d" (CPUInfo[3])
+ : "a" (function_id), "c" (subfunction_id));
}
#endif
-void cpu_x86::cpuid(int32_t out[4], int32_t x){
- __cpuidex(out, x, 0);
+void cpu_x86::cpuid(int32_t out[4], int32_t x)
+{
+ __cpuidex(out, x, 0);
}
-__int64 xgetbv(unsigned int x){
- return _xgetbv(x);
+__int64 xgetbv(unsigned int x)
+{
+ return _xgetbv(x);
}
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// Detect 64-bit - Note that this snippet of code for detecting 64-bit has been copied from MSDN.
-typedef BOOL (WINAPI *LPFN_ISWOW64PROCESS) (HANDLE, PBOOL);
+typedef BOOL(WINAPI *LPFN_ISWOW64PROCESS) (HANDLE, PBOOL);
BOOL IsWow64()
{
- BOOL bIsWow64 = FALSE;
+ BOOL bIsWow64 = FALSE;
#if defined(__MINGW__) || defined(__MINGW32__) || defined(__MINGW64__)
- if (!IsWow64Process(GetCurrentProcess(), &bIsWow64))
- {
- printf("Error Detecting Operating System.\n");
- printf("Defaulting to 32-bit OS.\n\n");
- bIsWow64 = FALSE;
- }
+ if (!IsWow64Process(GetCurrentProcess(), &bIsWow64)) {
+ printf("Error Detecting Operating System.\n");
+ printf("Defaulting to 32-bit OS.\n\n");
+ bIsWow64 = FALSE;
+ }
#elif !defined(WINRT) // Turned off on UWP where GetModuleHandle() doesn't exist
- LPFN_ISWOW64PROCESS fnIsWow64Process = (LPFN_ISWOW64PROCESS) GetProcAddress(
- GetModuleHandle(TEXT("kernel32")), "IsWow64Process");
+ LPFN_ISWOW64PROCESS fnIsWow64Process = (LPFN_ISWOW64PROCESS)GetProcAddress(
+ GetModuleHandle(TEXT("kernel32")), "IsWow64Process");
- if (NULL != fnIsWow64Process)
- {
- if (!fnIsWow64Process(GetCurrentProcess(), &bIsWow64))
- {
- printf("Error Detecting Operating System.\n");
- printf("Defaulting to 32-bit OS.\n\n");
- bIsWow64 = FALSE;
- }
+ if (NULL != fnIsWow64Process) {
+ if (!fnIsWow64Process(GetCurrentProcess(), &bIsWow64)) {
+ printf("Error Detecting Operating System.\n");
+ printf("Defaulting to 32-bit OS.\n\n");
+ bIsWow64 = FALSE;
}
+ }
#endif
- return bIsWow64;
+ return bIsWow64;
}
-bool cpu_x86::detect_OS_x64(){
+bool cpu_x86::detect_OS_x64()
+{
#ifdef _M_X64
- return true;
+ return true;
#else
- return IsWow64() != 0;
+ return IsWow64() != 0;
#endif
}
////////////////////////////////////////////////////////////////////////////////
diff --git a/modules/core/src/tools/exceptions/vpException.cpp b/modules/core/src/tools/exceptions/vpException.cpp
index 7c5804e92d..8dd97bf362 100644
--- a/modules/core/src/tools/exceptions/vpException.cpp
+++ b/modules/core/src/tools/exceptions/vpException.cpp
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,25 +29,16 @@
*
* Description:
* Exception handling.
- *
- * Authors:
- * Nicolas Mansard
- *
-*****************************************************************************/
+ */
-/* \file vpException.cpp
- \brief error that can be emitted by the vp class and its derivatives
+/*!
+ * \file vpException.cpp
+ * \brief error that can be emitted by the vp class and its derivatives
*/
#include "visp3/core/vpException.h"
#include
-/* -------------------------------------------------------------------------
- */
-/* --- CONSTRUCTORS --------------------------------------------------------
- */
-/* -------------------------------------------------------------------------
- */
vpException::vpException(int id) : code(id), message() {}
vpException::vpException(int id, const std::string &msg) : code(id), message(msg) {}
@@ -62,15 +52,6 @@ vpException::vpException(int id, const char *format, ...) : code(id), message()
}
vpException::vpException(int id, const char *format, va_list args) : code(id), message() { setMessage(format, args); }
-/* ------------------------------------------------------------------------ */
-/* --- DESTRUCTORS -------------------------------------------------------- */
-/* ------------------------------------------------------------------------ */
-
-/* Destructeur par default suffisant. */
-// vpException::
-// ~vpException (void)
-// {
-// }
void vpException::setMessage(const char *format, va_list args)
{
@@ -80,47 +61,17 @@ void vpException::setMessage(const char *format, va_list args)
message = msg;
}
-/* ------------------------------------------------------------------------ */
-/* --- ACCESSORS ---------------------------------------------------------- */
-/* ------------------------------------------------------------------------ */
-
const char *vpException::getMessage() const { return (this->message).c_str(); }
const std::string &vpException::getStringMessage() const { return this->message; }
int vpException::getCode() const { return this->code; }
-/*!
- Overloading of the what() method of std::exception to return the vpException
- message.
-
- \return pointer on the array of \e char related to the error string.
-*/
const char *vpException::what() const throw() { return (this->message).c_str(); }
-/* -------------------------------------------------------------------------
- */
-/* --- MODIFIORS -----------------------------------------------------------
- */
-/* -------------------------------------------------------------------------
- */
-
-/* -------------------------------------------------------------------------
- */
-/* --- OP << ---------------------------------------------------------------
- */
-/* -------------------------------------------------------------------------
- */
-
VISP_EXPORT std::ostream &operator<<(std::ostream &os, const vpException &error)
{
os << "Error [" << error.code << "]:\t" << error.message << std::endl;
return os;
}
-
-/*
- * Local variables:
- * c-basic-offset: 2
- * End:
- */
diff --git a/modules/core/src/tools/file/vpIoTools.cpp b/modules/core/src/tools/file/vpIoTools.cpp
index d2d4dd70bf..11910f1817 100644
--- a/modules/core/src/tools/file/vpIoTools.cpp
+++ b/modules/core/src/tools/file/vpIoTools.cpp
@@ -131,7 +131,9 @@ void replaceAll(std::string &str, const std::string &search, const std::string &
std::string <rim(std::string &s)
{
#if VISP_CXX_STANDARD > VISP_CXX_STANDARD_98
- s.erase(s.begin(), std::find_if(s.begin(), s.end(), [](int c) { return !std::isspace(c); }));
+ s.erase(s.begin(), std::find_if(s.begin(), s.end(), [](int c) {
+ return !std::isspace(c);
+ }));
#else
s.erase(s.begin(), std::find_if(s.begin(), s.end(), std::not1(std::ptr_fun(std::isspace))));
#endif
@@ -141,7 +143,9 @@ std::string <rim(std::string &s)
std::string &rtrim(std::string &s)
{
#if VISP_CXX_STANDARD > VISP_CXX_STANDARD_98
- s.erase(std::find_if(s.rbegin(), s.rend(), [](int c) { return !std::isspace(c); }).base(), s.end());
+ s.erase(std::find_if(s.rbegin(), s.rend(), [](int c) {
+ return !std::isspace(c);
+ }).base(), s.end());
#else
s.erase(std::find_if(s.rbegin(), s.rend(), std::not1(std::ptr_fun(std::isspace))).base(), s.end());
#endif
diff --git a/modules/core/src/tools/histogram/vpHistogram.cpp b/modules/core/src/tools/histogram/vpHistogram.cpp
index 1513fa40f7..9d34be9dd7 100644
--- a/modules/core/src/tools/histogram/vpHistogram.cpp
+++ b/modules/core/src/tools/histogram/vpHistogram.cpp
@@ -52,7 +52,8 @@
namespace
{
-struct Histogram_Param_t {
+struct vpHistogram_Param_t
+{
unsigned int m_start_index;
unsigned int m_end_index;
@@ -60,14 +61,13 @@ struct Histogram_Param_t {
unsigned int *m_histogram;
const vpImage *m_I;
- Histogram_Param_t() : m_start_index(0), m_end_index(0), m_lut(), m_histogram(NULL), m_I(NULL) {}
+ vpHistogram_Param_t() : m_start_index(0), m_end_index(0), m_lut(), m_histogram(NULL), m_I(NULL) { }
- Histogram_Param_t(unsigned int start_index, unsigned int end_index, const vpImage *const I)
+ vpHistogram_Param_t(unsigned int start_index, unsigned int end_index, const vpImage *const I)
: m_start_index(start_index), m_end_index(end_index), m_lut(), m_histogram(NULL), m_I(I)
- {
- }
+ { }
- ~Histogram_Param_t()
+ ~vpHistogram_Param_t()
{
if (m_histogram != NULL) {
delete[] m_histogram;
@@ -77,7 +77,7 @@ struct Histogram_Param_t {
vpThread::Return computeHistogramThread(vpThread::Args args)
{
- Histogram_Param_t *histogram_param = static_cast(args);
+ vpHistogram_Param_t *histogram_param = static_cast(args);
unsigned int start_index = histogram_param->m_start_index;
unsigned int end_index = histogram_param->m_end_index;
@@ -271,12 +271,13 @@ void vpHistogram::calculate(const vpImage &I, unsigned int nbins,
histogram[lut[*ptrCurrent]]++;
++ptrCurrent;
}
- } else {
+ }
+ else {
#if defined(VISP_HAVE_PTHREAD) || (defined(_WIN32) && !defined(WINRT_8_0))
// Multi-threads
std::vector threadpool;
- std::vector histogramParams;
+ std::vector histogramParams;
unsigned int image_size = I.getSize();
unsigned int step = image_size / nbThreads;
@@ -290,7 +291,7 @@ void vpHistogram::calculate(const vpImage &I, unsigned int nbins,
end_index = start_index + last_step;
}
- Histogram_Param_t *histogram_param = new Histogram_Param_t(start_index, end_index, &I);
+ vpHistogram_Param_t *histogram_param = new vpHistogram_Param_t(start_index, end_index, &I);
histogram_param->m_histogram = new unsigned int[size];
memset(histogram_param->m_histogram, 0, size * sizeof(unsigned int));
memcpy(histogram_param->m_lut, lut, 256 * sizeof(unsigned int));
@@ -601,11 +602,6 @@ bool vpHistogram::getPeaks(unsigned char dist, vpHistogramPeak &peakl, vpHistogr
if (prev_slope > 0)
peak[nbpeaks++] = (unsigned char)(size - 1);
- // vpTRACE("nb peaks: %d", nbpeaks);
- // for (unsigned i=0; i < nbpeaks; i ++)
- // vpTRACE("peak %d: pos %d value: %d", i, peak[i], histogram[ peak[i]
- // ]);
-
// Get the global maximum
index_highest_peak = 0;
for (unsigned int i = 0; i < nbpeaks; i++) {
@@ -614,10 +610,6 @@ bool vpHistogram::getPeaks(unsigned char dist, vpHistogramPeak &peakl, vpHistogr
}
}
- // vpTRACE("highest peak index: %d pos: %d value: %d",
- // index_highest_peak, peak[index_highest_peak],
- // histogram[ peak[index_highest_peak] ]);
-
maxprof = 0;
index_second_peak = index_highest_peak;
@@ -650,15 +642,13 @@ bool vpHistogram::getPeaks(unsigned char dist, vpHistogramPeak &peakl, vpHistogr
}
}
}
- // vpTRACE("second peak index: %d pos: %d value: %d",
- // index_second_peak, peak[index_second_peak],
- // histogram[ peak[index_second_peak] ]);
// Determine position of the first and second highest peaks
if (peak[index_highest_peak] < peak[index_second_peak]) {
peakr.set(peak[index_second_peak], histogram[peak[index_second_peak]]);
peakl.set(peak[index_highest_peak], histogram[peak[index_highest_peak]]);
- } else {
+ }
+ else {
peakl.set(peak[index_second_peak], histogram[peak[index_second_peak]]);
peakr.set(peak[index_highest_peak], histogram[peak[index_highest_peak]]);
}
@@ -697,7 +687,8 @@ bool vpHistogram::getPeaks(unsigned char dist, vpHistogramPeak &peakl, vpHistogr
delete[] peak;
return false;
- } else {
+ }
+ else {
mini = sumindmini / nbmini; // mean
valey.set((unsigned char)mini, histogram[mini]);
@@ -795,7 +786,8 @@ bool vpHistogram::getValey(const vpHistogramPeak &peak1, const vpHistogramPeak &
if (peak1.getLevel() > peak2.getLevel()) {
peakl = peak2;
peakr = peak1;
- } else {
+ }
+ else {
peakl = peak1;
peakr = peak2;
}
@@ -826,7 +818,8 @@ bool vpHistogram::getValey(const vpHistogramPeak &peak1, const vpHistogramPeak &
valey.set(0, 0);
return false;
- } else {
+ }
+ else {
unsigned int minipos = sumindmini / nbmini; // position of the minimum
valey.set((unsigned char)minipos, histogram[minipos]);
@@ -879,16 +872,6 @@ unsigned vpHistogram::getValey(unsigned char dist, const vpHistogramPeak &peak,
/* nbpeaks = */ getPeaks(peaks);
}
- // if (1) {
- // // vpTRACE("nb peaks: %d", nbpeaks);
- // peaks.front();
- // for (unsigned i=0; i < nbpeaks; i ++) {
- // vpHistogramPeak p = peaks.value();
- // // vpTRACE("peak index %d: pos %d value: %d",
- // // i, p.getLevel(), p.getValue());
- // peaks.next();
- // }
- // }
// Go to the requested peak in the list
std::list::const_iterator it;
unsigned index = 0;
@@ -905,8 +888,9 @@ unsigned vpHistogram::getValey(unsigned char dist, const vpHistogramPeak &peak,
// No chance to get a peak on the left
// should not occur !
peakl.set(0, 0);
- } else {
- // search for the nearest peak on the left that matches the distance
+ }
+ else {
+ // search for the nearest peak on the left that matches the distance
std::list::const_iterator lit; // left iterator
for (lit = peaks.begin(); lit != it; ++lit) {
if (abs((*lit).getLevel() - peak.getLevel()) > dist) {
@@ -939,7 +923,8 @@ unsigned vpHistogram::getValey(unsigned char dist, const vpHistogramPeak &peak,
if (nbmini == 0) {
valeyl.set(0, 0);
ret &= 0x01;
- } else {
+ }
+ else {
unsigned int minipos = sumindmini / nbmini; // position of the minimum
valeyl.set((unsigned char)minipos, histogram[minipos]);
ret &= 0x11;
@@ -994,7 +979,8 @@ unsigned vpHistogram::getValey(unsigned char dist, const vpHistogramPeak &peak,
if (nbmini == 0) {
valeyr.set((unsigned char)(size - 1), 0);
ret &= 0x10;
- } else {
+ }
+ else {
unsigned int minipos = sumindmini / nbmini; // position of the minimum
valeyr.set((unsigned char)minipos, histogram[minipos]);
ret &= 0x11;
diff --git a/modules/core/src/tools/network/vpNetwork.cpp b/modules/core/src/tools/network/vpNetwork.cpp
index 663181f382..abfaf86dee 100644
--- a/modules/core/src/tools/network/vpNetwork.cpp
+++ b/modules/core/src/tools/network/vpNetwork.cpp
@@ -43,8 +43,8 @@
vpNetwork::vpNetwork()
: emitter(), receptor_list(), readFileDescriptor(), socketMax(0), request_list(), max_size_message(999999),
- separator("[*@*]"), beginning("[*start*]"), end("[*end*]"), param_sep("[*|*]"), currentMessageReceived(), tv(),
- tv_sec(0), tv_usec(10), verboseMode(false)
+ separator("[*@*]"), beginning("[*start*]"), end("[*end*]"), param_sep("[*|*]"), currentMessageReceived(), tv(),
+ tv_sec(0), tv_usec(10), verboseMode(false)
{
tv.tv_sec = tv_sec;
#ifdef TARGET_OS_IPHONE
@@ -92,8 +92,8 @@ void vpNetwork::addDecodingRequest(vpRequest *req)
if (alreadyHas)
std::cout << "Server already has one request with the similar ID. "
- "Request hasn't been added."
- << std::endl;
+ "Request hasn't been added."
+ << std::endl;
else
request_list.push_back(req);
}
@@ -265,7 +265,7 @@ int vpNetwork::sendAndEncodeRequestTo(vpRequest &req, const unsigned int &dest)
}
/*!
- Receive requests untils there is requests to receive.
+ Receive requests until there is requests to receive.
\warning Requests will be received but not decoded.
@@ -280,12 +280,12 @@ int vpNetwork::sendAndEncodeRequestTo(vpRequest &req, const unsigned int &dest)
*/
std::vector vpNetwork::receiveRequest()
{
- _receiveRequest();
- return _handleRequests();
+ privReceiveRequest();
+ return privHandleRequests();
}
/*!
- Receives requests, from a specific emitter, untils there is request to
+ Receives requests, from a specific emitter, until there is request to
receive.
\warning Requests will be received but not decoded.
@@ -303,8 +303,8 @@ std::vector vpNetwork::receiveRequest()
*/
std::vector vpNetwork::receiveRequestFrom(const unsigned int &receptorEmitting)
{
- _receiveRequestFrom(receptorEmitting);
- return _handleRequests();
+ privReceiveRequestFrom(receptorEmitting);
+ return privHandleRequests();
}
/*!
@@ -327,8 +327,8 @@ std::vector vpNetwork::receiveRequestFrom(const unsigned int &receptorEmitt
*/
int vpNetwork::receiveRequestOnce()
{
- _receiveRequestOnce();
- return _handleFirstRequest();
+ privReceiveRequestOnce();
+ return privHandleFirstRequest();
}
/*!
@@ -354,12 +354,12 @@ int vpNetwork::receiveRequestOnce()
*/
int vpNetwork::receiveRequestOnceFrom(const unsigned int &receptorEmitting)
{
- _receiveRequestOnceFrom(receptorEmitting);
- return _handleFirstRequest();
+ privReceiveRequestOnceFrom(receptorEmitting);
+ return privHandleFirstRequest();
}
/*!
- Receives and decode requests untils there is requests to receive.
+ Receives and decode requests until there is requests to receive.
\warning Requests will be received but not decoded.
@@ -383,7 +383,7 @@ std::vector vpNetwork::receiveAndDecodeRequest()
}
/*!
- Receives and decode requests, from a specific emitter, untils there is
+ Receives and decode requests, from a specific emitter, until there is
request to receive.
\warning Requests will be received but not decoded.
@@ -483,14 +483,14 @@ int vpNetwork::receiveAndDecodeRequestOnceFrom(const unsigned int &receptorEmitt
\return : The list of index corresponding to the requests that have been
handled.
*/
-std::vector vpNetwork::_handleRequests()
+std::vector vpNetwork::privHandleRequests()
{
std::vector resIndex;
- int index = _handleFirstRequest();
+ int index = privHandleFirstRequest();
while (index != -1) {
resIndex.push_back(index);
- index = _handleFirstRequest();
+ index = privHandleFirstRequest();
}
return resIndex;
@@ -506,7 +506,7 @@ std::vector vpNetwork::_handleRequests()
\return : The index of the request that has been handled.
*/
-int vpNetwork::_handleFirstRequest()
+int vpNetwork::privHandleFirstRequest()
{
size_t indStart = currentMessageReceived.find(beginning);
size_t indSep = currentMessageReceived.find(separator);
@@ -587,7 +587,7 @@ int vpNetwork::_handleFirstRequest()
}
/*!
- Receive requests untils there is requests to receive.
+ Receive requests until there is requests to receive.
\warning Requests will be received but not decoded.
@@ -600,14 +600,14 @@ int vpNetwork::_handleFirstRequest()
\sa vpNetwork::receiveAndDecodeRequestOnce()
\sa vpNetwork::receiveAndDecodeRequestOnceFrom()
*/
-void vpNetwork::_receiveRequest()
+void vpNetwork::privReceiveRequest()
{
- while (_receiveRequestOnce() > 0) {
+ while (privReceiveRequestOnce() > 0) {
};
}
/*!
- Receives requests, from a specific emitter, untils there is request to
+ Receives requests, from a specific emitter, until there is request to
receive.
\warning Requests will be received but not decoded.
@@ -623,9 +623,9 @@ void vpNetwork::_receiveRequest()
\param receptorEmitting : Index of the receptor emitting the message
*/
-void vpNetwork::_receiveRequestFrom(const unsigned int &receptorEmitting)
+void vpNetwork::privReceiveRequestFrom(const unsigned int &receptorEmitting)
{
- while (_receiveRequestOnceFrom(receptorEmitting) > 0) {
+ while (privReceiveRequestOnceFrom(receptorEmitting) > 0) {
};
}
@@ -647,7 +647,7 @@ void vpNetwork::_receiveRequestFrom(const unsigned int &receptorEmitting)
\return The number of bytes received, -1 if an error occured.
*/
-int vpNetwork::_receiveRequestOnce()
+int vpNetwork::privReceiveRequestOnce()
{
if (receptor_list.size() == 0) {
if (verboseMode)
@@ -680,10 +680,12 @@ int vpNetwork::_receiveRequestOnce()
if (verboseMode)
vpERROR_TRACE("Select error");
return -1;
- } else if (value == 0) {
- // Timeout
+ }
+ else if (value == 0) {
+ // Timeout
return 0;
- } else {
+ }
+ else {
for (unsigned int i = 0; i < receptor_list.size(); i++) {
if (FD_ISSET((unsigned int)receptor_list[i].socketFileDescriptorReceptor, &readFileDescriptor)) {
char *buf = new char[max_size_message];
@@ -698,7 +700,8 @@ int vpNetwork::_receiveRequestOnce()
receptor_list.erase(receptor_list.begin() + (int)i);
delete[] buf;
return numbytes;
- } else {
+ }
+ else {
std::string returnVal(buf, (unsigned int)numbytes);
currentMessageReceived.append(returnVal);
}
@@ -732,7 +735,7 @@ int vpNetwork::_receiveRequestOnce()
\return The number of bytes received, -1 if an error occured.
*/
-int vpNetwork::_receiveRequestOnceFrom(const unsigned int &receptorEmitting)
+int vpNetwork::privReceiveRequestOnceFrom(const unsigned int &receptorEmitting)
{
int size = (int)receptor_list.size();
int sizeMinusOne = (int)receptor_list.size() - 1;
@@ -760,10 +763,12 @@ int vpNetwork::_receiveRequestOnceFrom(const unsigned int &receptorEmitting)
if (verboseMode)
vpERROR_TRACE("Select error");
return -1;
- } else if (value == 0) {
- // Timeout
+ }
+ else if (value == 0) {
+ // Timeout
return 0;
- } else {
+ }
+ else {
if (FD_ISSET((unsigned int)receptor_list[receptorEmitting].socketFileDescriptorReceptor, &readFileDescriptor)) {
char *buf = new char[max_size_message];
#if !defined(_WIN32) && (defined(__unix__) || defined(__unix) || (defined(__APPLE__) && defined(__MACH__))) // UNIX
@@ -774,11 +779,12 @@ int vpNetwork::_receiveRequestOnceFrom(const unsigned int &receptorEmitting)
#endif
if (numbytes <= 0) {
std::cout << "Disconnected : " << inet_ntoa(receptor_list[receptorEmitting].receptorAddress.sin_addr)
- << std::endl;
+ << std::endl;
receptor_list.erase(receptor_list.begin() + (int)receptorEmitting);
delete[] buf;
return numbytes;
- } else {
+ }
+ else {
std::string returnVal(buf, (unsigned int)numbytes);
currentMessageReceived.append(returnVal);
}
@@ -791,5 +797,5 @@ int vpNetwork::_receiveRequestOnceFrom(const unsigned int &receptorEmitting)
#elif !defined(VISP_BUILD_SHARED_LIBS)
// Work around to avoid warning: libvisp_core.a(vpNetwork.cpp.o) has no symbols
-void dummy_vpNetwork(){};
+void dummy_vpNetwork() { };
#endif
diff --git a/modules/core/src/tools/optimization/vpLinProg.cpp b/modules/core/src/tools/optimization/vpLinProg.cpp
index 3345f6394d..7929acd959 100644
--- a/modules/core/src/tools/optimization/vpLinProg.cpp
+++ b/modules/core/src/tools/optimization/vpLinProg.cpp
@@ -105,7 +105,8 @@ bool vpLinProg::colReduction(vpMatrix &A, vpColVector &b, bool full_rank, const
b.resize(n);
A.eye(n);
return true;
- } else
+ }
+ else
return false;
}
@@ -127,7 +128,8 @@ bool vpLinProg::colReduction(vpMatrix &A, vpColVector &b, bool full_rank, const
return true;
}
return false;
- } else if (r == m) // most common use case - rank is number of rows
+ }
+ else if (r == m) // most common use case - rank is number of rows
{
b = Q * R.inverseTriangular().t() * b;
// build projection to kernel of Q^T, pick n-m independent columns of I - Q.Q^T
@@ -254,14 +256,15 @@ bool vpLinProg::rowReduction(vpMatrix &A, vpColVector &b, const double &tol)
b.resize(0);
A.resize(0, n);
return true;
- } else
+ }
+ else
return false;
}
vpMatrix Q, R, P;
const unsigned int r = A.qrPivot(Q, R, P, false, false, tol);
const vpColVector x = P.transpose() * vpMatrix::stack(R.extract(0, 0, r, r).inverseTriangular(), vpMatrix(n - r, r)) *
- Q.extract(0, 0, m, r).transpose() * b;
+ Q.extract(0, 0, m, r).transpose() * b;
if (allClose(A, x, b, tol)) {
if (r < m) // if r == m then (A,b) is not changed
@@ -345,12 +348,12 @@ bool vpLinProg::solveLP(const vpColVector &c, vpMatrix A, vpColVector b, const v
// check if we should forward a feasible point to the next solver
const bool feasible =
- (x.getRows() == c.getRows()) && (A.getRows() == 0 || allClose(A, x, b, tol)) &&
- (C.getRows() == 0 || allLesser(C, x, d, tol)) &&
- (find_if(l.begin(), l.end(), [&](BoundedIndex &i) { return x[i.first] < i.second - tol; }) == l.end()) &&
- (find_if(u.begin(), u.end(), [&](BoundedIndex &i) { return x[i.first] > i.second + tol; }) == u.end());
+ (x.getRows() == c.getRows()) && (A.getRows() == 0 || allClose(A, x, b, tol)) &&
+ (C.getRows() == 0 || allLesser(C, x, d, tol)) &&
+ (find_if(l.begin(), l.end(), [&](BoundedIndex &i) { return x[i.first] < i.second - tol; }) == l.end()) &&
+ (find_if(u.begin(), u.end(), [&](BoundedIndex &i) { return x[i.first] > i.second + tol; }) == u.end());
- // shortcut for unbounded variables with equality
+// shortcut for unbounded variables with equality
if (!feasible && m && l.size() == 0 && u.size() == 0) {
// changes A.x = b to x = b + A.z
if (colReduction(A, b, false, tol)) {
@@ -359,7 +362,8 @@ bool vpLinProg::solveLP(const vpColVector &c, vpMatrix A, vpColVector b, const v
x = b + A * x;
return true;
}
- } else if (C.getRows() && allLesser(C, b, d, tol)) { // A.x = b has only 1 solution (the new b) and C.b <= d
+ }
+ else if (C.getRows() && allLesser(C, b, d, tol)) { // A.x = b has only 1 solution (the new b) and C.b <= d
x = b;
return true;
}
@@ -371,7 +375,9 @@ bool vpLinProg::solveLP(const vpColVector &c, vpMatrix A, vpColVector b, const v
// count how many additional variables are needed to deal with bounds
unsigned int s1 = 0, s2 = 0;
for (unsigned int i = 0; i < n; ++i) {
- const auto cmp = [&](const BoundedIndex &bi) { return bi.first == i; };
+ const auto cmp = [&](const BoundedIndex &bi) {
+ return bi.first == i;
+ };
// look for lower bound
const bool has_low = find_if(l.begin(), l.end(), cmp) != l.end();
// look for upper bound
@@ -410,7 +416,9 @@ bool vpLinProg::solveLP(const vpColVector &c, vpMatrix A, vpColVector b, const v
unsigned int k1 = 0, k2 = 0;
for (unsigned int i = 0; i < n; ++i) {
// lambda to find a bound for this index
- const auto cmp = [&](const BoundedIndex &bi) { return bi.first == i; };
+ const auto cmp = [&](const BoundedIndex &bi) {
+ return bi.first == i;
+ };
// look for lower bound
const auto low = find_if(l.begin(), l.end(), cmp);
@@ -429,7 +437,8 @@ bool vpLinProg::solveLP(const vpColVector &c, vpMatrix A, vpColVector b, const v
x[n + p + k1] = std::max(-x[i], 0.);
}
k1++;
- } else // upper bound x <= u <=> z1 = -x + u >= 0
+ }
+ else // upper bound x <= u <=> z1 = -x + u >= 0
{
z0[i] = up->second;
P[i][i] = -1;
@@ -439,7 +448,8 @@ bool vpLinProg::solveLP(const vpColVector &c, vpMatrix A, vpColVector b, const v
x[i] = up->second - x[i];
u.erase(up);
}
- } else // lower bound x >= l <=> z1 = x - l >= 0
+ }
+ else // lower bound x >= l <=> z1 = x - l >= 0
{
z0[i] = -low->second;
if (up != u.end()) // both bounds z1 + z2 = u - l
@@ -453,7 +463,8 @@ bool vpLinProg::solveLP(const vpColVector &c, vpMatrix A, vpColVector b, const v
k1++;
k2++;
u.erase(up);
- } else if (feasible) // only lower bound
+ }
+ else if (feasible) // only lower bound
x[i] = x[i] - low->second;
l.erase(low);
}
@@ -536,11 +547,13 @@ bool vpLinProg::simplex(const vpColVector &c, vpMatrix A, vpColVector b, vpColVe
// find a feasible point is passed x is not
if ((x.getRows() != c.getRows()) || !allGreater(x, -tol) || (m != 0 && !allClose(A, x, b, tol)) || [&x, &n]() {
- unsigned int non0 = 0; // count non-0 in x, feasible if <= m
- for (unsigned int i = 0; i < n; ++i)
- if (x[i] > 0)
- non0++;
- return non0;
+ unsigned int non0 = 0; // count non-0 in x, feasible if <= m
+ for (unsigned int i = 0; i < n; ++i) {
+ if (x[i] > 0) {
+ non0++;
+ }
+ }
+ return non0;
}() > m) {
// min sum(z)
// st A.x + D.z = with diag(D) = sign(b)
@@ -554,7 +567,8 @@ bool vpLinProg::simplex(const vpColVector &c, vpMatrix A, vpColVector b, vpColVe
if (b[i] > -tol) {
AD[i][n + i] = 1;
x[n + i] = b[i];
- } else {
+ }
+ else {
AD[i][n + i] = -1;
x[n + i] = -b[i];
}
@@ -690,7 +704,7 @@ bool vpLinProg::simplex(const vpColVector &c, vpMatrix A, vpColVector b, vpColVe
a.resize(0);
for (unsigned int k = 0; k < m; ++k) {
if (db[k] < -tol)
- a.push_back({-x[B[k]] / db[k], k});
+ a.push_back({ -x[B[k]] / db[k], k });
}
// get smallest index for smallest alpha
const auto amin = std::min_element(a.begin(), a.end());
diff --git a/modules/core/src/tools/serial/vpSerial.cpp b/modules/core/src/tools/serial/vpSerial.cpp
index 5cfc70faef..ac6f6273fc 100644
--- a/modules/core/src/tools/serial/vpSerial.cpp
+++ b/modules/core/src/tools/serial/vpSerial.cpp
@@ -272,7 +272,7 @@ bool vpSerial::read(char *c, long timeout_s)
if (ret < 0) {
throw(vpException(vpException::fatalError, "Serial i/o exception"));
} else if (ret == 0) {
- // Timeout occured
+ // Timeout occurred
return false;
} else {
ssize_t n = ::read(m_fd, c, 1); // read one character at a time
@@ -296,7 +296,7 @@ std::string vpSerial::readline(const std::string &eol)
while (true) {
size_t bytes_read = this->read(&c, 1);
if (bytes_read == 0) {
- break; // Timeout occured on reading 1 byte
+ break; // Timeout occurred on reading 1 byte
}
line.append(&c, 1);
if (std::string(line, line.size() - eol_len, eol_len) == eol) {
diff --git a/modules/core/src/tools/time/vpTime.cpp b/modules/core/src/tools/time/vpTime.cpp
index d5e3faf8d0..408f0c87ab 100644
--- a/modules/core/src/tools/time/vpTime.cpp
+++ b/modules/core/src/tools/time/vpTime.cpp
@@ -99,7 +99,8 @@ double measureTimeMicros()
QueryPerformanceFrequency(&frequency);
if (frequency.QuadPart == 0) {
return (timeGetTime());
- } else {
+ }
+ else {
QueryPerformanceCounter(&time);
return (double)(1000000.0 * time.QuadPart / frequency.QuadPart);
}
@@ -132,7 +133,8 @@ double measureTimeMs()
QueryPerformanceFrequency(&frequency);
if (frequency.QuadPart == 0) {
return (timeGetTime());
- } else {
+ }
+ else {
QueryPerformanceCounter(&time);
return (double)(1000.0 * time.QuadPart / frequency.QuadPart);
}
@@ -280,57 +282,57 @@ void sleepMs(double t)
}
/*!
- Return a string containing date and time.
-
- \param[in] format : The string format supported by strftime() function that represents the time.
- The default format is the following \c "%Y/%m/%d %H:%M:%S".
- This string contains any combination of special format specifiers given in the next table:
- | specifier | Replaced by | Example |
- |-----------|------------------------------------------------------|--------------------------|
- | %%a | Abbreviated weekday name * | Thu |
- | %%A | Full weekday name * | Thursday |
- | %%b | Abbreviated month name * | Aug |
- | %%B | Full month name * | August |
- | %%c | Date and time representation * | Thu Aug 23 14:55:02 2001 |
- | %%C | Year divided by 100 and truncated to integer (00-99) | 20 |
- | %%d | Day of the month, zero-padded (01-31) | 23 |
- | %%D | Short MM/DD/YY date, equivalent to %m/%d/%y | 08/23/01 |
- | %%e | Day of the month, space-padded ( 1-31) | 23 |
- | %%F | Short YYYY-MM-DD date, equivalent to %Y-%m-%d | 2001-08-23 |
- | %%g | Week-based year, last two digits (00-99) | 01 |
- | %%G | Week-based year | 2001 |
- | %%h | Abbreviated month name * (same as %b) | Aug |
- | %%H | Hour in 24h format (00-23) | 14 |
- | %%I | Hour in 12h format (01-12) | 02 |
- | %%j | Day of the year (001-366) | 235 |
- | %%m | Month as a decimal number (01-12) | 08 |
- | %%M | Minute (00-59) | 55 |
- | %%n | New-line character ('\\n') | |
- | %%p | AM or PM designation | PM |
- | %%r | 12-hour clock time * | 02:55:02 pm |
- | %%R | 24-hour HH:MM time, equivalent to %H:%M | 14:55 |
- | %%S | Second (00-61) | 02 |
- | %%t | Horizontal-tab character ('\\t') | |
- | %%T | ISO 8601 time format (HH:MM:SS), equivalent to %H:%M:%S | 14:55:02 |
- | %%u | ISO 8601 weekday as number with Monday as 1 (1-7) | 4 |
- | %%U | Week number with the first Sunday as the first day of week one (00-53) | 33 |
- | %%V | ISO 8601 week number (00-53) | 34 |
- | %%w | Weekday as a decimal number with Sunday as 0 (0-6) | 4 |
- | %%W | Week number with the first Monday as the first day of week one (00-53) | 34 |
- | %%x | Date representation * | 08/23/01 |
- | %%X | Time representation * | 14:55:02 |
- | %%y | Year, last two digits (00-99) | 01 |
- | %%Y | Year | 2001 |
- | %%z | ISO 8601 offset from UTC in timezone (1 minute=1, 1 hour=100) \n If timezone cannot be determined, no
-characters | +100 | | %%Z | Timezone name or abbreviation * \n If timezone cannot be determined, no
-characters| CDT | | %% | A % sign | % |
- * The specifiers marked with an asterisk (*) are locale-dependent.
-
- \return A formated date and time string. When default format is used, the
-returned string contains "YYYY/MM/DD hh:mm:ss".
-
- The following example shows how to use this function:
- \code
+ Return a string containing date and time.
+
+ \param[in] format : The string format supported by strftime() function that represents the time.
+ The default format is the following \c "%Y/%m/%d %H:%M:%S".
+ This string contains any combination of special format specifiers given in the next table:
+ | specifier | Replaced by | Example |
+ |-----------|------------------------------------------------------|--------------------------|
+ | %%a | Abbreviated weekday name * | Thu |
+ | %%A | Full weekday name * | Thursday |
+ | %%b | Abbreviated month name * | Aug |
+ | %%B | Full month name * | August |
+ | %%c | Date and time representation * | Thu Aug 23 14:55:02 2001 |
+ | %%C | Year divided by 100 and truncated to integer (00-99) | 20 |
+ | %%d | Day of the month, zero-padded (01-31) | 23 |
+ | %%D | Short MM/DD/YY date, equivalent to %m/%d/%y | 08/23/01 |
+ | %%e | Day of the month, space-padded ( 1-31) | 23 |
+ | %%F | Short YYYY-MM-DD date, equivalent to %Y-%m-%d | 2001-08-23 |
+ | %%g | Week-based year, last two digits (00-99) | 01 |
+ | %%G | Week-based year | 2001 |
+ | %%h | Abbreviated month name * (same as %b) | Aug |
+ | %%H | Hour in 24h format (00-23) | 14 |
+ | %%I | Hour in 12h format (01-12) | 02 |
+ | %%j | Day of the year (001-366) | 235 |
+ | %%m | Month as a decimal number (01-12) | 08 |
+ | %%M | Minute (00-59) | 55 |
+ | %%n | New-line character ('\\n') | |
+ | %%p | AM or PM designation | PM |
+ | %%r | 12-hour clock time * | 02:55:02 pm |
+ | %%R | 24-hour HH:MM time, equivalent to %H:%M | 14:55 |
+ | %%S | Second (00-61) | 02 |
+ | %%t | Horizontal-tab character ('\\t') | |
+ | %%T | ISO 8601 time format (HH:MM:SS), equivalent to %H:%M:%S | 14:55:02 |
+ | %%u | ISO 8601 weekday as number with Monday as 1 (1-7) | 4 |
+ | %%U | Week number with the first Sunday as the first day of week one (00-53) | 33 |
+ | %%V | ISO 8601 week number (00-53) | 34 |
+ | %%w | Weekday as a decimal number with Sunday as 0 (0-6) | 4 |
+ | %%W | Week number with the first Monday as the first day of week one (00-53) | 34 |
+ | %%x | Date representation * | 08/23/01 |
+ | %%X | Time representation * | 14:55:02 |
+ | %%y | Year, last two digits (00-99) | 01 |
+ | %%Y | Year | 2001 |
+ | %%z | ISO 8601 offset from UTC in timezone (1 minute=1, 1 hour=100) \n If timezone cannot be determined, no
+characters | +100 | | %%Z | Timezone name or abbreviation * \n If timezone cannot be determined, no
+characters| CDT | | %% | A % sign | % |
+ * The specifiers marked with an asterisk (*) are locale-dependent.
+
+ \return A formatted date and time string. When default format is used, the
+ returned string contains "YYYY/MM/DD hh:mm:ss".
+
+ The following example shows how to use this function:
+ \code
#include
int main()
@@ -371,7 +373,7 @@ std::string getDateTime(const std::string &format)
};
#endif
-vpChrono::vpChrono() : m_durationMs(), m_lastTimePoint() {}
+vpChrono::vpChrono() : m_durationMs(), m_lastTimePoint() { }
/*!
Get chrono duration in microsecond.
diff --git a/modules/core/src/tracking/moments/vpMomentAreaNormalized.cpp b/modules/core/src/tracking/moments/vpMomentAreaNormalized.cpp
index 6638fcdcce..e81999de34 100644
--- a/modules/core/src/tracking/moments/vpMomentAreaNormalized.cpp
+++ b/modules/core/src/tracking/moments/vpMomentAreaNormalized.cpp
@@ -50,11 +50,12 @@ void vpMomentAreaNormalized::compute()
bool found_moment_centered;
/* getMoments() returns a reference to a vpMomentDatabase. (a protected
- member inherited from vpMoment)
- .get() is a member function of vpMomentDatabase that returns
- a specific moment which is linked to it*/
+ * member inherited from vpMoment)
+ *.get() is a member function of vpMomentDatabase that returns
+ * a specific moment which is linked to it
+ * */
const vpMomentCentered &momentCentered =
- static_cast(getMoments().get("vpMomentCentered", found_moment_centered));
+ static_cast(getMoments().get("vpMomentCentered", found_moment_centered));
if (!found_moment_centered)
throw vpException(vpException::notInitialized, "vpMomentCentered not found");
@@ -107,7 +108,7 @@ void vpMomentAreaNormalized::printDependencies(std::ostream &os) const
bool found_moment_centered;
const vpMomentCentered &momentCentered =
- static_cast(getMoments().get("vpMomentCentered", found_moment_centered));
+ static_cast(getMoments().get("vpMomentCentered", found_moment_centered));
if (!found_moment_centered)
throw vpException(vpException::notInitialized, "vpMomentCentered not found");
diff --git a/modules/core/src/tracking/moments/vpMomentCInvariant.cpp b/modules/core/src/tracking/moments/vpMomentCInvariant.cpp
index 5b689a8f1d..782c199e3b 100644
--- a/modules/core/src/tracking/moments/vpMomentCInvariant.cpp
+++ b/modules/core/src/tracking/moments/vpMomentCInvariant.cpp
@@ -29,7 +29,7 @@
* WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* Description:
- * Descriptor for various invariants used to drive space roations around X and
+ * Descriptor for various invariants used to drive space rotations around X and
*Y axis.
*
* Authors:
diff --git a/modules/core/src/tracking/moments/vpMomentDatabase.cpp b/modules/core/src/tracking/moments/vpMomentDatabase.cpp
index f475c02b49..12e28b9d96 100644
--- a/modules/core/src/tracking/moments/vpMomentDatabase.cpp
+++ b/modules/core/src/tracking/moments/vpMomentDatabase.cpp
@@ -63,7 +63,7 @@ void vpMomentDatabase::add(vpMoment &moment, const char *name)
*/
const vpMoment &vpMomentDatabase::get(const char *type, bool &found) const
{
- std::map::const_iterator it = moments.find(type);
+ std::map::const_iterator it = moments.find(type);
found = (it != moments.end());
return *(it->second);
@@ -81,7 +81,7 @@ const vpMoment &vpMomentDatabase::get(const char *type, bool &found) const
*/
void vpMomentDatabase::updateAll(vpMomentObject &object)
{
- std::map::const_iterator itr;
+ std::map::const_iterator itr;
for (itr = moments.begin(); itr != moments.end(); ++itr) {
(*itr).second->update(object);
}
@@ -92,7 +92,7 @@ void vpMomentDatabase::updateAll(vpMomentObject &object)
*/
VISP_EXPORT std::ostream &operator<<(std::ostream &os, const vpMomentDatabase &m)
{
- std::map::const_iterator itr;
+ std::map::const_iterator itr;
os << "{";
for (itr = m.moments.begin(); itr != m.moments.end(); ++itr) {
diff --git a/modules/core/src/tracking/moments/vpMomentObject.cpp b/modules/core/src/tracking/moments/vpMomentObject.cpp
index 5ac1aeda22..83974dc4d2 100644
--- a/modules/core/src/tracking/moments/vpMomentObject.cpp
+++ b/modules/core/src/tracking/moments/vpMomentObject.cpp
@@ -416,7 +416,7 @@ void vpMomentObject::fromImage(const vpImage &image, const vpCame
}
}
} else {
- /////////// BLACK BACKGROUND ///////////
+ /////////// BLACK BACKGROUND ///////////
for (unsigned int j = 0; j < image.getRows(); j++) {
for (unsigned int i = 0; i < image.getCols(); i++) {
x = 0;
diff --git a/modules/core/test/camera/testJsonCamera.cpp b/modules/core/test/camera/testJsonCamera.cpp
index e5dd8d71e8..61207109a5 100644
--- a/modules/core/test/camera/testJsonCamera.cpp
+++ b/modules/core/test/camera/testJsonCamera.cpp
@@ -44,7 +44,7 @@
#if defined(VISP_HAVE_NLOHMANN_JSON) && defined(VISP_HAVE_CATCH2)
#include
-using json = nlohmann::json;
+using json = nlohmann::json; //! json namespace shortcut
#define CATCH_CONFIG_RUNNER
#include
@@ -53,7 +53,7 @@ using json = nlohmann::json;
namespace
{
// This class shows how to implement a simple generator for Catch tests
-class RandomCamGenerator : public Catch::Generators::IGenerator
+class vpRandomCamGenerator : public Catch::Generators::IGenerator
{
private:
std::minstd_rand m_rand;
@@ -64,7 +64,7 @@ class RandomCamGenerator : public Catch::Generators::IGenerator(next());
@@ -108,7 +108,7 @@ class RandomCamGenerator : public Catch::Generators::IGenerator randomCam(double low, double high)
{
return Catch::Generators::GeneratorWrapper(
- std::unique_ptr >(new RandomCamGenerator(low, high)));
+ std::unique_ptr >(new vpRandomCamGenerator(low, high)));
}
} // namespace
diff --git a/modules/core/test/image-with-dataset/testConversion.cpp b/modules/core/test/image-with-dataset/testConversion.cpp
index 4bff650e33..a8fee2ac6b 100644
--- a/modules/core/test/image-with-dataset/testConversion.cpp
+++ b/modules/core/test/image-with-dataset/testConversion.cpp
@@ -72,7 +72,7 @@ Test image conversions.\n\
\n\
SYNOPSIS\n\
%s [-i ] [-o ] [-n ]\n\
- [-h]\n \
+ [-h]\n\
",
name);
diff --git a/modules/core/test/image-with-dataset/testCrop.cpp b/modules/core/test/image-with-dataset/testCrop.cpp
index 56fc258c64..9f64551516 100644
--- a/modules/core/test/image-with-dataset/testCrop.cpp
+++ b/modules/core/test/image-with-dataset/testCrop.cpp
@@ -76,7 +76,7 @@ and save the cropped image on the disk (Klimt_cropped.pgm).\n\
\n\
SYNOPSIS\n\
%s [-i ] [-o ]\n\
- [-h]\n \
+ [-h]\n\
",
name);
diff --git a/modules/core/test/image-with-dataset/testIoEXR.cpp b/modules/core/test/image-with-dataset/testIoEXR.cpp
index 6fe9d4653c..ead98edbe9 100644
--- a/modules/core/test/image-with-dataset/testIoEXR.cpp
+++ b/modules/core/test/image-with-dataset/testIoEXR.cpp
@@ -78,77 +78,79 @@ void checkGrayImages(const vpImage &I1, const vpImage &I2,
#endif
} // namespace
-TEST_CASE("EXR image read", "[exr_image_io]"){
+TEST_CASE("EXR image read", "[exr_image_io]")
+{
// Disable the tests if big endian for now.
// See: https://github.com/syoyo/tinyexr/issues/189#issuecomment-1465174904
#ifdef VISP_LITTLE_ENDIAN
- SECTION("Color"){const std::string imgPathRef = vpIoTools::createFilePath(vpIoTools::getViSPImagesDataPath(),
- "memorial/memorial_color_LSB.pfm");
-REQUIRE(vpIoTools::checkFilename(imgPathRef));
+ SECTION("Color")
+ {
+ const std::string imgPathRef = vpIoTools::createFilePath(vpIoTools::getViSPImagesDataPath(), "memorial/memorial_color_LSB.pfm");
+ REQUIRE(vpIoTools::checkFilename(imgPathRef));
-vpImage I_ref;
-vpImageIo::readPFM_HDR(I_ref, imgPathRef);
-CHECK(I_ref.getSize() > 0);
+ vpImage I_ref;
+ vpImageIo::readPFM_HDR(I_ref, imgPathRef);
+ CHECK(I_ref.getSize() > 0);
-SECTION("32-bits")
-{
- const std::string imgPath =
- vpIoTools::createFilePath(vpIoTools::getViSPImagesDataPath(), "memorial/memorial_color_32bits.exr");
- REQUIRE(vpIoTools::checkFilename(imgPath));
+ SECTION("32-bits")
+ {
+ const std::string imgPath =
+ vpIoTools::createFilePath(vpIoTools::getViSPImagesDataPath(), "memorial/memorial_color_32bits.exr");
+ REQUIRE(vpIoTools::checkFilename(imgPath));
- vpImage I;
- vpImageIo::readEXR(I, imgPath);
- CHECK(I.getSize() > 0);
- checkColorImages(I_ref, I);
-}
+ vpImage I;
+ vpImageIo::readEXR(I, imgPath);
+ CHECK(I.getSize() > 0);
+ checkColorImages(I_ref, I);
+ }
-SECTION("16-bits")
-{
- const std::string imgPath =
- vpIoTools::createFilePath(vpIoTools::getViSPImagesDataPath(), "memorial/memorial_color_16bits.exr");
- REQUIRE(vpIoTools::checkFilename(imgPath));
-
- vpImage I;
- vpImageIo::readEXR(I, imgPath);
- CHECK(I.getSize() > 0);
- checkColorImages(I_ref, I, 0.00097656f);
-}
-}
+ SECTION("16-bits")
+ {
+ const std::string imgPath =
+ vpIoTools::createFilePath(vpIoTools::getViSPImagesDataPath(), "memorial/memorial_color_16bits.exr");
+ REQUIRE(vpIoTools::checkFilename(imgPath));
-SECTION("Gray")
-{
- const std::string imgPathRef =
+ vpImage I;
+ vpImageIo::readEXR(I, imgPath);
+ CHECK(I.getSize() > 0);
+ checkColorImages(I_ref, I, 0.00097656f);
+ }
+ }
+
+ SECTION("Gray")
+ {
+ const std::string imgPathRef =
vpIoTools::createFilePath(vpIoTools::getViSPImagesDataPath(), "memorial/memorial_gray_LSB.pfm");
- REQUIRE(vpIoTools::checkFilename(imgPathRef));
+ REQUIRE(vpIoTools::checkFilename(imgPathRef));
- vpImage I_ref;
- vpImageIo::readPFM_HDR(I_ref, imgPathRef);
- CHECK(I_ref.getSize() > 0);
+ vpImage I_ref;
+ vpImageIo::readPFM_HDR(I_ref, imgPathRef);
+ CHECK(I_ref.getSize() > 0);
- SECTION("32-bits")
- {
- const std::string imgPath =
+ SECTION("32-bits")
+ {
+ const std::string imgPath =
vpIoTools::createFilePath(vpIoTools::getViSPImagesDataPath(), "memorial/memorial_gray_32bits.exr");
- REQUIRE(vpIoTools::checkFilename(imgPath));
+ REQUIRE(vpIoTools::checkFilename(imgPath));
- vpImage I;
- vpImageIo::readEXR(I, imgPath);
- CHECK(I.getSize() > 0);
- checkGrayImages(I_ref, I);
- }
+ vpImage I;
+ vpImageIo::readEXR(I, imgPath);
+ CHECK(I.getSize() > 0);
+ checkGrayImages(I_ref, I);
+ }
- SECTION("16-bits")
- {
- const std::string imgPath =
+ SECTION("16-bits")
+ {
+ const std::string imgPath =
vpIoTools::createFilePath(vpIoTools::getViSPImagesDataPath(), "memorial/memorial_gray_16bits.exr");
- REQUIRE(vpIoTools::checkFilename(imgPath));
+ REQUIRE(vpIoTools::checkFilename(imgPath));
- vpImage I;
- vpImageIo::readEXR(I, imgPath);
- CHECK(I.getSize() > 0);
- checkGrayImages(I_ref, I, 0.00097656f);
+ vpImage I;
+ vpImageIo::readEXR(I, imgPath);
+ CHECK(I.getSize() > 0);
+ checkGrayImages(I_ref, I, 0.00097656f);
+ }
}
-}
#endif
}
@@ -163,7 +165,7 @@ TEST_CASE("EXR image write", "[exr_image_io]")
SECTION("Color")
{
const std::string imgPath =
- vpIoTools::createFilePath(vpIoTools::getViSPImagesDataPath(), "memorial/memorial_color_32bits.exr");
+ vpIoTools::createFilePath(vpIoTools::getViSPImagesDataPath(), "memorial/memorial_color_32bits.exr");
REQUIRE(vpIoTools::checkFilename(imgPath));
vpImage I;
@@ -183,7 +185,7 @@ TEST_CASE("EXR image write", "[exr_image_io]")
SECTION("Gray")
{
const std::string imgPath =
- vpIoTools::createFilePath(vpIoTools::getViSPImagesDataPath(), "memorial/memorial_gray_32bits.exr");
+ vpIoTools::createFilePath(vpIoTools::getViSPImagesDataPath(), "memorial/memorial_gray_32bits.exr");
REQUIRE(vpIoTools::checkFilename(imgPath));
vpImage I;
diff --git a/modules/core/test/image-with-dataset/testIoPGM.cpp b/modules/core/test/image-with-dataset/testIoPGM.cpp
index ffc441eab4..a1077b1b29 100644
--- a/modules/core/test/image-with-dataset/testIoPGM.cpp
+++ b/modules/core/test/image-with-dataset/testIoPGM.cpp
@@ -70,7 +70,7 @@ Read and write PGM images on the disk. Also test exceptions.\n\
\n\
SYNOPSIS\n\
%s [-i ] [-o ]\n\
- [-h]\n \
+ [-h]\n\
",
name);
diff --git a/modules/core/test/image-with-dataset/testIoPPM.cpp b/modules/core/test/image-with-dataset/testIoPPM.cpp
index a3223d8c65..d4195abfa9 100644
--- a/modules/core/test/image-with-dataset/testIoPPM.cpp
+++ b/modules/core/test/image-with-dataset/testIoPPM.cpp
@@ -71,7 +71,7 @@ Read and write PPM images on the disk. Also test exceptions.\n\
\n\
SYNOPSIS\n\
%s [-i ] [-o ]\n\
- [-h]\n \
+ [-h]\n\
",
name);
diff --git a/modules/core/test/image-with-dataset/testReadImage.cpp b/modules/core/test/image-with-dataset/testReadImage.cpp
index 47de5bfe42..0e5325085d 100644
--- a/modules/core/test/image-with-dataset/testReadImage.cpp
+++ b/modules/core/test/image-with-dataset/testReadImage.cpp
@@ -70,7 +70,7 @@ Read images on the disk.\n\
\n\
SYNOPSIS\n\
%s [-i ] [-p ]\n\
- [-h]\n \
+ [-h]\n\
",
name);
diff --git a/modules/core/test/math/perfColVectorOperations.cpp b/modules/core/test/math/perfColVectorOperations.cpp
index 6ca204e13d..c67a0790ec 100644
--- a/modules/core/test/math/perfColVectorOperations.cpp
+++ b/modules/core/test/math/perfColVectorOperations.cpp
@@ -45,7 +45,7 @@
namespace
{
static bool g_runBenchmark = false;
-static const std::vector g_sizes = {23, 127, 233, 419, 1153, 2749};
+static const std::vector g_sizes = { 23, 127, 233, 419, 1153, 2749 };
double getRandomValues(double min, double max) { return (max - min) * ((double)rand() / (double)RAND_MAX) + min; }
@@ -66,7 +66,8 @@ double stddev(const std::vector &vec)
double mean = sum / vec.size();
std::vector diff(vec.size());
- std::transform(vec.begin(), vec.end(), diff.begin(), [mean](double x) { return x - mean; });
+ std::transform(vec.begin(), vec.end(), diff.begin(), [mean](double x) {
+ return x - mean; });
double sq_sum = std::inner_product(diff.begin(), diff.end(), diff.begin(), 0.0);
return std::sqrt(sq_sum / vec.size());
}
@@ -369,11 +370,11 @@ int main(int argc, char *argv[])
// Build a new parser on top of Catch's
using namespace Catch::clara;
auto cli = session.cli() // Get Catch's composite command line parser
- | Opt(g_runBenchmark) // bind variable to a new option, with a hint string
- ["--benchmark"] // the option names it will respond to
- ("run benchmark?"); // description string for the help output
+ | Opt(g_runBenchmark) // bind variable to a new option, with a hint string
+ ["--benchmark"] // the option names it will respond to
+ ("run benchmark?"); // description string for the help output
- // Now pass the new composite back to Catch so it uses that
+// Now pass the new composite back to Catch so it uses that
session.cli(cli);
// Let Catch (using Clara) parse the command line
diff --git a/modules/core/test/math/testJsonArrayConversion.cpp b/modules/core/test/math/testJsonArrayConversion.cpp
index 67203e1d7d..c1d51a1361 100644
--- a/modules/core/test/math/testJsonArrayConversion.cpp
+++ b/modules/core/test/math/testJsonArrayConversion.cpp
@@ -48,7 +48,7 @@
#include
#include
-using json = nlohmann::json;
+using json = nlohmann::json; //! json namespace shortcut
#define CATCH_CONFIG_RUNNER
#include "catch.hpp"
@@ -79,7 +79,7 @@ class vpExceptionMatcher : public Catch::Matchers::Impl::MatcherBase >
+class vpRandomArray2DGenerator : public Catch::Generators::IGenerator >
{
private:
std::minstd_rand m_rand;
@@ -89,8 +89,8 @@ class RandomArray2DGenerator : public Catch::Generators::IGenerator current;
public:
- RandomArray2DGenerator(double valueRange, int minSize, int maxSize)
- : m_rand(std::random_device{}()), m_val_dist(-valueRange, valueRange), m_dim_dist(minSize, maxSize)
+ vpRandomArray2DGenerator(double valueRange, int minSize, int maxSize)
+ : m_rand(std::random_device {}()), m_val_dist(-valueRange, valueRange), m_dim_dist(minSize, maxSize)
{
static_cast(next());
@@ -110,7 +110,7 @@ class RandomArray2DGenerator : public Catch::Generators::IGenerator
+class vpRandomColVectorGenerator : public Catch::Generators::IGenerator
{
private:
std::minstd_rand m_rand;
@@ -120,8 +120,8 @@ class RandomColVectorGenerator : public Catch::Generators::IGenerator(next());
@@ -142,12 +142,12 @@ Catch::Generators::GeneratorWrapper > randomArray(double v, in
{
return Catch::Generators::GeneratorWrapper >(
std::unique_ptr > >(
- new RandomArray2DGenerator(v, minSize, maxSize)));
+ new vpRandomArray2DGenerator(v, minSize, maxSize)));
}
Catch::Generators::GeneratorWrapper randomColVector(double v, int minSize, int maxSize)
{
return Catch::Generators::GeneratorWrapper(
- std::unique_ptr >(new RandomColVectorGenerator(v, minSize, maxSize)));
+ std::unique_ptr >(new vpRandomColVectorGenerator(v, minSize, maxSize)));
}
vpExceptionMatcher matchVpException(vpException::generalExceptionEnum type, const StringMatcherBase &matcher)
{
@@ -326,7 +326,7 @@ SCENARIO("Serializing and deserializing a vpColVector", "[json]")
}
}
-int main(int argc, char *argv [])
+int main(int argc, char *argv[])
{
Catch::Session session; // There must be exactly one instance
session.applyCommandLine(argc, argv);
diff --git a/modules/core/test/math/testRotation.cpp b/modules/core/test/math/testRotation.cpp
index 0d76f1fd45..8f8d0d397a 100644
--- a/modules/core/test/math/testRotation.cpp
+++ b/modules/core/test/math/testRotation.cpp
@@ -425,13 +425,31 @@ int main()
{
// Test rotation_matrix * homogeneous_matrix
vpHomogeneousMatrix _1_M_2_truth;
- _1_M_2_truth[0][0] = 0.9835; _1_M_2_truth[0][1] = -0.0581; _1_M_2_truth[0][2] = 0.1716; _1_M_2_truth[0][3] = 0;
- _1_M_2_truth[1][0] = -0.0489; _1_M_2_truth[1][1] = -0.9972; _1_M_2_truth[1][2] = -0.0571; _1_M_2_truth[1][3] = 0;
- _1_M_2_truth[2][0] = 0.1744; _1_M_2_truth[2][1] = 0.0478; _1_M_2_truth[2][2] = -0.9835; _1_M_2_truth[2][3] = 0;
+ _1_M_2_truth[0][0] = 0.9835;
+ _1_M_2_truth[0][1] = -0.0581;
+ _1_M_2_truth[0][2] = 0.1716;
+ _1_M_2_truth[0][3] = 0;
+ _1_M_2_truth[1][0] = -0.0489;
+ _1_M_2_truth[1][1] = -0.9972;
+ _1_M_2_truth[1][2] = -0.0571;
+ _1_M_2_truth[1][3] = 0;
+ _1_M_2_truth[2][0] = 0.1744;
+ _1_M_2_truth[2][1] = 0.0478;
+ _1_M_2_truth[2][2] = -0.9835;
+ _1_M_2_truth[2][3] = 0;
vpHomogeneousMatrix _2_M_3_;
- _2_M_3_[0][0] = 0.9835; _2_M_3_[0][1] = -0.0581; _2_M_3_[0][2] = 0.1716; _2_M_3_[0][3] = 0.0072;
- _2_M_3_[1][0] = -0.0489; _2_M_3_[1][1] = -0.9972; _2_M_3_[1][2] = -0.0571; _2_M_3_[1][3] = 0.0352;
- _2_M_3_[2][0] = 0.1744; _2_M_3_[2][1] = 0.0478; _2_M_3_[2][2] = -0.9835; _2_M_3_[2][3] = 0.9470;
+ _2_M_3_[0][0] = 0.9835;
+ _2_M_3_[0][1] = -0.0581;
+ _2_M_3_[0][2] = 0.1716;
+ _2_M_3_[0][3] = 0.0072;
+ _2_M_3_[1][0] = -0.0489;
+ _2_M_3_[1][1] = -0.9972;
+ _2_M_3_[1][2] = -0.0571;
+ _2_M_3_[1][3] = 0.0352;
+ _2_M_3_[2][0] = 0.1744;
+ _2_M_3_[2][1] = 0.0478;
+ _2_M_3_[2][2] = -0.9835;
+ _2_M_3_[2][3] = 0.9470;
vpRotationMatrix _1_R_2_ = _1_M_2_truth.getRotationMatrix();
vpHomogeneousMatrix _1_M_3_(_1_R_2_* _2_M_3_);
diff --git a/modules/core/test/network/testUDPClient.cpp b/modules/core/test/network/testUDPClient.cpp
index 9262e1bbfe..de36ca400b 100644
--- a/modules/core/test/network/testUDPClient.cpp
+++ b/modules/core/test/network/testUDPClient.cpp
@@ -46,12 +46,12 @@
namespace
{
-struct DataType {
+struct vpDataType_t {
double double_val;
int int_val;
- DataType() : double_val(0.0), int_val(0) {}
- DataType(double dbl, int i) : double_val(dbl), int_val(i) {}
+ vpDataType_t() : double_val(0.0), int_val(0) {}
+ vpDataType_t(double dbl, int i) : double_val(dbl), int_val(i) {}
};
} // namespace
@@ -76,7 +76,7 @@ int main(int argc, char **argv)
vpUDPClient client(servername, port);
// Send custom data type
- DataType data_type(1234.56789, 123450);
+ vpDataType_t data_type(1234.56789, 123450);
char data[sizeof(data_type.double_val) + sizeof(data_type.int_val)];
memcpy(data, &data_type.double_val, sizeof(data_type.double_val));
memcpy(data + sizeof(data_type.double_val), &data_type.int_val, sizeof(data_type.int_val));
diff --git a/modules/core/test/network/testUDPServer.cpp b/modules/core/test/network/testUDPServer.cpp
index 9705ce84ce..c5afecf488 100644
--- a/modules/core/test/network/testUDPServer.cpp
+++ b/modules/core/test/network/testUDPServer.cpp
@@ -49,12 +49,12 @@
namespace
{
-struct DataType {
+struct vpDataType_t {
double double_val;
int int_val;
- DataType() : double_val(0.0), int_val(0) {}
- DataType(double dbl, int i) : double_val(dbl), int_val(i) {}
+ vpDataType_t() : double_val(0.0), int_val(0) {}
+ vpDataType_t(double dbl, int i) : double_val(dbl), int_val(i) {}
};
} // namespace
@@ -70,7 +70,7 @@ int main()
// Receive and send custom data type
int res = server.receive(msg, hostInfo);
if (res) {
- DataType data_type;
+ vpDataType_t data_type;
memcpy(&data_type.double_val, msg.c_str(), sizeof(data_type.double_val));
memcpy(&data_type.int_val, msg.c_str() + sizeof(data_type.double_val), sizeof(data_type.int_val));
std::cout << "Server received double_val: " << data_type.double_val << " ; int_val: " << data_type.int_val
diff --git a/modules/core/test/tools/geometry/testPolygon.cpp b/modules/core/test/tools/geometry/testPolygon.cpp
index 25cc42fa49..132eda4f40 100644
--- a/modules/core/test/tools/geometry/testPolygon.cpp
+++ b/modules/core/test/tools/geometry/testPolygon.cpp
@@ -68,7 +68,7 @@ void usage(const char *name, const char *badparam)
test the generic 2D polygons.\n\
\n\
SYNOPSIS\n\
- %s [-c] [-d] [-h]\n \
+ %s [-c] [-d] [-h]\n\
",
name);
diff --git a/modules/core/test/tools/threading/testThread2.cpp b/modules/core/test/tools/threading/testThread2.cpp
index 0c44a0dd8e..5fba1d2687 100644
--- a/modules/core/test/tools/threading/testThread2.cpp
+++ b/modules/core/test/tools/threading/testThread2.cpp
@@ -54,15 +54,14 @@
namespace
{
//! [functor-thread-example declaration]
-class ArithmFunctor
+class vpArithmFunctor
{
public:
- ArithmFunctor(const vpColVector &v1, const vpColVector &v2, unsigned int start, unsigned int end)
+ vpArithmFunctor(const vpColVector &v1, const vpColVector &v2, unsigned int start, unsigned int end)
: m_add(), m_mul(), m_v1(v1), m_v2(v2), m_indexStart(start), m_indexEnd(end)
- {
- }
+ { }
- ArithmFunctor() : m_add(), m_mul(), m_v1(), m_v2(), m_indexStart(0), m_indexEnd(0) {}
+ vpArithmFunctor() : m_add(), m_mul(), m_v1(), m_v2(), m_indexStart(0), m_indexEnd(0) { }
void operator()() { computeImpl(); }
@@ -97,7 +96,7 @@ class ArithmFunctor
//! [functor-thread-example threadFunction]
vpThread::Return arithmThread(vpThread::Args args)
{
- ArithmFunctor *f = static_cast(args);
+ vpArithmFunctor *f = static_cast(args);
(*f)();
return 0;
}
@@ -155,13 +154,14 @@ int main()
//! [functor-thread-example threadCreation]
std::vector threads(nb_threads);
- std::vector functors(nb_threads);
+ std::vector functors(nb_threads);
unsigned int split = size / nb_threads;
for (unsigned int i = 0; i < nb_threads; i++) {
if (i < nb_threads - 1) {
- functors[i] = ArithmFunctor(v1, v2, i * split, (i + 1) * split);
- } else {
- functors[i] = ArithmFunctor(v1, v2, i * split, size);
+ functors[i] = vpArithmFunctor(v1, v2, i * split, (i + 1) * split);
+ }
+ else {
+ functors[i] = vpArithmFunctor(v1, v2, i * split, size);
}
std::cout << "Create thread: " << i << std::endl;
diff --git a/modules/detection/include/visp3/detection/vpDetectorDNNOpenCV.h b/modules/detection/include/visp3/detection/vpDetectorDNNOpenCV.h
index 5a3a4b79f1..e0010b5367 100644
--- a/modules/detection/include/visp3/detection/vpDetectorDNNOpenCV.h
+++ b/modules/detection/include/visp3/detection/vpDetectorDNNOpenCV.h
@@ -52,7 +52,7 @@
#include
#ifdef VISP_HAVE_NLOHMANN_JSON
#include
-using json = nlohmann::json;
+using json = nlohmann::json; //! json namespace shortcut
#endif
/*!
diff --git a/modules/gui/src/display/vpDisplayGTK.cpp b/modules/gui/src/display/vpDisplayGTK.cpp
index a8cb38e711..a920903096 100644
--- a/modules/gui/src/display/vpDisplayGTK.cpp
+++ b/modules/gui/src/display/vpDisplayGTK.cpp
@@ -474,15 +474,10 @@ class vpDisplayGTK::Impl
GdkEvent *ev = NULL;
while ((ev = gdk_event_get()) != NULL) {
cpt++;
- // printf("event %d type %d on window %p My window %p\n",
- // cpt, ev->type, ev->any.window, widget->window);
if (ev->any.window == m_widget->window && ev->type == GDK_KEY_PRESS) {
- // std::cout << "Key val: \"" << gdk_keyval_name (ev->key.keyval)
- // /*ev->key.string*/ << "\"" << std::endl;
key = gdk_keyval_name(ev->key.keyval);
ret = true;
- // printf("Key press detection\n");
}
gdk_event_free(ev);
}
diff --git a/modules/gui/src/display/windows/vpGDIRenderer.cpp b/modules/gui/src/display/windows/vpGDIRenderer.cpp
index 1ee98f6ec2..b985f795e7 100644
--- a/modules/gui/src/display/windows/vpGDIRenderer.cpp
+++ b/modules/gui/src/display/windows/vpGDIRenderer.cpp
@@ -886,8 +886,7 @@ void vpGDIRenderer::drawCross(const vpImagePoint &ip, unsigned int size, const v
LineTo(hDCMem, vpMath::round(ip.get_u() / m_rscale), vpMath::round(ip.get_v() / m_rscale) + half_size);
// display the result (flush)
- // BitBlt(hDCScreen, j-(size/2), i-(size/2), size, size,
- // hDCMem, j-(size/2), i-(size/2), SRCCOPY);
+ // BitBlt(hDCScreen, j-(size/2), i-(size/2), size, size, hDCMem, j-(size/2), i-(size/2), SRCCOPY);
LeaveCriticalSection(&m_criticalSection);
diff --git a/modules/gui/src/plot/vpPlot.cpp b/modules/gui/src/plot/vpPlot.cpp
index c0a629b682..fdfc1db1c4 100644
--- a/modules/gui/src/plot/vpPlot.cpp
+++ b/modules/gui/src/plot/vpPlot.cpp
@@ -196,29 +196,20 @@ void vpPlot::initNbGraph(unsigned int nbGraph)
\param graphNum : The index of the graph in the window. As the number of
graphic in a window is less or equal to 4, this parameter is between 0
- and 3. \param curveNbr : The number of curves belonging to the graphic
+ and 3.
+ \param curveNbr : The number of curves belonging to the graphic
*/
void vpPlot::initGraph(unsigned int graphNum, unsigned int curveNbr) { (graphList + graphNum)->initGraph(curveNbr); }
-// void
-// vpPlot::initRange (const int graphNum,
-// double xmin, double xmax, double /*xdelt*/,
-// double ymin, double ymax, double /*ydelt*/,
-// bool gx, bool gy)
-// {
-// (graphList+graphNum)->initScale(I,xmin,xmax,10,ymin,ymax,10,gx,gy);
-// }
-
/*!
This method enables to set the initial range of the selected graphic.
\param graphNum : The index of the graph in the window. As the number of
- graphic in a window is less or equal to 4, this parameter is between 0
- and 3. \param xmin : The initial minimum value along the x axis given in the
- user coordinates. \param xmax : The initial maximum value along the x axis
- given in the user coordinates. \param ymin : The initial minimum value along
- the y axis given in the user coordinates. \param ymax : The initial maximum
- value along the y axis given in the user coordinates.
+ graphic in a window is less or equal to 4, this parameter is between 0 and 3.
+ \param xmin : The initial minimum value along the x axis given in the user coordinates.
+ \param xmax : The initial maximum value along the x axis given in the user coordinates.
+ \param ymin : The initial minimum value along the y axis given in the user coordinates.
+ \param ymax : The initial maximum value along the y axis given in the user coordinates.
*/
void vpPlot::initRange(unsigned int graphNum, double xmin, double xmax, double ymin, double ymax)
{
@@ -229,15 +220,13 @@ void vpPlot::initRange(unsigned int graphNum, double xmin, double xmax, double y
This method enables to set the initial range of the selected graphic.
\param graphNum : The index of the graph in the window. As the number of
- graphic in a window is less or equal to 4, this parameter is between 0
- and 3. \param xmin : The initial minimum value along the x axis given in the
- user coordinates. \param xmax : The initial maximum value along the x axis
- given in the user coordinates. \param ymin : The initial minimum value along
- the y axis given in the user coordinates. \param ymax : The initial maximum
- value along the y axis given in the user coordinates. \param zmin : The
- initial minimum value along the z axis given in the user coordinates. \param
- zmax : The initial maximum value along the z axis given in the user
- coordinates.
+ graphic in a window is less or equal to 4, this parameter is between 0 and 3.
+ \param xmin : The initial minimum value along the x axis given in the user coordinates.
+ \param xmax : The initial maximum value along the x axis given in the user coordinates.
+ \param ymin : The initial minimum value along the y axis given in the user coordinates.
+ \param ymax : The initial maximum value along the y axis given in the user coordinates.
+ \param zmin : The initial minimum value along the z axis given in the user coordinates.
+ \param zmax : The initial maximum value along the z axis given in the user coordinates.
*/
void vpPlot::initRange(unsigned int graphNum, double xmin, double xmax, double ymin, double ymax, double zmin,
double zmax)
@@ -249,9 +238,9 @@ void vpPlot::initRange(unsigned int graphNum, double xmin, double xmax, double y
This function enables you to choose the color used to draw a given curve.
\param graphNum : The index of the graph in the window. As the number of
- graphic in a window is less or equal to 4, this parameter is between 0
- and 3. \param curveNum : The index of the curve in the list of the curves
- belonging to the graphic. \param color : The color you want to use
+ graphic in a window is less or equal to 4, this parameter is between 0 and 3.
+ \param curveNum : The index of the curve in the list of the curves belonging to the graphic.
+ \param color : The color you want to use
*/
void vpPlot::setColor(unsigned int graphNum, unsigned int curveNum, vpColor color)
{
@@ -272,11 +261,10 @@ void vpPlot::displayGrid()
drawn with the parameters of the curve.
\param graphNum : The index of the graph in the window. As the number of
- graphic in a window is less or equal to 4, this parameter is between 0
- and 3. \param curveNum : The index of the curve in the list of the curves
- belonging to the graphic. \param x : The coordinate of the new point along
- the x axis and given in the user unit system. \param y : The coordinate of
- the new point along the y axis and given in the user unit system.
+ graphic in a window is less or equal to 4, this parameter is between 0 and 3.
+ \param curveNum : The index of the curve in the list of the curves belonging to the graphic.
+ \param x : The coordinate of the new point along the x axis and given in the user unit system.
+ \param y : The coordinate of the new point along the y axis and given in the user unit system.
*/
void vpPlot::plot(unsigned int graphNum, unsigned int curveNum, double x, double y)
{
@@ -288,11 +276,11 @@ void vpPlot::plot(unsigned int graphNum, unsigned int curveNum, double x, double
points are drawn with the parameters of the curves.
\param graphNum : The index of the graph in the window. As the number of
- graphic in a window is less or equal to 4, this parameter is between 0
- and 3. \param x : The coordinate of the new points along the x axis and
- given in the user unit system. \param v_y : y coordinates vector. The
- coordinates of the new points along the y axis and given in the user unit
- system.
+ graphic in a window is less or equal to 4, this parameter is between 0 and 3.
+ \param x : The coordinate of the new points along the x axis and
+ given in the user unit system.
+ \param v_y : y coordinates vector. The coordinates of the new points along the
+ y axis and given in the user unit system.
*/
void vpPlot::plot(unsigned int graphNum, double x, const vpColVector &v_y)
{
@@ -309,10 +297,11 @@ void vpPlot::plot(unsigned int graphNum, double x, const vpColVector &v_y)
\param graphNum : The index of the graph in the window. As the number of
graphic in a window is less or equal to 4, this parameter is between 0
- and 3. \param x : The coordinate of the new points along the x axis and
- given in the user unit system. \param v_y : y coordinates vector. The
- coordinates of the new points along the y axis and given in the user unit
- system.
+ and 3.
+ \param x : The coordinate of the new points along the x axis and
+ given in the user unit system.
+ \param v_y : y coordinates vector. The coordinates of the new points along
+ the y axis and given in the user unit system.
*/
void vpPlot::plot(unsigned int graphNum, double x, const vpRowVector &v_y)
{
@@ -330,8 +319,10 @@ void vpPlot::plot(unsigned int graphNum, double x, const vpRowVector &v_y)
\param graphNum : The index of the graph in the window. As the number of
graphic in a window is less or equal to 4, this parameter is between 0
- and 3. \param x : The coordinate of the new points along the x axis and
- given in the user unit system. \param v_y : y coordinates vector. The
+ and 3.
+ \param x : The coordinate of the new points along the x axis and
+ given in the user unit system.
+ \param v_y : y coordinates vector. The
coordinates of the new points along the y axis and given in the user unit
system.
*/
@@ -350,8 +341,10 @@ void vpPlot::plot(unsigned int graphNum, double x, const vpPoseVector &v_y)
\param graphNum : The index of the graph in the window. As the number of
graphic in a window is less or equal to 4, this parameter is between 0
- and 3. \param x : The coordinate of the new points along the x axis and
- given in the user unit system. \param v_y : y coordinates vector. The
+ and 3.
+ \param x : The coordinate of the new points along the x axis and
+ given in the user unit system.
+ \param v_y : y coordinates vector. The
coordinates of the new points along the y axis and given in the user unit
system.
*/
@@ -371,8 +364,10 @@ void vpPlot::plot(unsigned int graphNum, double x, const vpTranslationVector &v_
\param graphNum : The index of the graph in the window. As the number of
graphic in a window is less or equal to 4, this parameter is between 0
- and 3. \param x : The coordinate of the new points along the x axis and
- given in the user unit system. \param v_y : y coordinates vector. The
+ and 3.
+ \param x : The coordinate of the new points along the x axis and
+ given in the user unit system.
+ \param v_y : y coordinates vector. The
coordinates of the new points along the y axis and given in the user unit
system.
*/
@@ -392,10 +387,14 @@ void vpPlot::plot(unsigned int graphNum, double x, const vpRotationVector &v_y)
\param graphNum : The index of the graph in the window. As the number of
graphic in a window is less or equal to 4, this parameter is between 0
- and 3. \param curveNum : The index of the curve in the list of the curves
- belonging to the graphic. \param x : The coordinate of the new point along
- the x axis and given in the user unit system. \param y : The coordinate of
- the new point along the y axis and given in the user unit system. \param z :
+ and 3.
+ \param curveNum : The index of the curve in the list of the curves
+ belonging to the graphic.
+ \param x : The coordinate of the new point along
+ the x axis and given in the user unit system.
+ \param y : The coordinate of
+ the new point along the y axis and given in the user unit system.
+ \param z :
The coordinate of the new point along the z axis and given in the user unit
system.
*/
@@ -411,10 +410,13 @@ vpMouseButton::vpMouseButtonType vpPlot::plot(unsigned int graphNum, unsigned in
\param graphNum : The index of the graph in the window. As the number of
graphic in a window is less or equal to 4, this parameter is between 0
- and 3. \param x : The coordinate of the new points along the x axis and
- given in the user unit system. \param v_y : y coordinates vector. The
+ and 3.
+ \param x : The coordinate of the new points along the x axis and
+ given in the user unit system.
+ \param v_y : y coordinates vector. The
coordinates of the new points along the y axis and given in the user unit
- system. \param v_z : z coordinates vector. The coordinates of the new points
+ system.
+ \param v_z : z coordinates vector. The coordinates of the new points
along the z axis and given in the user unit system.
*/
vpMouseButton::vpMouseButtonType vpPlot::plot(unsigned int graphNum, double x, const vpColVector &v_y,
@@ -435,7 +437,7 @@ vpMouseButton::vpMouseButtonType vpPlot::plot(unsigned int graphNum, double x, c
3D graphic. The navigation is performed using the mouse.
- A click on left mouse button allows rotations
- A click on middle mouse button allows zoom
- - A click on rigt mouse button quit the infinite navigation loop.
+ - A click on right mouse button quit the infinite navigation loop.
*/
void vpPlot::navigate()
{
@@ -495,7 +497,8 @@ void vpPlot::getPixelValue(bool block)
\param graphNum : The index of the graph in the window. As the number of
graphic in a window is less or equal to 4, this parameter is between 0
- and 3. \param title : The graphic title.
+ and 3.
+ \param title : The graphic title.
*/
void vpPlot::setTitle(unsigned int graphNum, const std::string &title) { (graphList + graphNum)->setTitle(title); }
@@ -504,7 +507,8 @@ void vpPlot::setTitle(unsigned int graphNum, const std::string &title) { (graphL
\param graphNum : The index of the graph in the window. As the number of
graphic in a window is less or equal to 4, this parameter is between 0
- and 3. \param unitx : The name of the unit of the x axis.
+ and 3.
+ \param unitx : The name of the unit of the x axis.
*/
void vpPlot::setUnitX(unsigned int graphNum, const std::string &unitx) { (graphList + graphNum)->setUnitX(unitx); }
@@ -513,7 +517,8 @@ void vpPlot::setUnitX(unsigned int graphNum, const std::string &unitx) { (graphL
\param graphNum : The index of the graph in the window. As the number of
graphic in a window is less or equal to 4, this parameter is between 0
- and 3. \param unity : The name of the unit of the y axis.
+ and 3.
+ \param unity : The name of the unit of the y axis.
*/
void vpPlot::setUnitY(unsigned int graphNum, const std::string &unity) { (graphList + graphNum)->setUnitY(unity); }
@@ -522,7 +527,8 @@ void vpPlot::setUnitY(unsigned int graphNum, const std::string &unity) { (graphL
\param graphNum : The index of the graph in the window. As the number of
graphic in a window is less or equal to 4, this parameter is between 0
- and 3. \param unitz : The name of the unit of the z axis.
+ and 3.
+ \param unitz : The name of the unit of the z axis.
*/
void vpPlot::setUnitZ(unsigned int graphNum, const std::string &unitz) { (graphList + graphNum)->setUnitZ(unitz); }
@@ -531,8 +537,10 @@ void vpPlot::setUnitZ(unsigned int graphNum, const std::string &unitz) { (graphL
\param graphNum : The index of the graph in the window. As the number of
graphic in a window is less or equal to 4, this parameter is between 0
- and 3. \param curveNum : The index of the curve in the list of the curves
- belonging to the graphic. \param legend : The legend of the curve.
+ and 3.
+ \param curveNum : The index of the curve in the list of the curves
+ belonging to the graphic.
+ \param legend : The legend of the curve.
*/
void vpPlot::setLegend(unsigned int graphNum, unsigned int curveNum, const std::string &legend)
{
@@ -554,12 +562,13 @@ void vpPlot::resetPointList(unsigned int graphNum)
}
/*!
-This function enables you to choose the thickness used to draw a given curve.
+ This function enables you to choose the thickness used to draw a given curve.
\param graphNum : The index of the graph in the window. As the number of
-graphic in a window is less or equal to 4, this parameter is between 0 and 3.
+ graphic in a window is less or equal to 4, this parameter is between 0 and 3.
\param curveNum : The index of the curve in the list of the curves belonging
-to the graphic. \param thickness : The thickness you want to use
+ to the graphic.
+ \param thickness : The thickness you want to use
*/
void vpPlot::setThickness(unsigned int graphNum, unsigned int curveNum, unsigned int thickness)
{
@@ -567,11 +576,11 @@ void vpPlot::setThickness(unsigned int graphNum, unsigned int curveNum, unsigned
}
/*!
-This function enables you to choose the thickness used to draw all the curves
-belonging to a given graphic.
+ This function enables you to choose the thickness used to draw all the curves
+ belonging to a given graphic.
\param graphNum : The index of the graph in the window. As the number of
-graphic in a window is less or equal to 4, this parameter is between 0 and 3.
+ graphic in a window is less or equal to 4, this parameter is between 0 and 3.
\param thickness : The thickness you want to use
*/
void vpPlot::setGraphThickness(unsigned int graphNum, unsigned int thickness)
@@ -586,7 +595,8 @@ void vpPlot::setGraphThickness(unsigned int graphNum, unsigned int thickness)
\param graphNum : The index of the graph in the window. As the number of
graphic in a window is less or equal to 4, this parameter is between 0
- and 3. \param thickness : The thickness you want to use
+ and 3.
+ \param thickness : The thickness you want to use
*/
void vpPlot::setGridThickness(unsigned int graphNum, unsigned int thickness)
{
@@ -599,7 +609,8 @@ void vpPlot::setGridThickness(unsigned int graphNum, unsigned int thickness)
\param graphNum : The index of the graph in the window. As the number of
graphic in a window is less or equal to 4, this parameter is between 0
- and 3. \param curveNum : The index of the curve in the list of the curves
+ and 3.
+ \param curveNum : The index of the curve in the list of the curves
belonging to the graphic.
*/
void vpPlot::resetPointList(unsigned int graphNum, unsigned int curveNum)
@@ -625,13 +636,14 @@ void vpPlot::resetPointList(unsigned int graphNum, unsigned int curveNum)
The columns are delimited thanks to tabulations.
- \param title_prefix : Prefix introducted in the first line of the saved
+ \param title_prefix : Prefix introduced in the first line of the saved
file. To exploit a posteriori the resulting curves:
- with gnuplot, set title_prefix to "# ".
- with Matlab, set title_prefix to "% ".
\param graphNum : The index of the graph in the window. As the number of
graphic in a window is less or equal to 4, this parameter is between 0
- and 3. \param dataFile : Name of the text file.
+ and 3.
+ \param dataFile : Name of the text file.
*/
void vpPlot::saveData(unsigned int graphNum, const std::string &dataFile, const std::string &title_prefix)
{
diff --git a/modules/gui/test/display-with-dataset/testMouseEvent.cpp b/modules/gui/test/display-with-dataset/testMouseEvent.cpp
index 9273bf7d64..cd4432532c 100644
--- a/modules/gui/test/display-with-dataset/testMouseEvent.cpp
+++ b/modules/gui/test/display-with-dataset/testMouseEvent.cpp
@@ -115,7 +115,7 @@ to a PGM file.\n\
SYNOPSIS\n\
%s [-i ] [-p ]\n\
[-f ] [-l ] [-s ] \n\
- [-t ] [-L] [-w] [-c] [-d] [-h]\n \
+ [-t ] [-L] [-w] [-c] [-d] [-h]\n\
",
name);
diff --git a/modules/imgproc/include/visp3/imgproc/vpCircleHoughTransform.h b/modules/imgproc/include/visp3/imgproc/vpCircleHoughTransform.h
index b18a82b276..f02bddb803 100644
--- a/modules/imgproc/include/visp3/imgproc/vpCircleHoughTransform.h
+++ b/modules/imgproc/include/visp3/imgproc/vpCircleHoughTransform.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -27,8 +26,7 @@
*
* This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
* WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- *****************************************************************************/
+ */
#ifndef _vpCircleHoughTransform_h_
#define _vpCircleHoughTransform_h_
@@ -53,6 +51,7 @@
// 3rd parties inclue
#ifdef VISP_HAVE_NLOHMANN_JSON
#include
+//! json namespace shortcut
using json = nlohmann::json;
#endif
@@ -105,6 +104,9 @@ class VISP_EXPORT vpCircleHoughTransform
friend class vpCircleHoughTransform;
public:
+ /**
+ * \brief Construct a new vpCircleHoughTransformParameters object with default parameters.
+ */
vpCircleHoughTransformParameters()
: m_gaussianKernelSize(5)
, m_gaussianStdev(1.f)
@@ -186,6 +188,9 @@ class VISP_EXPORT vpCircleHoughTransform
}
+ /**
+ * Create a string with all the Hough transform parameters.
+ */
std::string toString() const
{
std::string txt("Hough Circle Transform Configuration:\n");
@@ -340,13 +345,13 @@ class VISP_EXPORT vpCircleHoughTransform
{"circlePerfectnessThreshold", params.m_circlePerfectness},
{"centerMinDistance", params.m_centerMinDist},
{"mergingRadiusDiffThresh", params.m_mergingRadiusDiffThresh} };
- }
+ }
#endif
- };
+};
- /**
- * \brief Construct a new vpCircleHoughTransform object with default parameters.
- */
+/**
+ * \brief Construct a new vpCircleHoughTransform object with default parameters.
+ */
vpCircleHoughTransform();
/**
@@ -719,9 +724,14 @@ class VISP_EXPORT vpCircleHoughTransform
return m_algoParams.m_maxRadius;
}
- // // Debug methods
+ /*!
+ * Create a string with all Hough transform parameters.
+ */
std::string toString() const;
+ /*!
+ * Create a ostream with all Hough transform parameters.
+ */
friend VISP_EXPORT std::ostream &operator<<(std::ostream &os, const vpCircleHoughTransform &detector);
private:
diff --git a/modules/imgproc/include/visp3/imgproc/vpContours.h b/modules/imgproc/include/visp3/imgproc/vpContours.h
index c2dad0c84a..b51e96d627 100644
--- a/modules/imgproc/include/visp3/imgproc/vpContours.h
+++ b/modules/imgproc/include/visp3/imgproc/vpContours.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -31,11 +30,7 @@
* Description:
* Basic contours extraction based on the orignal work of
* Sina Samangooei (ss@ecs.soton.ac.uk).
- *
- * Authors:
- * Souriya Trinh
- *
-*****************************************************************************/
+ */
/**
* Copyright (c) 2011, The University of Southampton and the individual
* contributors. All rights reserved.
@@ -79,26 +74,42 @@
#include
#include
+
namespace
{
-typedef enum {
- NORTH,
- NORTH_EAST,
- EAST,
- SOUTH_EAST,
- SOUTH,
- SOUTH_WEST,
- WEST,
- NORTH_WEST,
- LAST_DIRECTION
+/*!
+ * Possible directions to find a contour.
+ */
+typedef enum
+{
+ NORTH, //!< North direction
+ NORTH_EAST, //!< North-East direction
+ EAST, //!< East direction
+ SOUTH_EAST, //!< South-East direction
+ SOUTH, //!< South direction
+ SOUTH_WEST, //!< South-West direction
+ WEST, //!< West direction
+ NORTH_WEST, //!< North-West direction
+ LAST_DIRECTION //!< Number of possible directions
} vpDirectionType;
-struct vpDirection {
+/*!
+ * Direction object.
+ */
+struct vpDirection
+{
+ //!< Direction
vpDirectionType m_direction;
+ //!< Pixel increment along x to reach a given direction
int m_dirx[8];
+
+ //!< Pixel increment along y to reach a given direction
int m_diry[8];
+ /*!
+ * Default constructor.
+ */
vpDirection()
{
m_dirx[0] = 0;
@@ -120,6 +131,10 @@ struct vpDirection {
m_diry[7] = -1;
}
+ /*!
+ * Turn clockwise to find the next pixel along the contour.
+ * @return Direction to take.
+ */
vpDirection clockwise()
{
vpDirection direction;
@@ -129,6 +144,10 @@ struct vpDirection {
return direction;
}
+ /*!
+ * Turn counter clockwise to find the next pixel along the contour.
+ * @return Direction to take.
+ */
vpDirection counterClockwise()
{
vpDirection direction;
@@ -139,6 +158,12 @@ struct vpDirection {
return direction;
}
+ /*!
+ * Get the next point coordinate along the contour.
+ * @param I Image to process.
+ * @param point Current point coordinate.
+ * @return Next point coordinate along the contour.
+ */
vpImagePoint active(const vpImage &I, const vpImagePoint &point)
{
int yy = (int)(point.get_i() + m_diry[(int)m_direction]);
@@ -156,28 +181,53 @@ struct vpDirection {
namespace vp
{
-typedef enum {
+/*!
+ * Type of contour.
+ */
+typedef enum
+{
CONTOUR_OUTER, /*!< Outer contour. */
CONTOUR_HOLE /*!< Hole contour. */
} vpContourType;
-typedef enum {
+/*!
+ * Type of contour retrieval.
+ */
+typedef enum
+{
CONTOUR_RETR_TREE, /*!< Retrieve all the contours with the hierarchy stored
in a tree. */
CONTOUR_RETR_LIST, /*!< Retrieve all the contours without any hierarchy. */
CONTOUR_RETR_EXTERNAL /*!< Retrieve only external contours. */
} vpContourRetrievalType;
-struct vpContour {
+/*!
+ * Structure associated to a contour.
+ */
+struct vpContour
+{
+ //! Children contour
std::vector m_children;
+ //! Contour type
vpContourType m_contourType;
+ //! Parent contour
vpContour *m_parent;
+ //! Vector of points belonging to the contour
std::vector m_points;
- vpContour() : m_children(), m_contourType(vp::CONTOUR_HOLE), m_parent(NULL), m_points() {}
+ /*!
+ * Default constructor.
+ */
+ vpContour() : m_children(), m_contourType(vp::CONTOUR_HOLE), m_parent(NULL), m_points() { }
- vpContour(const vpContourType &type) : m_children(), m_contourType(type), m_parent(NULL), m_points() {}
+ /*!
+ * Constructor of a given contour type.
+ */
+ vpContour(const vpContourType &type) : m_children(), m_contourType(type), m_parent(NULL), m_points() { }
+ /*!
+ * Copy constructor.
+ */
vpContour(const vpContour &contour)
: m_children(), m_contourType(contour.m_contourType), m_parent(NULL), m_points(contour.m_points)
{
@@ -191,6 +241,9 @@ struct vpContour {
}
}
+ /*!
+ * Destructor.
+ */
virtual ~vpContour()
{
for (std::vector::iterator it = m_children.begin(); it != m_children.end(); ++it) {
@@ -202,6 +255,9 @@ struct vpContour {
}
}
+ /*!
+ * Copy operator.
+ */
vpContour &operator=(const vpContour &other)
{
m_contourType = other.m_contourType;
@@ -215,7 +271,8 @@ struct vpContour {
*it = NULL;
}
}
- } else {
+ }
+ else {
// Make the current contour the root contour
// to avoid problem when deleting
m_parent = NULL;
@@ -231,6 +288,9 @@ struct vpContour {
return *this;
}
+ /*!
+ * Set parent contour.
+ */
void setParent(vpContour *parent)
{
m_parent = parent;
@@ -241,11 +301,41 @@ struct vpContour {
}
};
+/*!
+ * \ingroup group_imgproc_contours
+ *
+ * Draw the input contours on the binary image.
+ *
+ * \param I : Grayscale image where we want to draw the input contours.
+ * \param contours : Detected contours.
+ * \param grayValue : Drawing grayscale color.
+ */
VISP_EXPORT void drawContours(vpImage &I, const std::vector > &contours,
unsigned char grayValue = 255);
+
+/*!
+ * \ingroup group_imgproc_contours
+ *
+ * Draw the input contours on the color image.
+ *
+ * \param I : Color image where we want to draw the input contours.
+ * \param contours : Detected contours.
+ * \param color : Drawing color.
+ */
VISP_EXPORT void drawContours(vpImage &I, const std::vector > &contours,
const vpColor &color);
+/*!
+ * \ingroup group_imgproc_contours
+ *
+ * Extract contours from a binary image.
+ *
+ * \param I_original : Input binary image (0 means background, 1 means
+ * foreground, other values are not allowed).
+ * \param contours : Detected contours.
+ * \param contourPts : List of contours, each contour contains a list of contour points.
+ * \param retrievalMode : Contour retrieval mode.
+ */
VISP_EXPORT void findContours(const vpImage &I_original, vpContour &contours,
std::vector > &contourPts,
const vpContourRetrievalType &retrievalMode = vp::CONTOUR_RETR_TREE);
diff --git a/modules/imgproc/include/visp3/imgproc/vpImgproc.h b/modules/imgproc/include/visp3/imgproc/vpImgproc.h
index 891dbc6fa4..303ef0f499 100644
--- a/modules/imgproc/include/visp3/imgproc/vpImgproc.h
+++ b/modules/imgproc/include/visp3/imgproc/vpImgproc.h
@@ -1,5 +1,4 @@
-/****************************************************************************
- *
+/*
* ViSP, open source Visual Servoing Platform software.
* Copyright (C) 2005 - 2023 by Inria. All rights reserved.
*
@@ -30,11 +29,7 @@
*
* Description:
* Static functions for basic image processing functions.
- *
- * Authors:
- * Souriya Trinh
- *
-*****************************************************************************/
+ */
/*!
\file vpImgproc.h
@@ -53,9 +48,22 @@
namespace vp
{
-enum RETINEX_LEVEL { RETINEX_UNIFORM = 0, RETINEX_LOW = 1, RETINEX_HIGH = 2 };
+/*!
+ * Retinex level that allows to specifies distribution
+ * of the Gaussian blurring kernel sizes for scale division values > 2.
+ */
+enum RETINEX_LEVEL
+{
+ RETINEX_UNIFORM = 0, //!< Tends to treat all image intensities similarly.
+ RETINEX_LOW = 1, //!< Enhances dark regions of the image.
+ RETINEX_HIGH = 2 //!< Enhances the bright regions of the image
+};
-typedef enum {
+/*!
+ * Automatic thresholding method.
+ */
+typedef enum
+{
AUTO_THRESHOLD_HUANG, /*!< Huang L.-K. and Wang M.-J.J. (1995) "Image
Thresholding by Minimizing the Measures of
Fuzziness" Pattern Recognition, 28(1): 41-51
@@ -83,37 +91,320 @@ typedef enum {
*/
} vpAutoThresholdMethod;
+/*!
+ * \ingroup group_imgproc_brightness
+ *
+ * Adjust the brightness of a grayscale image such as the new intensity is
+ * alpha x old_intensity + beta.
+ *
+ * \param I : The grayscale image to adjust the brightness.
+ * \param alpha : Multiplication coefficient.
+ * \param beta : Constant value added to the old intensity.
+ */
VISP_EXPORT void adjust(vpImage &I, double alpha, double beta);
+
+/*!
+ * \ingroup group_imgproc_brightness
+ *
+ * Adjust the brightness of a grayscale image such as the new intensity is
+ * alpha x old_intensity + beta.
+ *
+ * \param I1 : The original grayscale image.
+ * \param I2 : The grayscale image after adjusting pixel intensities.
+ * \param alpha : Multiplication coefficient.
+ * \param beta : Constant value added to the old intensity.
+ */
VISP_EXPORT void adjust(const vpImage &I1, vpImage &I2, double alpha, double beta);
+
+/*!
+ * \ingroup group_imgproc_brightness
+ *
+ * Adjust the brightness of a color image such as the new intensity is alpha x
+ * old_intensity + beta.
+ *
+ * \param I : The color image to adjust the brightness.
+ * \param alpha : Multiplication coefficient.
+ * \param beta : Constant value added to the old intensity.
+ */
VISP_EXPORT void adjust(vpImage &I, const double alpha, double beta);
+
+/*!
+ * \ingroup group_imgproc_brightness
+ *
+ * Adjust the brightness of a color image such as the new intensity is alpha x
+ * old_intensity + beta.
+ *
+ * \param I1 : The original color image.
+ * \param I2 : The color image after adjusting pixel intensities.
+ * \param alpha : Multiplication coefficient.
+ * \param beta : Constant value added to the old intensity.
+ */
VISP_EXPORT void adjust(const vpImage &I1, vpImage &I2, double alpha, double beta);
+/*!
+ * \ingroup group_imgproc_brightness
+ *
+ * Adjust the contrast of a grayscale image locally using the Contrast Limited
+ * Adaptive Histogram Equalization method. The limit parameter allows to
+ * limit the slope of the transformation function to prevent the
+ * over amplification of noise. This method is a transcription of the CLAHE
+ * ImageJ plugin code by Stephan Saalfeld.
+ *
+ * \param I1 : The first grayscale image.
+ * \param I2 : The second grayscale image after application of the CLAHE
+ * method.
+ * \param blockRadius : The size (2*blockRadius+1) of the local region
+ * around a pixel for which the histogram is equalized. This size should be
+ * larger than the size of features to be preserved.
+ * \param bins : The number
+ * of histogram bins used for histogram equalization (between 1 and 256). The
+ * number of histogram bins should be smaller than the number of pixels in a
+ * block.
+ * \param slope : Limits the contrast stretch in the intensity transfer
+ * function. Very large values will let the histogram equalization do whatever
+ * it wants to do, that is result in maximal local contrast. The value 1 will
+ * result in the original image.
+ * \param fast : Use the fast but less accurate
+ * version of the filter. The fast version does not evaluate the intensity
+ * transfer function for each pixel independently but for a grid of adjacent
+ * boxes of the given block size only and interpolates for locations in
+ * between.
+ */
VISP_EXPORT void clahe(const vpImage &I1, vpImage &I2, int blockRadius = 150,
int bins = 256, float slope = 3.0f, bool fast = true);
+
+/*!
+ * \ingroup group_imgproc_brightness
+ *
+ * Adjust the contrast of a color image locally using the Contrast Limited
+ * Adaptive Histogram Equalization method. The limit parameter allows to
+ * limit the slope of the transformation function to prevent the
+ * over amplification of noise. This method is a transcription of the CLAHE
+ * ImageJ plugin code by Stephan Saalfeld.
+ *
+ * \param I1 : The first color image.
+ * \param I2 : The second color image after application of the CLAHE method.
+ * \param blockRadius : The size (2*blockRadius+1) of the local region around a
+ * pixel for which the histogram is equalized. This size should be larger than
+ * the size of features to be preserved.
+ * \param bins : The number of histogram
+ * bins used for histogram equalization (between 1 and 256). The number of
+ * histogram bins should be smaller than the number of pixels in a block.
+ * \param slope : Limits the contrast stretch in the intensity transfer
+ * function. Very large values will let the histogram equalization do whatever
+ * it wants to do, that is result in maximal local contrast. The value 1 will
+ * result in the original image.
+ * \param fast : Use the fast but less accurate
+ * version of the filter. The fast version does not evaluate the intensity
+ * transfer function for each pixel independently but for a grid of adjacent
+ * boxes of the given block size only and interpolates for locations in
+ * between.
+*/
VISP_EXPORT void clahe(const vpImage &I1, vpImage &I2, int blockRadius = 150, int bins = 256,
float slope = 3.0f, bool fast = true);
+/*!
+ * \ingroup group_imgproc_histogram
+ *
+ * Adjust the contrast of a grayscale image by performing an histogram
+ * equalization. The intensity distribution is redistributed over the full [0 -
+ * 255] range such as the cumulative histogram distribution becomes linear.
+ *
+ * \param I : The grayscale image to apply histogram equalization.
+*/
VISP_EXPORT void equalizeHistogram(vpImage &I);
+
+/*!
+ * \ingroup group_imgproc_histogram
+ *
+ * Adjust the contrast of a grayscale image by performing an histogram
+ * equalization. The intensity distribution is redistributed over the full [0 -
+ * 255] range such as the cumulative histogram distribution becomes linear.
+ *
+ * \param I1 : The first grayscale image.
+ * \param I2 : The second grayscale image after histogram equalization.
+ */
VISP_EXPORT void equalizeHistogram(const vpImage &I1, vpImage &I2);
+
+/*!
+ * \ingroup group_imgproc_histogram
+ *
+ * Adjust the contrast of a color image by performing an histogram
+ * equalization. The intensity distribution is redistributed over the full [0 -
+ * 255] range such as the cumulative histogram distribution becomes linear. The
+ * alpha channel is ignored / copied from the source alpha channel.
+ *
+ * \param I : The color image to apply histogram equalization.
+ * \param useHSV : If true, the histogram equalization is performed on the
+ * value channel (in HSV space), otherwise the histogram equalization is
+ * performed independently on the RGB channels.
+ */
VISP_EXPORT void equalizeHistogram(vpImage &I, bool useHSV = false);
+
+/*!
+ * \ingroup group_imgproc_histogram
+ *
+ * Adjust the contrast of a color image by performing an histogram
+ * equalization. The intensity distribution is redistributed over the full [0 -
+ * 255] range such as the cumulative histogram distribution becomes linear. The
+ * alpha channel is ignored / copied from the source alpha channel.
+ *
+ * \param I1 : The first color image.
+ * \param I2 : The second color image after histogram equalization.
+ * \param useHSV : If true, the histogram equalization is performed on the
+ * value channel (in HSV space), otherwise the histogram equalization is
+ * performed independently on the RGB channels.
+ */
VISP_EXPORT void equalizeHistogram(const vpImage &I1, vpImage &I2, bool useHSV = false);
+/*!
+ * \ingroup group_imgproc_gamma
+ *
+ * Perform a gamma correction on a grayscale image.
+ *
+ * \param I : The grayscale image to apply gamma correction.
+ * \param gamma : Gamma value.
+ */
VISP_EXPORT void gammaCorrection(vpImage &I, double gamma);
+
+/*!
+ * \ingroup group_imgproc_gamma
+ *
+ * Perform a gamma correction on a grayscale image.
+ *
+ * \param I1 : The first grayscale image.
+ * \param I2 : The second grayscale image after gamma correction.
+ * \param gamma : Gamma value.
+ */
VISP_EXPORT void gammaCorrection(const vpImage &I1, vpImage &I2, double gamma);
+
+/*!
+ * \ingroup group_imgproc_gamma
+ *
+ * Perform a gamma correction on a color image.
+ *
+ * \param I : The color image to apply gamma correction.
+ * \param gamma : Gamma value.
+ */
VISP_EXPORT void gammaCorrection(vpImage &I, double gamma);
+
+/*!
+ * \ingroup group_imgproc_gamma
+ *
+ * Perform a gamma correction on a color image.
+ *
+ * \param I1 : The first color image.
+ * \param I2 : The second color image after gamma correction.
+ * \param gamma : Gamma value.
+ */
VISP_EXPORT void gammaCorrection(const vpImage &I1, vpImage &I2, double gamma);
+/*!
+ * \ingroup group_imgproc_retinex
+ *
+ * Apply the Retinex algorithm (the input image is modified).
+ * \param I : The color image after application of the Retinex technique.
+ * \param scale : Specifies the depth of the retinex effect. Minimum value is
+ * 16, a value providing gross, unrefined filtering. Maximum value is 250.
+ * Optimal and default value is 240.
+ * \param scaleDiv : Specifies the number of
+ * iterations of the multi scale filter. Values larger than 2 exploit the
+ * "multiscale" nature of the algorithm.
+ * \param level : Specifies distribution
+ * of the Gaussian blurring kernel sizes for Scale division values > 2:
+ * - 0, tends to treat all image intensities similarly,
+ * - 1, enhances dark regions of the image,
+ * - 2, enhances the bright regions of the image.
+ * \param dynamic : Adjusts the color of the result. Large values produce less
+ * saturated images.
+ * \param kernelSize : Kernel size for the gaussian blur
+ * operation. If -1, the kernel size is calculated from the image size.
+ */
VISP_EXPORT void retinex(vpImage &I, int scale = 240, int scaleDiv = 3, int level = RETINEX_UNIFORM,
double dynamic = 1.2, int kernelSize = -1);
+
+/*!
+ * \ingroup group_imgproc_retinex
+ *
+ * Apply the Retinex algorithm.
+ * \param I1 : The input color image.
+ * \param I2 : The output color image after application of the Retinex technique.
+ * \param scale : Specifies the depth of the retinex effect. Minimum
+ * value is 16, a value providing gross, unrefined filtering. Maximum value is
+ * 250. Optimal and default value is 240.
+ * \param scaleDiv : Specifies the
+ * number of iterations of the multiscale filter. Values larger than 2 exploit
+ * the "multiscale" nature of the algorithm.
+ * \param level : Specifies distribution of the Gaussian blurring kernel sizes
+ * for Scale division values > 2:
+ * - 0, tends to treat all image intensities similarly,
+ * - 1, enhances dark regions of the image,
+ * - 2, enhances the bright regions of the image.
+ * \param dynamic : Adjusts the color of the result. Large values produce less
+ * saturated images.
+ * \param kernelSize : Kernel size for the gaussian blur
+ * operation. If -1, the kernel size is calculated from the image size.
+ */
VISP_EXPORT void retinex(const vpImage &I1, vpImage &I2, int scale = 240, int scaleDiv = 3,
int level = RETINEX_UNIFORM, double dynamic = 1.2, int kernelSize = -1);
+/*!
+ * \ingroup group_imgproc_contrast
+ *
+ * Stretch the contrast of a grayscale image.
+ *
+ * \param I : The grayscale image to stretch the contrast.
+*/
VISP_EXPORT void stretchContrast(vpImage &I);
+
+/*!
+ * \ingroup group_imgproc_contrast
+ *
+ * Stretch the contrast of a grayscale image.
+ *
+ * \param I1 : The first input grayscale image.
+ * \param I2 : The second output grayscale image.
+ */
VISP_EXPORT void stretchContrast(const vpImage &I1, vpImage &I2);
+
+/*!
+ * \ingroup group_imgproc_contrast
+ *
+ * Stretch the contrast of a color image.
+ *
+ * \param I : The color image to stretch the contrast.
+ */
VISP_EXPORT void stretchContrast(vpImage &I);
+
+/*!
+ * \ingroup group_imgproc_contrast
+ *
+ * Stretch the contrast of a color image.
+ *
+ * \param I1 : The first input color image.
+ * \param I2 : The second output color image.
+ */
VISP_EXPORT void stretchContrast(const vpImage &I1, vpImage &I2);
+/*!
+ * \ingroup group_imgproc_contrast
+ *
+ * Stretch the contrast of a color image in the HSV color space.
+ * The saturation and value components are stretch so the hue is preserved.
+ *
+ * \param I : The color image to stretch the contrast in the HSV color space.
+ */
VISP_EXPORT void stretchContrastHSV(vpImage &I);
+
+/*!
+ * \ingroup group_imgproc_contrast
+ *
+ * Stretch the contrast of a color image in the HSV color space.
+ * The saturation and value components are stretch so the hue is preserved.
+ *
+ * \param I1 : The first input color image.
+ * \param I2 : The second output color image.
+ */
VISP_EXPORT void stretchContrastHSV(const vpImage &I1, vpImage &I2);
#if defined(VISP_BUILD_DEPRECATED_FUNCTIONS)
@@ -130,16 +421,73 @@ vp_deprecated VISP_EXPORT void unsharpMask(const vpImage &I, vpImage