[JAI] Image pattern comparison