Algorithm to measure automatically the ductile/brittle fracture of Charpy test specimens