use of boofcv.abst.feature.detect.extract.WrapperNonMaximumNaive in project BoofCV by lessthanoptimal.
the class BenchmarkExtractors method main.
public static void main(String[] args) {
intensity = new GrayF32(imgWidth, imgHeight);
corners = new QueueCorner(imgWidth * imgHeight);
// have about 1/20 the image below threshold
ImageMiscOps.fillUniform(intensity, rand, 0, threshold * 20.0f);
System.out.println("========= Profile Image Size " + imgWidth + " x " + imgHeight + " ==========");
System.out.println();
ThresholdCornerExtractor algThresh = new ThresholdCornerExtractor();
NonMaxBlockStrict algBlockStrict = new NonMaxBlockStrict.Max();
NonMaxBlockStrict algBlockStrictMinMax = new NonMaxBlockStrict.MinMax();
NonMaxExtractorNaive algNaiveStrict = new NonMaxExtractorNaive(true);
NonMaxBlockRelaxed algBlockRelaxed = new NonMaxBlockRelaxed.Max();
NonMaxExtractorNaive algNaiveRelaxed = new NonMaxExtractorNaive(true);
for (int radius = 1; radius < 20; radius += 1) {
System.out.println("Radius: " + radius);
System.out.println();
windowRadius = radius;
NM alg2 = new NM("Block Strict", new WrapperNonMaximumBlock(algBlockStrict));
NM alg3 = new NM("Block Strict MinMax", new WrapperNonMaximumBlock(algBlockStrictMinMax));
NM alg4 = new NM("Naive Strict", new WrapperNonMaximumNaive(algNaiveStrict));
NM alg5 = new NM("Block Relaxed", new WrapperNonMaximumBlock(algBlockRelaxed));
NM alg6 = new NM("Naive Relaxed", new WrapperNonMaximumNaive(algNaiveRelaxed));
ProfileOperation.printOpsPerSec(alg2, TEST_TIME);
ProfileOperation.printOpsPerSec(alg3, TEST_TIME);
// ProfileOperation.printOpsPerSec(alg4, TEST_TIME);
// ProfileOperation.printOpsPerSec(alg5, TEST_TIME);
// ProfileOperation.printOpsPerSec(alg6, TEST_TIME);
// ProfileOperation.printOpsPerSec(alg1, TEST_TIME);
}
}
Aggregations