I need to calculate the SIFT descriptors for given features from the Harris Corner detection in OpenCV. How would I do that? Could you provide me some code examples to modify the SIFT-compute method?
My code so far:
import cv2 as cv
img = cv.imread('example_image.png')
gray = cv.cvtColor(img, cv.COLOR_BGR2GRAY)
dst = cv.cornerHarris(gray, 2, 3, 0.05)
dst = cv.dilate(dst, None)
And now I want to add something like this:
sift = cv.SIFT_create()
sift.compute(#Pass Harris corner features here)
Is this possible? I searched for a while, but I couldn't find anything. Thank you guys.
There was an answer to this topic already here:
How do I create KeyPoints to compute SIFT?
The solution: