Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tutorial and examples for Particle Filter #1458

Merged
merged 98 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
fcaf564
[EXAMPLE][FIX] Fix readRealSenseData segfault when pointcloud is empty
Jul 25, 2024
5cc16a5
[TUTO][CLEAN] Fixed a compilation warning
Jul 25, 2024
774d8d2
[TUTO][FIX] Fix error 'Cannot initialize vpArray(0, 0) from std::vect…
Jul 25, 2024
4494cd8
[FIX] Fix 'multiple definition of vpDIsplayFactory:: allocateDisplay()
Jul 25, 2024
5794f5f
UpdatedCopyright
Jul 25, 2024
fb8da13
[TUTO] Began to write the Particle Filter tutorial code.
Jul 25, 2024
411c75f
[CORE] vpCannyEdgeDetection can now give the list of edge-points
Jul 25, 2024
139b888
[TUTO] Particle Filter tuto: least-mean square parabolla estimation
Jul 25, 2024
9b52be8
[TUTO] Added a RANSAC-based parabolla parameters estimation
Jul 26, 2024
6087c17
[FIX] The measurements were of incorrect type in threadLikelihood
Jul 26, 2024
4983d09
[EXAMPLE] Changed nbThreads to be able to set a negative value, to us…
Jul 26, 2024
df6f9e1
[TUTO] First draft of use of the Particle Filter
Jul 26, 2024
a2b6ebf
[TUTO] Protection against lack of display 3rd party
Jul 26, 2024
779b1f1
[TUTO] Added a class for the parabola model
Jul 26, 2024
979c87b
[MERGE] Merged master AprilTag PR into tuto_pf
Aug 5, 2024
6601c68
[TUTO] Extract the skeletton instead of using Canny to extract an edg…
Aug 5, 2024
8452e7d
TUTO] Improved RANSAC method
Aug 5, 2024
b89be67
[TUTO] Possible to read init points from a file
Aug 5, 2024
0cf391e
[TUTO] Moved const legend-related stuff in vpTutoCommonData + [TUTO][…
Aug 5, 2024
ad31df8
[TUTO] Moved the filling of the system and the construction from a ma…
Aug 5, 2024
1352bb0
[TUTO][FIX] Measured time in micros instead of millis for the PF
Aug 6, 2024
98fc4a6
[TUTO] Changed the tutorial for the PF
Aug 28, 2024
b4956da
[TUTO] Removed files of the former tuto for PF
Aug 28, 2024
d5f29ef
[TUTO] Fine-tuning PF parameters
Aug 28, 2024
40abc33
[MERGE] Fixed merge conflict in vpDisplayFactory
Aug 28, 2024
d95267d
[MERGE] Fixed merge conflict in vpDisplayFactory.h
Aug 28, 2024
70864a1
[TUTO] Improved PF tutorial, permitting setting parameters using CLI
Aug 29, 2024
743843b
[EXAMPLE] Changed the non-linear case example of the PF to match the …
Aug 29, 2024
6405e85
[TEST][EXAMPLE] Tuned the test based on the pf-nonlinear-example
Aug 29, 2024
c8c464c
[CLEAN] Corrected a typo in the PF tuto
Aug 29, 2024
8a60037
[FIX] Fix segfault when #threads != max(#threads) of the computer
Aug 29, 2024
d7043e6
[EXAMPLE][FIX] Fix formula to compute the position from the measurements
Aug 29, 2024
5c9445c
[EXAMPLE] Added another example for the PF
Aug 29, 2024
8416357
[EXAMPLE] Modified the likelihood function + [EXAMPLE][TEST] Added un…
Aug 29, 2024
3c25e84
[EXAMPLE][DOC] Improved documentation of the non-linear simple example
Sep 2, 2024
40f6641
[EXAMPLE] Includes the effect of the command in the process function
Sep 2, 2024
d02001e
[EXAMPLE] + [EXAMPLE][DOC]
Sep 2, 2024
bff0e7c
[TUTORIAL][DOC] Improved comments in PF tutorial
Sep 2, 2024
69c8148
[DOC][FIX] Fixed broken documentation of the UKF tutorial
Sep 2, 2024
4f11cb9
[TUTO][DOC] Began to wrote the documentation of the PF tutorial
Sep 2, 2024
af996bb
[TUTO][DOC] Finished the first draft of the PF tutorial documentation
Sep 2, 2024
ddf49c8
[TUTO] Generate simulated curves to check that LMS works. Tests revea…
Sep 4, 2024
6fad376
[TUTO] Can generate 2nd or 3rd degree polynomial simulated images
Sep 4, 2024
ff92325
[TUTO][FIX] Fix skelettonization when the thickness is of 1 pixel only
Sep 4, 2024
167dc66
[TUTO] Moved PF curve fitting tutorial in another folder
Sep 4, 2024
7d9a0c2
[TUTO] Created tuto based on UKF tuto and in another folder put the c…
Sep 4, 2024
a83864b
[TUTO][MERGE] Solved merge conflict with tuto_pf_like_ukf branch
Sep 4, 2024
f29cc46
[FIX] Solved linkage error
Sep 4, 2024
47d9c96
Merge branch 'tuto_pf_like_ukf' into tuto_pf
Sep 4, 2024
c5d852d
[FIX] Throw an error when the size of the state does not match the si…
Sep 4, 2024
4decd4c
Merge branch 'tuto_pf_like_ukf' into tuto_pf
Sep 4, 2024
f01ae20
[TUTO][FIX] Fix freeze when degree != 2
Sep 4, 2024
8aa2a94
[TUTO] Permits to generate polynomials of order > 3
Sep 4, 2024
1a5f005
[TUTO] Min nb of points depends on the degree of the polynomial
Sep 5, 2024
419cc04
[TUTO][FIX] Fixed the number of points to use in the RANSAC to build …
Sep 5, 2024
25043c8
[TUTO] Robustified the PF likelihood
Sep 5, 2024
0a9ac8b
[TUTO] Added plot and final stats
Sep 5, 2024
0f02633
[TUTO][FIX] Fixed the polynomial interpolation by normalizing a prior…
Sep 5, 2024
0700af4
[TUTO][FIX] tuto-pf-curve-fitting
Sep 5, 2024
d128e42
[TUTO] Added salt-and-pepper noise to see the usefulness of the PF
Sep 5, 2024
0ed9f6d
[TUTO] Added CLI options
Sep 6, 2024
2741f10
[TUTO] Changed the color of the PF graphs
Sep 6, 2024
68acda7
Merge branch 'tuto_pf_like_ukf' into tuto_pf
Sep 6, 2024
d283522
[TUTO][DOC][FIX] Fixed typo in doc
Sep 6, 2024
645bfc1
Merge branch 'tuto_pf_like_ukf' into tuto_pf
Sep 6, 2024
1cd085d
[TEST] Added a test for the PF
Sep 9, 2024
5d31ec1
[TUTO] Removed simulated data in the PF curve-fitting
Sep 9, 2024
0255e20
[CORE] vpUniRand::shuffleVector can now be seeded
Sep 9, 2024
08dfe04
[TEST] Added a test with noise added to the init points for the 2nd o…
Sep 9, 2024
2d2e64a
[TEST] Added a noisy case for the 3rd order polynomial interpolation
Sep 9, 2024
481dfc0
[TUTO] Removed display of skeletonized image, leaving only skeletoniz…
Sep 9, 2024
29d21fb
[TUTO] Removed RANSAC-based polynomial interpolator
Sep 10, 2024
bbd1c24
[TUTO][DOC] Added documentation for the segmentation methods + correc…
Sep 10, 2024
665def1
[TUTO] Error is now RMSE + using double
Sep 10, 2024
e010023
[TUTO] Averaging of the polynomials is done in a cleaner way
Sep 10, 2024
be519ee
[TEST] Use cleverer mean computation, which increases the PF accuracy
Sep 10, 2024
92f3b36
[TUTO] Created a separated tuto showing only polynomial interpolation…
Sep 10, 2024
076cc37
[TUTO] Created a tuto showing polynomial interpolation using a PF only
Sep 10, 2024
2e22f83
[TUTO] Removed useless evaluateRobust
Sep 10, 2024
39cd065
[TUTO] Automatic initialization of the PF
Sep 10, 2024
8b8da79
[TUTO] Added data + calib
Sep 10, 2024
4d6d0f7
[DOC] Clean the documentation adding DOXYGEN_SHOULD_SKIP_THIS
Sep 10, 2024
859cac2
[TUTO][DOC] Added a dox file to explain the curve fitting PF tutorial
Sep 10, 2024
a8a9070
Merge branch 'master' into tuto_pf_like_ukf
Sep 10, 2024
d1280ef
[FIX] Fixed multiple definition of vpDisplayFactory::makeDisplayGridH…
Sep 11, 2024
eb76327
[TUTO][FIX] Fix compilation errors when ViSP namespace is activated
Sep 11, 2024
68b5953
[FIX] Fixed typo in vpUniRand::shuffleVector
Sep 11, 2024
dd049ba
Merge with last changes
fspindle Sep 11, 2024
8127f2e
Introduce display factory usage
fspindle Sep 11, 2024
14204e3
Fix typos
fspindle Sep 11, 2024
b90c045
Update change log file with new tutorials
fspindle Sep 11, 2024
3bc7d32
Harmonize copyright headers in tutorial folder
fspindle Sep 11, 2024
5e98ed7
Relax tolerance in particle filter testing
fspindle Sep 11, 2024
d225943
[TUTO][FIX] Fix C++98 related compilation errors + removed unused inc…
Sep 11, 2024
3d01549
Merge branch 'tuto_pf_like_ukf' of github.com:rolalaro/visp into tuto…
Sep 11, 2024
280796f
[FIX] In vpUniRand::shuffleVector, the test on the CXX standard was i…
Sep 11, 2024
8c14616
Fix error: unsupported option '-mfpu=' for target 'arm64-apple-darwin…
fspindle Sep 12, 2024
c1624ea
Relax maxToleratedError for testing under windows
fspindle Sep 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[DOC] Clean the documentation adding DOXYGEN_SHOULD_SKIP_THIS
  • Loading branch information
LAGNEAU Romain committed Sep 10, 2024
commit 4d6d0f785a85d1dd9748d8c342310d0c6a4b614f
12 changes: 7 additions & 5 deletions modules/imgproc/src/vpCircleHoughTransform_centers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@

BEGIN_VISP_NAMESPACE

#ifndef DOXYGEN_SHOULD_SKIP_THIS
namespace
{
/**
Expand Down Expand Up @@ -204,7 +205,7 @@ updateAccumAlongGradientDir(const vpDataForAccumLoop &data, float &sx, float &sy
float dy = (coord.y_orig - static_cast<float>(coord.y));
accum[coord.y - data.offsetY][coord.x - data.offsetX] += std::abs(dx) + std::abs(dy);
}
};
};
#endif
vpCoordinatesForAccumStep coords;
coords.x_orig = x1;
Expand All @@ -216,14 +217,15 @@ updateAccumAlongGradientDir(const vpDataForAccumLoop &data, float &sx, float &sy
coords.x = x_high;
coords.y = y_high;
updateAccumulator(coords, data, centersAccum, hasToStopLoop);
}
}
}
}
sx = -sx;
sy = -sy;
}
}
}
}
#endif


// Static variables
Expand Down Expand Up @@ -525,8 +527,8 @@ vpCircleHoughTransform::filterCenterCandidates(const std::vector<vpCenterVotes>
m_centerCandidatesList.push_back(merged_peaks_position_votes[i].m_position);
m_centerVotes.push_back(static_cast<int>(merged_peaks_position_votes[i].m_votes));
}
}
}
}
}

vpCircleHoughTransform::vpCentersBarycenter
vpCircleHoughTransform::mergeSimilarCenters(const unsigned int &idPeak, const unsigned int &nbPeaks, const float &squared_distance_max, const std::vector<vpCenterVotes> &peak_positions_votes, std::vector<bool> &has_been_merged)
Expand Down
2 changes: 2 additions & 0 deletions modules/imgproc/src/vpCircleHoughTransform_circles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@

BEGIN_VISP_NAMESPACE

#ifndef DOXYGEN_SHOULD_SKIP_THIS
namespace
{
#if (VISP_CXX_STANDARD == VISP_CXX_STANDARD_98)
Expand Down Expand Up @@ -128,6 +129,7 @@ updateRadiusAccumulator(const vpDataUpdateRadAccum &data, std::vector<float> &ra
}
}
}
#endif

void
vpCircleHoughTransform::computeCircleCandidates()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
*
*****************************************************************************/

//! \example tutorial-pf.cpp
//! \example tutorial-pf-curve-fitting-all.cpp

// System includes
#include <algorithm>
Expand Down Expand Up @@ -61,6 +61,7 @@ using VISP_NAMESPACE_NAME;
#endif

#if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11) && defined(VISP_HAVE_DISPLAY)
#ifndef DOXYGEN_SHOULD_SKIP_THIS
namespace tutorial
{
//! [Evaluation_functions]
Expand Down Expand Up @@ -458,6 +459,7 @@ class vpTutoLikelihoodFunctor
};
//! [Likelihood_functor]
}
#endif

int main(const int argc, const char *argv[])
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
*
*****************************************************************************/

//! \example tutorial-pf.cpp
//! \example tutorial-pf-curve-fitting-lms.cpp

#include <visp3/core/vpConfig.h>
#include <visp3/core/vpCannyEdgeDetection.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
*
*****************************************************************************/

//! \example tutorial-pf.cpp
//! \example tutorial-pf-curve-fitting-pf.cpp

#include <visp3/core/vpConfig.h>
#include <visp3/core/vpCannyEdgeDetection.h>
Expand All @@ -57,6 +57,7 @@ using VISP_NAMESPACE_NAME;
#endif

#if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11) && defined(VISP_HAVE_DISPLAY)
#ifndef DOXYGEN_SHOULD_SKIP_THIS
namespace tutorial
{
//! [Evaluation_functions]
Expand Down Expand Up @@ -454,6 +455,7 @@ class vpTutoLikelihoodFunctor
};
//! [Likelihood_functor]
}
#endif

int main(const int argc, const char *argv[])
{
Expand Down
2 changes: 2 additions & 0 deletions tutorial/particle-filter-curve-fitting/vpTutoCommonData.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
#include <visp3/gui/vpDisplayFactory.h>
#include <visp3/io/vpVideoReader.h>

#ifndef DOXYGEN_SHOULD_SKIP_THIS
namespace tutorial
{
inline void log(std::ostream &os, const std::string &filename, const std::string &funName, const std::string &arrayName, const vpArray2D<double> &array, const unsigned int &level = 0)
Expand Down Expand Up @@ -338,3 +339,4 @@ typedef struct vpTutoCommonData
}vpTutoCommonData;
}
#endif
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

#include "vpTutoMeanSquareFitting.h"

#ifndef DOXYGEN_SHOULD_SKIP_THIS
namespace tutorial
{
#ifdef ENABLE_VISP_NAMESPACE
Expand Down Expand Up @@ -100,3 +101,4 @@ double vpTutoMeanSquareFitting::model(const float &u)
return v;
}
}
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@

#include "vpTutoParabolaModel.h"

#ifndef DOXYGEN_SHOULD_SKIP_THIS
namespace tutorial
{
/**
Expand Down Expand Up @@ -157,5 +158,5 @@ class vpTutoMeanSquareFitting
bool m_isFitted; /*!< Set to true if the fit method has been called.*/
};
}

#endif
#endif
6 changes: 5 additions & 1 deletion tutorial/particle-filter-curve-fitting/vpTutoParabolaModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@
#include <visp3/core/vpColVector.h>
#include <visp3/core/vpMatrix.h>

#ifndef DOXYGEN_SHOULD_SKIP_THIS
namespace tutorial
{
/*!
* \brief Model of a parabola \f[v = \sum_{i = 0}^N a_i u^i \f] where \f[N\f] is the
* degree of the polynomial.
Expand Down Expand Up @@ -164,5 +167,6 @@ class vpTutoParabolaModel
double m_width; /*!< The width of the input image*/
VISP_NAMESPACE_ADDRESSING vpColVector m_coeffs; /*!< The coefficient of the polynomial, where m_coeffs[0] is the offset and m_coeffs[m_degree] is the coefficient applied to the highest degree.*/
};

}
#endif
#endif
2 changes: 2 additions & 0 deletions tutorial/particle-filter-curve-fitting/vpTutoSegmentation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@

#include <visp3/core/vpGaussRand.h>

#ifndef DOXYGEN_SHOULD_SKIP_THIS
namespace tutorial
{
void performSegmentationHSV(vpTutoCommonData &data)
Expand Down Expand Up @@ -151,3 +152,4 @@ std::vector< vpImagePoint > addSaltAndPepperNoise(const std::vector< vpImagePoin
return noisyPts;
}
}
#endif
2 changes: 2 additions & 0 deletions tutorial/particle-filter-curve-fitting/vpTutoSegmentation.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@

#include "vpTutoCommonData.h"

#ifndef DOXYGEN_SHOULD_SKIP_THIS
namespace tutorial
{
/**
Expand Down Expand Up @@ -68,3 +69,4 @@ std::vector< VISP_NAMESPACE_ADDRESSING vpImagePoint > extractSkeleton(vpTutoComm
std::vector< VISP_NAMESPACE_ADDRESSING vpImagePoint > addSaltAndPepperNoise(const std::vector< VISP_NAMESPACE_ADDRESSING vpImagePoint > &noisefreePts, vpTutoCommonData &data);
}
#endif
#endif