Simple border detection