import java.applet.*; import java.awt.*; import java.awt.image.*; import java.net.*; import java.util.*; import java.io.*; import java.lang.Math; /** * Thin is an algorithm to thin a binary image using a 3x3 kernel. * @author Simon Horne. */ public class Thin extends Thread { /** * The default constructor with no parameters. */ public Thin() { } /** * Takes an image and a kernel and thins it once. * * @param b the BinaryFast input image * @param kernel the thinning kernel * @return the thinned BinaryFast image */ public static BinaryFast ThinBinaryRep(BinaryFast b, int [] kernel){ Point p; HashSet result = new HashSet(); HashSet inputHashSet = new HashSet(); if(HitMiss.kernelNo0s(kernel)){ for(int j=0;j=0 && p.y+k>0 && p.x+j