added ccxymatch_ref, ccxymatch using an image header as reference