public static Point[][] getLogicalCenter(FinderPattern finderPattern) { int version = finderPattern.Version; Point[][] pointArray1 = new Point[1][]; for (int index = 0; index < 1; ++index) { pointArray1[index] = new Point[1]; } int[] numArray = new int[1]; int[] seed = LogicalSeed.getSeed(version); Point[][] pointArray2 = new Point[seed.Length][]; for (int index = 0; index < seed.Length; ++index) { pointArray2[index] = new Point[seed.Length]; } for (int index1 = 0; index1 < pointArray2.Length; ++index1) { for (int index2 = 0; index2 < pointArray2.Length; ++index2) { pointArray2[index2][index1] = new Point(seed[index2], seed[index1]); } } return(pointArray2); }
//get logical center coordinates of each alignment patterns public static Point[][] getLogicalCenter(FinderPattern finderPattern) { int version = finderPattern.Version; Point[][] logicalCenters = new Point[1][]; for (int i = 0; i < 1; i++) { logicalCenters[i] = new Point[1]; } int[] logicalSeeds = new int[1]; //create "column(row)-coordinates" which based on relative coordinates //int sqrtCenters = (version / 7) + 2; //logicalSeeds = new int[sqrtCenters]; //for(int i=0 ; i<sqrtCenters ; i++) { // logicalSeeds[i] = 6 + i * (4 + 4 * version) / (sqrtCenters - 1); // logicalSeeds[i] -= (logicalSeeds[i] - 2) % 4; //} logicalSeeds = LogicalSeed.getSeed(version); logicalCenters = new Point[logicalSeeds.Length][]; for (int i2 = 0; i2 < logicalSeeds.Length; i2++) { logicalCenters[i2] = new Point[logicalSeeds.Length]; } //create real relative coordinates for (int col = 0; col < logicalCenters.Length; col++) { for (int row = 0; row < logicalCenters.Length; row++) { logicalCenters[row][col] = new Point(logicalSeeds[row], logicalSeeds[col]); } } return(logicalCenters); }