An algorithm for the detection of visually relevant luminance features is presented. The algorithm is motivated and directed by current models of the visual system. The algorithm detects edges (sharp luminance transitions) and narrow bars (luminance cusps) and marks them with the proper polarity. The image is first bandpass filtered with oriented filters at a number of scales an octave apart. The suprathreshold image contrast details at each scale are then identified and are compared across scales to find locations in which the signal polarity (sign) is identical at all scales, representing a minimal level of phase congruence across scales. These locations maintain the polarity of the bandpass-filtered image. The result is a polarity-preserving features map representing the edges with pairs of light and dark lines or curves on corresponding sides of the contour. Similarly, bar features are detected and represented with single curves of the proper polarity. The algorithm is implemented without free (fitted) parameters. All parameters are directly derived from visual models and from measurements on human observers. The algorithm is shown to be robust with respect to variations in filter parameters and requires no use of quadrature filters or Hilbert transforms. The possible utility of such an algorithm within the visual system and in computer vision applications is discussed.