31 std::vector<Pds::Array<unsigned char>> Block;
35 Block=Pds::Array<unsigned char>::ImportBmpFile(
"../manual/imagenes/pattern.bmp");
36 if(Block.size()==0) {std::cout<<
"Error\n";
return 0;}
38 std::cout<<
"Block.size(): "<<Block.size()<<std::endl;
42 Mag.Scale(0,255).ExportBmpFile(Pds::Colormap::Gray,
"pattern_hog_magnitude.bmp");
43 Ang.Scale(0,255).ExportBmpFile(Pds::Colormap::Gray,
"pattern_hog_angle.bmp");
bool Gradient(const Pds::Array< unsigned char > &Gray, Pds::Matrix &Mag, Pds::Matrix &Angle)
Cálculo del gradiente.