For everyday inspection jobs in offshore oil and gas industry, the human divers are being replaced by underwater vehicles. This paper proposes a visual feedback based control of an autonomous underwater vehicle for pipeline inspection. The hydrodynamic disturbances in water severely affect the movement of the vehicle resulting in performance degrading. The heading of the autonomous underwater vehicle under such disturbances is controlled using visual feedback to track the pipeline for inspection. The proposed method does not demand expensive position feedback devices such as underwater acoustic positioning system. By using built-in camera of the vehicle and few image processing techniques a simpler, easier and low-cost solution is proposed. The performance evaluation of the proposed technique on sample underwater images is also presented.