Free space is the world region where navigation without collision is guaranteed. So the computation of free space in an environment is an essential task for many intelligent automobiles. This paper presents a novel approach for free space computation in complex traffic scenarios based on stereo vision. Since existing methods may have drawbacks in smoothness or continuity, especially in noisy background environment, the method proposed in this paper improves detection accuracy of free space boundary in some specific situation, using dynamic programming(DP) in u-disparity map. In details, the proposed method mainly involves three different steps. The first step is reconstructing a u-disparity map and removing road pixels from it, which might be the potential disturbance to the next step. Next, implementing DP in the new u-disparity image, different from the classic way, we take three columns into consideration at the same time and change the smooth term, which will significantly increase the smoothness of slope boundary. Last, to satisfy the high speed requirement, the algorithm is optimized and speeded up. Experiments executed on KITTI data set show that the proposed method not only can detect the free space boundary efficiently, but also has an improvement both in smoothness and continuity.