ImageFileMatrix cow = new ImageFileMatrix(getCow());
ImageFileMatrix cowHead = new ImageFileMatrix(getCowHead());
System.out.println("Starting correlation...");
MatrixCorrelation correlation = new MatrixCorrelation(cow, cowHead);
correlation.calculate();
System.out.println("... correlation finished.");
cow = null;
cowHead = null;
System.gc();
BigDecimalMatrixSignal corr = MatrixSignalFactory.getInstance()
.multiplyToFitBounds(correlation.getCrossCorrelation(),
new BigDecimal(0), new BigDecimal(255));
PeakFinder peakFinder = new PeakFinder(corr);
System.out.println(peakFinder);
Point2D position = peakFinder.getPeaks()[0].getPoint();
System.out.println("Peak found at " + position.getX() + ","