1. An object detection apparatus comprising: a range image generator configured to, based on distance information indicative of distances from a given measurement point to objects in real space, generate a range image indicative of a distribution of distance information of objects located around the measurement point, a virtical direction of the range image corresponding to an up-down direction of the real space; a subgroup generator configured to divide the range image generated by the range image generator in a horizontal direction of the range image into a number of column regions of prescribed width, and for each column region, generate one or more subgroups that extend continuously in a vertical direction of the range image and fall within a given range of distance information; a continuity determiner configured to, for each of the subgroups generated by the subgroup generator, determine whether or not there is distance continuity between the subgroup and its horizontally adjacent subgroup in the range image; a merger configured to merge together horizontally continuous-in-distance subgroups, between any pair of horizontally adjacent subgroups of which it is determined by the continuity determiner that there is distance continuity, to generate a merged group; and an object detector configured to detect an object in each of regions of the range image corresponding to the respective merged groups generated by the merger.