A Qualitative Profile-based Approach to Edge Detection