/** Computes the phase correlation between two images. */ public static void runTestPhaseCorrelationImageAlignment() throws FileNotFoundException { Log.setLogLevel(LogType.VERBOSE); Debug.setDebugLevel(DebugType.VERBOSE); Log.msg(LogType.MANDATORY, "Running Test Phase Correlation Image Alignment Java"); // Read two images. File file1 = new File("F:\\StitchingData\\70perc_input_images\\F_2420.tif"); File file2 = new File("F:\\StitchingData\\70perc_input_images\\F_2421.tif"); // File file1 = new File("F:\\StitchingData\\70perc_input_images\\F_0001.tif"); // File file2 = new File("F:\\StitchingData\\70perc_input_images\\F_0002.tif"); JavaImageTile t1 = new JavaImageTile(file1, 0, 0, 2, 2, 0, 0); JavaImageTile t2 = new JavaImageTile(file2, 1, 0, 2, 2, 0, 0); JavaImageTile.initJavaPlan(t1); TimeUtil.tick(); TileWorkerMemory memory = new JavaTileWorkerMemory(t1); CorrelationTriple result = Stitching.phaseCorrelationImageAlignmentJava(t1, t2, memory); Log.msg( LogType.MANDATORY, "Completed image alignment between " + t1.getFileName() + " and " + t2.getFileName() + " with " + result.toString() + " in " + TimeUtil.tock() + "ms"); Log.msg(LogType.MANDATORY, "Test Completed."); }