libcvd
|
Classes and functions to support miscellaneous pixel operations. More...
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::Colourmap< Rgb< C > > |
Handy class for generating a colourscale. 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 |
Alternative (and correct) spelling for this object. | |
typedef Brezenham8 | CVD::Bresenham8 |
Alternative (and correct) spelling for this object. | |
Functions | |
template<class T > | |
void | CVD::drawLine (BasicImage< T > &im, double x1, double y1, double x2, double y2, const T &c) |
draws a line defined by start and end coordinates with given color into an image. More... | |
template<class T > | |
void | CVD::drawLine (BasicImage< T > &im, const ImageRef &p1, const ImageRef &p2, const T &c) |
draws a line defined by two ImageRef with given color into an image. More... | |
template<class T > | |
void | CVD::drawShape (BasicImage< T > &im, const ImageRef &offset, const std::vector< ImageRef > &points, const T &c) |
draws a polyline defined by a set of points into an image. More... | |
template<class T , class PointIterator > | |
void | CVD::drawShape (Image< T > &im, const ImageRef &offset, PointIterator begin, PointIterator end, const T &c) |
draws a polyline defined by a set of points into an image. More... | |
template<class T > | |
void | CVD::drawBox (BasicImage< T > &im, const ImageRef &upperleft, const ImageRef &lowerright, const T &c) |
draws a box defined by the upper left and the lower right corners into an image More... | |
template<class T > | |
void | CVD::drawCross (BasicImage< T > &im, const ImageRef &p, double len, const T &c) |
draws a cross defined by center point and length of the arms into an image More... | |
std::vector< ImageRef > | CVD::getCircle (int radius) |
returns coordinate for a circle of given radius around the origin. More... | |
std::vector< ImageRef > | CVD::getDisc (double radius) |
returns coordinate for a disc of given radius around the origin. More... | |
template<class S , class T , class U > | |
void | CVD::joinImages (const Image< S > &a, const Image< T > &b, Image< U > &J) |
joins two images side-by-side to create a larger image, any remaining empty region will be blacked out More... | |
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) |
similar to copy but combines values from two source images into the output image. More... | |
Classes and functions to support miscellaneous pixel operations.
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 |
||
) |
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 |
void CVD::drawBox | ( | BasicImage< T > & | im, |
const ImageRef & | upperleft, | ||
const ImageRef & | lowerright, | ||
const T & | c | ||
) |
void CVD::drawCross | ( | BasicImage< T > & | im, |
const ImageRef & | p, | ||
double | len, | ||
const T & | c | ||
) |
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 |
void CVD::drawLine | ( | BasicImage< T > & | im, |
double | x1, | ||
double | y1, | ||
double | x2, | ||
double | y2, | ||
const T & | c | ||
) |
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 |
void CVD::drawLine | ( | BasicImage< T > & | im, |
const ImageRef & | p1, | ||
const ImageRef & | p2, | ||
const T & | c | ||
) |
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 |
void CVD::drawShape | ( | BasicImage< T > & | im, |
const ImageRef & | offset, | ||
const std::vector< ImageRef > & | points, | ||
const T & | c | ||
) |
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 |
void CVD::drawShape | ( | Image< T > & | im, |
const ImageRef & | offset, | ||
PointIterator | begin, | ||
PointIterator | end, | ||
const T & | c | ||
) |
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 |
begin | an iterator pointing to the first point in the shape. |
end | an iterator pointing to one past the last point in the shape. |
c | color of the line |
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 | ( | double | 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 | ||
) |
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 |