In this work we address boundary detection and boundary grouping. We first pursue a learning-based approach to boundary detection. For this (i) we leverage appearance and context information by extracting descriptors around edgels and use them as features for classification, (ii) we use discriminative dimensionality reduction for efficiency and (iii) we use outlier-resilient boosting to deal with noise in the training set. We then introduce fractional-linear programming to optimize a grouping criterion that is expressed as a cost ratio. Our contributions are systematically evaluated on the Berkeley benchmark.