added JavaDoc
This commit is contained in:
@@ -41,10 +41,8 @@ public class Main {
|
||||
// utils.setInput(new MatInput(Imgcodecs.imread("src/main/resources/skyscraper_small.jpg")));
|
||||
|
||||
utils.initializeCommands();
|
||||
utils.warmupCPUTests(1);
|
||||
utils.runCPUTests(5);
|
||||
utils.warmupGPUTests(1);
|
||||
utils.runGPUTests(5);
|
||||
utils.warmup(10);
|
||||
utils.runTests(50);
|
||||
utils.evaluate();
|
||||
}
|
||||
}
|
||||
@@ -3,8 +3,9 @@ package de.unidue.nes.gpu.testframework.input;
|
||||
import org.opencv.core.Mat;
|
||||
|
||||
/**
|
||||
* Input for an array of Mats. The Mats are given as a vararg.
|
||||
*
|
||||
* @author Roch P., Shahbaz Nejad B.
|
||||
*
|
||||
*/
|
||||
public class MatArrayInput implements Input<Mat[]> {
|
||||
|
||||
|
||||
@@ -3,6 +3,9 @@ package de.unidue.nes.gpu.testframework.input;
|
||||
import org.opencv.core.Mat;
|
||||
|
||||
/**
|
||||
* A tuple of Mats. Contains fields "left" and "right" (which can be used for
|
||||
* stereo matching)
|
||||
*
|
||||
* @author Roch P., Shahbaz Nejad B.
|
||||
*/
|
||||
public class MatTuple {
|
||||
|
||||
@@ -3,8 +3,9 @@ package de.unidue.nes.gpu.testframework.input;
|
||||
import org.opencv.core.Mat;
|
||||
|
||||
/**
|
||||
* Input implementation for a MatTuple
|
||||
*
|
||||
* @author Roch P., Shahbaz Nejad B.
|
||||
*
|
||||
*/
|
||||
public class MatTupleInput implements Input<MatTuple> {
|
||||
|
||||
|
||||
+2
@@ -7,6 +7,8 @@ import de.unidue.nes.gpu.testframework.tasks.GpuTask;
|
||||
import de.unidue.nes.gpu.testframework.tasks.Task;
|
||||
|
||||
/**
|
||||
* A task for the DescriptorMatcher.create(int) function
|
||||
*
|
||||
* @author Roch P., Shahbaz Nejad B.
|
||||
*/
|
||||
public class DescriptorMatcher_create implements Task {
|
||||
|
||||
+2
@@ -12,6 +12,8 @@ import de.unidue.nes.gpu.testframework.tasks.GpuTask;
|
||||
import de.unidue.nes.gpu.testframework.tasks.Task;
|
||||
|
||||
/**
|
||||
* The DescriptorMatcher.match function
|
||||
*
|
||||
* @author Roch P., Shahbaz Nejad B.
|
||||
*/
|
||||
public class DescriptorMatcher_match implements Task {
|
||||
|
||||
+5
@@ -6,10 +6,15 @@ import java.util.Map;
|
||||
import org.opencv.features2d.DescriptorMatcher;
|
||||
|
||||
/**
|
||||
* a pool of DescriptorMatchers
|
||||
*
|
||||
* @author Roch P., Shahbaz Nejad B.
|
||||
*/
|
||||
public class DescriptorMatchers {
|
||||
|
||||
private DescriptorMatchers() {
|
||||
}
|
||||
|
||||
private static final Map<Integer, DescriptorMatcher> DESCRIPTOR_MATCHER_MAP = new HashMap<>();
|
||||
|
||||
private static final Map<Integer, org.bytedeco.opencv.opencv_cudafeatures2d.DescriptorMatcher> CUDA_DESCRIPTOR_MATCHER_MAP = new HashMap<>();
|
||||
|
||||
+2
@@ -9,6 +9,8 @@ import de.unidue.nes.gpu.testframework.tasks.GpuTask;
|
||||
import de.unidue.nes.gpu.testframework.tasks.Task;
|
||||
|
||||
/**
|
||||
* The function Features2d.drawKeypoints
|
||||
*
|
||||
* @author Roch P., Shahbaz Nejad B.
|
||||
*/
|
||||
public class DrawKeypoints implements Task {
|
||||
|
||||
+2
@@ -10,6 +10,8 @@ import de.unidue.nes.gpu.testframework.tasks.GpuTask;
|
||||
import de.unidue.nes.gpu.testframework.tasks.Task;
|
||||
|
||||
/**
|
||||
* The function Features2d.drawMatches
|
||||
*
|
||||
* @author Roch P., Shahbaz Nejad B.
|
||||
*/
|
||||
public class DrawMatches implements Task {
|
||||
|
||||
+2
@@ -12,6 +12,8 @@ import de.unidue.nes.gpu.testframework.tasks.GpuTask;
|
||||
import de.unidue.nes.gpu.testframework.tasks.Task;
|
||||
|
||||
/**
|
||||
* Imgproc.resize
|
||||
*
|
||||
* @author Roch P., Shahbaz Nejad B.
|
||||
*/
|
||||
public class Resize implements Task {
|
||||
|
||||
+2
-1
@@ -11,8 +11,9 @@ import de.unidue.nes.gpu.testframework.tasks.GpuTask;
|
||||
import de.unidue.nes.gpu.testframework.tasks.Task;
|
||||
|
||||
/**
|
||||
* Imgproc.threshold
|
||||
*
|
||||
* @author Roch P., Shahbaz Nejad B.
|
||||
*
|
||||
*/
|
||||
public class Threshold implements Task {
|
||||
|
||||
|
||||
@@ -9,6 +9,8 @@ import de.unidue.nes.gpu.testframework.tasks.GpuTask;
|
||||
import de.unidue.nes.gpu.testframework.tasks.Task;
|
||||
|
||||
/**
|
||||
* The method Mat.clone().
|
||||
*
|
||||
* @author Roch P., Shahbaz Nejad B.
|
||||
*/
|
||||
public class Clone implements Task {
|
||||
|
||||
@@ -9,6 +9,8 @@ import de.unidue.nes.gpu.testframework.tasks.GpuTask;
|
||||
import de.unidue.nes.gpu.testframework.tasks.Task;
|
||||
|
||||
/**
|
||||
* The method Mat.copyTo(Mat)
|
||||
*
|
||||
* @author Roch P., Shahbaz Nejad B.
|
||||
*/
|
||||
public class CopyTo implements Task {
|
||||
|
||||
+2
@@ -5,6 +5,8 @@ import de.unidue.nes.gpu.testframework.tasks.GpuTask;
|
||||
import de.unidue.nes.gpu.testframework.tasks.Task;
|
||||
|
||||
/**
|
||||
* The ORB.create function
|
||||
*
|
||||
* @author Roch P., Shahbaz Nejad B.
|
||||
*/
|
||||
public class ORB_create implements Task {
|
||||
|
||||
+2
@@ -12,6 +12,8 @@ import de.unidue.nes.gpu.testframework.tasks.GpuTask;
|
||||
import de.unidue.nes.gpu.testframework.tasks.Task;
|
||||
|
||||
/**
|
||||
* ORB.detectAndCompute
|
||||
*
|
||||
* @author Roch P., Shahbaz Nejad B.
|
||||
*/
|
||||
public class ORB_detectAndCompute implements Task {
|
||||
|
||||
@@ -4,6 +4,8 @@ import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* A pool of ORBs
|
||||
*
|
||||
* @author Roch P., Shahbaz Nejad B.
|
||||
*/
|
||||
public class ORBs {
|
||||
|
||||
+2
@@ -10,6 +10,8 @@ import de.unidue.nes.gpu.testframework.tasks.GpuTask;
|
||||
import de.unidue.nes.gpu.testframework.tasks.Task;
|
||||
|
||||
/**
|
||||
* StereoBM.compute
|
||||
*
|
||||
* @author Roch P., Shahbaz Nejad B.
|
||||
*/
|
||||
public class StereoBM_compute implements Task {
|
||||
|
||||
+2
@@ -8,6 +8,8 @@ import de.unidue.nes.gpu.testframework.tasks.GpuTask;
|
||||
import de.unidue.nes.gpu.testframework.tasks.Task;
|
||||
|
||||
/**
|
||||
* StereoBM.create
|
||||
*
|
||||
* @author Roch P., Shahbaz Nejad B.
|
||||
*/
|
||||
public class StereoBM_create implements Task {
|
||||
|
||||
+2
@@ -4,6 +4,8 @@ import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* A pool of StereoBMs
|
||||
*
|
||||
* @author Roch P., Shahbaz Nejad B.
|
||||
*/
|
||||
public class StereoBMs {
|
||||
|
||||
@@ -9,11 +9,15 @@ import de.unidue.nes.gpu.testframework.internal.tasks.features2d.DrawKeypoints;
|
||||
import de.unidue.nes.gpu.testframework.internal.tasks.features2d.DrawMatches;
|
||||
|
||||
/**
|
||||
* A replacement for the Features2d functions
|
||||
*
|
||||
* @author Roch P., Shahbaz Nejad B.
|
||||
*
|
||||
*/
|
||||
public class Features2d {
|
||||
|
||||
private Features2d() {
|
||||
}
|
||||
|
||||
public static void drawMatches(Mat img1, MatOfKeyPoint keypoints1, Mat img2, MatOfKeyPoint keypoints2, MatOfDMatch matches1to2, Mat outImg) {
|
||||
TestPipeline.INSTANCE.addTask(new DrawMatches(img1, keypoints1, img2, keypoints2, matches1to2, outImg));
|
||||
}
|
||||
|
||||
@@ -7,6 +7,8 @@ import de.unidue.nes.gpu.testframework.internal.tasks.mat.Clone;
|
||||
import de.unidue.nes.gpu.testframework.internal.tasks.mat.CopyTo;
|
||||
|
||||
/**
|
||||
* Utility functions to capture calls like Mat.copyTo(Mat)
|
||||
*
|
||||
* @author Roch P., Shahbaz Nejad B.
|
||||
*/
|
||||
public class MatFunctions {
|
||||
|
||||
@@ -10,8 +10,9 @@ import de.unidue.nes.gpu.testframework.internal.tasks.orb.ORB_create;
|
||||
import de.unidue.nes.gpu.testframework.internal.tasks.orb.ORB_detectAndCompute;
|
||||
|
||||
/**
|
||||
* ORB functions
|
||||
*
|
||||
* @author Roch P., Shahbaz Nejad B.
|
||||
*
|
||||
*/
|
||||
public class ORB {
|
||||
|
||||
|
||||
@@ -9,6 +9,8 @@ import de.unidue.nes.gpu.testframework.internal.tasks.stereobm.StereoBM_compute;
|
||||
import de.unidue.nes.gpu.testframework.internal.tasks.stereobm.StereoBM_create;
|
||||
|
||||
/**
|
||||
* StereoBM functions
|
||||
*
|
||||
* @author Roch P., Shahbaz Nejad B.
|
||||
*/
|
||||
public class StereoBM {
|
||||
|
||||
@@ -5,6 +5,11 @@ import java.util.Arrays;
|
||||
import org.opencv.core.Mat;
|
||||
import org.opencv.highgui.HighGui;
|
||||
|
||||
/**
|
||||
* Task is used for debugging
|
||||
*
|
||||
* @author Roch P., Shahbaz Nejad B.
|
||||
*/
|
||||
public class DebugTask implements Task {
|
||||
|
||||
private final Mat[] mats;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package de.unidue.nes.gpu.testframework.tasks;
|
||||
|
||||
/**
|
||||
* a high-level interface for a any task
|
||||
* a high-level interface for any task
|
||||
*
|
||||
* @author Roch P., Shahbaz Nejad B.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user