34 std::vector<Pds::Array<unsigned char>> Block;
35 Pds::Array<unsigned char> Gray;
39 Block=Pds::Array<unsigned char>::ImportBmpFile(
"../manual/imagenes/pattern2.bmp");
41 std::cout<<
"Block.size(): "<<Block.size()<<std::endl;
43 Gray=Pds::Array<unsigned char>::MeanSampleBlock(Block);
47 Gray.ExportBmpFile(Pds::Colormap::Gray,
"pattern_hog2_gray.bmp");
48 Mag.Scale(0,255).ExportBmpFile(Pds::Colormap::Gray,
"pattern_hog2_magnitude.bmp");
49 Ang.Scale(0,255).ExportBmpFile(Pds::Colormap::Gray,
"pattern_hog2_angle.bmp");
bool Gradient(const Pds::Array< unsigned char > &Gray, Pds::Matrix &Mag, Pds::Matrix &Angle)
Cálculo del gradiente.