Questions tagged [sift]

Scale-invariant feature transform (SIFT) is an algorithm in computer vision to detect and describe local features in images. This tag is for programming questions related to SIFT implementation or programs that use SIFT algorithm for computer vision applications.

Scale-invariant feature transform (SIFT) is an algorithm in computer vision to detect and describe local features in images, introduced by prof. David Lowe in 2004.

The local features extracted from an image with SIFT can then be used to identify an object from that image. This visualization illustrates homologous SIFT keypoints in two separate pictures of the same magazine cover:

enter image description here

Applications of SIFT include object recognition, robotic mapping and navigation, image stitching, 3D modeling, gesture recognition, video tracking, and match moving.

Algorithm Steps

  • Scale-space extrema detection

  • Keypoint localization

  • Interpolation of nearby data for accurate position

  • Discarding low-contrast keypoints

  • Eliminating edge responses

  • Orientation assignment

  • Keypoint descriptor

More information can be obtained here

837 questions
15
votes
1 answer

What is the difference between dense SIFT and HoG?

I am new to Computer Vision. I am studying Dense SIFT and HOG. For dense SIFT, the algorithm just considers every point as an interesting point and computes its gradient vector. HOG is another way to describe an image with a gradient vector. I think…
user3783676
  • 429
  • 2
  • 6
  • 16
14
votes
2 answers

How do I use SIFT in OpenCV 3.0 with c++?

I have OpenCV 3.0, and I have compiled & installed it with the opencv_contrib module so that's not a problem. Unfortunately the examples from previous versions do not work with the current one, and so although this question has already been asked…
leinaD_natipaC
  • 4,299
  • 5
  • 21
  • 40
14
votes
4 answers

how to use SIFT in opencv

I am learning C++ and OpenCV these days. Given an image, I want to extract its SIFT features. From http://docs.opencv.org/modules/nonfree/doc/feature_detection.html, we can know that OpenCV 2.4.8 has the SIFT module. See here: But I do not know…
tqjustc
  • 3,624
  • 6
  • 27
  • 42
14
votes
3 answers

OpenCV-Python dense SIFT

OpenCV has very good documentation on generating SIFT descriptors, but this is a version of "weak SIFT", where the key points are detected by the original Lowe algorithm. The OpenCV example reads something like: img = cv2.imread('home.jpg') gray=…
Doa
  • 1,965
  • 4
  • 19
  • 35
14
votes
1 answer

How to train and predict using bag of words?

I have a folder of images of a car from every angle. I want to use the bag of words approach to train the system in recognizing the car. Once the training is done, I want that if an image of that car is given it should be able to recognize it. I…
ipunished
  • 684
  • 2
  • 6
  • 22
13
votes
2 answers

David Lowe's SIFT -- Question about scale space and image coordinates (weird offset problem)

I realize this is a highly specialized question.. but here goes. I am using an implementation of SIFT to find matches on two images. With the current implementation that I have, when I match an image with is 90 or 180 degree version, I get matches…
Mustafa
  • 367
  • 1
  • 4
  • 13
12
votes
1 answer

SIFT & SURF : "module 'cv2.cv2' has no attribute 'xfeatures2d'" Set OPENCV_ENABLE_NONFREE CMake ==> Solution OpenCV 3 & OpenCV 4

I try to use the SIFT and SURF function with some of the versions of OpenCV 3 and openCV 4 (after having installed opencv-contrib-python) with: pip install opencv-contrib-python i try version 3.4.3 and 3.4.9 and 4.1.0, but have same probleme: sift…
RashidLadj_Winux
  • 810
  • 1
  • 6
  • 17
12
votes
1 answer

How to draw bounding box on best matches?

How can I draw a bounding box on best matches in BF MATCHER using Python?
Ali110
  • 151
  • 1
  • 1
  • 7
11
votes
3 answers

OpenCV feature matching for multiple images

How can I optimise the SIFT feature matching for many pictures using FLANN? I have a working example taken from the Python OpenCV docs. However this is comparing one image with another and it's slow. I need it to search for features matching in a…
Jafu
  • 470
  • 2
  • 6
  • 19
10
votes
1 answer

OpenCV Python Feature Detection: how to provide a mask? (SIFT)

I am building a simple project in Python3, using OpenCV3, trying to match jigsaw pieces to the "finished" jigsaw image. I have started my tests by using SIFT. I can extract the contour of the jigsaw piece and crop the image but since most of the…
Michał Gacka
  • 2,935
  • 2
  • 29
  • 45
10
votes
2 answers

What is a vocabulary tree and how to build one?

I'm reading a lot about vocabulary trees when it comes to fast queries for similar images or texts in big databases. But I couldn't find any good (easy to understand) description on what such a vocabulary tree is and how to build one of features.
dan
  • 371
  • 1
  • 4
  • 8
10
votes
1 answer

ValueError: cannot copy sequence with size 2 to array axis with dimension 4

Can any one explain to me where is this error come from? and what does it mean? and how can I fix that? Maybe my question is so general! sorry but I don't know what should I put more here! :P Error: Traceback (most recent call last): File…
Aress
  • 177
  • 1
  • 5
  • 11
9
votes
2 answers

How to get a rectangle around the target object using the features extracted by SIFT in OpenCV

I'm doing project in OpenCV on object detection which consists of matching the object in template image with the reference image. Using SIFT algorithm the features get acurately detected and matched but I want a rectagle around the matched…
Punit
  • 149
  • 3
  • 9
9
votes
5 answers

Can't use SIFT in Python OpenCV v4.20

I am using OpenCV v4.20 and PyCharm IDE. I want to use SIFT algorithm. But I get this error. I looked for solutions of this error on the internet but none of them did help me. Do you know the solution of this error? (With pip I can install at least…
Yunus Emre Üzmez
  • 113
  • 1
  • 1
  • 8
9
votes
1 answer

Searching an Image Database Using SIFT

Several questions have been asked about the SIFT algorithm, but they all seem focussed on a simple comparison between two images. Instead of determining how similar two images are, would it be practical to use SIFT to find the closest matching image…
Cerin
  • 60,957
  • 96
  • 316
  • 522
1
2
3
55 56