diff --git a/ImageProcess/bin/.gitignore b/ImageProcess/bin/.gitignore new file mode 100644 index 0000000..9e8777b --- /dev/null +++ b/ImageProcess/bin/.gitignore @@ -0,0 +1,3 @@ +/Filter.class +/ImageHandler.class +/Main.class diff --git a/ImageProcess/bin/ImageHandler.class b/ImageProcess/bin/ImageHandler.class index 534126d..fc2d885 100644 Binary files a/ImageProcess/bin/ImageHandler.class and b/ImageProcess/bin/ImageHandler.class differ diff --git a/ImageProcess/bin/Main.class b/ImageProcess/bin/Main.class index 125cad8..0101411 100644 Binary files a/ImageProcess/bin/Main.class and b/ImageProcess/bin/Main.class differ diff --git a/ImageProcess/src/Filter.java b/ImageProcess/src/Filter.java index 4020994..32d99a3 100644 --- a/ImageProcess/src/Filter.java +++ b/ImageProcess/src/Filter.java @@ -197,30 +197,54 @@ public static BufferedImage mean_filter(BufferedImage image){ } return image; } - public static BufferedImage sobel_filter(BufferedImage image){ - BufferedImage Gx, Gy; - float[] x1 = {-1, 0, 1, -2, 0, 2, -1, 0, 1}; - float[] y1 = {-1,-2,-1,0,0,0,1,2,1}; - //2x2 matrix, with those two float arrays. - Kernel MatrixA = new Kernel(3, 3, x1); - Kernel MatrixB = new Kernel(3, 3, y1); - ConvolveOp convolve1 = new ConvolveOp(MatrixA); - ConvolveOp convolve2 = new ConvolveOp(MatrixB); - Gx = convolve1.filter(image, null); - Gy = convolve2.filter(image, null); - for (int x=0; x