From manual to automatic pavement distress detection and classification