Home | Develop | Download | Contact
example_array_lbp2.cpp
1 
27 #include <cmath>
28 #include <Pds/Ra>
29 #include <Pds/Sp>
30 
31 int main(void)
32 {
33  std::vector<Pds::Array<unsigned char>> Block;
34  Pds::Array<unsigned char> Gray;
35  Pds::Array<unsigned char> LBP;
36  Pds::Array<unsigned char> LBPU;
37 
38  Block=Pds::Array<unsigned char>::ImportBmpFile("../manual/imagenes/pattern2.bmp");
39 
40  std::cout<<"Block.size(): "<<Block.size()<<std::endl;
41 
42  Gray=Pds::Array<unsigned char>::MeanSampleBlock(Block);
43  Gray.ExportBmpFile(Pds::Colormap::Gray,"pattern_lbp2_gray.bmp");
44 
45  LBP=Pds::Image::LBP(Block[0],0);
46  LBP.ExportBmpFile(Pds::Colormap::Gray,"pattern_lbp2.bmp");
47 
48  LBPU=Pds::Image::LBPU(Block[0],0);
49  LBPU.ExportBmpFile(Pds::Colormap::Gray,"pattern_lbpu2.bmp");
50 
51  return 0;
52 }
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