Visual Servoing Platform
version 3.5.0 under development (2022-02-15)
|
#include <visp3/core/vpImageDraw.h>
Static Public Member Functions | |
static void | drawArrow (vpImage< unsigned char > &I, const vpImagePoint &ip1, const vpImagePoint &ip2, unsigned char color, unsigned int w=4, unsigned int h=2, unsigned int thickness=1) |
static void | drawArrow (vpImage< vpRGBa > &I, const vpImagePoint &ip1, const vpImagePoint &ip2, const vpColor &color, unsigned int w=4, unsigned int h=2, unsigned int thickness=1) |
static void | drawCircle (vpImage< unsigned char > &I, const vpImagePoint ¢er, unsigned int radius, unsigned char color, unsigned int thickness=1) |
static void | drawCircle (vpImage< vpRGBa > &I, const vpImagePoint ¢er, unsigned int radius, const vpColor &color, unsigned int thickness=1) |
static void | drawCross (vpImage< unsigned char > &I, const vpImagePoint &ip, unsigned int size, unsigned char color, unsigned int thickness=1) |
static void | drawCross (vpImage< vpRGBa > &I, const vpImagePoint &ip, unsigned int size, const vpColor &color, unsigned int thickness=1) |
static void | drawDottedLine (vpImage< unsigned char > &I, const vpImagePoint &ip1, const vpImagePoint &ip2, unsigned char color, unsigned int thickness=1) |
static void | drawDottedLine (vpImage< vpRGBa > &I, const vpImagePoint &ip1, const vpImagePoint &ip2, const vpColor &color, unsigned int thickness=1) |
static void | drawEllipse (vpImage< unsigned char > &I, const vpImagePoint ¢er, double coef1, double coef2, double coef3, bool use_normalized_centered_moments, unsigned char color, double smallalpha=0, double highalpha=2 *M_PI, unsigned int thickness=1) |
static void | drawEllipse (vpImage< vpRGBa > &I, const vpImagePoint ¢er, double coef1, double coef2, double coef3, bool use_normalized_centered_moments, const vpColor &color, double smallalpha=0, double highalpha=2 *M_PI, unsigned int thickness=1) |
static void | drawFrame (vpImage< unsigned char > &I, const vpHomogeneousMatrix &cMo, const vpCameraParameters &cam, double size, unsigned char color, unsigned int thickness=1, const vpImagePoint &offset=vpImagePoint(0, 0)) |
static void | drawFrame (vpImage< vpRGBa > &I, const vpHomogeneousMatrix &cMo, const vpCameraParameters &cam, double size, const vpColor &color=vpColor::none, unsigned int thickness=1, const vpImagePoint &offset=vpImagePoint(0, 0)) |
static void | drawLine (vpImage< unsigned char > &I, const vpImagePoint &ip1, const vpImagePoint &ip2, unsigned char color, unsigned int thickness=1) |
static void | drawLine (vpImage< vpRGBa > &I, const vpImagePoint &ip1, const vpImagePoint &ip2, const vpColor &color, unsigned int thickness=1) |
static void | drawPoint (vpImage< unsigned char > &I, const vpImagePoint &ip, unsigned char color, unsigned int thickness=1) |
static void | drawPoint (vpImage< vpRGBa > &I, const vpImagePoint &ip, const vpColor &color, unsigned int thickness=1) |
static void | drawPolygon (vpImage< unsigned char > &I, const std::vector< vpImagePoint > &vip, unsigned char color, unsigned int thickness=1, bool closed=true) |
static void | drawPolygon (vpImage< vpRGBa > &I, const std::vector< vpImagePoint > &vip, const vpColor &color, unsigned int thickness=1, bool closed=true) |
static void | drawRectangle (vpImage< unsigned char > &I, const vpRect &rectangle, unsigned char color, bool fill=false, unsigned int thickness=1) |
static void | drawRectangle (vpImage< vpRGBa > &I, const vpRect &rectangle, const vpColor &color, bool fill=false, unsigned int thickness=1) |
Drawing functions for image.
Definition at line 58 of file vpImageDraw.h.
|
static |
Draw an arrow from image point ip1 to image point ip2.
[in,out] | I | : Image where to draw the arrow. |
[in] | ip1,ip2 | : Initial and final image points. |
[in] | color | : Arrow color. |
[in] | w,h | : Width and height of the arrow. |
[in] | thickness | : Thickness of the lines used to display the arrow. |
Definition at line 237 of file vpImageDraw.cpp.
References vpImagePoint::distance(), drawLine(), vpImagePoint::get_i(), vpImagePoint::get_j(), vpImagePoint::set_i(), vpImagePoint::set_j(), and vpMath::sqr().
Referenced by drawFrame().
|
static |
Draw an arrow from image point ip1 to image point ip2.
[in,out] | I | : Image where to draw the arrow. |
[in] | ip1,ip2 | : Initial and final image points. |
[in] | color | : Arrow color. |
[in] | w,h | : Width and height of the arrow. |
[in] | thickness | : Thickness of the lines used to display the arrow. |
Definition at line 282 of file vpImageDraw.cpp.
References vpImagePoint::distance(), drawLine(), vpImagePoint::get_i(), vpImagePoint::get_j(), vpImagePoint::set_i(), vpImagePoint::set_j(), and vpMath::sqr().
|
static |
Draw a circle in an image.
[in,out] | I | : Image where to draw the circle. |
[in] | center | : Circle center position. |
[in] | radius | : Circle radius. |
[in] | color | : Circle color. |
[in] | thickness | : Thickness of the circle. |
Definition at line 327 of file vpImageDraw.cpp.
|
static |
Draw a circle in an image.
[in,out] | I | : Image where to draw the circle. |
[in] | center | : Circle center position. |
[in] | radius | : Circle radius. |
[in] | color | : Circle color. |
[in] | thickness | : Thickness of the circle. |
Definition at line 341 of file vpImageDraw.cpp.
|
static |
Draw a cross in an image at position given by ip location.
[in,out] | I | : Image where to draw the cross. |
[in] | ip | : Cross location. |
[in] | size | : Size (width and height) of the cross. |
[in] | color | : Cross color. |
[in] | thickness | : Thickness of the lines used to display the cross. |
Definition at line 355 of file vpImageDraw.cpp.
References drawLine(), vpImagePoint::get_i(), vpImagePoint::get_j(), vpImagePoint::set_i(), and vpImagePoint::set_j().
|
static |
Draw a cross in an image at position given by ip location.
[in,out] | I | : Image where to draw the cross. |
[in] | ip | : Cross location. |
[in] | size | : Size (width and height) of the cross. |
[in] | color | : Cross color. |
[in] | thickness | : Thickness of the lines used to display the cross. |
Definition at line 379 of file vpImageDraw.cpp.
References drawLine(), vpImagePoint::get_i(), vpImagePoint::get_j(), vpImagePoint::set_i(), and vpImagePoint::set_j().
|
static |
Draw a dashed line in an image between two image points.
[in,out] | I | : Image where to draw the dashed line. |
[in] | ip1,ip2 | : Initial and final image points. |
[in] | color | : Line color. |
[in] | thickness | : Dashed line thickness. |
Definition at line 402 of file vpImageDraw.cpp.
References drawLine(), vpImagePoint::get_i(), vpImagePoint::get_j(), and vpMath::sqr().
|
static |
Draw a dashed line in an image between two image points.
[in,out] | I | : Image where to draw the dashed line. |
[in] | ip1,ip2 | : Initial and final image points. |
[in] | color | : Line color. |
[in] | thickness | : Dashed line thickness. |
Definition at line 445 of file vpImageDraw.cpp.
References drawLine(), vpImagePoint::get_i(), vpImagePoint::get_j(), and vpMath::sqr().
|
static |
Draw an ellipse in an image from its parameters expressed in pixels.
[in,out] | I | : Image where to draw the ellipse. |
[in] | center | : Center of the ellipse. |
coef1,coef2,coef3 | : Depending on the parameter use_normalized_centered_moments these parameters are:
| |
smallalpha | : Smallest angle in rad (0 for a complete ellipse). | |
highalpha | : Highest angle in rad (2 for a complete ellipse). | |
use_normalized_centered_moments | : When false, the parameters coef1, coef2, coef3 are the parameters . When true, the parameters coef1, coef2, coef3 are rather the normalized centered moments expressed in pixels. In that case, we compute the parameters a, b and e from the centered moments. | |
[in] | color | : Ellipse color. |
[in] | thickness | : Ellipse thickness. |
The following example shows how to use for example this function to draw the result of a tracking.
Definition at line 516 of file vpImageDraw.cpp.
References drawLine(), vpImagePoint::get_u(), vpImagePoint::get_v(), and vpImagePoint::set_uv().
|
static |
Draw an ellipse in an image from its parameters expressed in pixels.
[in,out] | I | : Image where to draw the ellipse. |
[in] | center | : Center of the ellipse. |
coef1,coef2,coef3 | : Depending on the parameter use_normalized_centered_moments these parameters are:
| |
smallalpha | : Smallest angle in rad (0 for a complete ellipse). | |
highalpha | : Highest angle in rad (2 for a complete ellipse). | |
use_normalized_centered_moments | : When false, the parameters coef1, coef2, coef3 are the parameters . When true, the parameters coef1, coef2, coef3 are rather the normalized centered moments expressed in pixels. In that case, we compute the parameters a, b and e from the centered moments. | |
[in] | color | : Ellipse color. |
[in] | thickness | : Ellipse thickness. |
The following example shows how to use for example this function to draw the result of a tracking.
Definition at line 630 of file vpImageDraw.cpp.
References drawLine(), vpImagePoint::get_u(), vpImagePoint::get_v(), and vpImagePoint::set_uv().
|
static |
Draw the projection in an image of an object frame represented by 3 arrows in the image. Red, green and blue arrows correspond to frame X, Y and Z axis respectively.
[in,out] | I | : Image where to draw the ellipse. |
[in] | cMo | : Homogeneous matrix that gives the transformation between the camera frame and the object frame to project in the image. |
[in] | cam | : Camera intrinsic parameters. |
[in] | size | : Size of the object frame. |
[in] | color | : Color used to display the frame in the image. |
[in] | thickness | : the thickness of the line. |
[in] | offset | : Offset in pixels applied to the frame origin location in the image. |
Definition at line 723 of file vpImageDraw.cpp.
References vpMeterPixelConversion::convertPoint(), drawArrow(), vpTracker::p, and vpForwardProjection::track().
|
static |
Draw the projection in an image of an object frame represented by 3 arrows in the image. Red, green and blue arrows correspond to frame X, Y and Z axis respectively.
[in,out] | I | : Image where to draw the ellipse. |
[in] | cMo | : Homogeneous matrix that gives the transformation between the camera frame and the object frame to project in the image. |
[in] | cam | : Camera intrinsic parameters. |
[in] | size | : Size of the object frame. |
[in] | color | : Color used to display the frame in the image. |
[in] | thickness | : the thickness of the line. |
[in] | offset | : Offset in pixels applied to the frame origin location in the image. |
Definition at line 765 of file vpImageDraw.cpp.
References vpColor::blue, vpMeterPixelConversion::convertPoint(), drawArrow(), vpColor::green, vpColor::none, vpTracker::p, vpColor::red, and vpForwardProjection::track().
|
static |
Draw a line in an image between two image points.
[in,out] | I | : Image where to draw the line. |
[in] | ip1,ip2 | : Initial and final image points. |
[in] | color | : Line color. |
[in] | thickness | : Dashed line thickness. |
Definition at line 812 of file vpImageDraw.cpp.
References vpImagePoint::get_u(), and vpImagePoint::get_v().
Referenced by drawArrow(), drawCross(), drawDottedLine(), and drawEllipse().
|
static |
Draw a line in an image between two image points.
[in,out] | I | : Image where to draw the line. |
[in] | ip1,ip2 | : Initial and final image points. |
[in] | color | : Line color. |
[in] | thickness | : Dashed line thickness. |
Definition at line 827 of file vpImageDraw.cpp.
References vpRGBa::B, vpRGBa::G, vpImagePoint::get_u(), vpImagePoint::get_v(), and vpRGBa::R.
|
static |
Draw in an image a point at the image point ip location.
[in,out] | I | : Image where to draw the point. |
[in] | ip | : Point location. |
[in] | color | : Point color. |
[in] | thickness | : Thickness of the point |
Definition at line 841 of file vpImageDraw.cpp.
References drawRectangle().
|
static |
Draw in an image a point at the image point ip location.
[in,out] | I | : Image where to draw the point. |
[in] | ip | : Point location. |
[in] | color | : Point color. |
[in] | thickness | : Thickness of the point |
Definition at line 853 of file vpImageDraw.cpp.
References drawRectangle().
|
static |
Draw in an image a polygon defined by a vector of image points.
[in,out] | I | : Image where to draw the polygon. |
[in] | vip | : Vector of image point that define the vertexes of the polygon. |
[in] | color | : Polygon color. |
[in] | thickness | : Polygon thickness. |
[in] | closed | : When true display a closed polygon with a segment between first and last image point. |
Definition at line 866 of file vpImageDraw.cpp.
|
static |
Draw in an image a polygon defined by a vector of image points.
[in,out] | I | : Image where to draw the polygon. |
[in] | vip | : Vector of image point that define the vertexes of the polygon. |
[in] | color | : Polygon color. |
[in] | thickness | : Polygon thickness. |
[in] | closed | : When true display a closed polygon with a segment between first and last image point. |
Definition at line 880 of file vpImageDraw.cpp.
|
static |
Draw in an image a rectangle with topLeft as the top-left corner and width and height the rectangle size.
[in,out] | I | : Image where to draw the rectangle. |
[in] | rectangle | : Rectangle characteristics. |
[in] | color | : Rectangle color. |
[in] | fill | : When set to true fill the rectangle. |
[in] | thickness | : Thickness of the four lines used to display the rectangle. This parameter is only useful when fill is set to false. |
Definition at line 898 of file vpImageDraw.cpp.
Referenced by drawPoint().
|
static |
Draw in an image a rectangle with topLeft as the top-left corner and width and height the rectangle size.
[in,out] | I | : Image where to draw the rectangle. |
[in] | rectangle | : Rectangle characteristics. |
[in] | color | : Rectangle color. |
[in] | fill | : When set to true fill the rectangle. |
[in] | thickness | : Thickness of the four lines used to display the rectangle. This parameter is only useful when fill is set to false. |
Definition at line 919 of file vpImageDraw.cpp.