Giter Club home page Giter Club logo

Comments (7)

YachiZhang avatar YachiZhang commented on July 21, 2024 2

I add some codes to process the float point descriptors, and create a pull request. You can see the codes.

from dbow3.

vovaekb avatar vovaekb commented on July 21, 2024

Thank you very much @YachiZhang! I will try once again and let you know whether it helped.

from dbow3.

vovaekb avatar vovaekb commented on July 21, 2024

I pulled last updates from the repo, rebuilt the DBow3 shared library and updated my project. Sadly the problem is still there.

from dbow3.

YachiZhang avatar YachiZhang commented on July 21, 2024

when using vectorcv::Mat ,you should use Mat.clone(). If the weights in the training result are all 0,the training result may be wrong.

from dbow3.

vovaekb avatar vovaekb commented on July 21, 2024

Thank you for clarification! I will try that.

from dbow3.

vovaekb avatar vovaekb commented on July 21, 2024

I changed the code with using Mat.clone() but still have the problem. I use the Mat.clone() like that:

void calculateFeatures(PointInTPtr& in, PointInTPtr& keypoints, NormalTPtr& normals, cv::Mat& features)
    {
        // Calculate features
        ...

        cv::Mat features_tmp (fpfhs->points.size(), dimensionality, CV_32F);

        for(size_t j = 0; j < fpfhs->points.size(); j++)
        {
            for(int idx = 0; idx < dimensionality; idx++)
            {
                features_tmp.at<float>(j, idx) = fpfhs->points[j].histogram[idx];
            }
        }

        features = features_tmp.clone();
    }

and

void loadFeatures(std::string path, cv::Mat& features)
    {
        // Load descriptors from the file
        ...

        features.create(features_cloud->points.size(), dimensionality, CV_32F); // CV_32FC1

        for(size_t j = 0; j < features_cloud->points.size(); j++)
        {
            for(int idx = 0; idx < dimensionality; idx++)
            {
                features.at<float>(j, idx) = features_cloud->points[j].histogram[idx];
            }
        }

    }
cv::Mat frame_features;
feature_estimator->calculateFeatures(sample_cloud, keypoints, normals, frame_features);
training_features[i] = frame_features.clone();
...
}
else
{
cv::Mat frame_features;
feature_estimator->loadFeatures(descr_file, frame_features);
training_features[i] = frame_features.clone();

Is it correct?

from dbow3.

wxt-github avatar wxt-github commented on July 21, 2024

I recently researched the FPFH descriptor using Lidar. But when I use the DBOW3 library, I can't get the correct result. I saw that you are also studying this aspect in github. Is it convenient to talk to you? @vovaekb

from dbow3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.