OpenCV version: 4.12.0
I added “‘SIFT’: [‘create’],” to features2d in opencv_js.config.py. However, after building, references to cv.SIFT are still undefined. I also added the opencv_contrib add-on module and enabled --cmake_option=“-DOPENCV_ENABLE_NONFREE=ON”, but this did not resolve the issue.
here is a previous thread on getting SIFT and the FLANN-based matcher to build for javascript:
It links to this issue, where someone explains what’s needed to make FLANN available. To me it sounds as if the procedure needs little adaptation to work for SIFT:
Perhaps try to include more than just the create method.
When in doubt, you could add a post to the other thread, directly pinging the relevant user by typing an @ and then their name. After typing the @, autocompletion should pop up.
I have read these two posts, but the problem does not seem to be solved. I tried to add the SITF whitelist to be consistent with ORB, but I can only use the ORB algorithm and cannot use the SIFT algorithm. I understand that since the patent expires in 2020, SIFT should have been included in the main library, but I still can’t use it. Perhaps you can provide me with an opencv.js file
I didn’t use FLANN, but BFMatcher. Now I use it after ORB. My feature points are around 500, and I think BFMatcher is better than it.
you could open an issue, asking for inclusion of SIFT in opencv.js. to my knowledge, no such issue exists yet.
SIFT is in features2d, i.e. the main repo. it used to be in xfeatures2d (contrib repo) when it was still under patent protection.
newer feature descriptors are faster and at least as good as SIFT. I’ve been using AKAZE for a long time. even better ones might have been developed since. some of those are ML/DNN-based, so if you browse the dnn module or its examples, you might find some.
OK, thank you for your answer. I will suggest SIFT to be included in the whitelist on GitHub. My original intention was to extract complex graphic features composed of lines, but it seems that many algorithms are not ideal, combined with the Lowe ratio test.