A camera is put in a downhole from ground, and moving downward, while the video is recorded by capturing an image of internal surface of the downhole at different depths. Later on, a complete 2D digital image of internal surface of the whole downhole needs to be formed by stitching each capture from the recorded video.