Edge detection based steady state detection, pair matching and clustering

Preliminary version. Tested loosely on REDD and iAWE.