IPDRepeatability { public double repeatability(double percentageOverlap) { prepare(); double potentialMatches = Math.min(this.validImage2Points.size(), this.validImage1Points.size()); if (potentialMatches == 0) { return 0; } double countMatches = 0; int totalSeen = 0; for (ScoredPair<Integer, Pair<Integer>> d : this.prunedOverlapping) { totalSeen++; if (d.score >= percentageOverlap) countMatches++; } return countMatches / potentialMatches; } IPDRepeatability(Image<?, ?> image1, Image<?, ?> image2,
			List<Ellipse> image1Points, List<Ellipse> image2Points,
			Matrix homography);  IPDRepeatability(File image1f, File image2f,
			InterestPointDetector<T> ipd, File homographyf);  IPDRepeatability(MBFImage image1, MBFImage image2,
			InterestPointDetector<T> ipd, InputStream homographyf);  IPDRepeatability(MBFImage image1, MBFImage image2,
			InterestPointDetector<T> ipd, Matrix homography);  IPDRepeatability(List<Ellipse> firstImagePoints,
			List<Ellipse> secondImagePoints, Matrix transform);  IPDRepeatability(); double repeatability(double percentageOverlap); List<ScoredPair<Integer, Pair<Integer>>> calculateOverlappingEllipses(); static IPDRepeatability<EllipticInterestPointData> repeatability(
			Image<?, ?> img1, Image<?, ?> img2, List<Ellipse> e1,
			List<Ellipse> e2, Matrix transform, double maximumDistanceMultiple); static IPDRepeatability<T> repeatability(
			MBFImage image1, MBFImage image2, List<T> interestPoints1,
			List<T> interestPoints2, Matrix transform,
			int maximumDistanceMultiple2); static List<Ellipse> validPoints(List<Ellipse> allPoints,
			Image<?, ?> sourceImage, Matrix transform); static List<ScoredPair<Integer, Pair<Integer>>> calculateOverlappingEllipses(
			List<Ellipse> firstImagePoints, List<Ellipse> secondImagePoints,
			Matrix transform, double maximumDistanceMultiple); static Matrix readHomography(File homographyf); static Matrix readHomography(InputStream homographyf); double calculateOverlapPercentage(Ellipse e1, Ellipse e2,
			double maximumDistanceFactor); double calculateOverlapPercentageOxford(Matrix e1Mat, Matrix e2Mat,
			Ellipse e1, Ellipse e2, double multiplier); static List<Ellipse> readMatlabInterestPoints(InputStream inputStream); static void main(String args[]); static void testSingleEllipseFromMatlab();  }
@Test public void testRepeatability() throws IOException{ MBFImage image2 = image.clone(); MBFImageRenderer renderer2 = image2.createRenderer(); renderer2.drawShapeFilled(shape.transform(transform), RGBColour.WHITE); MBFImageRenderer renderer1 = image.createRenderer(); renderer1.drawShapeFilled(shape, RGBColour.WHITE); HarrisIPD internal = new HarrisIPD(1,2,0.04f); AffineAdaption ipd = new AffineAdaption(internal,new IPDSelectionMode.All()); ipd.setFastDifferentiationScale(true); ipd.findInterestPoints(Transforms.calculateIntensityNTSC(image)); List<EllipticInterestPointData> interestPoints1 = ipd.getInterestPoints(); ipd.findInterestPoints(Transforms.calculateIntensityNTSC(image2)); List<EllipticInterestPointData> interestPoints2 = ipd.getInterestPoints(); IPDRepeatability<EllipticInterestPointData> rep = IPDRepeatability.repeatability(image,image2,interestPoints1,interestPoints2,transform,4); double repeatability = rep.repeatability(0.5); System.out.println("Repeatability: " + repeatability); assertTrue(repeatability == 1); }