import java.awt.*; import java.awt.image.*; import java.applet.*; import java.net.*; import java.io.*; import java.lang.Math; import java.util.*; import java.awt.event.*; import javax.swing.*; import javax.swing.JApplet; import javax.imageio.*; import javax.swing.event.*; public class symmetry { int[] input; double[] direction; int[] output; double[] magnitude; double[] logOfInput; double[][] distanceLookup; double[][] phaseLookup; double sigma; double mu; double progress; int width; int height; double distanceWeightingMultiplier; public void symmetry() { progress=0; } public void init(int[] inputIn, double[] directionIn, double sigmaIn, double muIn, int widthIn, int heightIn){ width=widthIn; height=heightIn; sigma=sigmaIn; mu=muIn; input = new int[width*height]; direction = new double[width*height]; output = new int[width*height]; magnitude = new double[width*height]; logOfInput = new double[width*height]; distanceLookup = new double[width][height]; phaseLookup = new double[181][181]; input=inputIn; direction=directionIn; distanceWeightingMultiplier=(double)1/(double)Math.sqrt(2*Math.PI*sigma); createTables(); } public void createTables(){ //get log magnitude of edges for (int Xi=1;Xi