Image stitching can be used to in 3D reconstruction to obtain the comprehensive obstacle information, which plays an important role in the field of mobile robots.However, previous algorithms have two problems: 1. The linear structure of the image might have been corrupted. 2. Some inconsistency may exist in the transitional region of the stitched image. In order to solve above problems, in this paper, we propose a grid-based linear structure protection method, which applies the constraints to the lines extracted from the image to protect them from the distortion caused by the mesh deformation process, and resulting in a natural panorama with reduced distortion. This method helps to obtain a natural panoramic image with reduced distortion. At the same time, we use the neighbor weighted based boundary artifact removal approach to process the stitched image, which can avoid the stitching problem and can make the image look more natural. We conducted some experiments, and the results demonstrated that our method is more efficient and more natural as compared with some state-of-the-art methods.