corner detection : begin to add condition