-
Notifications
You must be signed in to change notification settings - Fork 287
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
Circle Hough Transform #1186
Circle Hough Transform #1186
Conversation
713b88c
to
059dcac
Compare
…ions about the tutorial
059dcac
to
8023dc7
Compare
…ft the comment to keep in mind the existing formula
…e tutorial folder
…se center is outside the image
/** | ||
* \brief Class that defines a 2D circle in an image. | ||
*/ | ||
class vpCircle2D |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vpCircle2D
class should be moved in module/core/include/visp3/vpCircle2D.h
Since we have for a point in an image the vpImagePoint
class, instead of vpCircle2D
class name and corresponding files, I think that we should call the class vpImageCircle
to be homogeneous with existing code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The header of the vpImageCircle.h
should have something similar to:
#include <visp3/core/config.h>
#if defined(VISP_HAVE_OPENCV>
#include <opencv2/core.hpp>
#endif
class VISP_EXPORT vpImageCircle
/*! | ||
* Constructor from an OpenCV vector that contains [center_x, center_y, radius]. | ||
*/ | ||
vpCircle2D(const cv::Vec3f &vec) : m_center(vec[1], vec[0]), m_radius(vec[2]) { } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This constructor should be protected
#if defined(VISP_HAVE_OPENCV)
vpImageCircle(const cv::Vec3f &vec) : m_center(vec[1], vec[0]), m_radius(vec[2]) { }
#endif
There is no need to put #if defined(VISP_HAVE_OPENCV) && defined(HAVE_OPENCV_CORE)
since when OpenCV is detected, core module is available.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in d144f52
* \brief Class that gather the algorithm parameters. | ||
*/ | ||
class CHTransformParameters | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name of this class doesn't conform ViSP style. Should be something like vpCircleHoughParameters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 47a8982
@@ -0,0 +1,529 @@ | |||
#include <visp3/core/vpImageConvert.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ViSP copyright header is missing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 47a8982
…mber of detections [TUTO] Optimized detector_img.json for an example image
399b055
to
245b170
Compare
- code indentation - doxygen documentation - build without OpenCV - update changelog files
… to canny because canny now has a full-ViSP implementation too
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #1186 +/- ##
==========================================
- Coverage 54.75% 54.32% -0.43%
==========================================
Files 401 405 +4
Lines 49398 49821 +423
==========================================
+ Hits 27047 27065 +18
- Misses 22351 22756 +405
☔ View full report in Codecov by Sentry. |
…pCircle2D for ViSP vpImageCircle class
… + computation of the Canny threshold if the user set a negaitve value because it is already performed in the vpImageFilter::canny method
Added a ViSP implementation of the Circle Hough Transform.
It permits to have more control on the algorithm parameter than the current OpenCV implementation