Implemented the black line detector with a derivative function