Population
Image processing library in C++
Classes | Functions

template class for red green blue color More...

Classes

class  pop::RGB< ChannelType >
 Red Green Blue channel. More...
 

Functions

template<class T1 >
pop::RGB< T1 > pop::minimum (const pop::RGB< T1 > &x1, const pop::RGB< T1 > &x2)
 return the RGB with the minimum luminance More...
 
template<class T1 >
pop::RGB< T1 > pop::maximum (const pop::RGB< T1 > &x1, const pop::RGB< T1 > &x2)
 return the RGB with the maximum luminance More...
 
template<class T1 >
F32 pop::productInner (const pop::RGB< T1 > &x1, const pop::RGB< T1 > &x2)
 scalar product More...
 
template<class T1 >
F32 pop::normValue (const pop::RGB< T1 > &x1, int p=-1)
 return the luminance as default norm More...
 
template<class T1 >
F32 pop::normPowerValue (const pop::RGB< T1 > &x1, int p=-1)
 return the luminance as default norm More...
 
template<class T1 >
F32 pop::distance (const pop::RGB< T1 > &x1, const pop::RGB< T1 > &x2, int p=-1)
 return the luminance as default norm More...
 
template<typename T1 >
pop::RGB< T1 > pop::round (const pop::RGB< T1 > &v)
 return round of each channel More...
 
template<class T1 >
std::ostream & pop::operator<< (std::ostream &out, const pop::RGB< T1 > &h)
 
template<class T1 >
std::istream & pop::operator>> (std::istream &in, pop::RGB< T1 > &h)
 

Detailed Description

template class for red green blue color

Function Documentation

template<class T1 >
F32 pop::distance ( const pop::RGB< T1 > &  x1,
const pop::RGB< T1 > &  x2,
int  p = -1 
)

return the luminance as default norm

Parameters
pp-norm (-1=luminance, 2=euclidean)
x1RGB number
x2RGB number
template<class T1 >
pop::RGB<T1> pop::maximum ( const pop::RGB< T1 > &  x1,
const pop::RGB< T1 > &  x2 
)

return the RGB with the maximum luminance

Parameters
x1first RGB number
x2second RGB number
template<class T1 >
pop::RGB<T1> pop::minimum ( const pop::RGB< T1 > &  x1,
const pop::RGB< T1 > &  x2 
)

return the RGB with the minimum luminance

Parameters
x1first RGB number
x2second RGB number
template<class T1 >
F32 pop::normPowerValue ( const pop::RGB< T1 > &  x1,
int  p = -1 
)

return the luminance as default norm

Parameters
pp-norm (-1=luminance, 2=euclidean)
x1RGB number
template<class T1 >
F32 pop::normValue ( const pop::RGB< T1 > &  x1,
int  p = -1 
)

return the luminance as default norm

Parameters
pp-norm (-1=luminance, 2=euclidean)
x1RGB number
template<class T1 >
std::ostream& pop::operator<< ( std::ostream &  out,
const pop::RGB< T1 > &  h 
)

stream insertion operator

Parameters
outoutput stream
hRGB number
template<class T1 >
std::istream& pop::operator>> ( std::istream &  in,
pop::RGB< T1 > &  h 
)

stream extraction operator

Parameters
ininput stream
hRGB number
template<class T1 >
F32 pop::productInner ( const pop::RGB< T1 > &  x1,
const pop::RGB< T1 > &  x2 
)
inline

scalar product

Parameters
x1first RGB
x2second RGB
Returns
scalar value

scalar product of the two RGB $ u\cdot v=\sum_{i=0}^{n-1} u_i v_i = u_0 v_0 + u_1 v_1 + \cdots + u_{n-1} v_{n-1}.$

template<typename T1 >
pop::RGB<T1> pop::round ( const pop::RGB< T1 > &  v)

return round of each channel

Parameters
vRGB number