Homography in computer vision explained

Поділитися
Вставка
  • Опубліковано 11 вер 2024
  • Finding Homography Matrix using Singular-value Decomposition and RANSAC in OpenCV and Matlab.
    ros-developer.c...

КОМЕНТАРІ • 37

  • @yiliangxie8656
    @yiliangxie8656 4 роки тому +4

    This helped a lot at 1 day before my CV exam. Thanks!

  • @user-rn7qi8po3s
    @user-rn7qi8po3s Рік тому +1

    بهنام جان دمت گرم فقط عکس اول با کیفیت محتوا کمی تفاوت داشت. مطالبت بسیار مفید و آموزنده بود

  • @DavidGoodman
    @DavidGoodman 2 роки тому

    This is a great video and helped me get unstuck on a problem I was working on. Thank you!

  • @b.bakhtiari
    @b.bakhtiari 2 роки тому +1

    Thanks Behnam, very informative like always 🙏

  • @mariamgarba1416
    @mariamgarba1416 5 років тому +11

    13:16 A little mistake here... -x'2H11 should be -x1H11

  • @tymothylim6550
    @tymothylim6550 3 роки тому

    Thank you very much for this video! It must have taken quite a lot of effort to make this video! Thank you for your effort :))

  • @meghdadhasheminnasab4416
    @meghdadhasheminnasab4416 Місяць тому

    I believe the projection matrix has to be 3 by 4, not 4 by 4. then considering Z = 0, third column can be eliminated and we are left by a 3 by 3 Homography matrx

  • @dewikharismawati964
    @dewikharismawati964 5 років тому

    Thank you for creating this video, it helps me understand homography better.

  • @saulo_catharino
    @saulo_catharino 4 роки тому +3

    In 9:51 - Correct : H33

  • @turtleden7961
    @turtleden7961 4 роки тому

    Awesome explanation thank you a lot with such a difficult topic!

  • @klbm9999
    @klbm9999 5 років тому +3

    at 5:53 it should be a 3x4 matrix, 4x4 by 4x1 does not give 3x1. Camera intrinsic matrix is 3x3, extrinsic is 3x4 giving us a 3x4 matrix, not a 4x4. Then we take z=0, and ignore the 3rd column, giving us a 3x3 matrix. Please rectify or correct me if i am wrong.

    • @bowsori
      @bowsori 3 роки тому

      thank you, this is what we were taught

    • @Must23
      @Must23 2 роки тому

      he just forgot to put homogeneous coordinate so like x,y,z,1 for LHS and RHS

    • @astrophage381
      @astrophage381 2 місяці тому

      Yes there is a mistake.

  • @engineersingh6101
    @engineersingh6101 6 років тому

    Thanks for very informative video on homography in CV.
    Please clarify when I am taking coordinate from image, they will be in x,y like 0,0 for top-left corner and some other point say 115, 269. Now while calculating homographic matrix, shall we need to convert them into meters like meter/pixel into pixel coordinate or can we use image coordinates directly in the equations for calculating Homographic matrix.

  • @krishj8011
    @krishj8011 3 роки тому

    Great video...

  • @emeraldz3366
    @emeraldz3366 5 років тому

    Great tutorial! Thanks a lot!

  • @manoncnt
    @manoncnt 3 роки тому

    Thanks for this video!

  • @oldcoolbroqiuqiu6593
    @oldcoolbroqiuqiu6593 3 роки тому

    you saved my final

  • @rusencelik1272
    @rusencelik1272 Рік тому

    so how can you recover the tvec and rvec from this homography matrix if we know the intrinsic parameters

    • @RoboCodeHub
      @RoboCodeHub  Рік тому

      Please check here docs.opencv.org/4.x/d9/d0c/group__calib3d.html#ga7f60bdff78833d1e3fd6d9d0fd538d92

  • @songzhisu8713
    @songzhisu8713 5 років тому

    the best in the world! thank you.

  • @cindycindy5980
    @cindycindy5980 5 років тому +2

    17:12 Should the top left cell in the 9x9 matrix be -x2 instead of -x1

    • @RoboCodeHub
      @RoboCodeHub  5 років тому

      No that's correct, please have look at the link where everything is available in latex and python ros-developer.com/2017/12/26/finding-homography-matrix-using-singular-value-decomposition-and-ransac-in-opencv-and-matlab/

  • @zhuoerlyu4705
    @zhuoerlyu4705 6 років тому

    Hi,it is really an excellent tutorial,Thank you so much.
    But I still have a question about its application.
    I am gonna use this to remove perspective distortion which requires me to get a frontal image from an arbitrary position of the same image.But i only have one picture,therefore,the question is that how can I get the corresponding points to calculate the H matrix.
    Looking forward your reply!Thank you
    Best

    • @RoboCodeHub
      @RoboCodeHub  6 років тому +1

      You need at least for points in your image that are in the same plane, for instance, if you take photo of ground floor pick for points from the floor, have look at my opencv example in the description, cheers.

    • @zhuoerlyu4705
      @zhuoerlyu4705 6 років тому

      Yes, thank you, I have figured it out!

  • @raiakil
    @raiakil 6 років тому

    very clear - thanks

  • @sahartabrizi6155
    @sahartabrizi6155 6 років тому

    does this model work for CCD cameras as well? so we can calculate coordinates of a 3D point in the world using its image coordinates and Homography matrix of camera? it would be great if you explain how we can generate homography matrix for a CCD camera. Many thanks.

    • @RoboCodeHub
      @RoboCodeHub  6 років тому

      This (Homography) is a pure geometrical model for a pine hole camera and nothing to do with sensor (CCD or CMOS), you can follow the link in the description for implementation. If you interested in 3D reconstruction please have look at SFM in the other post here: ros-developer.com/tag/sfm/
      Good luck :)

    • @sahartabrizi6155
      @sahartabrizi6155 6 років тому

      what do you mean for "implementation"? Is this sth related to a camera matrix (sensor matrix) for CCD? If not, is there any possible solutions for the case of CCD? Thanks.

    • @sahartabrizi6155
      @sahartabrizi6155 6 років тому

      I also found this video which explains "complete camera model" using homography and homogenous coordinate system and it is also showing CCD sensor at 13:37. Could you please clarify if I am wrong! Since I don't have a good knowledge and background about cameras, I am a bit confused!

    • @ansjikhodro4680
      @ansjikhodro4680 4 роки тому

      @@sahartabrizi6155 این مدل کلی هندسیه برای مرتبط کردن فضای تصویر و زمین دوربین آنالوگ باشه یا دیجیتال تو استفاده از این مدل تفاوتی ایجاد نمیکنه اگه آنالوگ باشه مختصات عکسی رو از روی عکس با یه سری دستگاهای مخصوص میخونیم اگه دیجیتال باشه مختصات ماتریسی سل سی سی دی رو به عنوان داده استفاده میکنیم.کع الان کلا عکس آنالوگ منسوخ شده و فقط تو دانشگاه روشش رو تدریس میکنن محض آموزش.

  • @turinglifechu9419
    @turinglifechu9419 3 роки тому +1

    5:46, the matrix should be 3x4.

    • @bowsori
      @bowsori 3 роки тому

      shouldnt it be 4x3?

  • @waqasaps
    @waqasaps 2 роки тому

    why degree of freedom is 8 ?

    • @astrophage381
      @astrophage381 2 місяці тому +1

      The Homography matrix has 9 parameters.
      Let me walk you through it.
      When you transform something from 3d to its projection in 2d, you lose one degree of freedom. What this means is you could scale up everything i.e. make the object bigger and twice as far and not tell the difference from your 2d photo.
      Example:
      If you took a photo of the moon vs. Took a photo of a small pea sized moon that was much much closer, you wouldn't be able to tell. They do this with miniature movie sets.
      Ok, so then since that degree of freedom regarding scale is lost, mathematically it translates to a scaling factor multiplied on both sides of the equations. So we say let's make the norm of the h matrix equal to 1 without loss of generality i.e. ||H|| = 1. If that's the case then we have 8 degrees of freedom to find the values of H.
      E.g. If I told you to find 2 variables a and b in some equation but told you that
      a^2 + b^2 = 1, then I have constrained the solution to a circle. You only need to find 1 variable (say a), the other is sqrt(1 - b^2). Hence n-1 degrees of freedom.