A road boundary detection apparatus comprising: an acquisition unit configured to acquire a disparity image based on information obtained by capturing an image of a peripheral environment of a vehicle, the disparity image including a first pixel region and a second pixel region, an angle formed by a disparity gradient direction of the first pixel region and a disparity gradient direction of the second pixel region being within a predetermined angular range of a right angle; an extraction unit configured to extract candidate pixel regions (Pt) composed of candidate pixels which are candidate to constitute a boundary line of a step surface existing along the road, the candidate pixel regions being sandwiched by the first pixel region and the second pixel region, the candidate pixel regions being extracted from the first pixel region and the second pixel region based on the disparity gradient direction of the first pixel region and the disparity gradient direction of the second pixel region; and a detection unit configured to detect the boundary of the step surface by joining together at least some of the candidate pixel regions extracted by the extraction unit; wherein the extraction unit is configured, in order to extract the candidate pixel regions: • to set respective pixels of the disparity image as focus pixels (Pt); • to set pixels on the periphery of the focus pixel (Pt), and located respectively on the left side, on the right side, on the upper side, and on the lower side of the focus pixel respectively as at least one left side pixel (Ptl), at least one right side pixel (Ptr), at least one upper side pixel (Ptu), and at least one lower side pixel (Ptd); • to calculate a first angle formed by a disparity gradient direction of said at least one right side pixel (Ptr) and a disparity gradient direction of said at least one left side pixel (Ptl), and a second angle formed by a disparity gradient direction of said at least one lower side pixel (Ptd) and a disparity gradient direction of said at least one upper side pixel (Ptu), said first and second angles formed between disparity gradient directions being calculated using center values or average values of the disparity gradient directions of the respective groups of pixels; • to extract the candidate pixels, a focus pixel (Pt) being determined to be a candidate pixel when the first angle is within a predetermined angular range of a right angle, and the second angle is within a predetermined angular range of a right angle. an acquisition unit configured to acquire a disparity image based on information obtained by capturing an image of a peripheral environment of a vehicle, the disparity image including a first pixel region and a second pixel region, an angle formed by a disparity gradient direction of the first pixel region and a disparity gradient direction of the second pixel region being within a predetermined angular range of a right angle; an extraction unit configured to extract candidate pixel regions (Pt) composed of candidate pixels which are candidate to constitute a boundary line of a step surface existing along the road, the candidate pixel regions being sandwiched by the first pixel region and the second pixel region, the candidate pixel regions being extracted from the first pixel region and the second pixel region based on the disparity gradient direction of the first pixel region and the disparity gradient direction of the second pixel region; and a detection unit configured to detect the boundary of the step surface by joining together at least some of the candidate pixel regions extracted by the extraction unit; • to set respective pixels of the disparity image as focus pixels (Pt); • to set pixels on the periphery of the focus pixel (Pt), and located respectively on the left side, on the right side, on the upper side, and on the lower side of the focus pixel respectively as at least one left side pixel (Ptl), at least one right side pixel (Ptr), at least one upper side pixel (Ptu), and at least one lower side pixel (Ptd); • to calculate a first angle formed by a disparity gradient direction of said at least one right side pixel (Ptr) and a disparity gradient direction of said at least one left side pixel (Ptl), and a second angle formed by a disparity gradient direction of said at least one lower side pixel (Ptd) and a disparity gradient direction of said at least one upper side pixel (Ptu), said first and second angles formed between disparity gradient directions being calculated using center values or average values of the disparity gradient directions of the respective groups of pixels; • to extract the candidate pixels, a focus pixel (Pt) being determined to be a candidate pixel when the first angle is within a predetermined angular range of a right angle, and the second angle is within a predetermined angular range of a right angle.