use of boofcv.alg.feature.dense.DescribeDenseHogFastAlg in project BoofCV by lessthanoptimal.
the class ExampleDenseImageFeatures method LowLevelHOG.
public static void LowLevelHOG(GrayF32 input) {
DescribeDenseHogFastAlg<GrayF32> describer = FactoryDescribeImageDenseAlg.hogFast(new ConfigDenseHoG(), ImageType.single(GrayF32.class));
// The low level API gives you access to more information about the image. You can explicitly traverse it
// by rows and columns, and access the histogram for a region. The histogram has an easy to understand
// physical meaning.
describer.setInput(input);
describer.process();
// Let's print a few parameters just because we can. They can be modified using the configuration class passed in
System.out.println("\n------------------- HOG Low Level");
System.out.println("HOG pixels per cell " + describer.getPixelsPerCell());
System.out.println("HOG region width " + describer.getRegionWidthPixelX());
System.out.println("HOG region height " + describer.getRegionWidthPixelY());
System.out.println("HOG bins " + describer.getOrientationBins());
for (int i = 0; i < describer.getCellRows(); i++) {
for (int j = 0; j < describer.getCellCols(); j++) {
DescribeDenseHogFastAlg.Cell c = describer.getCell(i, j);
// this is where you could do processing on an individual cell
}
}
}
Aggregations