Learning to optimally detect image boundaries using brightness, color and texture