Add linear outline machinery

This commit is contained in:
2026-09-29 10:58:29 +02:00
parent 21faf82da6
commit fd010d8b0c
7 changed files with 182 additions and 24 deletions

View File

@@ -18,17 +18,17 @@ public class LinearOutline {
Mat kernel = new Mat(3, 3, CvType.CV_64F);
if (direction == 1) {
kernel.put(0, 0,
-1, 0, 1,
-1, 0, 1,
-1, 0, 1
);
} else if (direction == 2) {
kernel.put(0, 0,
-1, -1, -1,
0, 0, 0,
1, 1, 1
);
} else if (direction == 2) {
kernel.put(0, 0,
-1, 0, 1,
-1, 0, 1,
-1, 0, 1
);
} else {
throw new IllegalArgumentException("Direction must be 1 or 2");
}
@@ -46,17 +46,17 @@ public class LinearOutline {
Mat kernel = new Mat(3, 3, CvType.CV_64F);
if (direction == 1) {
kernel.put(0, 0,
-1, 0, 1,
-2, 0, 2,
-1, 0, 1
);
} else if (direction == 2) {
kernel.put(0, 0,
-1, -2, -1,
0, 0, 0,
1, 2, 1
);
} else if (direction == 2) {
kernel.put(0, 0,
-1, 0, 1,
-2, 0, 2,
-1, 0, 1
);
} else {
throw new IllegalArgumentException("Direction must be 1 or 2");
}