Image Stitching using OpenCV and Python (Creating Panorama Project)

21 / 23

Image Registration

Now that we found the homography for transformation, we can now proceed to warp and display the right-side image in an orientation suitable to be stitched with the left image. This is also known as image registration.


cv2.warpPerspective applies a perspective transformation to an image, given the image, homography matrix, and size of the output image and returns the transformed output image.

  • Use cv2.warpPerspective method to apply perspective transformation of the img_right.

    dst = cv2.<< your code comes here >>(img_right,H,(img_left.shape[1] + img_right.shape[1], img_left.shape[0]))
  • Visualize the output image dst.

    plt.title('Warped Image') 
Get Hint See Answer

Note - Having trouble with the assessment engine? Follow the steps listed here

Loading comments...