A computer-implemented stereo matching method comprising: acquiring detection information based on an edge detection of a first image; determining an edge line, provided in the form of a line, and a feature point, provided in a form excluding the line, based on the detection information; sampling a reference pixel from the edge line and the feature point; determining a polygon with reference pixels as vertices; predicting a search range comprising disparities of pixels within the polygon based on disparities of reference pixels; and performing stereo matching of the pixels based on the search range, wherein the determining of the edge line and the feature point comprises: determining continuously distributed pixels among pixels corresponding to the detection information as the edge line, wherein the continuously distributed pixels are determined based on a distance between the pixels and a direction of an edge; and determining discretely distributed pixels among the pixels corresponding to the detection information as the feature point, characterized by adjusting the number of reference pixels by adding at least one reference pixel to a region in which a density of reference pixels is less than a first threshold due to a wide interval between feature points, and/or adding at least one reference pixel to a region in which an interval between reference pixels sampled from the edge line is wide and exceeds a second threshold. acquiring detection information based on an edge detection of a first image; determining an edge line, provided in the form of a line, and a feature point, provided in a form excluding the line, based on the detection information; sampling a reference pixel from the edge line and the feature point; determining a polygon with reference pixels as vertices; predicting a search range comprising disparities of pixels within the polygon based on disparities of reference pixels; and performing stereo matching of the pixels based on the search range, wherein the determining of the edge line and the feature point comprises: determining continuously distributed pixels among pixels corresponding to the detection information as the edge line, wherein the continuously distributed pixels are determined based on a distance between the pixels and a direction of an edge; and determining discretely distributed pixels among the pixels corresponding to the detection information as the feature point, characterized by adjusting the number of reference pixels by adding at least one reference pixel to a region in which a density of reference pixels is less than a first threshold due to a wide interval between feature points, and/or adding at least one reference pixel to a region in which an interval between reference pixels sampled from the edge line is wide and exceeds a second threshold. determining continuously distributed pixels among pixels corresponding to the detection information as the edge line, wherein the continuously distributed pixels are determined based on a distance between the pixels and a direction of an edge; and determining discretely distributed pixels among the pixels corresponding to the detection information as the feature point, characterized by adjusting the number of reference pixels by adding at least one reference pixel to a region in which a density of reference pixels is less than a first threshold due to a wide interval between feature points, and/or adding at least one reference pixel to a region in which an interval between reference pixels sampled from the edge line is wide and exceeds a second threshold.