1. A stereo matching apparatus, the apparatus comprising: a scan line extractor configured to extract a scan line including a current scan line and an upper scan line relevant to a corresponding point in a stereo image including an image of the current scan line; a cost determiner configured to determine a cost at a node of a plurality of stages relative to the image of the current scan line, the determination depending on from which level among a same level, an upper level, and a lower level of a previous stage a cost of same stage of the upper scan line is determined, and whether a cost of the same stage of the upper scan line is determined by other disparities; a path designator configured to designate a path in response to the determined cost; and an optimal path determiner configured to determine a path that minimizes energy at the designated path.