1 | initial version |
i solved this by creating a 3x3 Mat and putting the data by myself
Mat ukernel = new Mat(3, 3, CvType.CV_8U);
ukernel.put(0, 0, (byte) 0);
ukernel.put(0, 1, (byte) 1);
ukernel.put(0, 2, (byte) 0);
ukernel.put(1, 0, (byte) 1);
ukernel.put(1, 1, (byte) 1);
ukernel.put(1, 2, (byte) 1);
ukernel.put(2, 0, (byte) 0);
ukernel.put(2, 1, (byte) 1);
ukernel.put(2, 2, (byte) 0);
Imgproc.dilate(outerbox, outerbox, ukernel);