Fixed detectEdges.m