From 4453b77e0f24afa2aa8ce4eab9aca8c7e158fc49 Mon Sep 17 00:00:00 2001 From: Pacien TRAN-GIRARD Date: Sat, 10 Oct 2015 10:39:03 +0200 Subject: Bootstrap project --- src/main/java/Filter.java | 76 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 src/main/java/Filter.java (limited to 'src/main/java/Filter.java') diff --git a/src/main/java/Filter.java b/src/main/java/Filter.java new file mode 100644 index 0000000..ddc3e92 --- /dev/null +++ b/src/main/java/Filter.java @@ -0,0 +1,76 @@ +/** + * @author Pacien TRAN-GIRARD + * @author Timothée FLOURE + */ +public final class Filter { + + /** + * Get a pixel without accessing out of bounds + * + * @param gray a HxW float array + * @param row Y coordinate + * @param col X coordinate + * @return nearest valid pixel color + */ + public static float at(float[][] gray, int row, int col) { + // TODO at + return 0.0f; + } + + /** + * Convolve a single-channel image with specified kernel. + * + * @param gray a HxW float array + * @param kernel a MxN float array, with M and N odd + * @return a HxW float array + */ + public static float[][] filter(float[][] gray, float[][] kernel) { + // TODO filter + return null; + } + + /** + * Smooth a single-channel image + * + * @param gray a HxW float array + * @return a HxW float array + */ + public static float[][] smooth(float[][] gray) { + // TODO smooth + return null; + } + + /** + * Compute horizontal Sobel filter + * + * @param gray a HxW float array + * @return a HxW float array + */ + public static float[][] sobelX(float[][] gray) { + // TODO sobelX + return null; + } + + /** + * Compute vertical Sobel filter + * + * @param gray a HxW float array + * @return a HxW float array + */ + public static float[][] sobelY(float[][] gray) { + // TODO sobelY + return null; + } + + /** + * Compute the magnitude of combined Sobel filters + * + * @param gray a HxW float array + * @return a HxW float array + */ + public static float[][] sobel(float[][] gray) { + // TODO sobel + return null; + } + +} -- cgit v1.2.3