Home | Develop | Download | Contact
example_array_lbp2.cpp

Programa para el testeo de las funciones.Para compilar o código example_array_lbp2.cpp:

g++ -static -o example_array_lbp2 example_array_lbp2.cpp -lpdsramm

Para executar o programa:

./example_array_lbp2

Retornando por consola:

Block.size(): 3 
Este es la imagen de entrada.


Este es la imagen de entrada en escala de grises.


Esta es la imagen LPB.


Esta es la imagen LBPU.

Código example_array_lbp2.cpp:

#include <cmath>
#include <Pds/Ra>
#include <Pds/Sp>
int main(void)
{
std::vector<Pds::Array<unsigned char>> Block;
Pds::Array<unsigned char> Gray;
Pds::Array<unsigned char> LBP;
Pds::Array<unsigned char> LBPU;
Block=Pds::Array<unsigned char>::ImportBmpFile("../manual/imagenes/pattern2.bmp");
std::cout<<"Block.size(): "<<Block.size()<<std::endl;
Gray=Pds::Array<unsigned char>::MeanBlock(Block);
Gray.ExportBmpFile(Pds::Colormap::Gray,"pattern_lbp2_gray.bmp");
LBP=Pds::Image::LBP(Block[0],0);
LBP.ExportBmpFile(Pds::Colormap::Gray,"pattern_lbp2.bmp");
LBPU=Pds::Image::LBPU(Block[0],0);
LBPU.ExportBmpFile(Pds::Colormap::Gray,"pattern_lbpu2.bmp");
return 0;
}
Pds::Array< unsigned char > LBP(const Pds::Array< unsigned char > &Gray, unsigned int T=0)
Local Binary Patterns : 0->255.
Pds::Array< unsigned char > LBPU(const Pds::Array< unsigned char > &Gray, unsigned int T=0)
Local Binary Patterns Uniforms : 0->58.

Enlaces de interés

HomePage Bazaar Download Bug report Ayuda Developer Feed