Home | Develop | Download | Contact
example_array_lbp.cpp
1 
25 #include <cmath>
26 #include <Pds/Ra>
27 #include <Pds/Sp>
28 
29 int main(void)
30 {
31  std::vector<Pds::Array<unsigned char>> Block;
32  Pds::Array<unsigned char> LBP;
33  Pds::Array<unsigned char> LBPU;
34 
35  Block=Pds::Array<unsigned char>::ImportBmpFile("../manual/imagenes/pattern.bmp");
36  if(Block.size()==0) {std::cout<<"Error\n"; return 0;}
37 
38  std::cout<<"Block.size(): "<<Block.size()<<std::endl;
39 
40  LBP=Pds::Image::LBP(Block[0],0);
41  LBP.ExportBmpFile(Pds::Colormap::Gray,"pattern_lbp.bmp");
42 
43  LBPU=Pds::Image::LBPU(Block[0],0);
44  LBPU.ExportBmpFile(Pds::Colormap::Gray,"pattern_lbpu.bmp");
45 
46 
47  return 0;
48 }
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