A fast and accurate automated pavement crack detection algorithm