Statistics for Designing hypothesis tests for digital image matching