Real-time stage detection for Edges based method