A knowledge-based approach to crack detection in thermographic images