Funciones para trabajar con espacios de colores: Pds::Ra::RGB2HSL(), etc. Más...
Namespaces | |
namespace | Pds |
Nombre de espacio para Pds (Procesamiento Digital de Senales) | |
namespace | Pds::Ra |
Nombre de espacio para RA (Real Arrays) | |
Trabajar con colores | |
void | Pds::Ra::RGB2HSL (unsigned char r, unsigned char g, unsigned char b, double &h, double &s, double &l) |
Transforma de coordenadas RGB a HSL Más... | |
bool | Pds::Ra::RGB2HSL (const Pds::Matrix &R, const Pds::Matrix &G, const Pds::Matrix &B, Pds::Matrix &H, Pds::Matrix &S, Pds::Matrix &L) |
Transforma de coordenadas RGB a HSL Más... | |
Funciones para trabajar con espacios de colores: Pds::Ra::RGB2HSL(), etc.
void Pds::Ra::RGB2HSL | ( | unsigned char | r, |
unsigned char | g, | ||
unsigned char | b, | ||
double & | h, | ||
double & | s, | ||
double & | l | ||
) |
Transforma de coordenadas RGB a HSL
double r=128;g=170;b=100;
double h=0;s=0;l=0;
Pds::Ra::RGB2HSL(r,g,b,h,s,l);
std::cout<<"h:"<<h<<"s:"<<s<<"l:"<<l<<"\n";
[in] | r | Red [0,255]. |
[in] | g | Green [0,255]. |
[in] | b | Blue [0,255]. |
[out] | h | Hue [0,360]. |
[out] | s | Saturation [0,100]. |
[out] | l | Light [0,100]. |
bool Pds::Ra::RGB2HSL | ( | const Pds::Matrix & | R, |
const Pds::Matrix & | G, | ||
const Pds::Matrix & | B, | ||
Pds::Matrix & | H, | ||
Pds::Matrix & | S, | ||
Pds::Matrix & | L | ||
) |
Transforma de coordenadas RGB a HSL
std::vector<Pds::Matrix> IMG=Pds::Matrix::ImportBmpFile("some_path/image.bmp");
std::vector<Pds::Matrix> HSL;
Pds::Ra::RGB2HSL(IMG[0],IMG[1],IMG[2],HSL[0],HSL[1],HSL[2]);
[in] | R | Red [0,255]. |
[in] | G | Green [0,255]. |
[in] | B | Blue [0,255]. |
[out] | H | Hue [0,360]. |
[out] | S | Saturation [0,100]. |
[out] | L | Light [0,100]. |