Find similarities between two images with Opencv and Python - Images comparison part 2

Поделиться
HTML-код
  • Опубликовано: 10 ноя 2024

Комментарии • 33

  • @luanmoreno9863
    @luanmoreno9863 2 года назад +1

    People have been asking for years how to resolve the problem with "sift = cv2.xfeatures2d.SIFT_create()" and the error it gives.
    The answer guys is simple, just remove "xfeatures2d" and put instead "sift = cv2.SIFT_create()"

  • @szalaiandras
    @szalaiandras 5 лет назад +5

    I am a fan of your work. That is not the George Washington bridge. It is the Manhattan Bridge.

  • @rootifera
    @rootifera 4 года назад +2

    So after a couple of hours struggle I managed to get xfeatures2d working. If you are getting "AttributeError: module 'cv2.cv2' has no attribute 'xfeatures2d' error" message, this is for you.
    1 - you need python 3.7, doesn't work if you have 3.8.
    2 - uninstall opencv-python and opencv-contrib-python if you have them installed.
    3 - Go to pypi.org/project/opencv-python/3.4.2.16/#files and download opencv-python for your OS. In my case it was opencv_python-3.4.2.16-cp37-cp37m-win32.whl (Win10 with 32bit Python installed)
    4 - Go to pypi.org/project/opencv-contrib-python/3.4.2.16/#files and download opencv-contrib-python for your OS just like previous step.
    5 - Using pip, install both whl files:
    # pip install opencv_python-3.4.2.16-cp37-cp37m-win32.whl
    # pip install opencv_contrib_python-3.4.2.16-cp37-cp37m-win32.whl
    that should be it.
    If you are a PyCharm user and want to install these in your venv, then please move the whl files into your project folder, switch to terminal by clicking Terminal button on the left bottom of your PyCharm (next to python console, run, TODO). Then run the commands above in your project folder. Be sure you have no opencv-python and opencv-contrib-python installed in your venv.
    The video tutorial is good however some parts feels so "copy-paste". I have no idea index_params = dict(algorithm=0, trees=5) does or why the search_params is an empty dict etc. In the end, yes it works but could have been better.

  • @yarontelyas7758
    @yarontelyas7758 4 года назад +1

    Hi, nice work! Opencv is not supporting anymore 'xfeatures2d' method - so with the latest version of Opencv, the code will not work

  • @maitreeable
    @maitreeable 4 года назад

    Hi sir
    Thank you very much, it is a great lesson for me. Could you please tell me what is the key point? Do the key points are equal to the total pixels of the image sir?

  • @udaychafale
    @udaychafale 6 лет назад +2

    Can we compare two face using this code and find the similarity percentage ?
    I am trying to compare two face similarity percentage in android .
    If possible please make image comparison video in android using opencv
    Thanks you for this video You are doing nice job 👌👌👍 👍

    • @user-iu1hi6zj7s
      @user-iu1hi6zj7s 5 лет назад

      did you find something about that? cause I am trying to do just as what you was looking for

    • @cuencopatrick
      @cuencopatrick 5 лет назад

      Me too. Am looking for how similar two identical face are.

    • @gomes8335
      @gomes8335 4 года назад

      Me too. Please revert back

  • @ironwolf3921
    @ironwolf3921 5 лет назад +3

    while running i got this error
    cv2.error: OpenCV(4.1.0) C:\projects\opencv-python\opencv_contrib\modules\xfeatures2d\src\sift.cpp:1207: error: (-213:The function/feature is not implemented) This algorithm is patented and is excluded in this configuration; Set OPENCV_ENABLE_NONFREE CMake option and rebuild the library in function 'cv::xfeatures2d::SIFT::create'
    how to fix

    • @sharathra4239
      @sharathra4239 4 года назад

      even i have the error and i couldn't find a solution if u have fixed please help me out with this

  • @mariamkhursheed
    @mariamkhursheed 4 года назад

    Can there be more than one image as anchor image? For example, a person's face has three profiles front, left and right... how does one go about anchoring three images to find out a similar looking person? Can siamese network help me with it? Or would I have to go about find a more sophisticated way?

  • @IrwanDjoehana
    @IrwanDjoehana 5 лет назад +2

    Thank you for this great tutorial!

  • @krishnadasari9863
    @krishnadasari9863 5 лет назад +1

    Hi
    can we also compare the canvas images by applying different colors to it ?
    we have application with html canvas elements and need to automate the image processing to do automation on it by adding annotations ,applying color to images etc..,

    • @pysource-com
      @pysource-com  5 лет назад

      Yes it's possible to do that as well.

  • @dody3329
    @dody3329 2 года назад

    Hello sir , could you explain the meaning of 6074 matches @10:49?

  • @orkeren8
    @orkeren8 4 года назад +2

    Next time add a short film of how to install the included modules, it will save a lot of time for us

  • @suparnarooj3568
    @suparnarooj3568 5 лет назад +4

    'xfeatures2d' is not an attribute to cv2. You forgot to mention how to resolve this, please inform

    • @yagdrassel
      @yagdrassel 5 лет назад +2

      pip3 install opencv-contrib-python==3.4.2.17

    • @sharathra4239
      @sharathra4239 4 года назад

      if I try to install this version in pycharm, its giving me an error message like this
      can you suggest some other technique to overcome this error please
      Could not find a version that satisfies the requirement opencv-contrib-python==3.4.2.17 (from versions: )
      No matching distribution found for opencv-contrib-python==3.4.2.17

    • @rootifera
      @rootifera 4 года назад

      @@sharathra4239 I have the same issue, I guess no solution found?

    • @amjadmughal9849
      @amjadmughal9849 4 года назад

      @@sharathra4239 u should use google colab

    • @AlHujraat
      @AlHujraat 4 года назад

      @@sharathra4239 I also have the same issue, hopefully someone can enlighten us

  • @yashasvisrivastava1935
    @yashasvisrivastava1935 4 года назад

    sir how to enable SIFT algorithm

  • @Delightforeyes
    @Delightforeyes 4 года назад

    Hi. I tried to downgrade the OpenCV version to recommended but faced the same problem, Also I receive the following msg, which means that now it is impossible to use SIFT. error:
    OpenCV(4.1.2) /io/opencv_contrib/modules/xfeatures2d/src/sift.cpp:1207: error: (-213:The function/feature is not implemented) This algorithm is patented and is excluded in this configuration; Set OPENCV_ENABLE_NONFREE CMake option and rebuild the library in function 'create' Could you pls assist to find out solution. Thanks

  • @GoldenHay1
    @GoldenHay1 6 лет назад

    i see. but i think for what i am trying to do i will keep using SequenceMatcher to find similarities between a given picture and a bunch of other pictures, because it's more pure, since i check the binary and it doesn't matter if the file i'm comparing with other files is an image, or some other file. the only problem is the file size, since it throws off the accuracy(depending on how many pictures i have in different sizes). the easiest solution for me is probably converting all image files and preferably also the image file i wanna compare with all other image files to the exact same file size, if only temporarily. and i would only have to do it once to the pictures i will use as a library anyway.

  • @MKA_NET
    @MKA_NET 5 лет назад +1

    'NoneType' object has no attribute 'shape'

  • @akhilrudra2497
    @akhilrudra2497 5 лет назад +1

    Stucked up at absolute error(sift) could anyone help me please to overcome it?

  • @tammysmith5487
    @tammysmith5487 4 года назад

    i need to see if cat is same