Many of ADAS applications such as pedestrian and vehicle detection are using stereo vision. By computing the well-known disparity the range of objects ahead of the car can be determined. According to the computed range, it is possible to iden- tify whether this object is in a collision position or not. Based on the chain code algorithm a new disparity computation method is introduced. The proposed method enhances obviously the delivered disparity values as well as the object segmentation results by integrating the segmentation into the disparity assignment step.