Skip to content

Cannot Reproduce OpenCV Descriptors #153

@axbycc-mark

Description

@axbycc-mark

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions