@Test
public void testCalcSimilarityByFeatureMatrix() throws Exception {

	BufferedImage image1 = ImageIO.read(getClass().getResource("hifive_logo.png"));
	BufferedImage image2 = ImageIO.read(getClass().getResource("hifive_logo.png"));
	Rectangle rectangle = new Rectangle(0, 0, image1.getWidth(), image1.getHeight());
	Offset offset = new Offset(0, 0);
	double actual;
	actual = SimilarityUtils.calcSimilarityByFeatureMatrix(image1, image2, rectangle, offset);
	assertThat(actual, is(1.0));
	Rectangle frame1 = new Rectangle(0, 0, image1.getWidth(), image1.getHeight());
	Rectangle frame2 = new Rectangle(0, 0, image2.getWidth(), image2.getHeight());
	actual = SimilarityUtils.calcSimilarityByFeatureMatrix(image1, image2, frame1, frame2);
	assertThat(actual, is(1.0));
}