Merge "Refactor compare_images"
am: 2ce9bc6563

Change-Id: Ie2d2249fffc78d4a70de5b7c218ce7df87f0f20b