added mirroring-off functionality to edge detect algorithm
fix diff