The present disclosure relates to a method of stitching images captured by a vehicle. A first image and a second image are received. The first image and the second image are segmented based on characteristics of pixels. Groups of pixels having similar characteristics are identified to form clusters in a predetermined portion of overlap of the first image and the second image. A confidence score is generated for the first image and the second image. A difference in the confidence score is computed. At least one of, the first image capturing unit and the second image capturing unit is aligned to capture at least one of, a first aligned image and a second aligned image based on the difference in the confidence score. The first aligned image and the second aligned image are stitched.
|