Details of the Berkeley contour detection algorithm can be found here. If you use this code please also cite:
Contour Detection and Hierarchical Image Segmentation,
P. Arbelaez, M. Maire, C. Fowlkes, and J. Malik. IEEE TPAMI 2010.

Below are some examples. On the left the blue points represent the bias (prior) and the biased normalized cut is on the right.

Breakdown of the elapsed time on a 160X160 image:

24.060s for local cues, 20.170s for generalized eigenvectors.

0.005s for each biased ncut.

Normalized Cuts based on Oriented Gaussian Derivatives

A faster but less accurate version based on the normalized cuts code written by Timothee Cour, Stella Yu and Jainbo Shi available here can be downloaded below:

Installation instructions:

Follow the instructions for installing the above code. You should be able to run demoNcutImage.m