![]() |
Visual Servoing Platform version 3.7.0
|
#include <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 |
| bool | isInside (const vpImagePoint &ip) const |
Class that defines a 2D circle in an image.
Definition at line 56 of file vpImageCircle.h.
| vpImageCircle::vpImageCircle | ( | ) |
Default constructor.
Definition at line 70 of file vpImageCircle.cpp.
| vpImageCircle::vpImageCircle | ( | const vpImagePoint & | center, |
| const float & | radius ) |
Constructor from a center and radius.
Definition at line 77 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 947 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 1057 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 1085 of file vpImageCircle.cpp.
References vpMath::equal(), 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 1201 of file vpImageCircle.cpp.
| float vpImageCircle::get_n11 | ( | ) | const |
Compute the normalized moment
of the image (2D) circle.
Definition at line 1207 of file vpImageCircle.cpp.
| float vpImageCircle::get_n20 | ( | ) | const |
Compute the normalized moment
of the image (2D) circle.
Definition at line 1195 of file vpImageCircle.cpp.
| vpRect vpImageCircle::getBBox | ( | ) | const |
Compute the bounding box, in the image, of the image (2D) circle.
Definition at line 1188 of file vpImageCircle.cpp.
| vpImagePoint vpImageCircle::getCenter | ( | ) | const |
Get the center of the image (2D) circle
Definition at line 1178 of file vpImageCircle.cpp.
Referenced by vpDisplay::displayCircle(), vpDisplay::displayCircle(), vpImageDraw::drawCircle(), vpImageDraw::drawCircle(), vpCircleHoughTransform::mergeCandidates(), and vpCircleHoughTransform::vpCircleHoughTransformParams::operator==.
| float vpImageCircle::getRadius | ( | ) | const |
Get the radius of the image (2D) circle.
Definition at line 1183 of file vpImageCircle.cpp.
Referenced by vpDisplay::displayCircle(), vpDisplay::displayCircle(), vpImageDraw::drawCircle(), vpImageDraw::drawCircle(), vpCircleHoughTransform::mergeCandidates(), and vpCircleHoughTransform::vpCircleHoughTransformParams::operator==.
|
inline |
Returns true if the image point belongs to the circle and false otherwise.
| [in] | ip | The image point that we are interested in. |
Definition at line 149 of file vpImageCircle.h.
References vpImagePoint::sqrDistance().