Local and global gestalt laws: A neurally based spectral approach