We propose a biologically motivated computational step, called non-classical receptive field (non-CRF) inhibition, to improve contour detection in images of natural scenes. We augment a Gabor energy operator with non-CRF inhibition. The resulting contour operator responds strongly to isolated lines, edges, and contours but exhibits a weaker or no response to edges that make part of texture. As such, the contour operator is more useful for contour-based object recognition tasks than traditional edge detectors, which do not make such a distinction. The contour operator consistently outperforms the Canny edge detector on natural images with associated ground truth contour maps