Classes | |
class | CVD::Brezenham |
Class to implement the Bresenham line-drawing algorithm. More... | |
class | CVD::Brezenham8 |
Class to implement the Bresenham line-drawing algorithm. More... | |
struct | CVD::color< T, N > |
traits type defining colors for pixel types More... | |
struct | CVD::color< T, 1 > |
traits type defining colors for pixel types. More... | |
struct | CVD::color< T, 3 > |
traits type defining colors for pixel types. More... | |
Typedefs | |
typedef Brezenham | CVD::Bresenham |
typedef Brezenham8 | CVD::Bresenham8 |
Functions | |
template<class T> | |
void | CVD::drawLine (Image< T > &im, double x1, double y1, double x2, double y2, const T &c) |
template<class T> | |
void | CVD::drawLine (Image< T > &im, const ImageRef &p1, const ImageRef &p2, const T &c) |
template<class T> | |
void | CVD::drawLine (Image< T > &im, const TooN::Vector< 2 > &p1, const TooN::Vector< 2 > &p2, const T &c) |
template<class T> | |
void | CVD::drawShape (Image< T > &im, const ImageRef &offset, const std::vector< ImageRef > &points, const T &c) |
template<class T> | |
void | CVD::drawBox (Image< T > &im, const ImageRef &upperleft, const ImageRef &lowerright, const T &c) |
template<class T> | |
void | CVD::drawCross (Image< T > &im, const ImageRef &p, double len, const T &c) |
std::vector< ImageRef > | CVD::getCircle (int radius) |
std::vector< ImageRef > | CVD::getDisc (float radius) |
template<class S, class T, class U> | |
void | CVD::joinImages (const Image< S > &a, const Image< T > &b, Image< U > &J) |
template<class S, class T, class U> | |
void | CVD::combineImages (const Image< S > &a, const Image< T > &b, Image< U > &out, const ImageRef &dst=ImageRef_zero, ImageRef size=ImageRef(), const ImageRef &from=ImageRef_zero) |
typedef Brezenham CVD::Bresenham |
typedef Brezenham8 CVD::Bresenham8 |
void CVD::drawLine | ( | Image< T > & | im, | |
double | x1, | |||
double | y1, | |||
double | x2, | |||
double | y2, | |||
const T & | c | |||
) | [inline] |
draws a line defined by start and end coordinates with given color into an image.
im | image to draw in | |
x1 | x coordinate of start point | |
y1 | y coordinate of start point | |
x2 | x coordinate of end point | |
y2 | y coordinate of end point | |
c | color of the line |
Definition at line 127 of file draw.h.
References CVD::abs(), CVD::SubImage< T >::size(), CVD::ImageRef::x, and CVD::ImageRef::y.
Referenced by CVD::drawBox(), CVD::drawCross(), CVD::drawLine(), and CVD::drawShape().
void CVD::drawLine | ( | Image< T > & | im, | |
const ImageRef & | p1, | |||
const ImageRef & | p2, | |||
const T & | c | |||
) | [inline] |
draws a line defined by two ImageRef with given color into an image.
im | image to draw in | |
p1 | start point | |
p2 | end point | |
c | color of the line |
Definition at line 149 of file draw.h.
References CVD::drawLine(), CVD::ImageRef::x, and CVD::ImageRef::y.
void CVD::drawLine | ( | Image< T > & | im, | |
const TooN::Vector< 2 > & | p1, | |||
const TooN::Vector< 2 > & | p2, | |||
const T & | c | |||
) | [inline] |
draws a line defined by two TooN::Vector<2> with given color into an image.
im | image to draw in | |
p1 | start point | |
p2 | end point | |
c | color of the line |
Definition at line 162 of file draw.h.
References CVD::drawLine().
void CVD::drawShape | ( | Image< T > & | im, | |
const ImageRef & | offset, | |||
const std::vector< ImageRef > & | points, | |||
const T & | c | |||
) | [inline] |
draws a polyline defined by a set of points into an image.
A given offset is added to all points.
im | image to draw in | |
offset | added to all points | |
points | vector containing points | |
c | color of the line |
Definition at line 178 of file draw.h.
References CVD::drawLine().
void CVD::drawBox | ( | Image< T > & | im, | |
const ImageRef & | upperleft, | |||
const ImageRef & | lowerright, | |||
const T & | c | |||
) | [inline] |
draws a box defined by the upper left and the lower right corners into an image
im | image to draw in | |
upperleft | ImageRef of upper left corner | |
lowerright | ImageRef of lower right corner | |
c | color of the box |
Definition at line 192 of file draw.h.
References CVD::drawLine(), CVD::ImageRef::x, and CVD::ImageRef::y.
void CVD::drawCross | ( | Image< T > & | im, | |
const ImageRef & | p, | |||
double | len, | |||
const T & | c | |||
) | [inline] |
draws a cross defined by center point and length of the arms into an image
im | image to draw in | |
p | center point | |
len | arm length | |
c | color of the box |
Definition at line 207 of file draw.h.
References CVD::drawLine(), CVD::ImageRef::x, and CVD::ImageRef::y.
std::vector<ImageRef> CVD::getCircle | ( | int | radius | ) |
returns coordinate for a circle of given radius around the origin.
The result can be used with drawShape to draw it into an image.
radius | radius of the circle in pixels |
std::vector<ImageRef> CVD::getDisc | ( | float | radius | ) |
returns coordinate for a disc of given radius around the origin.
The result can be used with drawShape to draw it into an image.
radius | radius of the circle in pixels |
void CVD::joinImages | ( | const Image< S > & | a, | |
const Image< T > & | b, | |||
Image< U > & | J | |||
) | [inline] |
joins two images side-by-side to create a larger image, any remaining empty region will be blacked out
a | input image a to copy from | |
b | input image b to copy from | |
J | resulting joint image |
Definition at line 234 of file draw.h.
References CVD::copy(), CVD::Image< T >::resize(), CVD::SubImage< T >::size(), CVD::ImageRef::x, and CVD::ImageRef::y.
void CVD::combineImages | ( | const Image< S > & | a, | |
const Image< T > & | b, | |||
Image< U > & | out, | |||
const ImageRef & | dst = ImageRef_zero , |
|||
ImageRef | size = ImageRef() , |
|||
const ImageRef & | from = ImageRef_zero | |||
) | [inline] |
similar to copy but combines values from two source images into the output image.
In the current implementation it simply adds the pixel values of two input images together and writes them into the output image.
a | input image a to copy from | |
b | input image b to copy from | |
out | resulting combined image |
Definition at line 259 of file draw.h.
References CVD::copy(), CVD::SubImage< T >::in_image(), CVD::ImageRef::next(), CVD::SubImage< T >::size(), CVD::ImageRef::x, and CVD::ImageRef::y.