adds color and intensity distance thresholds
adds script for processing pairs in the whole dataset