How texture elements are combined to detect boundaries: A machine learning approach