Based on some previous work on the connection between image restoration and fluid dynamics, we apply a two-step algorithm for image denoising. In the first step, using a splitting scheme to study a nonlinear Stokes equation, tangent vectors are obtained. In the second step, an image is restored to fit the constructed tangent directions. We apply a fixed point iteration to solve the total variation-based image denoising problem, and use algebraic multigrid method to solve the corresponding linear equations. Numerical results demonstrate that our algorithm is efficient and robust, and boundary conditions are satisfactory for image denoising.