this code gives me the following errors,
why?
--------------------Configuration: <Default>--------------------
D:\javafiles\Image Matching Algorithm\ImageMatchingAlgorithm2.java:107: cannot find symbol
symbol : variable getDimX
location: class SubWindow2
System.out.println("sw.getDimX ="+sw.getDimX+" "+"sw.getDimY ="+sw.getDimY);
^
D:\javafiles\Image Matching Algorithm\ImageMatchingAlgorithm2.java:107: cannot find symbol
symbol : variable getDimY
location: class SubWindow2
System.out.println("sw.getDimX ="+sw.getDimX+" "+"sw.getDimY ="+sw.getDimY);
^
D:\javafiles\Image Matching Algorithm\ImageMatchingAlgorithm2.java:108: cannot find symbol
symbol : variable getDimX
location: class SubWindow2
System.out.println("sw.getDimX ="+sw.getDimX+" "+"sw.getDimY ="+sw.getDimY);
^
D:\javafiles\Image Matching Algorithm\ImageMatchingAlgorithm2.java:108: cannot find symbol
symbol : variable getDimY
location: class SubWindow2
System.out.println("sw.getDimX ="+sw.getDimX+" "+"sw.getDimY ="+sw.getDimY);
^
4 errors
Process completed.
import java.util.*; import java.lang.*; public class ImageMatchingAlgorithm2 { int swaped1; int swaped2; int isolated; public boolean hasReversed(int mw_axis, int sw_axis) { if(sw_axis > mw_axis) return true; return false; } public boolean isTangible (int mw_axis, int sw_axis) { if (mw_axis == sw_axis) return true; return false; } public void doIsolate(int mw_axis) { isolated=mw_axis-1; } public int getIsolated() { return isolated; } public void doSwap(int coor1, int coor2) { swaped1=coor2; swaped2=coor1; } public int getMWSwapedDim() { return swaped1; } public int getSWSwapedDim() { return swaped2; } public static void main (String[] args) { int scanx; int scany; Scanner readDim = new Scanner(System.in); MainWindow2 mw = new MainWindow2(); SubWindow2 sw = new SubWindow2(); ImageMatchingAlgorithm2 Obj = new ImageMatchingAlgorithm2(); int [] CorrlationMatrix=new int [sw.correlationSize()]; System.out.print("Dimension of MW X axis:"); scanx=readDim.nextInt(); mw.setDimX(scanx); System.out.print("Dimension of MW Y axis:"); scany=readDim.nextInt(); mw.setDimY(scany); System.out.print("Dimension of SW X axis:"); scanx=readDim.nextInt(); sw.setDimX(scanx); System.out.print("Dimension of SW Y axis:"); scany=readDim.nextInt(); sw.setDimY(scany); if (Obj.hasReversed(mw.getDimX(), sw.getDimX()) ) { Obj.doSwap(mw.getDimX(), sw.getDimX()); mw.setDimX(Obj.getMWSwapedDim()); sw.setDimX(Obj.getSWSwapedDim()); } if (Obj.isTangible(mw.getDimX(), sw.getDimX())) { Obj.doIsolate(mw.getDimX()); sw.setDimX(Obj.getIsolated()); } if (Obj.hasReversed(mw.getDimY(), sw.getDimY()) ) { Obj.doSwap(mw.getDimY(), sw.getDimY()); mw.setDimY(Obj.getMWSwapedDim()); sw.setDimY(Obj.getSWSwapedDim()); } if (Obj.isTangible(mw.getDimY(), sw.getDimY())) { Obj.doIsolate(mw.getDimY()); sw.setDimY(Obj.getIsolated()); } int [][]MainGrid = mw.setPixelValues( mw.defGrid(mw.getDimX(),mw.getDimY()) ); int [][]SubGrid = sw.setPixelValues( sw.defGrid(sw.getDimX(),sw.getDimY()) ); mw.display(); sw.display(); //for(int i=0;i<t.length;i++) // for (int j=0;j<t[0].length;j++) sw.initCoor(MainGrid); System.out.println("sw.getDimX ="+sw.getDimX+" "+"sw.getDimY ="+sw.getDimY); System.out.println("sw.getDimX ="+sw.getDimX+" "+"sw.getDimY ="+sw.getDimY); //System.out.println(r); System.out.println(); System.out.println(); /*do{ int sum=0; int rounds=0; for(int i=sw.getCoorX0();i<((sw.swDimx-1)+sw.getCoorX0());i++) { for (int j=sw.getCoorY0();j<((sw.swDimy-1)+sw.getCoorY0());j++) { sum+=MainGrid[i][j]; } } CorrlationMatrix[rounds]=sum; rounds++; if (sw.HasVerticalOverLap()) { sw.Vertical_Shift(); sw.CarryBack(); } sw.Horizontal_Shift(); System.out.print(sum+" "); }while(!sw.notDone()); */ //System.out.print("\n"+sw.initCoor()+"\n"); //System.out.println(mw.getDimX()+" "+mw.getDimY()); //System.out.println(sw.getDimX()+" "+sw.getDimY()); } }