Visual Servoing Platform
version 3.3.0
vpImageDraw.h
1
/****************************************************************************
2
*
3
* ViSP, open source Visual Servoing Platform software.
4
* Copyright (C) 2005 - 2019 by Inria. All rights reserved.
5
*
6
* This software is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 2 of the License, or
9
* (at your option) any later version.
10
* See the file LICENSE.txt at the root directory of this source
11
* distribution for additional information about the GNU GPL.
12
*
13
* For using ViSP with software that can not be combined with the GNU
14
* GPL, please contact Inria about acquiring a ViSP Professional
15
* Edition License.
16
*
17
* See http://visp.inria.fr for more information.
18
*
19
* This software was developed at:
20
* Inria Rennes - Bretagne Atlantique
21
* Campus Universitaire de Beaulieu
22
* 35042 Rennes Cedex
23
* France
24
*
25
* If you have questions regarding the use of this file, please contact
26
* Inria at visp@inria.fr
27
*
28
* This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
29
* WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
30
*
31
* Description:
32
* Drawing functions.
33
*
34
*****************************************************************************/
35
36
#ifndef _vpImageDraw_h_
37
#define _vpImageDraw_h_
38
45
#include <visp3/core/vpImage.h>
46
#include <visp3/core/vpColor.h>
47
#include <visp3/core/vpRect.h>
48
#include <visp3/core/vpCameraParameters.h>
49
57
class
VISP_EXPORT
vpImageDraw
58
{
59
public
:
60
static
void
drawArrow(
vpImage<unsigned char>
&I,
const
vpImagePoint
&ip1,
const
vpImagePoint
&ip2,
unsigned
char
color,
61
unsigned
int
w = 4,
unsigned
int
h = 2,
unsigned
int
thickness = 1);
62
static
void
drawArrow(
vpImage<vpRGBa>
&I,
const
vpImagePoint
&ip1,
const
vpImagePoint
&ip2,
const
vpColor
&color,
63
unsigned
int
w = 4,
unsigned
int
h = 2,
unsigned
int
thickness = 1);
64
65
static
void
drawCircle(
vpImage<unsigned char>
&I,
const
vpImagePoint
¢er,
unsigned
int
radius,
66
unsigned
char
color,
unsigned
int
thickness = 1);
67
static
void
drawCircle(
vpImage<vpRGBa>
&I,
const
vpImagePoint
¢er,
unsigned
int
radius,
68
const
vpColor
&color,
unsigned
int
thickness = 1);
69
70
static
void
drawCross(
vpImage<unsigned char>
&I,
const
vpImagePoint
&ip,
unsigned
int
size,
unsigned
char
color,
71
unsigned
int
thickness = 1);
72
static
void
drawCross(
vpImage<vpRGBa>
&I,
const
vpImagePoint
&ip,
unsigned
int
size,
const
vpColor
&color,
73
unsigned
int
thickness = 1);
74
75
static
void
drawDottedLine(
vpImage<unsigned char>
&I,
const
vpImagePoint
&ip1,
const
vpImagePoint
&ip2,
unsigned
char
color,
76
unsigned
int
thickness = 1);
77
static
void
drawDottedLine(
vpImage<vpRGBa>
&I,
const
vpImagePoint
&ip1,
const
vpImagePoint
&ip2,
const
vpColor
&color,
78
unsigned
int
thickness = 1);
79
80
static
void
drawEllipse(
vpImage<unsigned char>
&I,
const
vpImagePoint
¢er,
double
coef1,
81
double
coef2,
double
coef3,
bool
use_centered_moments,
unsigned
char
color,
82
double
theta1 = 0,
double
theta2 = 360,
unsigned
int
thickness = 1);
83
static
void
drawEllipse(
vpImage<vpRGBa>
&I,
const
vpImagePoint
¢er,
double
coef1,
84
double
coef2,
double
coef3,
bool
use_centered_moments,
const
vpColor
&color,
85
double
theta1 = 0,
double
theta2 = 360,
unsigned
int
thickness = 1);
86
87
static
void
drawFrame(
vpImage<unsigned char>
&I,
const
vpHomogeneousMatrix
&cMo,
88
const
vpCameraParameters
&cam,
double
size,
unsigned
char
color,
89
unsigned
int
thickness = 1,
const
vpImagePoint
&offset =
vpImagePoint
(0, 0));
90
static
void
drawFrame(
vpImage<vpRGBa>
&I,
const
vpHomogeneousMatrix
&cMo,
91
const
vpCameraParameters
&cam,
double
size,
const
vpColor
&color =
vpColor::none
,
92
unsigned
int
thickness = 1,
const
vpImagePoint
&offset =
vpImagePoint
(0, 0));
93
94
static
void
drawLine(
vpImage<unsigned char>
&I,
const
vpImagePoint
&ip1,
const
vpImagePoint
&ip2,
unsigned
char
color,
95
unsigned
int
thickness = 1);
96
static
void
drawLine(
vpImage<vpRGBa>
&I,
const
vpImagePoint
&ip1,
const
vpImagePoint
&ip2,
const
vpColor
&color,
97
unsigned
int
thickness = 1);
98
99
static
void
drawPoint(
vpImage<unsigned char>
&I,
const
vpImagePoint
&ip,
unsigned
char
color,
unsigned
int
thickness = 1);
100
static
void
drawPoint(
vpImage<vpRGBa>
&I,
const
vpImagePoint
&ip,
const
vpColor
&color,
unsigned
int
thickness = 1);
101
102
static
void
drawPolygon(
vpImage<unsigned char>
&I,
const
std::vector<vpImagePoint> &vip,
103
unsigned
char
color,
unsigned
int
thickness = 1,
bool
closed =
true
);
104
static
void
drawPolygon(
vpImage<vpRGBa>
&I,
const
std::vector<vpImagePoint> &vip,
105
const
vpColor
&color,
unsigned
int
thickness = 1,
bool
closed =
true
);
106
107
static
void
drawRectangle(
vpImage<unsigned char>
&I,
const
vpRect
&rectangle,
unsigned
char
color,
108
bool
fill =
false
,
unsigned
int
thickness = 1);
109
static
void
drawRectangle(
vpImage<vpRGBa>
&I,
const
vpRect
&rectangle,
const
vpColor
&color,
110
bool
fill =
false
,
unsigned
int
thickness = 1);
111
};
112
113
#endif
vpCameraParameters
Generic class defining intrinsic camera parameters.
Definition:
vpCameraParameters.h:234
vpColor::none
static const vpColor none
Definition:
vpColor.h:191
vpImagePoint
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...
Definition:
vpImagePoint.h:89
vpImageDraw
Drawing functions for image.
Definition:
vpImageDraw.h:58
vpImage< unsigned char >
vpColor
Class to define colors available for display functionnalities.
Definition:
vpColor.h:120
vpHomogeneousMatrix
Implementation of an homogeneous matrix and operations on such kind of matrices.
Definition:
vpHomogeneousMatrix.h:150
vpRect
Defines a rectangle in the plane.
Definition:
vpRect.h:79
modules
core
include
visp3
core
vpImageDraw.h
Generated by
1.8.18