fixed copy bug
This commit is contained in:
@@ -27,11 +27,12 @@ public class Main {
|
||||
});
|
||||
utils.setInput(new MatInput(Imgcodecs.imread("src/main/resources/skyscraper_large.jpg")));
|
||||
// utils.setInput(new MatInput(Imgcodecs.imread("src/main/resources/car.jpg")));
|
||||
// utils.setInput(new MatInput(Imgcodecs.imread("src/main/resources/skyscraper_small.jpg")));
|
||||
|
||||
utils.initializeCommands();
|
||||
utils.warmupCPUTests(1);
|
||||
utils.runCPUTests(1);
|
||||
utils.warmupGPUTests(1);
|
||||
utils.runGPUTests(5);
|
||||
utils.warmupCPUTests(10);
|
||||
utils.runCPUTests(10);
|
||||
utils.warmupGPUTests(10);
|
||||
utils.runGPUTests(10);
|
||||
}
|
||||
}
|
||||
|
||||
+1
@@ -24,6 +24,7 @@ public class MatPool {
|
||||
public static GpuMat getUploadedGpuMat(org.opencv.core.Mat mat) {
|
||||
if (gpuMats.containsKey(mat.getNativeObjAddr())) {
|
||||
if (states.get(mat.getNativeObjAddr()) == State.CPU) {
|
||||
MatConverter.copyMat(mat, mats.get(mat.getNativeObjAddr()));
|
||||
gpuMats.get(mat.getNativeObjAddr()).upload(mats.get(mat.getNativeObjAddr()));
|
||||
states.put(mat.getNativeObjAddr(), State.GPU);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user