Add patch_match application

I stole code from the correlation app