The edge-preserving smoothing for images in computer graphics and image processing was studied. Considering that the previous edge-preserving smoothing methods, which mostly employ the first order smoothness prior as the regularization term of an energy function, tend to introduce the staircase effect into the results under the optimization framework, a fast edge-preserving smoothing algorithm ... [Show full abstract] using the second order smoothness prior was put forward. The algorithm can avoid this staircase effect, besides, it uses the binary line process variables to overcome the over-smoothing problem caused by the high order smoothness prior. As the binary variables make the original problem difficult to solve, a practical optimization strategy was designed to obtain an approximate solution. The proposed algorithm can be further accelerated on a graphic processing unit (GPU) and can achieve the near real time performance. The effectiveness of the algorithm was demonstrated in the applications such as depth map smoothing, cartoon image denoising and edge extraction.