7 std::vector<Pds::Array<unsigned char>> Block;
10 Block=Pds::Array<unsigned char>::ImportBmpFile(
"pattern.bmp");
11 if(Block.size()==0) {std::cout<<
"Error\n";
return 0;}
15 Mag.Scale(0,255).ExportBmpFile(Pds::Colormap::Gray,
"pattern_hog_magnitude.bmp");
16 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.