Library of Assembled Shared Sources
|
image thing? More...
#include <image.h>
Public Member Functions | |
Image () | |
Default constructor. | |
Image (size_t rows, size_t cols) | |
Construct image of given width and height. | |
Image (const std::string &path) | |
Construct image from given file. | |
Image (const Image &other) | |
Copy constructor. | |
~Image () | |
Destructor. | |
void | reset () |
Reset image to empty image. | |
void | reset (size_t rows, size_t cols) |
Reset image to (black) image of given width. | |
void | reset (const std::string &path) |
Reset image to the one in the given file. | |
void | reset (const Image &other) |
Reset image to copy of given image. | |
void | open (const std::string &path) |
Open image from file. | |
void | open (BinaryIStream &stream, const std::string &formatTag) |
Open image from binary stream. | |
void | save (const std::string &path) |
Save image to file. | |
void | save (BinaryOStream &stream, const std::string &formatTag) |
Save image to file. | |
Image & | operator= (const Image &other) |
Copy other into this image. | |
void | swap (Image &other) |
swap two images | |
const TPixel & | operator() (size_t row, size_t col) const |
Return const pixel at position row, col. | |
TPixel & | operator() (size_t row, size_t col) |
Return reference to pixel at position row, col. | |
const TPixel & | at (TSignedSize row, TSignedSize col) const |
Return const pixel at position row, col. | |
TPixel & | at (TSignedSize row, TSignedSize col) |
Return reference to pixel at position row, col. | |
const TPixel * | data () const |
Return const data block. | |
TPixel * | data () |
Return data block. | |
const ColorSpace & | colorSpace () const |
Return colorSpace of image data. | |
ColorSpace & | colorSpace () |
Return colorSpace of image data. | |
void | transformColors (const ColorSpace &newColorSpace) |
Transform the colors from the current color spacer to destColorSpace. | |
size_t | rows () const |
Return height of image. | |
size_t | cols () const |
Return width of image. | |
bool | isEmpty () const |
Return true if image is empty (no data) | |
void | over (const Image &other) |
this = this over other | |
void | in (const Image &other) |
this = this in other | |
void | out (const Image &other) |
this = this out other | |
void | atop (const Image &other) |
this = this atop other | |
void | through (const Image &other) |
this = this through other | |
void | rover (const Image &other) |
this = other over this | |
void | rin (const Image &other) |
this = other in this | |
void | rout (const Image &other) |
this = other out this | |
void | ratop (const Image &other) |
this = other atop this | |
void | rthrough (const Image &other) |
this = other through this | |
void | plus (const Image &other) |
this = this plus other = other plus this | |
void | clampNegatives () |
clamp all negative pixel components to zero. | |
void | filterMedian (size_t boxSize) |
Apply a median filter on image. | |
void | filterGamma (TParam gammaExponent) |
apply gamma correction to image | |
void | filterExposure (TParam exposureTime) |
apply exposure to image | |
void | filterInverseExposure (TParam exposureTime) |
apply exposure to image | |
lass::io::Image::Image | ( | ) |
const Image::TPixel & lass::io::Image::operator() | ( | size_t | row, |
size_t | col ) const |
Image::TPixel & lass::io::Image::operator() | ( | size_t | row, |
size_t | col ) |
const Image::TPixel & lass::io::Image::at | ( | TSignedSize | row, |
TSignedSize | col ) const |
Image::TPixel & lass::io::Image::at | ( | TSignedSize | row, |
TSignedSize | col ) |
Image::ColorSpace & lass::io::Image::colorSpace | ( | ) |
Return colorSpace of image data.
You can change the parameters of the current color space without transforming the pixels. This is most useful if you know that the pixels are in a different color space that the current one is set to. For example, if you know the pixels have a gamma correction 2.2 applied, but the this->colorSpace().gamma == 1.
void lass::io::Image::transformColors | ( | const ColorSpace & | newColorSpace | ) |
Transform the colors from the current color spacer to destColorSpace.
The transformation consists of three stages:
For the color transformation, two transformations are concatenated. Both of them will also perform a chromatic adaption transform if the white point of either color space is not the equal energy one (E):
Definition at line 538 of file image.cpp.
References colorSpace(), and filterGamma().
void lass::io::Image::filterMedian | ( | size_t | boxSize | ) |
Apply a median filter on image.
boxSize | size of box filter, must be odd. |