The weighted graphs are constructed to well represent OCT images. The connected components can avoid some disturbs from the intrinsic speckle noise and organic texture artifacts. The SLIC superpixels method is used to segment 2D OCT images. The manifold ranking method is used to exactly detect the boundaries of 2D OCT images.