Add linear outline machinery
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user