Skip to content

Beginners Opencv · Tutorials

Affine transformation – OpenCV 3.4 with python 3 Tutorial 14

Access community, courses and source codes
Logo

AI Vision Academy

Access the code of this tutorial, computer vision courses and an exclusive community on AI Vision Academy

  • Access to over 50+ source codes from Pysource.com/blog
  • Dedicated video courses about computer vision
  • Access to an exclusive community of professionals
  • Real-World AI Projects – Get hands-on experience building practical AI Computer Vision solutions with a structured path.
  • Monthly Coaching Calls – get support and any of your questions answered

Subscribe to our newsletter to learn more

2 comments

  1. I got a information about warpAffine method. But I want to know one more about warpAffine .

    import cv2
    import numpy as np

    pic = cv2.imread(‘image.jpeg’)
    print(pic.shape)
    cols = pic.shape[1]
    rows = pic.shape[0]

    M = np.float32([[1,0,25],[0,1,10]]) # This line is passed to warpAffine method. But in your video, you have explained another way. can you tell me what is the difference between this line and your method in your code?

    shifted = cv2.warpAffine(pic, M, (cols,rows))
    cv2.imshow(‘shifted’,shifted)

    cv2.waitKey(0)
    cv2.destroyAllWindows()

Join the discussion