Sift image feature extraction python3.6 + opencv3.3 code

Source: Internet
Author: User

Some of the functions in opencv3.x are changed:

1. SIFT: can use Help (cv2.xfeatures2d) query

2.drawKeypoints: Also use the Help () method to query

Opencv3 version Sift,surf and other unstable algorithmic functions are placed in the contrib version of opencv3.x. The module https://www.lfd.uci.edu/~gohlke/pythonlibs/

#Python 3.6.2 | Anacondaimport cv2  Import numpy as NP   #read image  img = cv2.imread (R ' test.jpg ', Cv2. Imread_color)  Gray = Cv2.cvtcolor (img,cv2. Color_bgr2gray)  cv2.imshow (' Origin ', img);    #SIFT  detector = cv2.xfeatures2d.SIFT_create () keypoints = Detector.detect (gray,none)  cv2.drawkeypoints ( GRAY,KEYPOINTS,IMG)  #img = cv2.drawkeypoints (gray,keypoints,flags = Cv2. draw_matches_flags_draw_rich_keypoints)  cv2.imshow (' Test ', IMG);  Cv2.waitkey (0)  cv2.destroyallwindows ()  

Sift image feature extraction python3.6 + opencv3.3 code

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.