1. A stereo matching method performed by a stereo matching device including a processor, the method comprising: obtaining left and right stereo images; producing an n th frame using the left and right stereo images, n being a natural number greater than or equal to 1; determining whether each of the n th frame and a buffering frame that is an n−1 th frame includes a pattern, the pattern corresponding to a predetermines period, wherein a frame includes the pattern if an image of the frame includes the pattern; when the n th frame includes the pattern and the buffering frame does not include the pattern, generating a raw cost volume using the n th frame and generating a weight using the buffering frame; when the buffering frame includes the pattern and the n th frame does not include the pattern, generating the raw cost volume using the buffering frame and generating the weight using the n th frame; and generating a final cost volume by performing the vector product of the raw cost volume and the weight.