Robust robot pose estimation is an important prerequisite of moving object detection and tracking in dynamic environments. Since a simple segmentation is not enough for the representation of an object due to problem of fragmentation and grouping of the segments. It may cause incorrect data association. To address these problems, we propose a segment-merging approach with the Sampling- and Correlation-based Range Image Matching(or SCRIM) algorithm. To concern about the uncertainty of the combination of all the merged segments, we find all the proper and possible hypothesis of data association and segmentation. We specify all the uncertainty from the measurement, segment, segmentation and data association, to detection and localization. Also we address the problems such as pitch motion of the robot, localization and detection in dynamic environments.