Visual Servoing Platform
version 3.6.1 under development (2024-10-10)
|
#include <visp3/core/vpImageCircle.h>
Public Member Functions | |
vpImageCircle () | |
vpImageCircle (const vpImagePoint ¢er, const float &radius) | |
float | computeAngularCoverageInRoI (const vpRect &roi, const float &roundingTolerance=0.001f) const |
float | computeArcLengthInRoI (const vpRect &roi, const float &roundingTolerance=0.001f) const |
unsigned int | computePixelsInMask (const vpImage< bool > &mask) const |
vpImagePoint | getCenter () const |
float | getRadius () const |
vpRect | getBBox () const |
float | get_n20 () const |
float | get_n02 () const |
float | get_n11 () const |
Class that defines a 2D circle in an image.
Definition at line 56 of file vpImageCircle.h.
BEGIN_VISP_NAMESPACE vpImageCircle::vpImageCircle | ( | ) |
Default constructor.
Definition at line 38 of file vpImageCircle.cpp.
vpImageCircle::vpImageCircle | ( | const vpImagePoint & | center, |
const float & | radius | ||
) |
Constructor from a center and radius.
Definition at line 45 of file vpImageCircle.cpp.
float vpImageCircle::computeAngularCoverageInRoI | ( | const vpRect & | roi, |
const float & | roundingTolerance = 0.001f |
||
) | const |
Compute the angular coverage, in terms of radians, that is contained in the Region of Interest (RoI).
[in] | roi | The rectangular RoI in which we want to know the number of pixels of the circle that are contained. |
[in] | roundingTolerance | The tolerance on the angle when the angle is close to a negative multiple of 2 * M_PI_FLOAT. |
Definition at line 915 of file vpImageCircle.cpp.
References vpException::fatalError, vpImagePoint::get_u(), vpImagePoint::get_v(), vpRect::getHeight(), vpRect::getTopLeft(), vpRect::getWidth(), vpRect::isInside(), and vpMath::modulo().
Referenced by computeArcLengthInRoI().
float vpImageCircle::computeArcLengthInRoI | ( | const vpRect & | roi, |
const float & | roundingTolerance = 0.001f |
||
) | const |
Compute the arc length, in terms of number of pixels, that is contained in the Region of Interest (RoI).
[in] | roi | The rectangular RoI in which we want to know the number of pixels of the circle that are contained. |
[in] | roundingTolerance | The tolerance on the angle when the angle is close to 2.f * M_PI_FLOAT . |
Definition at line 1025 of file vpImageCircle.cpp.
References computeAngularCoverageInRoI().
Referenced by vpCircleHoughTransform::computeCircleProbability().
unsigned int vpImageCircle::computePixelsInMask | ( | const vpImage< bool > & | mask | ) | const |
Count the number of pixels of the circle whose value in the mask is true.
mask | A mask where true indicates that a pixel must be taken into account and false that it must be ignored. |
Definition at line 1050 of file vpImageCircle.cpp.
References vpMath::equal(), vpImagePoint::get_u(), vpImagePoint::get_v(), vpImage< Type >::getHeight(), and vpImage< Type >::getWidth().
Referenced by vpCircleHoughTransform::computeCircleProbability().
float vpImageCircle::get_n02 | ( | ) | const |
Compute the normalized moment of the image (2D) circle.
Definition at line 1164 of file vpImageCircle.cpp.
float vpImageCircle::get_n11 | ( | ) | const |
Compute the normalized moment of the image (2D) circle.
Definition at line 1169 of file vpImageCircle.cpp.
float vpImageCircle::get_n20 | ( | ) | const |
Compute the normalized moment of the image (2D) circle.
Definition at line 1159 of file vpImageCircle.cpp.
vpRect vpImageCircle::getBBox | ( | ) | const |
Compute the bounding box, in the image, of the image (2D) circle.
Definition at line 1153 of file vpImageCircle.cpp.
vpImagePoint vpImageCircle::getCenter | ( | ) | const |
Get the center of the image (2D) circle
Definition at line 1143 of file vpImageCircle.cpp.
Referenced by vpDisplay::displayCircle(), vpImageDraw::drawCircle(), and vpCircleHoughTransform::mergeCandidates().
float vpImageCircle::getRadius | ( | ) | const |
Get the radius of the image (2D) circle.
Definition at line 1148 of file vpImageCircle.cpp.
Referenced by vpDisplay::displayCircle(), vpImageDraw::drawCircle(), and vpCircleHoughTransform::mergeCandidates().