Imagine++
|
Classes | |
class | Imagine::Array< T > |
Array of variable size. More... | |
class | Imagine::Coords< dim > |
Coordinates. More... | |
class | Imagine::CoordsIterator< dim > |
Iterator on Coordinates. More... | |
class | Imagine::FArray< T, S > |
Array of fixed size. More... | |
class | Imagine::FMatrix< T, M, N > |
Matrix of fixed dimension. More... | |
class | Imagine::FVector< T, dim > |
Vector of fixed size. More... | |
class | Imagine::MultiArray< T, dim > |
nD array of variable size. More... | |
class | Imagine::RGB< T > |
RED GREEN BLUE color. More... | |
class | Imagine::RGBA< T > |
RED GREEN BLUE Alpha color. More... | |
class | Imagine::Timer |
Timers. More... | |
Macros | |
#define | srcPath(s) (s) |
Transform relative file path to absolute path. More... | |
#define | stringSrcPath(s) (s) |
Typedefs | |
typedef RGBA< octet > | Imagine::AlphaColor |
RGBA<byte> alias. More... | |
typedef unsigned char | Imagine::byte |
typedef RGB< octet > | Imagine::Color |
RGB<octet> alias. More... | |
typedef unsigned char | Imagine::octet |
0 to 255 integer type. More... | |
Functions | |
const Color | Imagine::BLACK (0, 0, 0) |
Predefined color. More... | |
const Color | Imagine::BLUE (0, 0, 255) |
Predefined color. More... | |
const Color | Imagine::CYAN (0, 255, 255) |
Predefined color. More... | |
template<typename T , int M> | |
T | Imagine::det (const FMatrix< T, M, M > &A) |
Determinant. More... | |
template<typename T , int M> | |
FMatrix< T, M, M > | Imagine::Diagonal (const FVector< T, M > &d) |
Diagonal. More... | |
double | Imagine::doubleRandom () |
Uniform double. More... | |
double | Imagine::gaussianRandom () |
Normal law. More... | |
const Color | Imagine::GREEN (0, 255, 0) |
Predefined color. More... | |
void | Imagine::initRandom (unsigned int s) |
Init with seed. More... | |
void | Imagine::initRandom () |
Init. More... | |
int | Imagine::intRandom (int a, int b) |
Uniform int. More... | |
template<typename T , int M> | |
FMatrix< T, M, M > | Imagine::inverse (const FMatrix< T, M, M > &A) |
Inverse. More... | |
template<typename T > | |
bool | Imagine::loadBinary (T &obj, std::string filename) |
Object loading. More... | |
template<typename T > | |
bool | Imagine::loadText (T &obj, std::string filename) |
Object loading. More... | |
const Color | Imagine::MAGENTA (255, 0, 255) |
Predefined color. More... | |
template<typename T , int M, int N, int O> | |
FMatrix< T, M, O > | Imagine::multt (const FMatrix< T, M, N > &A, const FMatrix< T, O, N > &B) |
Product. More... | |
template<typename T , int M, int N> | |
FMatrix< T, M, N > | Imagine::operator* (T s, const FMatrix< T, M, N > &A) |
Scalar multiplication. More... | |
template<typename T , int M, int N> | |
FMatrix< T, M, N > | Imagine::operator+ (T s, const FMatrix< T, M, N > &A) |
Scalar addition. More... | |
template<typename T , int M, int N> | |
FMatrix< T, M, N > | Imagine::operator- (T s, const FMatrix< T, M, N > &A) |
Scalar substraction. More... | |
std::ostream & | Imagine::operator<< (std::ostream &out, const Color &c) |
Display color as three integral values. | |
const Color | Imagine::ORANGE (255, 128, 0) |
Predefined color. More... | |
const Color | Imagine::PURPLE (128, 0, 255) |
Predefined color. More... | |
const Color | Imagine::RED (255, 0, 0) |
Predefined color. More... | |
template<typename T > | |
FVector< double, 3 > | Imagine::RGB2YUV (const RGB< T > &rgb) |
RGB to YUV. More... | |
template<typename T > | |
bool | Imagine::saveBinary (const T &obj, std::string filename) |
Object saving. More... | |
template<typename T > | |
bool | Imagine::saveText (const T &obj, std::string filename, int precision=-1) |
Object saving. More... | |
size_t | Imagine::size_tRandom (size_t a) |
Uniform size_t. More... | |
template<typename T , int M, int N, int O> | |
FMatrix< T, N, O > | Imagine::tmult (const FMatrix< T, M, N > &A, const FMatrix< T, M, O > &B) |
Product. More... | |
template<typename T , int M, int N> | |
FVector< T, N > | Imagine::tmult (const FMatrix< T, M, N > &A, const FVector< T, M > &v) |
Product with vector. More... | |
template<typename T , int M, int N, int O> | |
FMatrix< T, N, O > | Imagine::tmultt (const FMatrix< T, M, N > &A, const FMatrix< T, O, M > &B) |
Product. More... | |
template<typename T , int M, int N> | |
FMatrix< T, N, M > | Imagine::transpose (const FMatrix< T, M, N > &A) |
Transpose. More... | |
unsigned int | Imagine::uintRandom (unsigned int a) |
Uniform unsigned int. More... | |
void | Imagine::waitKey (const char *message="Press <enter> to continue...") |
Pause in program execution until key press. More... | |
const Color | Imagine::WHITE (255, 255, 255) |
Predefined color. More... | |
const Color | Imagine::YELLOW (255, 255, 0) |
Predefined color. More... | |
template<typename T > | |
RGB< T > | Imagine::YUV2RGB (const FVector< double, 3 > &yuv) |
YUV to RGB. More... | |
Variables | |
const AlphaColor | Imagine::ABLACK =AlphaColor(0,0,0) |
Predefined color. More... | |
const AlphaColor | Imagine::ABLUE =AlphaColor(0,0,255) |
Predefined color. More... | |
const AlphaColor | Imagine::ACYAN =AlphaColor(0,255,255) |
Predefined color. More... | |
const AlphaColor | Imagine::AGREEN =AlphaColor(0,255,0) |
Predefined color. More... | |
const AlphaColor | Imagine::AMAGENTA =AlphaColor(255,0,255) |
Predefined color. More... | |
const AlphaColor | Imagine::ARED =AlphaColor(255,0,0) |
Predefined color. More... | |
const AlphaColor | Imagine::AWHITE =AlphaColor(255,255,255) |
Predefined color. More... | |
const AlphaColor | Imagine::AYELLOW =AlphaColor(255,255,0) |
Predefined color. More... | |
const std::string | Imagine::VERSION ="6.0.0" |
version of libraries. More... | |
#define srcPath | ( | s | ) | (s) |
This macro prepends its argument with the absolute path of the folder containing the source file. The argument (a file name relative path) must be a C constant string, like "data.txt".
s | File name as a string |
#define stringSrcPath | ( | s | ) | (s) |
s | File name as a string |
alias for the most common type of color with alpha channel!
typedef unsigned char Imagine::byte |
alias for the most common type of color!
alias for 0 to 255 integers
const Color Imagine::BLACK | ( | 0 | , |
0 | , | ||
0 | |||
) |
Predefined color
const Color Imagine::BLUE | ( | 0 | , |
0 | , | ||
255 | |||
) |
Predefined color
const Color Imagine::CYAN | ( | 0 | , |
255 | , | ||
255 | |||
) |
Predefined color
T Imagine::det | ( | const FMatrix< T, M, M > & | A | ) |
Determinant. Available for M = N <= 3 only. For larger matrices, consider using Matrix class.
A | argument |
FMatrix<T,M,M> Imagine::Diagonal | ( | const FVector< T, M > & | d | ) |
Diagonal matrix
d | diagonal vector |
|
inline |
Uniform double in [0;1]
|
inline |
Normal Gaussian
const Color Imagine::GREEN | ( | 0 | , |
255 | , | ||
0 | |||
) |
Predefined color
|
inline |
Init with given seed (to obtain the same sequence)
s | seed |
|
inline |
Init. Uses a time-dependent seed.
|
inline |
Uniform int between to numbers a and b (included)
a,b | bounds |
FMatrix<T,M,M> Imagine::inverse | ( | const FMatrix< T, M, M > & | A | ) |
Inverse matrix. If non invertible, ouptuts a message to cerr
and returns a matrix with zeroed elements. Available for M = N <= 3 only. For larger matrices, use inverseFMatrix() in LinAlg Library.
A | FMatrix to invert |
bool Imagine::loadBinary | ( | T & | obj, |
std::string | filename | ||
) |
Loads an object from a given file in binary format (read() must be implemented)
obj | object to load |
filename | file name |
bool Imagine::loadText | ( | T & | obj, |
std::string | filename | ||
) |
Loads an object from a given file in ASCII format (operator>>() must be implemented)
obj | object to load |
filename | file name |
const Color Imagine::MAGENTA | ( | 255 | , |
0 | , | ||
255 | |||
) |
Predefined color
FMatrix<T,M,O> Imagine::multt | ( | const FMatrix< T, M, N > & | A, |
const FMatrix< T, O, N > & | B | ||
) |
Matrix matrix product (variant)
A | left operand |
B | right operand |
FMatrix<T,M,N> Imagine::operator* | ( | T | s, |
const FMatrix< T, M, N > & | A | ||
) |
Multiplies each element by a scalar
s | The scalar |
A | The FMatrix |
FMatrix<T,M,N> Imagine::operator+ | ( | T | s, |
const FMatrix< T, M, N > & | A | ||
) |
Adds a scalar to each element
s | The scalar |
A | The FMatrix |
FMatrix<T,M,N> Imagine::operator- | ( | T | s, |
const FMatrix< T, M, N > & | A | ||
) |
Substract each element to a scalar
s | The scalar |
A | The FMatrix |
const Color Imagine::ORANGE | ( | 255 | , |
128 | , | ||
0 | |||
) |
const Color Imagine::PURPLE | ( | 128 | , |
0 | , | ||
255 | |||
) |
const Color Imagine::RED | ( | 255 | , |
0 | , | ||
0 | |||
) |
Predefined color
|
inline |
RGB to YUV
rgb | RGB color to convert |
bool Imagine::saveBinary | ( | const T & | obj, |
std::string | filename | ||
) |
Saves an object from a given file in binary format (write must be implemented)
obj | object to save |
filename | file name |
bool Imagine::saveText | ( | const T & | obj, |
std::string | filename, | ||
int | precision = -1 |
||
) |
Saves an object from a given file in ASCII format (operator<<() must be implemented)
obj | object to save |
filename | file name |
precision | for ASCII output |
|
inline |
Uniform size_t between 0 and a (included)
a | bound |
FMatrix<T,N,O> Imagine::tmult | ( | const FMatrix< T, M, N > & | A, |
const FMatrix< T, M, O > & | B | ||
) |
Matrix matrix product (variant)
A | left operand |
B | right operand |
FVector<T,N> Imagine::tmult | ( | const FMatrix< T, M, N > & | A, |
const FVector< T, M > & | v | ||
) |
FMatrix<T,N,O> Imagine::tmultt | ( | const FMatrix< T, M, N > & | A, |
const FMatrix< T, O, M > & | B | ||
) |
Matrix matrix product (variant)
A | left operand |
B | right operand |
FMatrix<T,N,M> Imagine::transpose | ( | const FMatrix< T, M, N > & | A | ) |
Transposed FMatrix
A | matrix to transpose |
|
inline |
Uniform int between 0 and a (included)
a | bound |
|
inline |
message | the message to display: (use "") to display nothing |
const Color Imagine::WHITE | ( | 255 | , |
255 | , | ||
255 | |||
) |
Predefined color
const Color Imagine::YELLOW | ( | 255 | , |
255 | , | ||
0 | |||
) |
Predefined color
|
inline |
const AlphaColor Imagine::ABLACK =AlphaColor(0,0,0) |
Predefined color
const AlphaColor Imagine::ABLUE =AlphaColor(0,0,255) |
Predefined color
const AlphaColor Imagine::ACYAN =AlphaColor(0,255,255) |
Predefined color
const AlphaColor Imagine::AGREEN =AlphaColor(0,255,0) |
Predefined color
const AlphaColor Imagine::AMAGENTA =AlphaColor(255,0,255) |
Predefined color
const AlphaColor Imagine::ARED =AlphaColor(255,0,0) |
Predefined color
const AlphaColor Imagine::AWHITE =AlphaColor(255,255,255) |
const AlphaColor Imagine::AYELLOW =AlphaColor(255,255,0) |
Predefined color
const std::string Imagine::VERSION ="6.0.0" |