Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot Reproduce OpenCV Descriptors #153

Open
axbycc-mark opened this issue Apr 6, 2024 · 0 comments
Open

Cannot Reproduce OpenCV Descriptors #153

axbycc-mark opened this issue Apr 6, 2024 · 0 comments

Comments

@axbycc-mark
Copy link

axbycc-mark commented Apr 6, 2024

Describe the bug
First of all thanks for the library, it's really fast! I'm having trouble, however, getting descriptors that match OpenCVs. I'm not sure if this is a bug or if I'm just not understanding how to use PopSift.

To Reproduce
I'm constructing a popsift::Config object by directly reading the config from a cv::SIFT object as follows.

    popsift::Config config;
    config.setMode(popsift::Config::OpenCV);
    config.setFilterSorting("down");		
    config.setFilterMaxExtrema(cv_sift->getNFeatures());
    config.levels = cv_sift->getNOctaveLayers();
    config.sigma = cv_sift->getSigma();
    config.setThreshold(cv_sift->getContrastThreshold());
    config.setEdgeLimit(cv_sift->getEdgeThreshold());
    config.setNormMode(popsift::Config::Classic);

Note I set the norm mode to classic, since OpenCV does not use RootSift.

I have run both SiftPop and OpenCV on the same picture. The set of keypoints detected are similar, but not exactly the same. I have selected a particular point in the image which seems to have been detected by both algorithms and visualized the corresponding descriptor as a bar chart.
image

You can see that the scales on both histograms are very different. The OpenCV version values in the range [0, 130], while PopSift returns values in the range [0, 0.23].
image

Moreover if we zoom in on the histograms, we can see they are qualitatively different.
image

For example, bin 30 is relatively low in OpenCV, but very high in PopSift.

Expected behavior
Descriptors would be closer to OpenCVs

Desktop (please complete the following and other pertinent information):

  • OS: Windows 10
  • PopSift version: 4b4b247
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant